/* ============================================
   POPUP AUTHENTICATION MODAL STYLES
   Created: January 16, 2026
   ============================================ */

/* Overlay Backdrop */
.auth-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.auth-popup-overlay.active {
    display: flex;
}

/* Modal Container */
.auth-popup-container {
    position: relative;
    max-width: 500px;
    width: 100%;
    background: linear-gradient(145deg, #fff 0%, #f8fafe 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
    margin: auto;
    max-height: 90vh;
    overflow-y: auto;
}

/* Close Button */
.auth-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f3f8;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    color: #666;
    font-size: 18px;
}

.auth-popup-close:hover {
    background: #f26722;
    color: white;
    transform: rotate(90deg);
}

/* Content Area */
.auth-popup-content {
    padding: 40px 30px 30px 30px;
}

/* Header with gradient bar */
.auth-popup-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f26722, #ff6b3d, #f26722);
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
    border-radius: 20px 20px 0 0;
}

/* Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: #f1f3f8;
    border-radius: 15px;
    padding: 6px;
    position: relative;
}

.auth-tab {
    flex: 1;
    padding: 14px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    border-radius: 12px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #f26722, #ff6b3d);
    box-shadow: 0 8px 25px rgba(242, 103, 34, 0.3);
    transform: translateY(-2px);
}

.auth-tab:hover:not(.active) {
    color: #333;
    background-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
}

/* Tab Content */
.auth-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.auth-tab-content.active {
    display: block;
}

/* Form Styles */
.auth-popup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group label i {
    margin-right: 6px;
    color: #f26722;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    background-color: #f8fafc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #f26722;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(242, 103, 34, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #a0aec0;
}

/* Password Toggle */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    padding-right: 50px !important;
}

.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: #718096;
    font-size: 18px;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: #f26722;
    background-color: rgba(242, 103, 34, 0.1);
}

/* Password Hint */
.password-hint {
    display: block;
    margin-top: 6px;
    color: #718096;
    font-size: 12px;
    font-weight: 400;
}

.password-hint i {
    margin-right: 4px;
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-checkbox label {
    margin: 0;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    text-transform: none;
    font-weight: 500;
}

/* Auth Button */
.auth-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #f26722, #ff6b3d);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(242, 103, 34, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-button:hover {
    background: linear-gradient(135deg, #e05b17, #f26722);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 103, 34, 0.4);
}

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Social Login */
.social-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
    color: #718096;
    font-size: 14px;
}

.social-divider::before,
.social-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}

.social-divider::before {
    left: 0;
}

.social-divider::after {
    right: 0;
}

.social-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.social-button {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
}

.social-button.google {
    color: #ea4335;
}

.social-button.google:hover {
    background: #ea4335;
    color: white;
    border-color: #ea4335;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 67, 53, 0.3);
}

.social-button i {
    font-size: 18px;
}

/* reCAPTCHA Container */
.recaptcha-container {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

/* Alert Messages */
.auth-alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: slideIn 0.3s ease;
}

.auth-alert.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.auth-alert.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.auth-alert i {
    font-size: 18px;
}

/* Loading Spinner */
.auth-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.auth-loading.active {
    display: block;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #f26722;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-popup-overlay {
        padding: 0;
        align-items: flex-start;
    }
    
    .auth-popup-container {
        max-width: 100%;
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
        margin: 0;
        max-height: none;
    }
    
    .auth-popup-content {
        padding: 50px 20px 30px 20px;
    }
    
    .auth-popup-close {
        top: 10px;
        right: 10px;
    }
    
    .auth-tab {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .form-group input {
        padding: 12px 16px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .social-button {
        width: 100%;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .auth-popup-content {
        padding: 50px 15px 20px 15px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .auth-button {
        padding: 14px;
        font-size: 15px;
    }
}

/* Notification Toast */
.auth-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    animation: slideInRight 0.3s ease;
}

.auth-notification.success {
    border-left: 4px solid #4CAF50;
}

.auth-notification.success i {
    color: #4CAF50;
    font-size: 24px;
}

.auth-notification.error {
    border-left: 4px solid #f44336;
}

.auth-notification.error i {
    color: #f44336;
    font-size: 24px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}
