/* Banner in basso */
#gcm-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #f5f5f5;
    color: #222;
    border-top: 2px solid #ccc;
    padding: 12px 20px;
    z-index: 9999;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    
    display: none !important;
    box-sizing: border-box;

    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

#gcm-consent-banner span {
    flex: 1 1 auto;
    min-width: 200px;
    font-size: 0.9rem;
}

#gcm-consent-banner button {
    flex: 0 0 auto;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

#gcm-consent-banner #gcm-open-preferences {
    background: #0073aa;
    color: white;
}

#gcm-consent-banner #gcm-open-preferences:hover,
#gcm-consent-banner #gcm-open-preferences:focus {
    background: #005177;
}

#gcm-consent-banner #gcm-accept-all-banner {
    background: #28a745;
    color: white;
}

#gcm-consent-banner #gcm-accept-all-banner:hover,
#gcm-consent-banner #gcm-accept-all-banner:focus {
    background: #218838;
}

#gcm-consent-banner #gcm-reject-all-banner {
    background: #dc3545;
    color: white;
}

#gcm-consent-banner #gcm-reject-all-banner:hover,
#gcm-consent-banner #gcm-reject-all-banner:focus {
    background: #c82333;
}

/* Overlay dietro al modale */
#gdpr-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 9998;
    display: none;
}

/* Modale centrato */
#gdpr-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    background: #fff;
    color: #333;
    border-radius: 8px;
    padding: 25px 30px;
    z-index: 9999;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    display: none;
    box-sizing: border-box;
    outline: none;
}

#gdpr-modal.show {
    display: block;
}

#gdpr-modal h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

#gdpr-modal p {
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

#gdpr-modal fieldset {
    border: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

#gdpr-modal legend {
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

#gdpr-modal label {
    display: block;
    margin-bottom: 0.7rem;
    font-size: 0.95rem;
    cursor: pointer;
}

#gdpr-modal input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: middle;
    cursor: pointer;
}

/* Bottoni nel modale */
.gcm-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.gcm-buttons button {
    cursor: pointer;
    background: #0073aa;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.3s ease;
}

.gcm-buttons button:hover,
.gcm-buttons button:focus {
    background: #005177;
}

.gcm-buttons button#<?php echo esc_attr('gcm-btn-reject'); ?>,
.gcm-buttons button#gcm-btn-reject {
    background: #dc3545;
}

.gcm-buttons button#<?php echo esc_attr('gcm-btn-reject'); ?>:hover,
.gcm-buttons button#gcm-btn-reject:hover {
    background: #a71d2a;
}

.gcm-buttons button#gcm-btn-accept-all {
    background: #28a745;
}

.gcm-buttons button#gcm-btn-accept-all:hover {
    background: #1e7e34;
}

.gcm-desc { margin: 0 0 15px; font-size: 0.9em; }

@media (max-width: 600px) {
    #gcm-consent-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    #gcm-consent-banner button {
        width: 100%;
        margin-top: 6px;
    }

    .gcm-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .gcm-buttons button {
        width: 100%;
    }
}

#gdpr-modal, #gdpr-overlay {
    display: none;
}
