/* Stili per il blocco Privacy e Consensi */

/* Container principale */
.privacy-consent-block {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    /* Forza il blocco a essere un elemento di blocco completo */
    display: block !important;
    width: 100% !important;
    clear: both !important;
    float: none !important;
    position: relative !important;
}

/* Fix per il pulsante submit HubSpot che segue il blocco privacy */
.hsfc-NavigationRow__Buttons .hsfc-Button {
    width: auto !important;
}

/* Sezioni Privacy e Consensi */
.privacy-section,
.consensi-section {
    margin-bottom: 15px;
}

/* Intestazioni */
.privacy-section h3,
.consensi-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

/* Separatore tra sezioni */
.privacy-consent-separator {
    margin: 30px 0;
    border: none;
    border-top: 1px solid #ddd;
}

/* Container checkbox */
.checkbox-container {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

/* Checkbox input */
.checkbox-container input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 3px;
    cursor: pointer;
}

/* Label checkbox */
.checkbox-container label {
    cursor: pointer;
    line-height: 1.5;
}

/* Asterisco obbligatorio */
.required-asterisk {
    color: #8B0000;
    margin-left: 3px;
    font-weight: bold;
}

/* Link all'interno delle label */
.checkbox-container label a,
.privacy-link {
    color: #8B0000;
    text-decoration: underline;
    cursor: pointer;
}

.checkbox-container label a:hover,
.privacy-link:hover {
    color: #660000;
}

/* Stile per le checkbox - sfondo rosso scuro quando selezionate */
.checkbox-container input[type="checkbox"],
.expandable-main-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    border: 1px solid rgb(211, 218, 228);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    background-color: white;
    flex-shrink: 0;
}

.checkbox-container input[type="checkbox"]:checked,
.expandable-main-row input[type="checkbox"]:checked {
    background-color: #8B0000;
    border-color: rgb(211, 218, 228);
}

.checkbox-container input[type="checkbox"]:checked::after,
.expandable-main-row input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Container per checkbox secondarie - rimosso sfondo grigio */
.sub-checkboxes-container {
    margin-left: 25px;
    margin-top: 10px;
    display: none;
    background-color: transparent;
}

.sub-checkboxes-container.visible {
    display: block;
}

/* Container per checkbox espandibili */
.expandable-checkbox-container {
    margin-bottom: 15px;
}

/* Row principale con checkbox e freccia */
.expandable-main-row {
    display: flex;
    align-items: flex-start;
}

.expandable-main-row input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 3px;
}

.expandable-main-row label {
    cursor: pointer;
    line-height: 1.5;
    flex: 1;
}

/* Icona freccia per espansione */
.toggle-arrow {
    cursor: pointer;
    margin-left: 10px;
    transition: transform 0.3s;
    display: inline-block;
    font-size: 12px;
    color: #8B0000;
}

.toggle-arrow:hover {
    color: #660000;
}

.toggle-arrow.expanded {
    transform: rotate(90deg);
}

/* Sezione espandibile - sfondo rimosso */
.expandable-section {
    display: none;
    margin-left: 30px;
    margin-top: 10px;
    padding: 10px;
    background-color: transparent;
    border-left: 3px solid #8B0000;
    border-radius: 3px;
}

.expandable-section.visible {
    display: block;
}

/* Label di validazione per campi obbligatori */
.validation-message {
    display: block;
    color: red;
    margin-top: 10px;
    font-size: 14px;
}

.validation-message.hidden {
    display: none;
}
