/* ==========================================
   Auth Overlay & Modal Styles
   ========================================== */

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.auth-modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.auth-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.auth-modal-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: var(--space-2xl);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-modal:not(.hidden) .auth-modal-card {
    transform: translateY(0);
}

.auth-modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: var(--fs-md);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-full);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.auth-modal-logo {
    text-align: center;
    margin-bottom: var(--space-sm);
}

.auth-modal-logo img {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.5));
}

.auth-modal-title {
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-xs);
}

.auth-modal-sub {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-tabs {
    display: flex;
    background: var(--bg-app);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: var(--space-xl);
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    font-weight: 600;
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.auth-input {
    width: 100%;
    background: var(--bg-app);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: var(--fs-sm);
    transition: all 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.auth-input::placeholder {
    color: var(--text-muted);
}

.auth-submit {
    width: 100%;
    padding: 14px;
    font-size: var(--fs-sm);
    font-weight: 600;
    margin-top: 8px;
}

.auth-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: var(--bg-app);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-google:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: var(--space-md) 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.auth-divider span {
    padding: 0 var(--space-md);
    color: var(--text-muted);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Auth required styling for missing permission */
.auth-required-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-3xl) var(--space-md);
    min-height: 50vh;
}

.auth-required-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.8;
}

.auth-required-title {
    font-size: var(--fs-xl);
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-weight: 700;
}

.auth-required-desc {
    font-size: var(--fs-md);
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.6;
    margin-bottom: var(--space-xl);
}

/* Auth Terms Link */
.auth-terms {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    text-align: center;
    margin-top: var(--space-md);
    line-height: 1.5;
}

.auth-terms a {
    color: var(--primary);
    text-decoration: none;
}

.auth-terms a:hover {
    text-decoration: underline;
}
