/* Cookie strip (src/js/consent.js, templates/partials/cookie_strip.html): full width, glued to
   the bottom, no overlay, two buttons of one class.

   consent.js unhides the strip and sets --cookie-strip-h on <body> (its height). Every rule that
   touches shared elements hangs on body:has(#cookie-strip:not([hidden])), so it applies only while
   the strip is open, also after Turbo has replaced the body: Turbo keeps a stylesheet in <head>
   after a visit. Nothing is set on <html>: the Velzon layout.js fingerprints its attributes and
   reloads the page when they change.
   Plain CSS on purpose: no Sass rebuild needed. Colors come from the theme's --vz-* variables. */

.cookie-strip {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 1040;               /* above the fixed navbar (1030), below modals (1055) and the chat widget */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    /* The chat widget's launcher floats bottom-right (56px + 20px): keep the buttons clear of it. */
    padding: 12px 96px 12px 24px;
    background: var(--vz-card-bg, #fff);
    color: var(--vz-body-color, #212529);
    border-top: 1px solid var(--vz-border-color, #e9ebec);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-strip[hidden] {
    display: none;
}

.cookie-strip__text {
    flex: 1 1 24rem;
    margin: 0;
}

.cookie-strip__actions {
    display: flex;
    flex: 0 0 auto;
    gap: 12px;
}

.cookie-strip .btn {
    min-width: 5.5rem;
}

/* The last lines of the page stay readable. */
body:has(#cookie-strip:not([hidden])) {
    padding-bottom: var(--cookie-strip-h, 6rem);
}

/* The chat main page fills the viewport: leave the strip's height to it. */
body:has(#cookie-strip:not([hidden])) .chat-page {
    height: calc(100vh - var(--cookie-strip-h, 6rem));
    height: calc(100dvh - var(--cookie-strip-h, 6rem));
}

@media (min-width: 1024px) {
    body:has(#cookie-strip:not([hidden])) .chat-sidebar {
        height: calc(100vh - var(--cookie-strip-h, 6rem));
        height: calc(100dvh - var(--cookie-strip-h, 6rem));
    }
}

@media (max-width: 575.98px) {
    .cookie-strip {
        padding: 10px 88px 10px 16px;
        font-size: 0.85rem;
    }

    .cookie-strip__actions {
        flex: 1 1 100%;
    }
}

/* The "Cookie settings" link in a footer: looks like the footer's other links. */
.cookie-settings-link {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.cookie-settings-link:hover,
.cookie-settings-link:focus-visible {
    text-decoration: none;
}
