/* ==========================================================
   BANNER COOKIE (fragments/cookie-consent.html)
   Barra scura sottile attaccata al bordo basso, a tutta
   larghezza: non copre piu' il centro della pagina. Il "display"
   lo decide js/cookie-consent.js (none / flex): qui non va forzato.
   ========================================================== */
#cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    gap: 0.5rem 1.25rem;
    padding: 0.6rem var(--site-gutter, 16px);
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
    background: var(--ink, #16201B);
    color: var(--paper, #F4F5F0);
    border-top: 1px solid rgba(244, 245, 240, 0.12);
    box-shadow: 0 -8px 24px rgba(22, 32, 27, 0.18);
    font-family: var(--font-sans, system-ui, sans-serif);
    font-size: 0.85rem;
    line-height: 1.45;
    animation: rCookieIn 0.35s ease-out both;
}

.r-cookie__icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-pill, 999px);
    background: rgba(244, 245, 240, 0.08);
    color: var(--gold, #B8912F);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.r-cookie__icon .r-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

#cookie-banner p {
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
}

#cookie-banner a {
    color: var(--paper, #F4F5F0);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-left: 0.25rem;
}

#cookie-banner a:hover {
    color: #fff;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

#cookie-accept,
#cookie-decline {
    min-height: 36px;
    padding: 0 1.1rem;
    border-radius: var(--radius-pill, 999px);
    border: 0;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#cookie-accept {
    background: var(--paper, #F4F5F0);
    color: var(--ink, #16201B);
}

#cookie-accept:hover {
    background: #fff;
}

#cookie-decline {
    background: transparent;
    color: var(--paper, #F4F5F0);
    box-shadow: inset 0 0 0 1.5px rgba(244, 245, 240, 0.45);
}

#cookie-decline:hover {
    box-shadow: inset 0 0 0 1.5px var(--paper, #F4F5F0);
}

#cookie-banner :focus-visible {
    outline: 2px solid var(--gold, #B8912F);
    outline-offset: 2px;
}

@keyframes rCookieIn {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    #cookie-banner { animation: none; }
}

/* Telefono: testo su una riga piena, pulsanti piccoli sotto, affiancati */
@media (max-width: 640px) {
    #cookie-banner {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .r-cookie__icon {
        display: none;
    }

    #cookie-banner p {
        flex-basis: 100%;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    #cookie-accept,
    #cookie-decline {
        flex: 1;
        min-height: 34px;
    }
}
