/*
 * Flash message styling. The delivered bookAbro design ships no flash/toast
 * component at all — CakePHP's baked default.php/success.php/error.php/
 * warning.php/info.php elements render a completely unstyled <div
 * class="message ..."> with no matching CSS anywhere, so every Flash->success()/
 * error() was rendering as plain black text jammed against the top of the
 * page. Kept as its own file (not appended to bookabro.css) for the same
 * reason as carousel.css/register-steps.css — a new component, not part of
 * the delivered file. Colors reuse the existing status-badge tokens
 * (--action-accepted/--action-rejected/--action-open from the dashboard's
 * Angenommen/Abgelehnt/Offen badges) rather than inventing new ones.
 *
 * position:fixed, not static in the document flow: a static banner pushes
 * the whole page down, which on hero pages (Home, login, register, ...)
 * shoves the full-bleed photo band down and leaves an awkward blank strip
 * above it — reported as "ugly, shows up above the header". Fixed + full
 * width + above everything (z-index) reads as a deliberate system-level
 * banner (same pattern as a cookie-consent bar) instead, and never disturbs
 * page layout. It does briefly sit over the header while shown, which is
 * expected for this pattern and goes away on dismiss/reload.
 */
.message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px 56px 16px 22px;
    background: var(--surface-card);
    box-shadow: var(--shadow-card);
    border-bottom: 3px solid var(--action-primary);
    font: var(--type-label);
    color: var(--text-body);
    text-align: center;
    cursor: pointer;
}

.message::before {
    font-family: "bootstrap-icons", sans-serif;
    font-size: 20px;
    line-height: 1;
    flex: 0 0 auto;
    color: var(--action-primary);
    content: "\f430"; /* bi-info-circle-fill */
}

.message::after {
    content: "\f659"; /* bi-x-lg */
    font-family: "bootstrap-icons", sans-serif;
    font-size: 14px;
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    color: var(--text-subtle);
}

.message.success {
    border-bottom-color: var(--action-accepted);
}

.message.success::before {
    color: var(--action-accepted);
    content: "\f26a"; /* bi-check-circle-fill */
}

.message.error {
    border-bottom-color: var(--action-rejected);
}

.message.error::before {
    color: var(--action-rejected);
    content: "\f33a"; /* bi-exclamation-triangle-fill */
}

.message.warning {
    border-bottom-color: var(--action-open);
}

.message.warning::before {
    color: var(--action-open-text);
    content: "\f33a"; /* bi-exclamation-triangle-fill */
}

.message.hidden {
    display: none;
}

@media (max-width: 640px) {
    .message {
        padding: 14px 44px 14px 16px;
        font-size: 14px;
        text-align: left;
    }
}
