/* Estilos base del modal */
.custom-popup {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}
form#popup-form.form_actualizacion  a.privacy-policy-link {
    margin-bottom: 0px;
    -webkit-order: 3;
    -moz-order: 3;
    -ms-order: 3;
    -o-order: 3;
    order: 3;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}
.popup-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    width: 650px;
    max-width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}
div#privacy-policy-body ul li {
    display: block !important;
    list-style-type: disc !important;
    line-height: 1.3;
    position: relative;
}
div#privacy-policy-body ul {
    list-style-type: disc !important;
    padding-left: 20px;
    margin-bottom: 20px;
}
.privacy-policy-body ul li:before {
 content: "• ";
}
div#privacy-policy-body h2 {
    font-size: 20px;
    margin-top: 14px;
}

div#privacy-policy-body {
    line-height: 1.3;
}
/* Botón de cerrar */
.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    width: 30px;
    height: 30px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    background-color: #ffffff;
    color: #0097d6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}
.form-field.field-type-text.solo-hijo {
    width: 100%;
}
.close-button:hover {
    transform: scale(1.1);
}

/* Título y subtítulo */
.popup-title {
    font-size: 28px;
    text-align: center;
    margin-bottom: 5px;
    font-weight: bold;
    color: #0097d6;
    font-family: inherit;
}

.popup-subtitle {
    font-size: 18px;
    text-align: center;
    margin-bottom: 0px;
    color: #333;
    font-family: inherit;
}

/* Mensaje principal */
.popup-content .message {
    font-size: 16px;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.popup-content .message::after {
    content: "";
    display: block;
    width: 40%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    position: absolute;
    bottom: 0;
    left: 30%;
}

/* Formulario */
form.form_actualizacion {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

form.form_actualizacion .action_form {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 25px;
}

/* Campos del formulario */
.form-field {
    width: 48%;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.field-full-width {
    width: 100%;
}

.form-field label {
display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 12px;
    color: #333;
    line-height: 1;
}

.form-field input[type="text"],
.form-field input[type="date"],
.form-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f5f5f5;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-field textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f5f5f5;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: #0097d6;
    box-shadow: 0 0 0 2px rgba(255, 80, 0, 0.1);
}

/* Estilos para checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #0097d6;
}

.checkbox-label {
    font-size: 14px;
    line-height: 1.4;
}

/* Link "Leer Política" al lado del checkbox */
.privacy-policy-link{
    font-size: 12px;
    margin-left: 8px;
    text-decoration: underline;
    font-weight: 600;
}

/* Estilos para radio buttons */
.radio-wrapper {
    display: flex;
    flex-direction: column;
    margin-top: 5px;
}

.radio-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #0097d6;
}

/* Botón de guardar */
.button-primary {
    background-color: #0097d6;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.button-primary:hover {
    background-color: #e74700;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
form#popup-form.form_actualizacion .form-field.field-type-checkbox {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-flow: row wrap;
    flex-flow: row wrap;
    margin-bottom: 0px;
    flex-flow: nowrap;
}

form#popup-form.form_actualizacion .form-field.field-type-checkbox label {
    margin-bottom: 0px;
    -webkit-order: 2;
    -moz-order: 2;
    -ms-order: 2;
    -o-order: 2;
    order: 2;
    line-height: 1;
    display: flex;
    align-items: center;
}

form#popup-form.form_actualizacion .form-field.field-type-checkbox .checkbox-wrapper {
    margin-top: 0px;
    -webkit-order: 1;
    -moz-order: 1;
    -ms-order: 1;
    -o-order: 1;
    order: 1;
}
/* Responsive */
@media (max-width: 768px) {
    .popup-content {
        padding: 20px;
    }
    
    .popup-title {
        font-size: 22px;
    }
    
    .popup-subtitle {
        font-size: 16px;
    }
    
    .form-field {
        width: 100%;
    }
    
    .button-primary {
        width: 100%;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.custom-popup {
    animation: fadeIn 0.3s ease;
}

/* Estilos para campos con errores */
.form-field.has-error input,
.form-field.has-error textarea,
.form-field.has-error select {
    border-color: #ff3b30;
    background-color: rgba(255, 59, 48, 0.05);
}

.form-field.has-error::after {
    content: "Este campo es obligatorio";
    display: block;
    color: #ff3b30;
    font-size: 12px;
    margin-top: 5px;
}
form.form_actualizacion select {
    min-height: 38px;
    height: 38px;
}
form#popup-form.form_actualizacion .form-field.field-type-checkbox label input {
    min-width: 20px;
}

form#popup-form.form_actualizacion .form-field.field-type-checkbox label {
    line-height: 1.2;
    margin-bottom: 11px;
}

form#popup-form.form_actualizacion .form-field.field-type-checkbox .checkbox-wrapper {
    justify-content: space-between;
    width: 100%;
}
.link_footer a {
    text-transform: uppercase;
    color: #d9edff;
    text-decoration: underline;
    font-size: 15px;
}

.link_footer a:hover {
    color: #063866;
}
form#popup-form.form_actualizacion .form-field.field-type-checkbox .checkbox-wrapper a.privacy-policy-link {
    min-width: 118px;
    border: 1px solid #0298d6;
    display: inline-block;
    padding: 6px 3px;
    text-decoration: none;
    font-size: 11px;
    border-radius: 3px;
    line-height: 1;
}
@media (max-width: 991px) {
    form#popup-form.form_actualizacion .form-field.field-type-checkbox .checkbox-wrapper a.privacy-policy-link {
        min-width: 96px;
        font-size: 9px;
    }
}
@media (max-width: 600px) {
    form#popup-form.form_actualizacion .form-field.field-type-checkbox {
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        -webkit-flex-flow: row wrap;
        flex-flow: row wrap;
        margin-bottom: 5px;
        flex-flow: nowrap;
    }
}

/* ============================
   Modal Política de Privacidad
   ============================ */
a.privacy-policy-link{
    font-size: 13px;
    margin-left: 8px;
    text-decoration: underline;
    cursor: pointer;
}

.privacy-policy-popup{
    display: none !important;
    position: fixed;
    z-index: 100000; /* por encima del modal principal */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.privacy-policy-popup.is-open{
    display: flex !important;
}

.privacy-policy-content{
    background: #fff;
    width: 720px;
    max-width: 95%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    overflow: hidden;
    position: relative;
    padding: 22px;
}

.privacy-policy-title{
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.privacy-policy-body{
    overflow: auto;
    max-height: 60vh;
    padding-right: 6px;
    font-size: 14px;
    color: #222;
}

.privacy-policy-actions{
    margin-top: 16px;
    display: flex;
    justify-content: center;
}


/* ✅ Mejora: botón Guardar deshabilitado con opacidad 0.6 */
#custom-popup input[type="submit"]:disabled,
#custom-popup button[type="submit"]:disabled,
#custom-popup .button-primary:disabled,
#custom-popup .button-primary[disabled]{
    opacity: 0.6;
    cursor: not-allowed;
}
#custom-popup input[type="submit"]:enabled,
#custom-popup button[type="submit"]:enabled,
#custom-popup .button-primary:enabled{
    opacity: 1;
}


/* Botón Guardar deshabilitado (checkboxes pendientes) */
#popup-form .is-disabled,
#popup-form input[type="submit"].is-disabled,
#popup-form button[type="submit"].is-disabled {
    opacity: 0.6;
    pointer-events: none;
}

#popup-form input[type="submit"],
#popup-form button[type="submit"] { opacity: 1; }
