/* ============================================
   COOKIE CONSENT BANNER & MODAL - GDPR Compliant
   Style compatibile con il design di Punto Feste
   ============================================ */

/* Overlay */
.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-consent-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Banner principale */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 25px 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

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

.cookie-consent-text {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex: 1;
    min-width: 300px;
}

.cookie-icon {
    font-size: 40px;
    color: var(--primary, #FF6B9D);
    flex-shrink: 0;
}

.cookie-consent-text h3 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark, #212529);
    font-family: var(--font-primary, 'Poppins', sans-serif);
}

.cookie-consent-text p {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--dark-gray, #495057);
}

.cookie-links {
    font-size: 0.9rem;
}

.cookie-links a {
    color: var(--primary, #FF6B9D);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.cookie-links a:hover {
    color: var(--primary-dark, #E91E63);
    text-decoration: underline;
}

/* Bottoni del banner */
.cookie-consent-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-primary, 'Poppins', sans-serif);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.cookie-btn i {
    font-size: 1rem;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #FF6B9D 0%, #7C4DFF 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.cookie-btn-reject {
    background: white;
    color: var(--dark-gray, #495057);
    border: 2px solid var(--light-gray, #E9ECEF);
}

.cookie-btn-reject:hover {
    background: var(--light, #F8F9FA);
    border-color: var(--dark-gray, #495057);
}

.cookie-btn-customize {
    background: transparent;
    color: var(--primary, #FF6B9D);
    border: 2px solid var(--primary, #FF6B9D);
}

.cookie-btn-customize:hover {
    background: var(--primary, #FF6B9D);
    color: white;
}

.cookie-btn-primary {
    background: var(--secondary, #7C4DFF);
    color: white;
}

.cookie-btn-primary:hover {
    background: var(--secondary-dark, #651FFF);
    transform: translateY(-2px);
}

/* Modal di personalizzazione */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, #FF6B9D 0%, #7C4DFF 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cookie-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.cookie-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* Categorie di cookie */
.cookie-category {
    margin-bottom: 25px;
    padding: 20px;
    border: 2px solid var(--light-gray, #E9ECEF);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    border-color: var(--primary, #FF6B9D);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.1);
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    flex-shrink: 0;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--light-gray, #E9ECEF);
    transition: 0.4s;
    border-radius: 28px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background: linear-gradient(135deg, #FF6B9D 0%, #7C4DFF 100%);
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(28px);
}

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

.cookie-category-info {
    flex: 1;
}

.cookie-category-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark, #212529);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #FF6B9D 0%, #7C4DFF 100%);
    color: white;
    font-size: 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.cookie-category-info p {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--gray, #6C757D);
}

.cookie-details {
    margin-top: 12px;
    padding: 12px;
    background: var(--light, #F8F9FA);
    border-radius: 8px;
}

.cookie-details small {
    display: block;
    color: var(--dark-gray, #495057);
    line-height: 1.6;
}

.cookie-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid var(--light-gray, #E9ECEF);
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Notifiche */
.cookie-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.cookie-notification.show {
    transform: translateX(0);
}

.cookie-notification-success {
    border-left: 4px solid #10b981;
}

.cookie-notification-success i {
    color: #10b981;
    font-size: 1.3rem;
}

.cookie-notification-info {
    border-left: 4px solid #3b82f6;
}

.cookie-notification-info i {
    color: #3b82f6;
    font-size: 1.3rem;
}

.cookie-notification span {
    color: var(--dark, #212529);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Stili per le pagine Policy */
.policy-content {
    padding: 60px 0;
    background: var(--light, #F8F9FA);
}

.policy-box {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.policy-box .update-date {
    color: var(--gray, #6C757D);
    font-size: 0.9rem;
    margin-bottom: 30px;
    padding: 15px;
    background: var(--light, #F8F9FA);
    border-radius: 8px;
    border-left: 4px solid var(--primary, #FF6B9D);
}

.policy-box h2 {
    color: var(--primary, #FF6B9D);
    font-size: 2rem;
    margin: 0 0 30px 0;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary, #FF6B9D);
}

.policy-box h3 {
    color: var(--dark, #212529);
    font-size: 1.4rem;
    margin: 40px 0 20px 0;
}

.policy-box h4 {
    color: var(--secondary, #7C4DFF);
    font-size: 1.1rem;
    margin: 25px 0 15px 0;
}

.policy-box p {
    color: var(--dark-gray, #495057);
    line-height: 1.8;
    margin-bottom: 15px;
}

.policy-box ul {
    margin: 15px 0;
    padding-left: 30px;
}

.policy-box ul li {
    color: var(--dark-gray, #495057);
    line-height: 1.8;
    margin-bottom: 10px;
}

.policy-box a {
    color: var(--primary, #FF6B9D);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.policy-box a:hover {
    color: var(--primary-dark, #E91E63);
    text-decoration: underline;
}

.contact-box {
    background: var(--light, #F8F9FA);
    padding: 30px;
    border-radius: 12px;
    margin-top: 40px;
    border-left: 4px solid var(--secondary, #7C4DFF);
}

.contact-box h3 {
    margin-top: 0;
}

/* Tabella cookie */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.cookie-table thead {
    background: linear-gradient(135deg, #FF6B9D 0%, #7C4DFF 100%);
    color: white;
}

.cookie-table th,
.cookie-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray, #E9ECEF);
}

.cookie-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.cookie-table tbody tr:hover {
    background: var(--light, #F8F9FA);
}

.cookie-table tbody tr:last-child td {
    border-bottom: none;
}

/* Sezione impostazioni cookie nella policy */
.cookie-settings {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1) 0%, rgba(124, 77, 255, 0.1) 100%);
    border-radius: 15px;
    text-align: center;
}

.cookie-settings h3 {
    margin-top: 0;
    color: var(--primary, #FF6B9D);
}

.cookie-settings .btn {
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-consent-text {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-icon {
        font-size: 35px;
    }
    
    .cookie-consent-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-btn {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-modal-content {
        max-height: 95vh;
    }
    
    .cookie-modal-header {
        padding: 20px;
    }
    
    .cookie-modal-header h2 {
        font-size: 1.2rem;
    }
    
    .cookie-modal-body {
        padding: 20px;
    }
    
    .cookie-category {
        padding: 15px;
    }
    
    .cookie-category-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
    
    .policy-box {
        padding: 30px 20px;
    }
    
    .policy-box h2 {
        font-size: 1.6rem;
    }
    
    .cookie-notification {
        right: 10px;
        left: 10px;
        top: 10px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 20px 15px;
    }
    
    .cookie-consent-text h3 {
        font-size: 1.1rem;
    }
    
    .cookie-consent-text p {
        font-size: 0.9rem;
    }
    
    .cookie-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
