/* Authentication Modal Styles - Wildex Theme */

.auth-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    padding: 20px 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-modal-content {
    position: relative;
    background: #ffffff;
    margin: 0 auto;
    padding: 0;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    display: flex;
    flex-direction: column;
}

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

.auth-modal-header {
    background: linear-gradient(135deg, #F5AD4C 0%, #e69b3a 100%);
    padding: 30px;
    text-align: center;
    position: relative;
}

.auth-modal-header h2 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    font-family: 'Bricolage Grotesque', sans-serif;
}

.auth-modal-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 8px 0 0 0;
}

.auth-close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #ffffff;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
}

.auth-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.auth-modal-body {
    padding: 40px 30px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 150px);
}

.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-form-group {
    margin-bottom: 24px;
}

.auth-form-group label {
    display: block;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Manrope', sans-serif;
}

.auth-form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: 'Manrope', sans-serif;
    background: #f8fafc;
}

.auth-form-group input:focus {
    outline: none;
    border-color: #F5AD4C;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(245, 173, 76, 0.1);
}

.auth-form-group input::placeholder {
    color: #94a3b8;
}

.otp-input-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.otp-input {
    width: 50px !important;
    height: 55px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #F5AD4C;
    padding: 0 !important;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #F5AD4C 0%, #e69b3a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(245, 173, 76, 0.3);
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 173, 76, 0.4);
    background: linear-gradient(135deg, #e69b3a 0%, #d48a1a 100%);
}

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

.auth-btn i {
    font-size: 18px;
}

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

.auth-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

.auth-btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    box-shadow: none;
    margin-top: 12px;
}

.auth-btn-secondary:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-2px);
}

/* Loading Spinner for Buttons */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
    to { transform: rotate(360deg); }
}

.auth-helper-text {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #64748b;
}

.auth-helper-text a {
    color: #F5AD4C;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-helper-text a:hover {
    color: #e69b3a;
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #94a3b8;
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
    padding: 0 16px;
    font-weight: 500;
}

.auth-alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    animation: slideDown 0.3s ease;
}

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

.auth-alert.show {
    display: block;
}

.auth-alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.auth-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.auth-alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.resend-otp-text {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: #64748b;
}

.resend-otp-link {
    color: #F5AD4C;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
}

.resend-otp-link:hover {
    color: #e69b3a;
    text-decoration: underline;
}

.resend-otp-link.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    pointer-events: none;
}

.timer-text {
    color: #F5AD4C;
    font-weight: 600;
}

/* User Profile Dropdown */
.user-profile-dropdown {
    position: relative;
    display: none;
}

.user-profile-dropdown.show {
    display: inline-block;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile-btn:hover {
    border-color: #F5AD4C;
    background: #fffbf5;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5AD4C 0%, #e69b3a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
}

.user-name {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.dropdown-menu-custom {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px;
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.dropdown-menu-custom.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.dropdown-item-custom {
    padding: 12px 16px;
    color: #334155;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 14px;
}

.dropdown-item-custom:hover {
    background: #f8fafc;
    color: #F5AD4C;
}

.dropdown-item-custom i {
    width: 20px;
    text-align: center;
}

/* Responsive */
@media (max-width: 576px) {
    .auth-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .auth-modal-header {
        padding: 25px 20px;
    }

    .auth-modal-header h2 {
        font-size: 24px;
    }

    .auth-modal-body {
        padding: 30px 20px;
    }

    .otp-input {
        width: 45px !important;
        height: 50px;
        font-size: 20px;
    }
}

/* Custom Scrollbar for Modal */
.auth-modal-body::-webkit-scrollbar {
    width: 6px;
}

.auth-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.auth-modal-body::-webkit-scrollbar-thumb {
    background: #F5AD4C;
    border-radius: 10px;
}

.auth-modal-body::-webkit-scrollbar-thumb:hover {
    background: #e69b3a;
}

/* Smooth scrolling */
.auth-modal-body {
    scroll-behavior: smooth;
}
