.saz-toast-container {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    max-width: 360px;
}

.saz-toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 240px;
    max-width: 360px;
    padding: 12px 16px;
    border-radius: 4px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: saz-toast-slide-in 0.2s ease-out;
}

.saz-toast-success {
    background-color: #28a745;
}

.saz-toast-error {
    background-color: #dc3545;
}

.saz-toast-message {
    flex: 1;
    white-space: pre-line;
    font-size: 14px;
}

.saz-toast-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    opacity: 0.8;
    /* The same 44px floor every other control in the app meets. A close button is the one control
       on a toast, and it was an 11px glyph. */
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.saz-toast-close:hover {
    opacity: 1;
}

.saz-toast-close:focus {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

/* Below Bootstrap's sm breakpoint the toast spans the screen with a small inset, instead of a
   fixed 360px box pinned to a corner. A 360px box does not fit a 375px viewport once the 16px
   corner offsets are counted, and a phone has no corner to spare anyway. */
@media (max-width: 575.98px) {
    .saz-toast-container {
        left: 8px;
        right: 8px;
        bottom: 8px;
        max-width: none;
        align-items: stretch;
    }

    .saz-toast {
        min-width: 0;
        max-width: none;
        width: 100%;
    }
}

@keyframes saz-toast-slide-in {
    from {
        transform: translateX(16px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* The always-present live regions showToast() announces through. Visually hidden, but NOT
   `display: none` or `visibility: hidden` - either of those removes an element from the
   accessibility tree entirely, which would silence the very thing they exist for. This is the
   standard clip-rect pattern (Bootstrap's own .visually-hidden does the same). */
.saz-toast-announcer {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
