/* wp_cookie_consenso 1.0.1 */
:root { --wpcc-color: #8dbb25; --wpcc-text: #2b2b2b; --wpcc-muted: #5f6368; --wpcc-bg: #ffffff; --wpcc-line: #e3e3e3; }

#wpcc-banner[hidden], #wpcc-panel[hidden], #wpcc-float[hidden] { display: none !important; }

#wpcc-banner, #wpcc-panel, #wpcc-float { font-family: inherit; color: var(--wpcc-text); box-sizing: border-box; }
#wpcc-banner *, #wpcc-panel * { box-sizing: border-box; }

/* Banner */
#wpcc-banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100000;
    max-width: 980px; margin: 0 auto; padding: 20px 52px 20px 24px;
    background: var(--wpcc-bg); border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.04);
    display: flex; align-items: center; gap: 24px;
}
#wpcc-banner .wpcc-body { flex: 1 1 auto; min-width: 0; }
#wpcc-banner .wpcc-actions { flex: 0 0 auto; }

.wpcc-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.wpcc-text, .wpcc-intro, .wpcc-row-desc, .wpcc-policy { margin: 0; font-size: 14px; line-height: 1.5; color: var(--wpcc-muted); }
#wpcc-banner a, #wpcc-panel a { color: var(--wpcc-text); text-decoration: underline; }

.wpcc-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Pulsanti: "Rifiuta" e "Accetta" hanno lo stesso peso visivo */
.wpcc-btn {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    min-height: 42px; padding: 10px 18px; border-radius: 6px;
    border: 2px solid var(--wpcc-color); background: var(--wpcc-color); color: #fff;
    font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; white-space: nowrap;
}
.wpcc-btn:hover { filter: brightness(.94); }
.wpcc-btn-ghost { background: transparent; color: var(--wpcc-text); border-color: var(--wpcc-line); }
.wpcc-btn-ghost:hover { border-color: var(--wpcc-color); filter: none; }
.wpcc-btn:focus-visible, .wpcc-x:focus-visible, #wpcc-float:focus-visible, .wpcc-switch input:focus-visible + .wpcc-slider {
    outline: 3px solid #1a73e8; outline-offset: 2px;
}

.wpcc-x {
    position: absolute; top: 8px; right: 8px; width: 36px; height: 36px;
    border: 0; background: transparent; cursor: pointer; border-radius: 50%;
    font-size: 26px; line-height: 36px; color: var(--wpcc-muted); padding: 0;
}
.wpcc-x:hover { background: #f1f1f1; color: var(--wpcc-text); }

/* Pannello preferenze */
#wpcc-panel { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 16px; }
#wpcc-panel .wpcc-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
#wpcc-panel .wpcc-dialog {
    position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto;
    background: var(--wpcc-bg); border-radius: 10px; padding: 24px; outline: none;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
#wpcc-panel .wpcc-title { font-size: 18px; padding-right: 32px; }
#wpcc-panel .wpcc-intro { margin-bottom: 12px; }
#wpcc-panel .wpcc-actions { margin-top: 18px; justify-content: flex-end; }
#wpcc-panel .wpcc-policy { margin-top: 12px; }

.wpcc-row { padding: 14px 0; border-top: 1px solid var(--wpcc-line); }
.wpcc-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.wpcc-row-title { font-weight: 700; font-size: 15px; }
.wpcc-always { font-size: 13px; font-weight: 700; color: var(--wpcc-color); }

.wpcc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; cursor: pointer; }
.wpcc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.wpcc-slider { position: absolute; inset: 0; background: #c7c7c7; border-radius: 26px; transition: background .2s; pointer-events: none; }
.wpcc-slider::before {
    content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px;
    background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.wpcc-switch input:checked + .wpcc-slider { background: var(--wpcc-color); }
.wpcc-switch input:checked + .wpcc-slider::before { transform: translateX(20px); }
.wpcc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Pulsante fisso "Preferenze cookie" */
#wpcc-float {
    position: fixed; left: 14px; bottom: 14px; z-index: 99999;
    width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--wpcc-bg); color: var(--wpcc-muted);
    box-shadow: 0 2px 10px rgba(0,0,0,.2); display: flex; align-items: center; justify-content: center; padding: 0;
}
#wpcc-float:hover { color: var(--wpcc-color); }

html.wpcc-lock, html.wpcc-lock body { overflow: hidden; }

@media (max-width: 767px) {
    #wpcc-banner { left: 8px; right: 8px; bottom: 8px; padding: 16px 44px 16px 16px; flex-direction: column; align-items: stretch; gap: 14px; }
    #wpcc-banner .wpcc-actions, #wpcc-panel .wpcc-actions { flex-direction: column-reverse; }
    .wpcc-btn { width: 100%; }
    #wpcc-panel .wpcc-dialog { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .wpcc-slider, .wpcc-slider::before { transition: none; }
}
