/* Cookie consent manager — conforme alle Linee guida del Garante privacy (10 giugno 2021).
   Self-contained e neutro rispetto al tema: reso identico su pagine pubbliche e area interna. */
.pdv-cc-banner, .pdv-cc-modal { box-sizing: border-box; }
.pdv-cc-banner *, .pdv-cc-modal * { box-sizing: border-box; }
.pdv-cc-banner[hidden], .pdv-cc-modal[hidden] { display: none !important; }

.pdv-cc-banner {
    position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 2147483000;
    max-width: 920px; margin: 0 auto;
    background: #ffffff; color: #18181b;
    border: 1px solid #e4e4e7; border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .22);
    padding: 1.15rem 1.25rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: pdv-cc-in .28s ease;
}
@keyframes pdv-cc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.pdv-cc-x {
    position: absolute; top: .5rem; right: .6rem; width: 30px; height: 30px;
    border: none; background: transparent; color: #71717a; font-size: 1.5rem; line-height: 1;
    cursor: pointer; border-radius: 8px;
}
.pdv-cc-x:hover { background: #f4f4f5; color: #18181b; }

.pdv-cc-title { margin: 0 0 .35rem; font-size: 1.05rem; font-weight: 700; }
.pdv-cc-text { margin: 0; font-size: .9rem; line-height: 1.5; color: #3f3f46; }
.pdv-cc-text a { color: #1a56db; text-decoration: underline; }

.pdv-cc-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .95rem; justify-content: flex-end; }
.pdv-cc-btn {
    font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
    border-radius: 9px; padding: .6rem 1.1rem; border: 1.5px solid transparent; line-height: 1;
}
.pdv-cc-btn-primary { background: #18181b; color: #fff; border-color: #18181b; }
.pdv-cc-btn-primary:hover { background: #000; }
.pdv-cc-btn-secondary { background: #fff; color: #18181b; border-color: #18181b; }
.pdv-cc-btn-secondary:hover { background: #f4f4f5; }
.pdv-cc-btn-ghost { background: transparent; color: #3f3f46; border-color: transparent; text-decoration: underline; padding-left: .6rem; padding-right: .6rem; }
.pdv-cc-btn-ghost:hover { color: #18181b; }

/* Modal preferenze */
.pdv-cc-modal {
    position: fixed; inset: 0; z-index: 2147483001; display: flex;
    align-items: center; justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.pdv-cc-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.pdv-cc-modal-card {
    position: relative; background: #fff; color: #18181b;
    width: min(560px, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto;
    border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.pdv-cc-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-bottom: 1px solid #e4e4e7; }
.pdv-cc-modal-head h2 { margin: 0; font-size: 1.1rem; }
.pdv-cc-modal-body { padding: 1rem 1.25rem; }
.pdv-cc-modal-body .pdv-cc-text { margin-bottom: .5rem; }
.pdv-cc-modal-foot { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; padding: 1rem 1.25rem; border-top: 1px solid #e4e4e7; }

.pdv-cc-cat { padding: .85rem 0; border-bottom: 1px solid #f1f1f3; }
.pdv-cc-cat:last-child { border-bottom: none; }
.pdv-cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pdv-cc-cat-name { font-weight: 700; font-size: .95rem; }
.pdv-cc-cat-desc { margin: .35rem 0 0; font-size: .85rem; color: #52525b; line-height: 1.45; }

/* Interruttore on/off */
.pdv-cc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.pdv-cc-switch input { opacity: 0; width: 0; height: 0; }
.pdv-cc-slider { position: absolute; inset: 0; background: #d4d4d8; border-radius: 999px; transition: .2s; cursor: pointer; }
.pdv-cc-slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.pdv-cc-switch input:checked + .pdv-cc-slider { background: #1e8e3e; }
.pdv-cc-switch input:checked + .pdv-cc-slider::before { transform: translateX(20px); }
.pdv-cc-switch input:disabled + .pdv-cc-slider { background: #1e8e3e; opacity: .55; cursor: not-allowed; }

/* Link legali condivisi (footer) */
.legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .55rem; font-size: .85rem; }
.legal-links a, .legal-link-btn { color: inherit; text-decoration: none; opacity: .85; }
.legal-links a:hover, .legal-link-btn:hover { opacity: 1; text-decoration: underline; }
.legal-link-btn { font: inherit; background: none; border: none; padding: 0; cursor: pointer; }
.app-legal-footer { padding: .9rem 1.5rem; border-top: 1px solid var(--border, #e4e4e7); display: flex; justify-content: center; color: var(--txt-3, #71717a); }

@media (max-width: 540px) {
    .pdv-cc-actions { justify-content: stretch; }
    .pdv-cc-actions .pdv-cc-btn { flex: 1 1 auto; text-align: center; }
}
