/* ==========================================================================
   AUTHENTICATION MODALS & TOP-RIGHT GOOGLE PROMPT STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOP-RIGHT GOOGLE PERMISSION PROMPT BANNER
   -------------------------------------------------------------------------- */
.google-prompt-banner {
    position: fixed;
    top: 84px;
    right: 24px;
    z-index: 1050;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: var(--bg-card, #ffffff);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: promptSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

@keyframes promptSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.google-prompt-banner.closing {
    animation: promptSlideOut 0.3s ease forwards;
}

@keyframes promptSlideOut {
    to {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
}

.google-prompt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.google-prompt-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.google-prompt-logo {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.google-prompt-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
}

.google-prompt-close {
    background: transparent;
    border: none;
    color: var(--text-tertiary, #94a3b8);
    font-size: 1.1rem;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.google-prompt-close:hover {
    background: var(--primary-bg, rgba(99, 102, 241, 0.08));
    color: var(--text-primary, #0f172a);
}

.google-prompt-body {
    font-size: 0.85rem;
    color: var(--text-secondary, #475569);
    line-height: 1.45;
}

.google-prompt-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-google-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-google-action:hover {
    background: #f8f9fa;
    border-color: #d2e3fc;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    color: #202124;
}

.btn-prompt-dismiss {
    padding: 10px 14px;
    background: transparent;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    color: var(--text-secondary, #475569);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-prompt-dismiss:hover {
    background: var(--bg-secondary, #f1f5f9);
}


/* --------------------------------------------------------------------------
   2. AUTH MODAL OVERLAY & CONTAINER
   -------------------------------------------------------------------------- */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 36px 32px;
    position: relative;
    transform: scale(0.95) translateY(15px);
    max-height: 90vh;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-overlay.active .auth-modal-card {
    transform: scale(1) translateY(0);
}

.auth-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-secondary, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-secondary, #475569);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-modal-close:hover {
    background: var(--primary-bg, rgba(99, 102, 241, 0.1));
    color: var(--primary, #6366f1);
    transform: rotate(90deg);
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-modal-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 14px;
    background: var(--gradient-primary, linear-gradient(135deg, #6366f1, #8b5cf6));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.25);
}

.auth-modal-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    margin-bottom: 6px;
}

.auth-modal-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary, #475569);
}

/* --------------------------------------------------------------------------
   3. FORM CONTROLS & BUTTONS
   -------------------------------------------------------------------------- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-tertiary, #94a3b8);
    font-size: 0.95rem;
    pointer-events: none;
}

.form-control-custom {
    width: 100%;
    padding: 12px 14px 12px 40px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary, #0f172a);
    background: var(--bg-secondary, #f1f5f9);
    border: 1.5px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.form-control-custom:focus {
    background: var(--bg-card, #ffffff);
    border-color: var(--primary, #6366f1);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary, #475569);
    cursor: pointer;
}

.remember-me input {
    accent-color: var(--primary, #6366f1);
    width: 16px;
    height: 16px;
}

.btn-auth-submit {
    width: 100%;
    padding: 13px 20px;
    margin-top: 4px;
    background: var(--primary, #6366f1);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-auth-submit:hover {
    background: var(--primary-dark, #4f46e5);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

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

.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-tertiary, #94a3b8);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color, #e2e8f0);
}

.auth-divider span {
    padding: 0 12px;
}

.btn-google-full {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    background: #ffffff;
    color: #3c4043;
    border: 1.5px solid #dadce0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-google-full:hover {
    background: #f8f9fa;
    border-color: #c6c8cc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #202124;
    transform: translateY(-1px);
}

.auth-modal-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary, #475569);
}

.auth-switch-link {
    color: var(--primary, #6366f1);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.auth-switch-link:hover {
    color: var(--primary-dark, #4f46e5);
    text-decoration: underline;
}

/* Alert Message Box inside Modals */
.auth-alert {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.8375rem;
    margin-bottom: 14px;
    display: none;
}

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

.auth-alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.auth-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #10b981;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .google-prompt-banner {
    background: #111128;
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .auth-modal-card {
    background: #111128;
    border-color: #1e1e3f;
}

[data-theme="dark"] .form-control-custom {
    background: #0c0c1d;
    border-color: #1e1e3f;
    color: #f1f5f9;
}

[data-theme="dark"] .btn-google-action,
[data-theme="dark"] .btn-google-full {
    background: #1e1e3f;
    color: #f1f5f9;
    border-color: #2e2e5d;
}

[data-theme="dark"] .btn-google-action:hover,
[data-theme="dark"] .btn-google-full:hover {
    background: #252550;
    color: #ffffff;
}
