/* ====================================================================
   LOGIN/SIGNUP/FORGOT PASSWORD MODAL STYLES
   Modern, clean authentication modal interfaces with breathing effects
   ==================================================================== */

/* ====================================================================
   MODERN LOGIN MODAL STYLES
   ==================================================================== */

.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-modal-overlay.show {
    opacity: 1;
}

.login-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    max-width: 400px;
    width: 90%;
    max-height: 70vh;
    overflow: hidden;
    transform: scale(0.8) translateY(40px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.login-modal-overlay.show .login-modal {
    transform: scale(1) translateY(0);
}


.login-modal-content {
    padding: 2rem 2rem;
    text-align: center;
    position: relative;
}

/* Modern Icon Container */
.login-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

/* Success State */
.login-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    animation: success-bounce 0.6s ease-out;
    box-shadow:
        0 0 20px rgba(16, 185, 129, 0.4),
        0 0 40px rgba(16, 185, 129, 0.2);
}



/* Icon Content */
.login-icon i {
    font-size: 3.5rem !important;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
    position: relative;
    width: auto !important;
    height: auto !important;
    border: none !important;
    display: inline-block !important;
}

/* Modern Spinner */
.login-icon .fa-circle-notch {
    font-size: 4.5rem !important;
    animation: spin 1s linear infinite;
    width: auto !important;
    height: auto !important;
    border: none !important;
    display: inline-block !important;
}

/* Override fallback styles */
.login-icon .fa-circle-notch::before {
    display: block !important;
}

/* Typography */
.login-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 1rem 0;
    letter-spacing: -0.025em;
}

.login-modal-message {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 2.5rem 0;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Modern Button */
.login-retry-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 15px rgba(102, 126, 234, 0.3),
        0 0 0 0 rgba(102, 126, 234, 0.5);
    position: relative;
    overflow: hidden;
    min-width: 140px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 auto;
    display: block;
}

.login-retry-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-retry-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px rgba(102, 126, 234, 0.4),
        0 0 0 4px rgba(102, 126, 234, 0.1);
}

.login-retry-btn:hover::before {
    left: 100%;
}

.login-retry-btn:active {
    transform: translateY(-1px);
    box-shadow:
        0 4px 15px rgba(102, 126, 234, 0.3),
        0 0 0 2px rgba(102, 126, 234, 0.2);
}

.login-retry-btn:focus {
    outline: none;
    box-shadow:
        0 4px 15px rgba(102, 126, 234, 0.3),
        0 0 0 4px rgba(102, 126, 234, 0.2);
}

/* ====================================================================
   FORGOT PASSWORD MODAL STYLES
   ==================================================================== */

.forgot-password-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.forgot-password-modal-overlay.show {
    opacity: 1;
}

.forgot-password-modal {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 90%;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.forgot-password-modal-overlay.show .forgot-password-modal {
    transform: scale(1) translateY(0);
}

.forgot-password-modal-content {
    padding: 0;
}

.forgot-password-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-password-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.forgot-password-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.forgot-password-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.forgot-password-body {
    padding: 2rem;
    text-align: center;
}

.forgot-password-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 2rem;
}

.forgot-password-description {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 2rem 0;
}

.forgot-password-form {
    text-align: left;
}

.forgot-password-form .form-group {
    margin-bottom: 1.5rem;
}

.forgot-password-form label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.forgot-password-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.forgot-password-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.forgot-password-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.forgot-password-actions .btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forgot-password-actions .btn-secondary {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.forgot-password-actions .btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.forgot-password-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.forgot-password-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.forgot-password-actions .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* ====================================================================
   RESPONSIVE DESIGN
   ==================================================================== */

@media (max-width: 768px) {
    .login-modal,
    .forgot-password-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .login-modal-content,
    .forgot-password-body {
        padding: 1.5rem;
    }
    
    .forgot-password-header {
        padding: 1rem 1.5rem;
    }
    
    .forgot-password-title {
        font-size: 1.3rem;
    }
    
    .login-modal-title {
        font-size: 1.3rem;
    }
    
    .login-icon,
    .forgot-password-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .login-icon i,
    .login-icon .fa-circle-notch {
        font-size: 2.5rem;
    }
    
    .forgot-password-icon {
        font-size: 1.5rem;
    }
    
    .forgot-password-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .forgot-password-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ====================================================================
   LOADING ANIMATIONS
   ==================================================================== */


/* ====================================================================
   SUCCESS/ERROR STATE COLORS
   ==================================================================== */

.login-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}



/* ====================================================================
   ACCESSIBILITY IMPROVEMENTS
   ==================================================================== */

.login-modal-overlay:focus-within,
.forgot-password-modal-overlay:focus-within {
    outline: none;
}

.login-retry-btn:focus,
.forgot-password-actions .btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-modal,
    .forgot-password-modal {
        border: 2px solid #000;
    }
    
    .login-icon,
    .forgot-password-icon {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .login-modal-overlay,
    .forgot-password-modal-overlay,
    .login-modal,
    .forgot-password-modal,
    .login-retry-btn,
    .forgot-password-actions .btn {
        transition: none;
    }
    
    .fa-spin {
        animation: none;
    }
}


/* ====================================================================
   MODERN ANIMATIONS AND KEYFRAMES
   ==================================================================== */

/* Shimmer effect for top border */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Success bounce animation */
@keyframes success-bounce {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}



/* Modern fade-in animation */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply fade-in to content elements */
.login-modal-content > * {
    animation: fadeInUp 0.6s ease-out forwards;
}

.login-modal-content > *:nth-child(1) { animation-delay: 0.1s; }
.login-modal-content > *:nth-child(2) { animation-delay: 0.2s; }
.login-modal-content > *:nth-child(3) { animation-delay: 0.3s; }
.login-modal-content > *:nth-child(4) { animation-delay: 0.4s; }
