/* ═══════════════════════════════════════════════════════════
   SikelCookie v1.0.0 — Banner CSS
═══════════════════════════════════════════════════════════ */

/* ── Barra cookie ──────────────────────────────────────── */
.sc-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    padding: 14px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,.3);
    transform: translateY(100%);
    transition: transform .35s ease;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
.sc-bar.sc-bar-visible {
    transform: translateY(0);
}
.sc-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.sc-bar-text {
    flex: 1;
    min-width: 200px;
    margin: 0;
    opacity: .92;
}
.sc-bar-links {
    display: inline-flex;
    gap: 12px;
    margin-left: 8px;
}
.sc-bar-links a {
    text-decoration: underline;
    font-size: 13px;
}
.sc-bar-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ── Bottoni ────────────────────────────────────────────── */
.sc-btn {
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: opacity .15s, transform .1s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.3;
}
.sc-btn:hover  { opacity: .85; }
.sc-btn:active { transform: scale(.97); }
.sc-btn-primary   { border-color: transparent; }
.sc-btn-secondary { background: transparent; }
.sc-btn-outline   { background: transparent; border-color: rgba(255,255,255,.4); }
.sc-btn-outline-dark     { background: transparent; border: 2px solid #ccc; color: #333; }
.sc-btn-secondary-dark   { background: transparent; border-width: 2px; border-style: solid; color: #333; }

/* ── Modal overlay ──────────────────────────────────────── */
.sc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: rgba(0,0,0,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
body.sc-modal-open { overflow: hidden; }

.sc-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    overflow: hidden;
    font-family: system-ui, -apple-system, sans-serif;
}
.sc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-weight: 700;
    font-size: 16px;
}
.sc-modal-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: .8;
}
.sc-modal-close:hover { opacity: 1; }
.sc-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}
.sc-modal-intro {
    color: #555;
    font-size: 13.5px;
    margin: 0 0 16px;
}

/* ── Categorie ──────────────────────────────────────────── */
.sc-cat-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}
.sc-cat-row:last-child { border-bottom: none; }
.sc-cat-info {
    flex: 1;
}
.sc-cat-info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
    color: #1a1a1a;
}
.sc-cat-info p {
    font-size: 12.5px;
    color: #666;
    margin: 0;
    line-height: 1.45;
}

/* ── Toggle switch ──────────────────────────────────────── */
.sc-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
}
.sc-toggle input { display: none; }
.sc-toggle-slider {
    position: relative;
    width: 46px;
    height: 26px;
    background: #ccc;
    border-radius: 13px;
    transition: background .2s;
    display: block;
}
.sc-toggle-slider::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.sc-toggle input:checked + .sc-toggle-slider {
    background: var(--sc-btn, #C9A84C);
}
.sc-toggle input:checked + .sc-toggle-slider::after {
    transform: translateX(20px);
}
.sc-toggle-disabled .sc-toggle-slider { background: #4caf50; cursor: not-allowed; }
.sc-toggle-disabled .sc-toggle-slider::after { transform: translateX(20px); }
.sc-toggle-label {
    font-size: 11px;
    color: #888;
    font-weight: 600;
}

/* ── Piede modal ────────────────────────────────────────── */
.sc-modal-foot {
    padding: 14px 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
    background: #fafafa;
}

/* ── Link revoca nel footer ─────────────────────────────── */
.sc-revoca-wrap {
    position: fixed;
    bottom: 12px;
    left: 12px;
    z-index: 9999;
}
.sc-revoca-btn {
    background: rgba(255,255,255,.95);
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    font-family: system-ui, sans-serif;
    transition: box-shadow .15s;
}
.sc-revoca-btn:hover { box-shadow: 0 4px 14px rgba(0,0,0,.18); }

/* ── Script bloccati placeholder ───────────────────────── */
.sc-blocked {
    min-height: 80px;
    background: #f5f5f5;
    border: 1px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
    font-family: system-ui, sans-serif;
    text-align: center;
    padding: 12px;
}
.sc-blocked::before { content: '🍪 Contenuto bloccato — accetta i cookie per visualizzarlo'; }

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .sc-bar-inner   { flex-direction: column; align-items: flex-start; }
    .sc-bar-btns    { width: 100%; }
    .sc-btn         { flex: 1; text-align: center; }
    .sc-modal-foot  { flex-direction: column-reverse; }
    .sc-modal-foot .sc-btn { width: 100%; text-align: center; }
    .sc-revoca-wrap { bottom: 8px; left: 8px; right: 8px; text-align: center; }
}
