/* ============================================
   HAZE CUP — COOKIE BANNER
   Conformità GDPR / ePrivacy / Garante Privacy 2021
   Isolato dal resto del sito tramite prefisso .hz-cb-
   ============================================ */

.hz-cb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.hz-cb-overlay.hz-cb-visible {
    opacity: 1;
    pointer-events: auto;
}

.hz-cb-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0A0A0A;
    color: #FFFFFF;
    z-index: 99999;
    padding: 24px 28px;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    border-top: 3px solid #FF1A1A;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.hz-cb-banner.hz-cb-visible {
    transform: translateY(0);
}

.hz-cb-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
}

.hz-cb-text {
    max-width: 720px;
}

.hz-cb-title {
    font-family: 'Anton', 'Bebas Neue', 'Plus Jakarta Sans', sans-serif;
    font-size: 20px;
    letter-spacing: 0.04em;
    margin: 0 0 10px 0;
    color: #FFFFFF;
    text-transform: uppercase;
    line-height: 1.1;
}

.hz-cb-title span {
    color: #FF1A1A;
}

.hz-cb-desc {
    font-size: 13.5px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
    font-weight: 400;
}

.hz-cb-desc a {
    color: #FF1A1A;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 26, 26, 0.4);
    transition: border-color 0.2s ease;
}

.hz-cb-desc a:hover {
    border-bottom-color: #FF1A1A;
}

.hz-cb-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-items: center;
    flex-wrap: wrap;
}

.hz-cb-btn {
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 13px 22px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px;
    white-space: nowrap;
    line-height: 1;
}

.hz-cb-btn-primary {
    background: #FF1A1A;
    color: #FFFFFF;
}

.hz-cb-btn-primary:hover {
    background: #D50000;
    transform: translateY(-1px);
}

.hz-cb-btn-secondary {
    background: transparent;
    color: #FFFFFF;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.hz-cb-btn-secondary:hover {
    border-color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
}

.hz-cb-btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    border: 1.5px solid transparent;
    padding: 13px 16px;
}

.hz-cb-btn-ghost:hover {
    color: #FFFFFF;
}

/* ============================================
   PANNELLO PREFERENZE (dettagliato)
   ============================================ */
.hz-cb-prefs {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    grid-column: 1 / -1;
}

.hz-cb-prefs.hz-cb-visible {
    display: block;
}

.hz-cb-pref-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hz-cb-pref-row:last-child {
    border-bottom: none;
}

.hz-cb-pref-info {
    flex: 1;
}

.hz-cb-pref-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #FFFFFF;
    margin: 0 0 4px 0;
    text-transform: uppercase;
}

.hz-cb-pref-desc {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.55;
    margin: 0;
}

.hz-cb-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.hz-cb-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.hz-cb-toggle-slider {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.25s;
    border-radius: 24px;
    cursor: pointer;
}

.hz-cb-toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background-color: #FFFFFF;
    transition: 0.25s;
    border-radius: 50%;
}

.hz-cb-toggle input:checked + .hz-cb-toggle-slider {
    background-color: #FF1A1A;
}

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

.hz-cb-toggle input:disabled + .hz-cb-toggle-slider {
    background-color: #FF1A1A;
    opacity: 0.6;
    cursor: not-allowed;
}

.hz-cb-pref-locked {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 26, 26, 0.9);
    flex-shrink: 0;
    margin-top: 4px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .hz-cb-banner {
        padding: 20px 18px;
    }

    .hz-cb-inner {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .hz-cb-title {
        font-size: 18px;
    }

    .hz-cb-desc {
        font-size: 13px;
    }

    .hz-cb-actions {
        width: 100%;
        gap: 8px;
    }

    .hz-cb-btn {
        flex: 1;
        padding: 13px 10px;
        font-size: 11px;
        letter-spacing: 0.05em;
    }

    .hz-cb-btn-ghost {
        flex: 0 0 100%;
        order: 3;
    }
}

@media (max-width: 480px) {
    .hz-cb-banner {
        padding: 18px 14px;
    }

    .hz-cb-actions {
        flex-direction: column;
    }

    .hz-cb-btn {
        width: 100%;
    }

    .hz-cb-pref-row {
        gap: 12px;
    }
}

/* Rispetto preferenze motion */
@media (prefers-reduced-motion: reduce) {
    .hz-cb-banner,
    .hz-cb-overlay,
    .hz-cb-btn,
    .hz-cb-toggle-slider,
    .hz-cb-toggle-slider::before {
        transition: none !important;
    }
}

/* Focus accessibile */
.hz-cb-btn:focus-visible,
.hz-cb-toggle input:focus-visible + .hz-cb-toggle-slider {
    outline: 2px solid #FF1A1A;
    outline-offset: 2px;
}
