/* ===== Page toast (shared, static/js/utils/page-toast.js) =====
   A short message at the bottom centre, above the mobile footer; tones: default (dark), --success, --danger. */
.page-toast {
    position: fixed;
    left: 50%;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    z-index: var(--z-popover);
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 10px 10px 10px 16px;
    border-radius: 10px;
    background: #1f2937;
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateX(-50%);
}

.page-toast--success {
    background: #15803d;
}

.page-toast--danger {
    background: #b91c1c;
}

.page-toast__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-toast__action {
    flex-shrink: 0;
    padding: 4px 10px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: #93c5fd;
    font-weight: 700;
}

.page-toast__action:hover,
.page-toast__action:focus-visible {
    background: rgba(255, 255, 255, 0.1);
}

.page-toast__action:disabled {
    opacity: 0.6;
}

.page-toast__close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem;
    line-height: 1;
}


/* Desktop: no fixed mobile footer, the toast sits near the bottom edge */
@media (min-width: 992px) {
    .page-toast {
        bottom: 24px;
    }
}
