/* ============================================================
   MAKO DESIGN - COOKIE BANNER STYLES
   Conforme GDPR + Garante Privacy 231/2021
   ============================================================ */

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483647;
    background: #ffffff;
    color: #111;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, #b300ff, #f200ff, #800080) 1;
    transform: translateY(110%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', sans-serif;
    max-height: 90vh;
    overflow-y: auto;
}

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

.cookie-banner.cookie-banner-hidden {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
}

.cookie-banner-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 22px 5%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}

.cookie-banner-text {
    min-width: 0;
}

.cookie-banner-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #111;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}

.cookie-banner-title i {
    color: #b300ff;
    font-size: 1.2rem;
}

.cookie-banner-text p {
    margin: 0;
    color: #444;
    font-size: 0.9rem;
    line-height: 1.55;
    font-weight: 400;
}

.cookie-banner-text a {
    color: #b300ff;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(179, 0, 255, 0.3);
    transition: border-color 0.2s;
}

.cookie-banner-text a:hover {
    border-bottom-color: #b300ff;
}

/* ============================================================
   PULSANTI - "Rifiuta" e "Accetta" con pari dignità visiva
   (linee guida Garante: no dark patterns)
   ============================================================ */

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border: 2px solid transparent;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #f200ff, #800080);
    color: #fff;
    border-color: transparent;
}

.cookie-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(179, 0, 255, 0.35);
}

.cookie-btn-secondary {
    background: #ffffff;
    color: #111;
    border-color: #d0d0d0;
}

.cookie-btn-secondary:hover {
    border-color: #111;
    background: #f7f7f7;
}

/* ============================================================
   PANNELLO PREFERENZE
   ============================================================ */

.cookie-preferences {
    border-top: 1px solid #ececec;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 800px;
    }
}

.cookie-preferences-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 5% 28px;
}

.cookie-preferences-inner h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 6px;
    letter-spacing: -0.2px;
}

.cookie-preferences-sub {
    color: #666;
    font-size: 0.85rem;
    margin: 0 0 20px;
    font-weight: 400;
    line-height: 1.5;
}

.cookie-pref-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cookie-pref-item:last-of-type {
    border-bottom: none;
}

.cookie-pref-info strong {
    display: block;
    font-size: 0.95rem;
    color: #111;
    margin-bottom: 4px;
}

.cookie-pref-info small {
    display: block;
    color: #666;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.45;
}

/* Toggle switch */
.cookie-pref-switch {
    position: relative;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.cookie-pref-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-pref-switch label {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #d0d0d0;
    border-radius: 28px;
    transition: background 0.3s ease;
}

.cookie-pref-switch label::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-pref-switch input:checked + label {
    background: linear-gradient(135deg, #b300ff, #800080);
}

.cookie-pref-switch input:checked + label::before {
    transform: translateX(22px);
}

.cookie-pref-switch input:disabled + label {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-pref-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE MOBILE
   ============================================================ */

@media (max-width: 900px) {
    .cookie-banner-inner {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px 5%;
    }

    .cookie-banner-actions {
        justify-content: stretch;
    }

    .cookie-banner-actions .cookie-btn {
        flex: 1 1 auto;
        min-width: 0;
        padding: 12px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 600px) {
    .cookie-banner-title {
        font-size: 0.95rem;
    }

    .cookie-banner-text p {
        font-size: 0.82rem;
    }

    .cookie-banner-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner-actions .cookie-btn {
        width: 100%;
    }

    .cookie-pref-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cookie-pref-switch {
        align-self: flex-start;
    }

    .cookie-pref-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-pref-actions .cookie-btn {
        width: 100%;
    }

    .cookie-preferences-inner {
        padding: 20px 5% 24px;
    }
}

@media (max-width: 360px) {
    .cookie-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
}