/* ============================================================
   MuseusDeBanyoles — Banner de consentiment de cookies
   Estils autònoms (no depenen del Sass del theme ni de Bootstrap).
   Paleta alineada amb el peu del theme 2017 (#242424 / blanc),
   comuna als 3 skins (genèric, Arqueologic, Darder).
   Prefix de classe: .mb-cc  → evita col·lisions amb el theme.
   ============================================================ */

.mb-cc {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: #242424;
    color: #fff;
    border-top: 3px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    display: none;
}

.mb-cc.is-visible { display: block; }

.mb-cc * { box-sizing: border-box; }

.mb-cc__inner {
    max-width: 1170px;
    margin: 0 auto;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
}

.mb-cc__body { flex: 1 1 420px; min-width: 260px; }

.mb-cc__title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}

.mb-cc__body p { margin: 0; color: #dcdcdc; font-size: 13.5px; }

.mb-cc__body a { color: #fff; text-decoration: underline; }
.mb-cc__body a:hover { color: #fff; }

/* -------- Botons -------- */
.mb-cc__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

.mb-cc__btn {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    padding: 11px 18px;
    border-radius: 2px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.mb-cc__btn:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.mb-cc__btn--primary {
    background: #fff;
    border-color: #fff;
    color: #242424;
}

.mb-cc__btn--primary:hover { background: #e4e4e4; border-color: #e4e4e4; color: #242424; }

.mb-cc__btn:focus-visible,
.mb-cc__switch input:focus-visible + .mb-cc__slider {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* -------- Panell de preferències -------- */
.mb-cc__prefs {
    flex-basis: 100%;
    display: none;
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    flex-wrap: wrap;
    gap: 16px 32px;
}

.mb-cc.is-prefs-open .mb-cc__prefs { display: flex; }

.mb-cc__row {
    flex: 1 1 280px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.mb-cc__row .mb-cc__ct { flex: 1; }
.mb-cc__row b { display: block; font-size: 13.5px; font-weight: 700; color: #fff; }
.mb-cc__row span { display: block; margin-top: 3px; font-size: 12.5px; color: #b9b9b9; }

.mb-cc__row--action {
    flex-basis: 100%;
    justify-content: flex-end;
    align-items: center;
}

/* -------- Interruptor (switch) accessible -------- */
.mb-cc__switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.mb-cc__switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.mb-cc__switch input:disabled { cursor: not-allowed; }

.mb-cc__slider {
    position: absolute;
    inset: 0;
    background: #6b6b6b;
    border-radius: 24px;
    transition: background 0.2s;
    pointer-events: none;
}

.mb-cc__slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.mb-cc__switch input:checked + .mb-cc__slider { background: #4a9d6a; }
.mb-cc__switch input:checked + .mb-cc__slider::before { transform: translateX(20px); }
.mb-cc__switch input:disabled + .mb-cc__slider { background: #4a9d6a; opacity: 0.6; }

/* -------- Responsiu -------- */
@media (max-width: 767px) {
    .mb-cc__inner { padding: 16px; gap: 12px; }
    .mb-cc__actions { width: 100%; }
    .mb-cc__btn { flex: 1 1 auto; text-align: center; }
    .mb-cc__row { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .mb-cc__btn,
    .mb-cc__slider,
    .mb-cc__slider::before { transition: none; }
}
