:root {
    --cds-blue: #003366;
    --cds-gold: #C5A059;
    --cds-bg-gray: #F9F9F9;
    --cds-text: #333;
}

/* Nasconde gli input radio e checkbox nativi sovrapposti */
.custom-consent-wrapper input[type="radio"],
.custom-consent-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.custom-consent-section {
    display: block !important;
    margin-bottom: 24px !important;
    width: 100% !important;
}

/* Titolo e Freccia */
.custom-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.custom-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--cds-blue);
    line-height: 1.3;
}

.custom-arrow {
    border: solid var(--cds-gold);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 4px;
    transform: rotate(45deg); /* Punta in basso di default (Stato Chiuso) */
    transition: transform 0.3s ease;
    margin-left: 10px;
    flex-shrink: 0;
}

.custom-arrow.open {
    transform: rotate(-135deg); /* Ruota in alto (Stato Aperto) */
}

/* Opzioni */
.custom-options {
    margin-bottom: 8px;
}

.custom-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--cds-blue);
}

/* Cerchietti dei Radio button custom */
.custom-circle {
    width: 20px;
    height: 20px;
    border: 2px solid #CCC;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    display: inline-block;
    background: white;
}

input[type="radio"]:checked + .custom-circle {
    border-color: var(--cds-blue);
}

input[type="radio"]:checked + .custom-circle::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--cds-blue);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Checkbox Privacy custom */
.custom-check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--cds-blue);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    display: inline-block;
    background: white;
}

input[type="checkbox"]:checked + .custom-check {
    background: var(--cds-blue);
}

input[type="checkbox"]:checked + .custom-check::after {
    content: '✓';
    color: white;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: bold;
}

/* Box grigio informativo */
.custom-info-box {
    background-color: var(--cds-bg-gray);
    border-radius: 8px;
    padding: 14px;
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    display: none;
}

.custom-info-box.show {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

.custom-info-box p {
    margin: 0 0 8px 0;
}

.custom-info-box p:last-child {
    margin-bottom: 0;
}

.custom-info-box strong {
    color: var(--cds-blue);
}

/* Link Informativa Privacy */
.privacy-text a {
    color: var(--cds-blue);
    text-decoration: underline;
    font-weight: bold;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulisce eventuali stili ereditati dagli helper text di PatternFly inseriti nel box */
.custom-info-box .pf-v5-c-form__helper-text,
.custom-info-box .pf-v5-c-helper-text__item-text {
    display: inline !important;
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
}