/* ===========================================
   GDPR Cookie Consent UI
   =========================================== */

/* Cookie Banner */
.gdpr-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(33, 37, 41, 0.98);
    color: #fff;
    padding: 1.25rem 0;
    z-index: 99999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.gdpr-banner.show {
    transform: translateY(0);
}

.gdpr-banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.gdpr-banner__content {
    flex: 1;
    min-width: 280px;
}

.gdpr-banner__content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff !important;
}

.gdpr-banner__content p {
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.gdpr-banner__link {
    color: var(--color-primary, #c9a87c);
    text-decoration: underline;
}

.gdpr-banner__link:hover {
    color: #fff;
}

/* IMPORTANTE: Pulsanti Accetta e Rifiuta IDENTICI */
.gdpr-banner__buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.gdpr-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 120px;
    text-align: center;
    border: none;
}

/* Pulsanti primari - IDENTICI per Accetta e Rifiuta */
.gdpr-btn--primary {
    background-color: var(--color-primary, #c9a87c);
    color: #fff;
}

.gdpr-btn--primary:hover {
    background-color: var(--color-secondary, #b8976b);
    color: #fff;
}

/* Pulsante secondario - Personalizza */
.gdpr-btn--secondary {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.gdpr-btn--secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

/* Modal Impostazioni Cookie */
.gdpr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.gdpr-modal-overlay.show {
    display: flex;
}

.gdpr-modal {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.gdpr-modal__header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gdpr-modal__header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
}

.gdpr-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.gdpr-modal__close:hover {
    color: #333;
}

.gdpr-modal__body {
    padding: 1.5rem;
}

.gdpr-category {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.gdpr-category:last-child {
    border-bottom: none;
}

.gdpr-category__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.gdpr-category__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.gdpr-category__desc {
    font-size: 0.8125rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Toggle Switch */
.gdpr-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.gdpr-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.gdpr-toggle__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.gdpr-toggle__slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.gdpr-toggle input:checked + .gdpr-toggle__slider {
    background-color: var(--color-primary, #c9a87c);
}

.gdpr-toggle input:checked + .gdpr-toggle__slider:before {
    transform: translateX(22px);
}

.gdpr-toggle input:disabled + .gdpr-toggle__slider {
    background-color: var(--color-primary, #c9a87c);
    opacity: 0.6;
    cursor: not-allowed;
}

.gdpr-modal__footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.gdpr-modal__footer .gdpr-btn {
    min-width: 140px;
}

.gdpr-modal__footer .gdpr-btn--primary {
    background-color: var(--color-primary, #c9a87c);
}

.gdpr-modal__footer .gdpr-btn--secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.gdpr-modal__footer .gdpr-btn--secondary:hover {
    background-color: #eee;
}

/* Privacy Widget (Pulsante Flottante) */
.gdpr-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99998;
    display: none;
}

.gdpr-widget.show {
    display: block;
}

.gdpr-widget__btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary, #c9a87c);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gdpr-widget__btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.gdpr-widget__btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Responsive */
@media (max-width: 576px) {
    .gdpr-banner__inner {
        flex-direction: column;
        text-align: center;
    }

    .gdpr-banner__buttons {
        width: 100%;
        justify-content: center;
    }

    .gdpr-btn {
        flex: 1;
        min-width: 100px;
    }

    .gdpr-modal {
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }

    .gdpr-modal__footer {
        flex-direction: column;
    }

    .gdpr-modal__footer .gdpr-btn {
        width: 100%;
    }
}
