/**
 * GDPR Cookie Consent - Frontend Styles
 * Stili per il banner di consenso cookie
 */

/* Banner principale */
#gdpr-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    animation: gdpr-slide-in 0.5s ease-out;
}

/* Posizione banner */
#gdpr-cookie-banner.gdpr-banner-top {
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#gdpr-cookie-banner.gdpr-banner-bottom {
    bottom: 0;
}

/* Contenitore contenuto */
.gdpr-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Testo banner */
.gdpr-banner-text {
    flex: 1;
}

.gdpr-banner-text p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.6;
}

/* Link policy */
.gdpr-banner-links {
    margin-top: 10px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.gdpr-banner-links a {
    text-decoration: underline;
    font-size: 13px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.gdpr-banner-links a:hover {
    opacity: 1;
}

/* Pulsanti */
.gdpr-banner-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.gdpr-button {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Colori pulsanti definiti dinamicamente via inline CSS nel PHP */

.gdpr-button-reject {
    background-color: transparent;
    border: 2px solid currentColor;
    color: inherit;
}

.gdpr-button-reject:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Animazione slide-in */
@keyframes gdpr-slide-in {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#gdpr-cookie-banner.gdpr-banner-top {
    animation-name: gdpr-slide-in-top;
}

@keyframes gdpr-slide-in-top {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive design */
@media screen and (max-width: 768px) {
    #gdpr-cookie-banner {
        padding: 15px;
    }
    
    .gdpr-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .gdpr-banner-text p {
        font-size: 13px;
    }
    
    .gdpr-banner-buttons {
        flex-direction: row;
        width: 100%;
    }
    
    .gdpr-button {
        width: 100%;
        padding: 14px 20px;
    }
    
    .gdpr-banner-links {
        flex-direction: column;
        gap: 8px;
    }
}

@media screen and (max-width: 480px) {
    #gdpr-cookie-banner {
        padding: 12px;
    }
    
    .gdpr-banner-text p {
        font-size: 12px;
    }
    
    .gdpr-button {
        font-size: 13px;
        padding: 12px 16px;
    }
    
    .gdpr-banner-links a {
        font-size: 12px;
    }
}

/* Stato nascosto */
#gdpr-cookie-banner.gdpr-hidden {
    display: none !important;
}

/* Overlay opzionale per dare più enfasi */
.gdpr-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 999998;
    display: none;
    animation: gdpr-fade-in 0.3s ease-out;
}

.gdpr-overlay.active {
    display: block;
}

@keyframes gdpr-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Accessibilità */
.gdpr-button:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.gdpr-banner-links a:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    #gdpr-cookie-banner,
    .gdpr-overlay {
        display: none !important;
    }
}

/* ========================================
   Pulsante Preferenze Cookie (Shortcode)
   ======================================== */

.gdpr-cookie-preferences-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: transparent;
    color: currentColor;
    border: 1px solid currentColor;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    line-height: 1.4;
}

.gdpr-cookie-preferences-button:hover {
    background-color: currentColor;
    color: #ffffff;
    opacity: 0.9;
    transform: translateY(-1px);
}

.gdpr-cookie-preferences-button:active {
    transform: translateY(0);
}

.gdpr-cookie-preferences-button:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Variante con icona (opzionale) */
.gdpr-cookie-preferences-button.with-icon::before {
    content: "⚙️ ";
    margin-right: 6px;
}

/* Responsive per pulsante preferenze */
@media (max-width: 768px) {
    .gdpr-cookie-preferences-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}
