/* ========================================
   Authentication Modal Styles
   Nordic Design - Minimalist & Clean
   ======================================== */

/* ========================================
   1. Modal Base Styles
   ======================================== */

/* Modal Container */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.auth-modal.show {
    display: flex;
    opacity: 1;
}

/* Background Overlay - Nordic minimalist style */
.auth-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Modal Body - Clean white Nordic style */
.auth-modal-content {
    position: relative;
    background: #FAF9F6;
    max-width: 460px;
    width: 90%;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 1;
}

.auth-modal.show .auth-modal-content {
    transform: scale(1);
}

/* Close Button - Minimalist circular */
.auth-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 0;
}

.auth-modal-close:hover {
    background: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.auth-modal-close::before,
.auth-modal-close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: #495057;
    border-radius: 1px;
}

.auth-modal-close::before {
    transform: rotate(45deg);
}

.auth-modal-close::after {
    transform: rotate(-45deg);
}

/* ========================================
   2. Modal Header
   ======================================== */

.auth-modal-header {
    padding: 50px 50px 30px;
    text-align: center;
}

.auth-modal-title {
    font-family: 'Century Gothic Bold', sans-serif;
    font-size: 32px;
    font-weight: normal;
    color: #495057;
    margin: 0 0 10px;
    letter-spacing: 0.5px;
}

.auth-modal-subtitle {
    font-family: 'League Spartan', sans-serif;
    font-size: 15px;
    color: #6c757d;
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   3. Form Container
   ======================================== */

.auth-modal-body {
    padding: 0 50px 50px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   4. Form Fields - Nordic Clean Design
   ======================================== */

.auth-form-group {
    margin-bottom: 24px;
}

.auth-form-label {
    font-family: 'Century Gothic Bold', sans-serif;
    font-size: 14px;
    color: #495057;
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.3px;
}

.auth-form-input {
    width: 100%;
    height: 50px;
    padding: 12px;
    font-family: 'League Spartan', sans-serif;
    font-size: 16px;
    color: #495057;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 2px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.auth-form-input:focus {
    outline: none;
    border-color: rgb(73, 80, 87);
    background: #ffffff;
    box-shadow: 0 0 0 3.2px rgba(0, 0, 0, 0.1);
}

.auth-form-input::placeholder {
    color: #adb5bd;
}

/* Input States */
.auth-form-input.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.auth-form-input.success {
    border-color: #28a745;
}

/* Error Message */
.auth-form-error {
    font-family: 'League Spartan', sans-serif;
    font-size: 13px;
    color: #dc3545;
    margin-top: 6px;
    display: none;
}

.auth-form-error.show {
    display: block;
}

/* ========================================
   5. Checkbox & Remember Me
   ======================================== */

.auth-form-checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.auth-form-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #495057;
}

.auth-form-checkbox-label {
    font-family: 'League Spartan', sans-serif;
    font-size: 14px;
    color: #6c757d;
    cursor: pointer;
    user-select: none;
}

/* ========================================
   6. Buttons - Nordic Minimalist Style
   ======================================== */

.auth-form-submit {
    width: 100%;
    height: 54px;
    font-family: 'Century Gothic Bold', sans-serif;
    font-size: 16px;
    color: #ffffff;
    background: #495057;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.auth-form-submit:hover {
    background: #343a40;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(73, 80, 87, 0.3);
}

.auth-form-submit:active {
    transform: translateY(0);
}

.auth-form-submit:disabled {
    background: #dee2e6;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading State */
.auth-form-submit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.auth-form-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loading Spinner (inline in button) */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

/* ========================================
   7. Footer Links - Clean Typography
   ======================================== */

.auth-form-footer {
    text-align: center;
    margin-top: 24px;
}

.auth-form-link {
    font-family: 'League Spartan', sans-serif;
    font-size: 14px;
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-form-link:hover {
    color: #495057;
    text-decoration: underline;
}

.auth-form-divider {
    margin: 20px 0;
    text-align: center;
    font-family: 'League Spartan', sans-serif;
    font-size: 14px;
    color: #adb5bd;
}

.auth-form-switch {
    font-family: 'League Spartan', sans-serif;
    font-size: 14px;
    color: #6c757d;
    text-align: center;
    margin-top: 20px;
}

.auth-form-switch-link {
    color: #495057;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.auth-form-switch-link:hover {
    text-decoration: underline;
}

/* ========================================
   8. Responsive Design
   ======================================== */

@media (max-width: 576px) {
    .auth-modal-content {
        max-width: 100%;
        width: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .auth-modal-header {
        padding: 40px 30px 24px;
    }
    
    .auth-modal-title {
        font-size: 28px;
    }
    
    .auth-modal-body {
        padding: 0 30px 40px;
    }
    
    .auth-modal-close {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
    }
}

/* ========================================
   9. Accessibility
   ======================================== */

.auth-form-input:focus-visible {
    outline: 2px solid #495057;
    outline-offset: 2px;
}

.auth-form-submit:focus-visible {
    outline: 2px solid #495057;
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

