/* Banner cookie e finestra delle preferenze (Pages/Shared/_CookieBanner.cshtml).
   Colori del sito: nero #1D1D1B, crema #F0EBE0, oro #A4793D. */

/* ── Banner ─────────────────────────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1045; /* sopra la navbar, sotto la finestra delle preferenze */
    background: #1D1D1B;
    color: #F0EBE0;
    padding: 1.5rem 0;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.22);
    font-family: 'Work Sans', system-ui, -apple-system, sans-serif;
}

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

.cookie-banner__inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.cookie-banner__text {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 2rem;
}

.cookie-banner__title {
    font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
    font-size: 1.4rem;
    line-height: 1.2;
    color: #FAFAF8;
    margin: 0 0 0.35rem;
}

.cookie-banner__body {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(240, 235, 224, 0.88);
    margin: 0;
}

.cookie-banner__body a {
    color: #D6C79C;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner__body a:hover {
    color: #FAFAF8;
}

.cookie-banner__actions {
    display: flex;
    flex-shrink: 0;
    gap: 0.75rem;
}

.cookie-banner .btn-cambria {
    padding: 0.75rem 1.5rem;
    justify-content: center;
    white-space: nowrap;
}

/* "Rifiuta" e "Accetta tutti": stesso stile, nessuna delle due scelte è favorita */
.cookie-btn--solid {
    background: #F0EBE0;
    color: #1D1D1B;
    border: 1px solid #F0EBE0;
}

.cookie-btn--solid:hover,
.cookie-btn--solid:focus-visible {
    background: #A4793D;
    border-color: #A4793D;
    color: #FAFAF8;
}

.cookie-banner .btn-cambria:focus-visible,
.cookie-banner__close:focus-visible {
    outline: 2px solid #D6C79C;
    outline-offset: 2px;
}

.cookie-banner__close {
    position: absolute;
    top: -0.5rem;
    right: 0.75rem;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    color: rgba(240, 235, 224, 0.75);
    font-size: 1rem;
    cursor: pointer;
}

.cookie-banner__close:hover {
    color: #FAFAF8;
}

@media (max-width: 991.98px) {
    .cookie-banner {
        padding: 1.25rem 0 1rem;
    }

    .cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .cookie-banner__body {
        max-height: 32vh;
        overflow-y: auto;
    }

    .cookie-banner__actions {
        flex-wrap: wrap;
    }

    .cookie-banner .btn-cambria {
        flex: 1 1 0;
        padding: 0.75rem 0.75rem;
    }

    /* Su schermi stretti "Personalizza" va su una riga sua, sotto le due scelte principali */
    .cookie-banner .btn-cambria--outline-light {
        order: 3;
        flex-basis: 100%;
    }
}

/* ── Link nel footer ────────────────────────────────────────────────────── */
.cookie-prefs-link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 0.8125rem;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.cookie-prefs-link:hover {
    color: #FAFAF8;
}

/* ── Finestra preferenze ────────────────────────────────────────────────── */
.cookie-modal .modal-content {
    border: 0;
    border-radius: 0;
    background: #FAFAF8;
}

.cookie-modal .modal-header,
.cookie-modal .modal-footer {
    border-color: #E6DDD0;
    padding: 1.25rem 1.75rem;
}

.cookie-modal .modal-body {
    padding: 1.25rem 1.75rem;
}

.cookie-modal .modal-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.6rem;
    margin: 0;
}

.cookie-modal__intro {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #4A463F;
    margin-bottom: 0.5rem;
}

.cookie-modal a {
    color: #A4793D;
}

.cookie-cat {
    border-top: 1px solid #E6DDD0;
    padding: 1rem 0 0.75rem;
}

.cookie-cat__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cookie-cat__title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: #1D1D1B;
    margin: 0;
    cursor: default;
}

label.cookie-cat__title {
    cursor: pointer;
}

.cookie-cat p {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #4A463F;
    margin: 0.4rem 0 0;
}

.cookie-cat p.cookie-cat__list {
    font-size: 0.78rem;
    color: #6C655A;
}

.cookie-cat__always {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #A4793D;
    white-space: nowrap;
}

.cookie-modal .form-switch .form-check-input {
    width: 2.75em;
    height: 1.45em;
    cursor: pointer;
}

.cookie-modal .form-check-input:checked {
    background-color: #A4793D;
    border-color: #A4793D;
}

.cookie-modal .modal-footer {
    gap: 0.5rem;
}

.cookie-modal .modal-footer .btn-cambria {
    padding: 0.7rem 1.4rem;
    margin: 0;
}

@media (max-width: 575.98px) {
    .cookie-modal .modal-footer .btn-cambria {
        flex: 1 1 100%;
        justify-content: center;
    }
}
