#auth-overlay {
    font-family: "Inter", sans-serif;
}

.auth-animate-fade {
    animation: auth-fade-in 0.3s ease-out forwards;
}

@keyframes auth-fade-in {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#auth-overlay :is(button, input, a):focus-visible {
    outline: 3px solid rgba(26, 60, 94, 0.45);
    outline-offset: 3px;
}

#auth-overlay button[disabled] {
    cursor: wait;
    opacity: 0.65;
}

#auth-overlay [aria-busy="true"] {
    pointer-events: none;
}

#auth-overlay [data-message-kind="success"] {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
    color: #166534;
}

#auth-overlay [data-message-kind="error"] {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

@media (max-width: 640px) {
    #auth-overlay {
        align-items: stretch;
        overflow-y: auto;
        padding: 0.75rem;
    }

    #auth-overlay > div {
        min-height: auto;
        margin: auto 0;
    }

    #auth-overlay > div > div:last-child {
        min-height: auto;
        padding: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-animate-fade {
        animation: none;
    }

    #auth-overlay * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
