/* ============================================================
   SALENTO STAY — Banner e pannello cookie
   I selettori partono da #cc-root per non influenzare il sito
   e non ereditare le regole globali delle singole pagine.
   ============================================================ */

#cc-root,
#cc-root * {
    box-sizing: border-box;
}

#cc-root [hidden] {
    display: none !important;
}

/* ── Banner ── */
#cc-root .cc-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 100000;
    max-width: 760px;
    max-height: calc(100vh - 32px);
    margin: 0 auto;
    padding: 24px;
    overflow-y: auto;
    background: #FFFFFF;
    color: #222222;
    border: 1px solid #B0B0B0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
}

/* ── Pannello preferenze ── */
#cc-root .cc-overlay {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.55);
}

#cc-root .cc-panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 100%;
    padding: 24px;
    overflow-y: auto;
    background: #FFFFFF;
    color: #222222;
    border-radius: 12px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
}

/* ── Testi ── */
#cc-root .cc-title {
    margin: 0 40px 8px 0;
    padding: 0;
    color: #222222;
    font-family: inherit;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
    text-align: left;
}

#cc-root .cc-title:focus {
    outline: none;
}

#cc-root .cc-text {
    margin: 0 0 16px;
    color: #222222;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

#cc-root a {
    color: #007A90;
    font-weight: 600;
    text-decoration: underline;
}

/* ── Pulsanti ──
   "Accetta tutti" e "Rifiuta" condividono la stessa classe: stessa evidenza grafica. */
#cc-root .cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#cc-root .cc-btn {
    flex: 1 1 150px;
    min-height: 44px;
    margin: 0;
    padding: 10px 16px;
    border: 2px solid #007A90;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#cc-root .cc-btn-main {
    background: #007A90;
    color: #FFFFFF;
}

#cc-root .cc-btn-main:hover {
    background: #005F70;
    border-color: #005F70;
}

#cc-root .cc-btn-alt {
    background: #FFFFFF;
    color: #005F70;
}

#cc-root .cc-btn-alt:hover {
    background: #E6F7FA;
}

#cc-root .cc-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    background: transparent;
    color: #222222;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#cc-root .cc-close:hover {
    background: #F7F7F7;
}

#cc-root button:focus-visible,
#cc-root a:focus-visible,
#cc-root input:focus-visible {
    outline: 3px solid #005F70;
    outline-offset: 2px;
}

/* ── Categorie ── */
#cc-root .cc-category {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 12px 0;
    border-top: 1px solid #EBEBEB;
}

#cc-root .cc-category + .cc-actions {
    margin-top: 0;
    padding-top: 16px;
    border-top: 1px solid #EBEBEB;
}

#cc-root .cc-category input {
    flex: none;
    width: 20px;
    height: 20px;
    min-width: 0;
    margin: 2px 0 0;
    padding: 0;
    accent-color: #007A90;
    cursor: pointer;
}

#cc-root .cc-category input:disabled {
    cursor: not-allowed;
}

#cc-root .cc-category label {
    display: block;
    flex: 1;
    margin: 0;
    color: #222222;
    font-size: 15px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}

#cc-root .cc-always {
    color: #595959;
    font-size: 13px;
}

#cc-root .cc-desc {
    display: block;
    margin-top: 2px;
    color: #595959;
    font-size: 13px;
}

/* ── Footer minimo per le pagine che non ne hanno uno ── */
.cc-mini-footer {
    padding: 16px;
    text-align: center;
    font-size: 13px;
}

.cc-mini-footer a {
    color: #005F70;
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    #cc-root .cc-banner {
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 85vh;
        padding: 20px 16px;
        border-width: 1px 0 0;
        border-radius: 12px 12px 0 0;
    }

    #cc-root .cc-btn {
        flex-basis: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #cc-root .cc-btn {
        transition: none;
    }
}

@media print {
    #cc-root,
    .cc-mini-footer {
        display: none !important;
    }
}
