@charset "UTF-8";

/**
 * Modern Registration Page
 * 
 * Purpose: Professional, modern registration form design with validation
 * Features:
 * - Real-time validation feedback
 * - Loading states
 * - Password strength indicator
 * - Responsive design
 * - Accessible form fields
 * 
 * @version 1.0.0
 * @date 2026-01-25
 */

/* ============================================================
   REGISTRATION SECTION
   ============================================================ */

.register {
    padding: 4rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    min-height: 80vh;
}

.register-box {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.register-box:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
    .register {
        padding: 2rem 0;
    }
    
    .register-box {
        border-radius: 20px;
    }
}

/* ============================================================
   REGISTRATION HEADER
   ============================================================ */

.nx-register-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.nx-register-title {
    font-size: 2.75rem;
    font-weight: 800;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    color: #1d1d1f;
    margin: 0 0 1rem 0;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, #1d1d1f 0%, #4a4a4a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.nx-register-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--bs-primary, #0d6efd), transparent);
    border-radius: 2px;
}

.nx-register-subtitle {
    font-size: 1rem;
    color: #6e6e73;
    margin: 1rem 0 0 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .nx-register-title {
        font-size: 2.25rem;
        letter-spacing: -0.025em;
    }
    
    .nx-register-title::after {
        width: 50px;
        height: 3px;
        bottom: -6px;
    }
    
    .nx-register-subtitle {
        font-size: 0.9375rem;
    }
}

/* ============================================================
   FORM GROUPS & FLOATING LABELS
   ============================================================ */

.nx-form-group {
    position: relative;
    width: 100%;
    margin-bottom: 0;
}

.nx-form-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #6e6e73;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    padding: 0 0.5rem;
    z-index: 1;
}

.nx-form-input,
.nx-form-textarea {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: #1d1d1f;
    background: #ffffff !important;
    border: 2px solid #e8e8ed;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.nx-form-input:focus,
.nx-form-textarea:focus {
    border-color: var(--bs-primary, #0d6efd) !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1) !important;
    background: #ffffff !important;
    outline: none !important;
}

.nx-form-input:hover,
.nx-form-textarea:hover {
    background: #ffffff !important;
    border-color: #d1d1d6;
}

.nx-form-input:focus + .nx-form-label,
.nx-form-input:not(:placeholder-shown) + .nx-form-label,
.nx-form-input.has-value + .nx-form-label,
.nx-form-textarea:focus + .nx-form-label,
.nx-form-textarea:not(:placeholder-shown) + .nx-form-label,
.nx-form-textarea.has-value + .nx-form-label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.8125rem;
    color: var(--bs-primary, #0d6efd);
    font-weight: 600;
}

.nx-form-input.has-value:not(:focus) + .nx-form-label {
    color: #6e6e73;
}

.nx-form-input::placeholder,
.nx-form-textarea::placeholder {
    color: transparent;
}

.nx-form-input:focus::placeholder,
.nx-form-textarea:focus::placeholder {
    color: #c7c7cc;
    transition: color 0.3s ease;
}

/* OTP Input Styling */
.nx-otp-input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5rem;
    font-family: 'Courier New', monospace;
}

.nx-otp-input:focus + .nx-form-label,
.nx-otp-input:not(:placeholder-shown) + .nx-form-label,
.nx-otp-input.has-value + .nx-form-label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.8125rem;
    color: var(--bs-primary, #0d6efd);
    font-weight: 600;
}

/* Textarea */
.nx-form-textarea {
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
    min-height: auto;
    height: auto;
}

.nx-form-textarea:focus {
    background: #ffffff !important;
    outline: none !important;
}

.nx-form-textarea:hover {
    background: #ffffff !important;
}

/* Error states */
.nx-form-input.is-invalid,
.nx-form-textarea.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1) !important;
}

.nx-form-input.is-invalid + .nx-form-label,
.nx-form-textarea.is-invalid + .nx-form-label {
    color: #dc3545;
}

/* Success states */
.nx-form-input.is-valid,
.nx-form-textarea.is-valid {
    border-color: var(--bs-primary, #0d6efd) !important;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1) !important;
}

.nx-form-input.is-valid + .nx-form-label,
.nx-form-textarea.is-valid + .nx-form-label {
    color: var(--bs-primary, #0d6efd);
}

/* ============================================================
   PASSWORD STRENGTH INDICATOR
   ============================================================ */

.password-strength {
    margin-top: 0.5rem;
}

.password-strength .progress {
    height: 4px;
    border-radius: 2px;
    background: #e8e8ed;
    overflow: hidden;
}

.password-strength .progress-bar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.password-strength-text {
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* ============================================================
   BUTTON LOADING STATES
   ============================================================ */

.btn-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-spinner .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============================================================
   RESEND OTP TIMER
   ============================================================ */

#resend-otp-link {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#resend-otp-link:hover:not([style*="pointer-events: none"]) {
    text-decoration: underline;
}

.resend-timer {
    font-weight: 500;
}

/* ============================================================
   ERROR MESSAGES
   ============================================================ */

.text-danger {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    min-height: 1.25rem;
}

.text-success {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    min-height: 1.25rem;
}

.text-muted {
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    display: block;
}

/* ============================================================
   READONLY INPUT STYLING
   ============================================================ */

.nx-form-input[readonly] {
    background: #f5f5f7 !important;
    cursor: not-allowed;
}

.nx-form-input[readonly]:focus {
    background: #f5f5f7 !important;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 576px) {
    .nx-form-input,
    .nx-form-textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.875rem;
    }
    
    .nx-otp-input {
        font-size: 1.25rem;
        letter-spacing: 0.25rem;
    }
    
    .register-box {
        padding: 1.5rem 1rem !important;
    }
    
    .nx-form-label {
        top: 0.875rem;
        left: 0.875rem;
        font-size: 0.875rem;
    }
    
    .nx-form-input:focus + .nx-form-label,
    .nx-form-input:not(:placeholder-shown) + .nx-form-label,
    .nx-form-textarea:focus + .nx-form-label,
    .nx-form-textarea:not(:placeholder-shown) + .nx-form-label {
        top: -0.5rem;
        left: 0.625rem;
        font-size: 0.75rem;
    }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.nx-register-input:focus-visible {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nx-register-input.is-valid,
.nx-register-input.is-invalid {
    animation: fadeIn 0.3s ease-out;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .nx-register-input,
    .password-strength .progress-bar {
        transition: none;
        animation: none;
    }
}
