/* Cookie banner GDPR – CartomanteGioia.com (nero / testo bianco / pulsanti blu) */
#cg-cookie {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 2147483000;
    padding: 12px;
    display: flex;
    justify-content: center;
    pointer-events: none;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', Arial, sans-serif;
}
#cg-cookie .cg-box {
    pointer-events: auto;
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    background: #000;
    color: #fff;
    border: 1px solid #333;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,.6);
    padding: 20px 22px;
    box-sizing: border-box;
    animation: cg-in .25s ease-out;
}
@keyframes cg-in { from { transform: translateY(20px); opacity: 0 } to { transform: none; opacity: 1 } }
#cg-cookie h2 { margin: 0 0 8px; font-size: 1.2rem; color: #fff; }
#cg-cookie p { margin: 0 0 14px; font-size: .95rem; line-height: 1.45; color: #fff; }
#cg-cookie a { color: #8ab4f8; text-decoration: underline; }
#cg-cookie .cg-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#cg-cookie .cg-btn {
    flex: 1 1 150px;
    background: #0d6efd;
    color: #fff;
    border: 2px solid #0d6efd;
    border-radius: 8px;
    padding: 11px 16px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, color .15s;
}
#cg-cookie .cg-btn:hover, #cg-cookie .cg-btn:focus-visible { background: #0b5ed7; border-color: #0b5ed7; outline: 2px solid #fff; outline-offset: 2px; }
#cg-cookie .cg-btn-outline { background: transparent; color: #8ab4f8; }
#cg-cookie .cg-btn-outline:hover, #cg-cookie .cg-btn-outline:focus-visible { background: #0d6efd; color: #fff; }

#cg-cookie .cg-panel { border-top: 1px solid #333; margin-top: 16px; padding-top: 14px; }
#cg-cookie .cg-cat { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; font-size: .92rem; line-height: 1.4; }
#cg-cookie .cg-cat em { color: #bbb; font-style: normal; font-size: .85rem; }
#cg-cookie .cg-cat span { color: #ccc; }
#cg-cookie .cg-cat label { cursor: pointer; }

/* interruttore */
#cg-cookie .cg-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 46px; margin-top: 2px; }
#cg-cookie .cg-switch input { opacity: 0; width: 0; height: 0; }
#cg-cookie .cg-slider { position: absolute; inset: 0; background: #444; border-radius: 26px; transition: .2s; }
#cg-cookie .cg-slider:before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
#cg-cookie .cg-switch input:checked + .cg-slider { background: #0d6efd; }
#cg-cookie .cg-switch input:checked + .cg-slider:before { transform: translateX(20px); }
#cg-cookie .cg-switch input:disabled + .cg-slider { opacity: .6; cursor: not-allowed; }
#cg-cookie .cg-switch input:focus-visible + .cg-slider { outline: 2px solid #fff; outline-offset: 2px; }

/* pulsante flottante per riaprire le preferenze */
#cg-cookie-reopen {
    position: fixed;
    left: 14px; bottom: 14px;
    z-index: 2147482000;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid #0d6efd;
    background: #000;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.5);
}
#cg-cookie-reopen:hover { background: #0d6efd; }
body.cg-open #cg-cookie-reopen { display: none; }

@media (max-width: 600px) {
    #cg-cookie { padding: 8px; }
    #cg-cookie .cg-box { padding: 16px; border-radius: 10px; }
    #cg-cookie h2 { font-size: 1.05rem; }
    #cg-cookie p { font-size: .88rem; }
    #cg-cookie .cg-btn { flex-basis: 100%; }
}
