/* =========================================================
   Stile Base Mobile (Breakpoint 0px - 767px)
   Versione 2.2 - Correzione z-index per Storefront.
   ========================================================= */

#consent-banner-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff; 
    color: #333; 
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.25); 
    /* !!! Z-INDEX CRITICO !!! 
       Deve essere superiore a 9999 (z-index di Storefront mobile bar) */
    z-index: 999999; 
    font-family: inherit; 
    display: flex;
    flex-direction: column; 
    align-items: flex-start;
    gap: 15px; 
    border-top: 2px solid #0073aa; 
}

#consent-banner-wrapper h2 {
    margin: 0;
    font-size: 18px; 
    font-weight: 700;
    color: #0073aa;
    width: 100%;
}

#consent-banner-wrapper p {
    margin: 0;
    font-size: 14px; 
    line-height: 1.6;
    text-align: left;
    width: 100%;
}

/* Stili per i Link Legali */
.consent-links {
    width: 100%;
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    padding-top: 5px;
    border-top: 1px dotted #ccc; /* Linea di separazione sottile */
    padding-top: 10px;
}

.consent-links a {
    font-size: 13px;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.consent-links a:hover {
    text-decoration: underline;
}

/* Azioni */
.consent-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: stretch;
}

.consent-btn {
    flex-grow: 1; 
    padding: 12px 15px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    transition: background-color 0.2s, opacity 0.2s;
}

.consent-btn.accept {
    background: #0073aa; 
    color: white;
}

.consent-btn.deny {
    background: transparent;
    color: #333;
    border-color: #ccc;
}

.consent-btn.accept:hover { opacity: 0.9; }
.consent-btn.deny:hover { background: #f0f0f0; }


/* =========================================================
   Media Query: Tablet e Desktop (Breakpoint 768px e oltre)
   ========================================================= */

@media (min-width: 768px) {
    /* Il banner si posiziona in basso al centro per desktop */
    #consent-banner-wrapper {
        flex-direction: column; 
        align-items: flex-start;
        padding: 20px 40px; 
        max-width: 700px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 8px 8px 0 0; 
        border: 1px solid #ccc;
        border-bottom: none;
        z-index: 9999; /* Z-index normale su desktop */
    }
    
    #consent-banner-wrapper h2 {
        font-size: 20px;
    }
    
    #consent-banner-wrapper p {
        font-size: 15px;
        margin-bottom: 15px;
    }

    .consent-actions {
        width: auto;
        justify-content: flex-start;
        gap: 20px;
        margin-top: 5px;
        /* Rimuoviamo il full-width su desktop */
        width: 100%; 
    }
    
    .consent-links {
        margin-top: 10px;
        border-top: none; /* Rimuoviamo la linea di separazione su desktop */
        padding-top: 0;
    }
    
    .consent-btn {
        flex-grow: 0; 
        min-width: 150px;
    }
}