/* =====================================================================
   DVirtual · Modal <dialog> (patrón compartido)
   16-11-2026

   Este bloque vivía inline en public/index.php (líneas 316-365) y bloqueaba
   el patrón de modal en cualquier otra página. Vive acá, solo, porque:

   - NO va dentro de assets/css/spa.css: esa hoja es del servicio "crear SpA",
     define sus propias variables y reglas de body, y al meterla en
     mi-cuenta.php (que vive con el tailwind.min.css del sitio) le cambiaría
     la tipografía y los tamaños de toda la página.
   - NO depende de ninguna clase del tailwind.min.css del sitio: esa build
     está purgada y una clase que no exista ahí se rompe en silencio.

   Solo reglas .modal-*: se puede incluir en cualquier página sin tocar el
   resto del diseño.
   ===================================================================== */

.modal-content {
  border: 1px solid #c4c5d5;
  border-radius: 1rem;
  background: #ffffff;
  color: #1a1b22;
  overflow: hidden;
  max-width: 920px;
  width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.5);
}
.modal-content::backdrop {
  background: rgba(15, 15, 16, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; padding: 1.4rem 1.5rem 1.1rem;
  border-bottom: 1px solid #e2e1eb;
}
.modal-header h2 { font-size: 1.4rem; margin: 0 0 0.25rem; letter-spacing: -0.02em; }
.modal-header p { color: #444653; font-size: 0.9rem; margin: 0; }
.modal-body { padding: 1.25rem 1.5rem; overflow-y: auto; max-height: calc(100vh - 210px); }
.modal-body h3 { font-family: 'Hanken Grotesk', sans-serif; font-size: 1.1rem; margin: 1.25rem 0 0.5rem; color: #002d89; }
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { color: #444653; font-size: 0.95rem; line-height: 1.6; margin: 0 0 0.75rem; }
.modal-body ul { color: #444653; font-size: 0.95rem; line-height: 1.6; padding-left: 1.5rem; margin: 0 0 0.75rem; }
.modal-body ol { color: #444653; font-size: 0.95rem; line-height: 1.6; padding-left: 1.5rem; margin: 0 0 0.75rem; }
.modal-body li { margin-bottom: 0.35rem; }
.modal-body a { color: #1d4ed8; text-decoration: underline; }
.modal-body strong { color: #1a1b22; }
.modal-close {
  background: #f4f3fc; border: 1px solid #c4c5d5; font-size: 24px;
  cursor: pointer; width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #444653; flex-shrink: 0; font-weight: 300; line-height: 1; padding: 0;
  font-family: inherit; position: absolute; top: 14px; right: 14px; z-index: 10;
}
.modal-close:hover { background: #dce1ff; color: #002d89; border-color: #002d89; }

/* Modal footer */
.modal-footer {
  padding: 0.9rem 1.25rem; border-top: 1px solid #e2e1eb;
  display: flex; gap: 0.6rem; justify-content: flex-end; align-items: center;
  flex-wrap: wrap; background: #f4f3fc; position: sticky; bottom: 0;
}
.modal-footer .btn { padding: 0.7rem 1.1rem; font-size: 0.9rem; }
/* 2026-11-25: el boton "Autorizar" del mandato F29 nace deshabilitado hasta
   que se marcan las tres casillas. Sin esto se veía igual que habilitado y
   el cliente creia que podia autorizar sin marcar nada. */
.modal-footer .btn[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 640px) {
  .modal-content { width: calc(100vw - 16px); max-width: 100vw; max-height: calc(100vh - 16px); }
  .modal-body { max-height: calc(100vh - 180px); padding: 1rem 1.1rem; }
  .modal-header { padding: 1.1rem 1.25rem 0.9rem; }
  .modal-header h2 { font-size: 1.2rem; }
}
