/* ============================================
   download-consent.css - Modale scelta formato
   ============================================ */

/* Overlay della modale */
.download-consent {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    font-family: sans-serif;
}

/* Contenitore della modale */
.download-consent-content {
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.download-consent-content p.title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: bold;
}

/* Stili per i radio button (formato) */
.formats-group {
    text-align: left;
    margin: 20px 0 15px 0;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    border: none; /* Rimuove il bordo standard del fieldset */
}
.formats-group legend {
    font-weight: bold;
    padding: 0 5px;
    float: none; /* Assicura che la legenda sia in linea */
    width: auto;
}
.radio-option {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.radio-option input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.radio-option label {
    font-size: 16px;
    cursor: pointer;
}

/* Checkbox di consenso */
.checkbox-container {
    margin: 20px 0 10px 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}
.checkbox-container input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.checkbox-container label {
    font-size: 14px;
    cursor: pointer;
    line-height: 1.4;
}

/* Pulsanti e messaggi di errore */
.download-consent-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
}
.download-consent-buttons button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}
.btn-download {
    background-color: #4caf50;
    color: white;
}
.btn-download:hover {
    background-color: #45a049;
}
.btn-cancel {
    background-color: #f44336;
    color: white;
}
.btn-cancel:hover {
    background-color: #d32f2f;
}
.error-msg {
    color: #d32f2f;
    font-size: 13px;
    margin-top: 10px;
    display: none;
}

/* MODALE PER ANTEPRIMA PDF */
.pdf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    justify-content: center;
    align-items: center;
}

.pdf-modal .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
    font-family: sans-serif;
    transition: 0.2s;
}
.pdf-modal .close:hover {
    color: #aaa;
}

.pdf-modal iframe {
    width: 70%;
    height: 70%;
    max-width: 1100px;
    max-height: 90%;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    background: #fff;
    display: flex; 
    justify-content: center; 
    align-items: center;
}