/*
 * tvt-alert 1.0.0: the styles of public/js/tvt-alert.js. Plain CSS, loaded by URL (not processed by Vite).
 * Only the closing of an alert: its colours, size and layout are Tailwind classes, in components/tools/tvt-alert
 * (presets in config/alerts.php).
 */

/* closing: the alert fades out and folds up, so the content under it moves up smoothly instead of jumping.
   tvt-alert.js sets --tvt-alert-height (its height before closing), adds .is-closing and removes it at the end. */
[data-tvt-alert].is-closing {
    overflow: hidden;
    pointer-events: none;
    animation: tvt-alert-close var(--tvt-alert-duration, 300ms) forwards;
}

@keyframes tvt-alert-close {
    from {
        height: var(--tvt-alert-height);
    }

    to {
        height: 0;
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-top-width: 0;
        border-bottom-width: 0;
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-tvt-alert].is-closing {
        animation-duration: 1ms;
    }
}
/* /closing */
