/* ========================================
   Registration Page Styles
   Modern, Clean UI inspired by Google/Airbnb
   ======================================== */

:root {
    --primary-color: #2cac6e;
    --primary-dark: #0b7e88;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #dee2e6;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* Container */
.register-container {
    min-height: calc(100vh - 72px); /* Subtract navbar height */
    background: #eaefeb8f;
    padding: 40px 0;
}

/* Header Section */
.register-header {
    margin-bottom: 40px;
}

.register-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.register-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.help-link-container {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    gap: 10px;

    @media (min-width: 992px) {
        align-items: flex-end;
        flex-direction: column;
        justify-content: flex-start;
    }
}

/* Language Switcher */
.language-switcher {
    text-align: right;
}

.lang-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-block;
}

.lang-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.lang-link i {
    margin-right: 5px;
}

.help-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.help-link:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.help-link i {
    margin-right: 5px;
}

.help-link-small {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.help-link-small:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.help-link-small i {
    margin-right: 3px;
}

/* Card */
.register-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .register-card {
        padding: 20px;
    }
}

/* Form Sections */
.form-section {
    margin-bottom: 35px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--white);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.1rem rgba(44, 172, 110, 0.15) !important;
    outline: none !important;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: none;
}

.form-control.is-invalid:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

/* Input Group */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}

.input-group .form-control {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.input-group-append {
    margin-left: 0;
    display: flex;
    align-items: stretch;
}

.input-group-append .btn {
    border: 1px solid var(--border-color);
    background-color: var(--white);
    color: var(--text-secondary);
    padding: 0 12px;
    border-radius: 0 4px 4px 0;
    min-width: 40px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin: 0;
}

.input-group-append .btn:hover {
    background-color: var(--light-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.input-group-append .btn:focus {
    box-shadow: none !important;
    border-color: var(--primary-color) !important;
    outline: none !important;
}

.input-group-append .btn:active {
    background-color: var(--light-bg);
}

.input-group .form-control:focus {
    z-index: 2;
    border-color: var(--primary-color) !important;
    box-shadow: none !important;
}

.input-group .form-control:focus + .input-group-append .btn {
    border-color: var(--primary-color) !important;
    z-index: 2;
    box-shadow: none !important;
}

/* Form Text */
.form-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Invalid Feedback */
.invalid-feedback {
    font-size: 0.875rem;
    color: var(--danger-color);
    margin-top: 6px;
}

.invalid-feedback i {
    margin-right: 5px;
}

/* Alert */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 15px 20px;
    margin-bottom: 25px;
}

.alert i {
    margin-right: 8px;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

/* Form Actions */
.form-actions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.form-actions .btn {
    margin-bottom: 15px;
}

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary-color) !important;
    color: var(--white);
}

.btn-primary:hover {
    background: #29925f !important;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.05rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Modal */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow-hover);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 25px;
    background: linear-gradient(135deg, #2cac6e 0%, #28a064 100%);
    color: var(--white);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-header .close {
    color: var(--white);
    opacity: 0.8;
    text-shadow: none;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 10px 20px;
}

/* Alpine.js x-cloak */
[x-cloak] {
    display: none !important;
}

/* Responsive */
@media (max-width: 991px) {
    .register-title {
        font-size: 2rem;
    }

    .register-subtitle {
        font-size: 1rem;
    }

    .form-section {
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    .register-title {
        font-size: 1.75rem;
    }

    .register-subtitle {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

/* Loading Spinner */
.fa-spinner {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.close:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Success Page Styles (if needed) */
.success-container {
    min-height: calc(100vh - 72px); /* Subtract navbar height */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f7fa;
    padding: 40px 0;
}

.success-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 50px 40px;
    text-align: center;
    max-width: 600px;
    margin-top: 130px;
}

.success-icon {
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    animation: successPulse 0.5s ease-out;
}

.success-icon i {
    color: var(--white);
    font-size: 19px;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.success-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}
