/* Shared feedback for every screen. Toasts stay out of the document flow,
   stack independently and use one visual language site-wide. */
.site-toast-container {
    position: fixed;
    top: 76px;
    right: 1.25rem;
    z-index: 1095;
    display: flex;
    width: min(390px, calc(100vw - 2rem));
    flex-direction: column;
    gap: .75rem;
    pointer-events: none;
}

.site-toast {
    --toast-accent: #206bc4;
    --toast-soft: #e9f2fc;
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 30px;
    gap: .75rem;
    align-items: center;
    min-height: 76px;
    padding: .85rem .75rem .85rem .9rem;
    overflow: hidden;
    border: 1px solid rgba(31, 45, 61, .1);
    border-left: 4px solid var(--toast-accent);
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 .65rem 1.75rem rgba(31, 45, 61, .18);
    color: #303e67;
    opacity: 0;
    transform: translateX(1.25rem);
    transition: opacity .22s ease, transform .22s ease;
    pointer-events: auto;
}

.site-toast.is-visible { opacity: 1; transform: translateX(0); }
.site-toast.is-leaving { opacity: 0; transform: translateX(1.25rem); }
.site-toast--success { --toast-accent: #2b8a5a; --toast-soft: #e8f6ef; }
.site-toast--info { --toast-accent: #206bc4; --toast-soft: #e9f2fc; }
.site-toast--warning { --toast-accent: #d58a08; --toast-soft: #fff5df; }
.site-toast--error { --toast-accent: #d63939; --toast-soft: #fdecec; }

.site-toast__icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--toast-soft);
    color: var(--toast-accent);
    font-size: 1.3rem;
}

.site-toast__content { min-width: 0; }

.site-toast__title {
    display: block;
    margin-bottom: .1rem;
    color: #25304c;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.25;
}

.site-toast__message {
    display: block;
    color: #637083;
    font-size: .8rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.site-toast__close {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    align-self: start;
    border: 0;
    border-radius: .45rem;
    background: transparent;
    color: #8792a5;
    font-size: 1.05rem;
}

.site-toast__close:hover,
.site-toast__close:focus-visible { background: #f1f3f6; color: #303e67; }
.site-toast__close:focus-visible { outline: 3px solid rgba(32, 107, 196, .2); }

.site-toast__progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--toast-accent);
    transform-origin: left;
    animation: siteToastProgress var(--toast-duration, 5000ms) linear forwards;
}

@keyframes siteToastProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-width: 575.98px) {
    .site-toast-container { top: 68px; right: 1rem; left: 1rem; width: auto; }
}

body.auth-bg .site-toast-container { top: 1.25rem; }

@media (max-width: 575.98px) {
    body.auth-bg .site-toast-container { top: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .site-toast { transition: none; }
    .site-toast__progress { animation: none; }
}
