.announcement-widget .announcement-message { overflow-wrap: anywhere; }
.announcement-widget .announcement-body { white-space: pre-wrap; }
.announcement-front .announcement-top { max-width: 1140px; margin: 1rem auto; padding: 0 15px; }
.announcement-top:not(:has(.announcement-message)) { display: none; }
body.header-overlay .announcement-front .announcement-top:has(.announcement-message) { padding-top: var(--navbar-h, 100px); }
.announcement-bottom-right { position: fixed; right: 1rem; bottom: 1rem; width: min(380px, calc(100vw - 2rem)); max-height: 45vh; overflow-y: auto; z-index: 1020; }
.announcement-admin .announcement-top { margin: .75rem 1rem; font-size: .875rem; }
.announcement-admin .announcement-message { padding: .5rem .75rem; }
.announcement-admin .announcement-title { margin-right: .5rem; }
.announcement-admin .announcement-body { display: inline; }
/* A small close button in the top left corner of a dismissible announcement. */
.announcement-message:has(> .announcement-close) { position: relative; padding-inline-start: 2rem; }
.announcement-close { position: absolute; top: .5rem; inset-inline-start: .5rem; font-size: .625rem; }
/* In the compact administration notice the button is centered on the first text line (padding .5rem,
   line .875rem × 1.5, button .625rem × 1.5). */
.announcement-admin .announcement-close { top: calc(.5rem + (.875rem * 1.5 - .625rem * 1.5) / 2); }
.announcement-load-error:not([hidden]) { position: fixed; bottom: .5rem; left: 1rem; max-width: calc(100vw - 2rem); padding: .5rem; background: #fff; color: #343a40; border: 1px solid #ced4da; border-radius: .25rem; z-index: 1020; font-size: .875rem; }
/* Consent dialogs take precedence over a floating announcement. */
body.modal-open .announcement-bottom-right { visibility: hidden; }
.announcement-consent-visible .announcement-bottom-right { visibility: hidden; }
@media (max-width: 575.98px) {
    .announcement-bottom-right { right: .5rem; bottom: calc(.5rem + env(safe-area-inset-bottom)); width: calc(100vw - 1rem); max-height: 32vh; }
    .announcement-front .announcement-top { margin: .5rem auto; }
}
