/* ============================================================
   Cookie banner Carnielli SRL
   ============================================================ */

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2B3A41;
    color: #fff;
    padding: 20px 24px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    font-family: "DM Sans", system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    display: none;
}

#cookie-banner.is-visible {
    display: block;
}

.cookie-banner__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}

.cookie-banner__text {
    flex: 1 1 320px;
    min-width: 280px;
}

.cookie-banner__text h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #ECBB9C;
}

.cookie-banner__text p {
    margin: 0;
}

.cookie-banner__text a {
    color: #ECBB9C;
    text-decoration: underline;
}

.cookie-banner__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cookie-banner__btn {
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
}

.cookie-banner__btn:hover {
    opacity: 0.85;
}

.cookie-banner__btn:active {
    transform: scale(0.98);
}

.cookie-banner__btn--accept {
    background: #ECBB9C;
    color: #2B3A41;
}

.cookie-banner__btn--reject {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.cookie-banner__btn--customize {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Modale di personalizzazione */
#cookie-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#cookie-modal.is-visible {
    display: flex;
}

.cookie-modal__content {
    background: #fff;
    color: #2B3A41;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 28px;
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-modal__content h2 {
    margin: 0 0 16px 0;
    font-size: 22px;
    font-family: "Baskervville", serif;
}

.cookie-modal__option {
    border-top: 1px solid #eee;
    padding: 16px 0;
}

.cookie-modal__option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cookie-modal__option-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.cookie-modal__option p {
    margin: 0;
    color: #555;
}

.cookie-modal__switch {
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.cookie-modal__switch.is-on {
    background: #ECBB9C;
}

.cookie-modal__switch.is-disabled {
    background: #2B3A41;
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-modal__switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.cookie-modal__switch.is-on::after,
.cookie-modal__switch.is-disabled::after {
    transform: translateX(20px);
}

.cookie-modal__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
    flex-wrap: wrap;
}

.cookie-modal__actions button {
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
}

.cookie-modal__actions .btn-save {
    background: #2B3A41;
    color: #fff;
}

.cookie-modal__actions .btn-accept-all {
    background: #ECBB9C;
    color: #2B3A41;
}

/* Bottone "rivedi preferenze" piccolo, in basso a sinistra */
#cookie-revoke {
    position: fixed;
    bottom: 12px;
    left: 12px;
    background: rgba(43, 58, 65, 0.85);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    z-index: 9998;
    font-family: "DM Sans", system-ui, sans-serif;
    display: none;
}

#cookie-revoke.is-visible {
    display: block;
}

#cookie-revoke:hover {
    opacity: 0.85;
}

@media (max-width: 600px) {
    .cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }
    .cookie-banner__buttons {
        justify-content: stretch;
    }
    .cookie-banner__btn {
        flex: 1;
        text-align: center;
    }
}

/* ============================================================
   Stile per pagine policy (privacy + cookie)
   ============================================================ */
.privacypolicy-content,
.cookiepolicy-content {
    max-width: 820px;
    margin: 80px auto 60px auto;
    padding: 20px 24px 60px 24px;
    font-family: "DM Sans", system-ui, sans-serif;
    color: #2B3A41;
    line-height: 1.65;
    font-size: 15px;
}

.privacypolicy-content h1,
.cookiepolicy-content h1 {
    font-family: "Baskervville", serif;
    font-size: 36px;
    margin: 0 0 24px 0;
    color: #2B3A41;
}

.privacypolicy-content h2,
.cookiepolicy-content h2 {
    font-family: "Baskervville", serif;
    font-size: 22px;
    margin: 32px 0 12px 0;
    color: #2B3A41;
    border-bottom: 1px solid #ECBB9C;
    padding-bottom: 6px;
}

.privacypolicy-content h3,
.cookiepolicy-content h3 {
    font-size: 16px;
    margin: 20px 0 8px 0;
    color: #2B3A41;
}

.privacypolicy-content p,
.cookiepolicy-content p {
    margin: 0 0 12px 0;
}

.privacypolicy-content ul,
.cookiepolicy-content ul {
    margin: 0 0 16px 0;
    padding-left: 22px;
}

.privacypolicy-content li,
.cookiepolicy-content li {
    margin-bottom: 8px;
}

.privacypolicy-content a,
.cookiepolicy-content a {
    color: #2B3A41;
    text-decoration: underline;
}

.privacypolicy-content a:hover,
.cookiepolicy-content a:hover {
    color: #ECBB9C;
}

.privacy-intro {
    font-size: 16px;
    background: #f6efeb;
    padding: 16px 20px;
    border-radius: 6px;
    border-left: 3px solid #ECBB9C;
}

.privacy-meta {
    color: #777;
    font-size: 13px;
    margin-bottom: 24px !important;
}

@media (max-width: 600px) {
    .privacypolicy-content,
    .cookiepolicy-content {
        margin: 40px 0 30px 0;
        padding: 0 16px 40px 16px;
    }
    .privacypolicy-content h1,
    .cookiepolicy-content h1 {
        font-size: 28px;
    }
}
