/* BFQ Modal — diseño coherente con las fichas. Sustituye assets/modal.css.
   No cambia el formulario, sus campos ni el envío. */
.bfq-modal[hidden] { display: none !important; }
.bfq-modal { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.bfq-modal__backdrop { position: absolute; inset: 0; background: rgba(19, 26, 39, .68); }
.bfq-modal__panel { position: relative; width: 100%; max-width: 680px; max-height: calc(100dvh - 32px); overflow: auto; background: #fff; color: #333; border-radius: 16px; padding: 26px 28px 28px; box-shadow: 0 20px 65px rgba(0,0,0,.28); }
.bfq-modal__panel > h2 { font-size: 23px; line-height: 1.3; font-weight: 600; margin: 0 40px 18px 0; color: #333; }
.bfq-modal__close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; font-size: 30px; line-height: 1; color: #333; cursor: pointer; }
.bfq-modal__close:hover, .bfq-modal__close:focus-visible { background: #f2f2f2; color: #111; }
/* El mismo aspecto de .cajaformulario de las fichas, sin duplicar ese contenedor. */
#bfq-modal-content { background: #f7f7f7; border: 1px solid #ececec; border-radius: 12px; padding: 20px; }
#bfq-modal-content #formularioN { margin: 0; padding: 0; background: transparent; }
.bfq-modal__panel #formularioN .formularioN2-h2 { display: none; }
#bfq-modal-content #contact-form, #bfq-modal-content #bfq-modal-contact-form { margin: 0; padding: 0; }
#bfq-modal-content fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
#bfq-modal-content input:not([type="checkbox"]):not([type="hidden"]), #bfq-modal-content select { display: block; width: 100%; max-width: 100%; min-height: 46px; padding: 10px 12px; margin: 0 0 12px; border: 1px solid #d4d7dc; border-radius: 6px; background: #fff; color: #333; box-sizing: border-box; font-size: 15px; box-shadow: none; }
#bfq-modal-content input:focus, #bfq-modal-content select:focus { outline: 2px solid #f1c94e; outline-offset: 1px; border-color: #d9b133; }
#bfq-modal-content h3 { font-size: 17px; line-height: 1.4; font-weight: 600; color: #333; margin: 12px 0 10px; }
#bfq-modal-content .form_check { display: flex; align-items: flex-start; gap: 7px; margin: 0 0 8px; padding: 0; }
#bfq-modal-content .form_check input[type="checkbox"] { flex: 0 0 auto; margin: 4px 0 0; accent-color: #c59a10; }
#bfq-modal-content .form_check label { display: inline; margin: 0; line-height: 1.45; font-size: 15px; cursor: pointer; }
#bfq-modal-content #requeridos_margen { display: block; text-align: left !important; margin: 18px 0 0; }
#bfq-modal-content #requeridos_margen > div { width: 100%; max-width: none; padding: 0; margin: 0 0 10px; text-align: left; }
#bfq-modal-content #requeridos_margen label { display: inline; font-size: 14px; line-height: 1.5; cursor: pointer; }
#bfq-modal-content #requeridos_margen input[type="checkbox"] { vertical-align: middle; margin-left: 5px; accent-color: #c59a10; }
#bfq-modal-content #bfq-modal-enviar_formulario { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; min-width: 160px; padding: 11px 24px !important; margin: 5px 0 0 !important; color: #222 !important; background: #ffdf65 !important; border: 1px solid #e5c653 !important; border-radius: 6px !important; font-size: 16px; font-weight: 700; line-height: 1.2; box-shadow: none !important; cursor: pointer; }
#bfq-modal-content #bfq-modal-enviar_formulario:hover, #bfq-modal-content #bfq-modal-enviar_formulario:focus-visible { background: #f3d052 !important; border-color: #ddbc45 !important; color: #222 !important; }
#bfq-modal-content #bfq-modal-enviar_formulario:disabled { cursor: wait; opacity: .75; }
.bfq-modal__error { color: #a40000; font-weight: 600; }
.bfq-modal__success { color: #185d2f; font-weight: 600; }
body.bfq-modal-open { overflow: hidden; }
/* Mantener el diseño existente del botón de apertura en las tarjetas. */
.boton_franquicia .bfq-abrir-formulario { display: block; margin-top: 8px; background: #ffdf65; border-color: #ffdf65; color: #222; }
article[id^="post-"] .bfq-abrir-formulario { display: block; margin: 8px auto 0; background: #ffdf65; border: 1px solid #ffdf65; color: #222; cursor: pointer; }
article[id^="post-"] .bfq-abrir-formulario:hover { background: #f4cf47; color: #222; }
@media (max-width: 640px) { .bfq-modal { padding: 10px; } .bfq-modal__panel { max-height: calc(100dvh - 20px); padding: 20px 15px; border-radius: 12px; } .bfq-modal__panel > h2 { font-size: 19px; margin-right: 32px; } #bfq-modal-content { padding: 14px; } #bfq-modal-content #bfq-modal-enviar_formulario { width: 100%; } }

/* BFQ - Centrado horizontal del botón Enviar exclusivamente en el modal. */
#bfq-modal-content #requeridos_margen > div:last-child {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
}
#bfq-modal-content #bfq-modal-enviar_formulario {
    display: inline-flex !important;
    width: auto !important;
    margin: 5px auto 0 !important;
}
@media (max-width: 640px) {
    #bfq-modal-content #bfq-modal-enviar_formulario {
        width: min(100%, 300px) !important;
    }
}
