/* ============================================
   CLIENT AUTH COMMON STYLES
   All common styles for Login and Signup pages
   Change colors/fonts here to update everywhere
   ============================================ */

/* ========== COLOR VARIABLES ========== */
:root {
    /* Blue Theme Colors */
    --primary-blue: #1e40af;
    --light-blue: #3b82f6;
    --bright-blue: #2563eb;
    --dark-blue: #1e3a8a;
    --accent-blue: #60a5fa;
    --blue-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    --blue-gradient-light: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    
    /* Status Colors */
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    
    /* Background & Border Colors */
    --light-bg: #eff6ff;
    --border-color: #bfdbfe;
    --white: #ffffff;
}

/* ========== FONT SETTINGS ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

/* ========== COMMON CONTAINER STYLES ========== */
.auth-container {
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(59, 130, 246, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 480px;
    animation: slideUp 0.6s ease-out;
    position: relative;
}

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

/* ========== FORM TITLE STYLES ========== */
.form-title {
    text-align: center;
    margin-bottom: 35px;
}

.form-title h1 {
    font-weight: 800;
    font-size: 2.2rem;
    background: var(--blue-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.form-title p {
    font-size: 0.95rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* ========== FORM STYLES ========== */
.auth-form {
    padding: 50px 40px 40px;
    display: flex;
    flex-direction: column;
}

.auth-form.scrollable {
    max-height: 85vh;
    overflow-y: auto;
    justify-content: flex-start;
}

.auth-form.non-scrollable {
    flex: 1;
    justify-content: center;
    overflow: hidden;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-blue);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ========== INPUT FIELD STYLES ========== */
.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-blue);
    font-size: 1.2rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 16px 50px 16px 50px;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--light-bg);
    color: var(--dark-blue);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: var(--bright-blue);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), 0 4px 12px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

.form-input:focus + .input-icon,
.form-input:not(:placeholder-shown) + .input-icon {
    color: var(--bright-blue);
}

/* Password Toggle Button */
.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--bright-blue);
    transform: translateY(-50%) scale(1.1);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

/* ========== BUTTON STYLES ========== */
.auth-btn {
    width: 100%;
    background: var(--blue-gradient);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.auth-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.google-btn {
    width: 100%;
    background: white;
    color: var(--dark-blue);
    border: 2px solid var(--border-color);
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Inter', sans-serif;
}

.google-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--bright-blue);
    background: var(--light-bg);
}

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

.google-icon {
    width: 22px;
    height: 22px;
}

/* ========== DIVIDER STYLES ========== */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid var(--border-color);
}

.divider span {
    padding: 0 16px;
    background: white;
}

/* ========== MESSAGE STYLES ========== */
.error-message {
    background: #fef2f2;
    border: 2px solid #fecaca;
    color: var(--danger-color);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

.error-message.show {
    display: block;
}

.success-message {
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    color: var(--success-color);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
    font-weight: 500;
}

.success-message.show {
    display: block;
}

/* ========== FIELD ERROR MESSAGES ========== */
.field-error {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 6px;
    padding-left: 4px;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.field-error.show {
    display: block;
}

.form-input.error {
    border-color: var(--danger-color);
    background-color: #fef2f2;
}

.form-input.error:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* ========== LOADING STATE ========== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .auth-btn {
    position: relative;
}

.loading .auth-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== LINK STYLES ========== */
.auth-link {
    text-align: center;
    margin-top: 20px;
    color: var(--secondary-color);
    font-size: 0.95rem;
    font-weight: 500;
}

.auth-link a {
    color: var(--bright-blue);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.auth-link a:hover {
    text-decoration: underline;
    color: var(--primary-blue);
}

/* ========== RESPONSIVE STYLES ========== */
@media (max-width: 768px) {
    .auth-container {
        max-width: 95%;
        border-radius: 20px;
    }
    
    .auth-form {
        padding: 40px 30px 35px;
    }
    
    .auth-form.scrollable {
        max-height: 90vh;
    }
    
    .form-title h1 {
        font-size: 1.9rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        max-width: 100%;
        border-radius: 0;
    }
    
    .auth-form {
        padding: 35px 25px 30px;
    }
    
    .auth-form.scrollable {
        max-height: 100vh;
    }
    
    .form-title h1 {
        font-size: 1.7rem;
    }
    
    .form-title p {
        font-size: 0.9rem;
    }
    
    .form-label {
        font-size: 0.85rem;
    }
    
    .form-input {
        padding: 14px 45px 14px 45px;
        font-size: 0.95rem;
    }
    
    .auth-btn,
    .google-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* ========== CUSTOM SCROLLBAR ========== */
.auth-form.scrollable::-webkit-scrollbar {
    width: 6px;
}

.auth-form.scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.auth-form.scrollable::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.auth-form.scrollable::-webkit-scrollbar-thumb:hover {
    background: var(--light-blue);
}

/* ========== VERIFICATION CODE POPUP ========== */
.verification-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.verification-popup.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

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

.verification-popup-content {
    background: var(--white);
    border-radius: 24px;
    padding: 35px 25px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
    position: relative;
    margin: 20px;
}

.verification-popup-title {
    text-align: center;
    margin-bottom: 10px;
}

.verification-popup-title h2 {
    font-weight: 800;
    font-size: 1.8rem;
    background: var(--blue-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.verification-popup-title p {
    font-size: 0.95rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.code-input-container {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 30px 0;
    max-width: 100%;
    padding: 0 5px;
}

.code-input-box {
    flex: 1;
    min-width: 0;
    max-width: 60px;
    height: 55px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-blue);
    background: var(--light-bg);
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    padding: 0;
}

.code-input-box:focus {
    outline: none;
    border-color: var(--bright-blue);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), 0 4px 12px rgba(37, 99, 235, 0.15);
    transform: scale(1.05);
}

.code-input-box.filled {
    border-color: var(--bright-blue);
    background: white;
}

.resend-code-link {
    text-align: center;
    margin-top: 20px;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.resend-code-link a {
    color: var(--bright-blue);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.resend-code-link a:hover {
    text-decoration: underline;
}

.resend-code-link .countdown {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Responsive styles for verification popup */
@media (max-width: 480px) {
    .verification-popup-content {
        padding: 25px 15px;
        max-width: 95%;
        margin: 10px;
    }
    
    .code-input-container {
        gap: 6px;
        padding: 0 2px;
    }
    
    .code-input-box {
        max-width: 45px;
        height: 50px;
        font-size: 1.1rem;
    }
    
    .verification-popup-title h2 {
        font-size: 1.5rem;
    }
    
    .verification-popup-title p {
        font-size: 0.85rem;
    }
}

