/*
 * assets/css/cookie-banner.css
 * Styles for the cookie notice (compact grey bar at the bottom of the screen, like the
 * EU website) and the "Cookie settings" link in the footer.
 * Loaded from includes/header.php AFTER legal.css.
 *
 * Every rule starts with one of these names, so no other page is affected:
 *   .cookie-banner    .site-footer .footer-legal .cookie-settings-btn
 * Colours: only the approved site palette. v47: white bar, yellow top line, soft shadow, rounded buttons.
 *
 * Layout:
 *   900px and wider : one row  [icon] [text] [two buttons]
 *   below 900px     : icon + text on the first row, the two buttons side by side below
 *   below 600px     : the two buttons stacked, full width
 */

/* ---------- The bar ---------- */

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    width: 100%;
    padding: 16px 0;
    background: #FFFFFF;
    color: #262626;
    border-top: 4px solid #FFDE39;
    box-shadow: 0 -4px 16px rgba(38, 38, 38, 0.12);
    font-size: 1rem;
    line-height: 1.5;
}

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

/* The inner .container keeps the same left and right edges as the footer container */
.cookie-banner .cookie-banner-inner {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    column-gap: 16px;
    align-items: center;
}

/* Small decorative "i" square (hidden from screen readers in the HTML) */
.cookie-banner .cookie-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #4073AF;
    color: #FFFFFF;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.cookie-banner .cookie-banner-text {
    margin: 0;
}

.cookie-banner .cookie-banner-text:focus {
    outline: none;
}

.cookie-banner .cookie-banner-text a {
    color: #255D9D;
    text-decoration: underline;
}

.cookie-banner .cookie-banner-text a:focus-visible {
    outline: 2px solid #262626;
    outline-offset: 2px;
}

/* ---------- The two buttons: identical in every way ---------- */

/* Two equal columns: both buttons are as wide as the longer label */
.cookie-banner .cookie-banner-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cookie-banner .cookie-btn {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    padding: 12px 22px;
    border: 0;
    border-radius: 6px;
    background: #4073AF;
    color: #FFFFFF;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
}

.cookie-banner .cookie-btn:hover {
    background: #255D9D;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(38, 38, 38, 0.22);
}

.cookie-banner .cookie-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner .cookie-btn { transition: none; }
    .cookie-banner .cookie-btn:hover { transform: none; }
}

/* Keyboard focus: yellow line with a dark ring around it (visible on grey and on blue) */
.cookie-banner .cookie-btn:focus-visible {
    outline: 3px solid #FFDE39;
    outline-offset: 0;
    box-shadow: 0 0 0 5px #262626;
}

/* ---------- Below 900px: icon + text on top, buttons side by side below ---------- */

@media (max-width: 899px) {
    .cookie-banner .cookie-banner-inner {
        grid-template-columns: 36px minmax(0, 1fr);
        row-gap: 10px;
        align-items: start;
    }

    .cookie-banner .cookie-banner-buttons {
        grid-column: 1 / -1;
    }
}

/* ---------- Below 600px: buttons stacked, full width, a little less height ---------- */

@media (max-width: 599px) {
    .cookie-banner {
        padding: 10px 0;
    }

    .cookie-banner .cookie-banner-inner {
        column-gap: 12px;
        row-gap: 8px;
    }

    .cookie-banner .cookie-banner-buttons {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .cookie-banner .cookie-btn {
        padding: 9px 16px;
    }
}

/* ---------- Footer: "Cookie settings" looks like the other footer links ---------- */

.site-footer .footer-legal .cookie-settings-btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-block;
    margin: 0;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: none;
    font: inherit;
    color: #255D9D;
    text-align: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.site-footer .footer-legal .cookie-settings-btn[hidden] {
    display: none;
}
