/* Cookie consent banner — sostituisce Cookiebot.
   Linee guida Garante: pulsanti di pari peso visivo, nessun dark pattern. */

#taac-cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2147483646;
    display: none;
    opacity: 0;
    transition: opacity .2s ease;
}

#taac-cc-overlay.taac-cc-visible {
    display: block;
    opacity: 1;
}

#taac-cc-banner {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 100%);
    width: 100%;
    max-width: 720px;
    z-index: 2147483647;
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
    font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    transition: transform .25s ease;
    max-height: 90vh;
    overflow-y: auto;
}

#taac-cc-banner.taac-cc-visible {
    transform: translate(-50%, 0);
}

@media (min-width: 768px) {
    #taac-cc-banner {
        bottom: 24px;
        border-radius: 12px;
        max-width: 760px;
        transform: translate(-50%, calc(100% + 40px));
    }
    #taac-cc-banner.taac-cc-visible {
        transform: translate(-50%, 0);
    }
}

.taac-cc-inner {
    padding: 20px 22px;
}

#taac-cc-banner h2 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

#taac-cc-banner p {
    margin: 0 0 12px;
    color: #444;
}

#taac-cc-banner a {
    color: #d62828;
    text-decoration: underline;
}

.taac-cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.taac-cc-btn {
    flex: 1 1 auto;
    min-width: 140px;
    padding: 12px 16px;
    border: 1px solid #1a1a1a;
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
    font-family: inherit;
}

.taac-cc-btn:hover {
    background: #1a1a1a;
    color: #ffffff;
}

.taac-cc-btn:focus-visible {
    outline: 2px solid #d62828;
    outline-offset: 2px;
}

.taac-cc-categories {
    display: none;
    margin-top: 16px;
    border-top: 1px solid #eee;
    padding-top: 14px;
}

#taac-cc-banner.taac-cc-show-categories .taac-cc-categories {
    display: block;
}

#taac-cc-banner.taac-cc-show-categories .taac-cc-btn-customize {
    display: none;
}

.taac-cc-category {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
}

.taac-cc-category:last-child {
    border-bottom: none;
}

.taac-cc-category-info {
    flex: 1;
}

.taac-cc-category-info strong {
    display: block;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.taac-cc-category-info span {
    font-size: 13px;
    color: #555;
}

.taac-cc-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.taac-cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.taac-cc-toggle .taac-cc-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: background .15s ease;
    cursor: pointer;
}

.taac-cc-toggle .taac-cc-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .15s ease;
}

.taac-cc-toggle input:checked + .taac-cc-slider {
    background: #28a745;
}

.taac-cc-toggle input:checked + .taac-cc-slider::before {
    transform: translateX(20px);
}

.taac-cc-toggle input:disabled + .taac-cc-slider {
    background: #28a745;
    opacity: 0.6;
    cursor: not-allowed;
}
