/**
 * Cookie Consent Styles
 * Banner centrato con design elegante
 */

/* Privacy Policy Link */
.privacy-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 0.75rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.privacy-link:hover {
    color: #e94e1a;
}

/* Cookie Overlay - Oscura il sito */
#cookie-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 2999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#cookie-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Cookie Popup - Box centrato */
#cookie-popup {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 45px 50px;
    font-family: 'Space Grotesk', sans-serif;
    color: #ccc;
    z-index: 3000;
    max-width: 420px;
    width: 90%;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

#cookie-popup.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

#cookie-popup h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 400;
    font-style: italic;
    color: #fff;
    margin-bottom: 20px;
}

#cookie-popup .cookie-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #999;
    margin-bottom: 25px;
}

/* Opzioni cookie inline */
#cookie-options {
    margin-bottom: 25px;
    text-align: left;
}

#cookie-options .cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#cookie-options .cookie-option:last-child {
    border-bottom: none;
}

#cookie-options .cookie-option-info h4 {
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 3px;
}

#cookie-options .cookie-option-info p {
    font-size: 0.75rem;
    color: #666;
}

#cookie-popup .customize-link {
    display: block;
    width: 100%;
    color: #999;
    background: none;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
    margin-top: 15px;
    text-align: center;
}

#cookie-popup .customize-link:hover {
    color: #e94e1a;
}

/* Pulsante Accetta - Ben visibile */
#cookie-popup .cookie-btn-accept {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #e94e1a 0%, #ff6b3d 100%);
    border: none;
    color: #fff;
    padding: 18px 40px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(233, 78, 26, 0.4);
}

#cookie-popup .cookie-btn-accept:hover {
    background: linear-gradient(135deg, #ff6b3d 0%, #e94e1a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(233, 78, 26, 0.5);
}

/* .show classe è già definita sopra */

/* ========== PANNELLO PERSONALIZZAZIONE ========== */
#cookie-customize-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 45px;
    font-family: 'Space Grotesk', sans-serif;
    z-index: 3100;
    max-width: 450px;
    width: 90%;
    display: none;
}

#cookie-customize-panel.show {
    display: block;
}

#cookie-customize-panel h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 400;
    font-style: italic;
    color: #fff;
    margin-bottom: 25px;
    text-align: center;
}

/* Cookie Options */
.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-option:last-of-type {
    border-bottom: none;
    margin-bottom: 25px;
}

.cookie-option-info h4 {
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 5px;
}

.cookie-option-info p {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.5;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
    margin-left: 15px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #333;
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #888;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked+.toggle-slider {
    background: #e94e1a;
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(24px);
    background: #fff;
}

.toggle-switch.disabled .toggle-slider {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Buttons del pannello */
.customize-buttons {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.customize-btn {
    flex: 1;
    padding: 14px 20px;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid;
}

.customize-btn.reject-all {
    background: transparent;
    border-color: #555;
    color: #888;
}

.customize-btn.reject-all:hover {
    border-color: #888;
    color: #ccc;
}

.customize-btn.save {
    background: #e94e1a;
    border-color: #e94e1a;
    color: #fff;
}

.customize-btn.save:hover {
    background: #ff6b3d;
    border-color: #ff6b3d;
}

/* Back link */
.back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.8rem;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.back-link:hover {
    color: #999;
}

/* Responsive */
@media (max-width: 500px) {
    #cookie-popup {
        padding: 35px 30px;
    }

    #cookie-popup h3 {
        font-size: 1.4rem;
    }

    #cookie-customize-panel {
        padding: 30px 25px;
    }

    .customize-buttons {
        flex-direction: column;
    }
}