/* Formularios de DataGenesis: cuestionario (/solicitud/), expediente del cliente (/expediente/) y panel (/panel/).
   Usa las variables y la letra de /sv/sitio.css (que se carga antes). Aquí solo van las piezas de formulario. */

.fx-pagina { padding-block: clamp(26px, 4vw, 52px) clamp(48px, 6vw, 80px); }
.fx-columna { max-width: 46rem; }
.fx-cabeza { display: grid; gap: 12px; margin-bottom: 26px; }
.fx-cabeza h1 { font-size: clamp(1.9rem, 3vw + 1rem, 2.9rem); }

.fx-tarjeta { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: clamp(18px, 3vw, 28px); background: var(--hoja); border: 1px solid var(--linea); border-radius: 14px; min-width: 0; }
.fx-tarjeta + .fx-tarjeta { margin-top: 16px; }
.fx-tarjeta > h2, .fx-tarjeta > legend { font-family: var(--titulo); font-weight: 400; font-size: clamp(1.35rem, 1vw + 1.1rem, 1.7rem); line-height: 1.15; letter-spacing: -0.01em; padding: 0; }
fieldset.fx-tarjeta { margin: 0; }
fieldset.fx-tarjeta > legend { float: left; width: 100%; margin-bottom: 0; }
fieldset.fx-tarjeta > legend + * { clear: both; }
.fx-paso { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 8px; border-radius: 50%; background: var(--lavanda-tenue); color: var(--indigo); font-family: var(--texto); font-size: 0.9375rem; font-weight: 700; vertical-align: 0.15em; }

.fx-campo { display: grid; gap: 6px; min-width: 0; }
.fx-campo > label, .fx-rotulo { font-weight: 700; line-height: 1.35; }
.fx-campo > label.fx-nose, .fx-campo > label.fx-marca { font-weight: 400; }
.fx-opcional { font-weight: 400; color: var(--tinta-2); font-size: 0.9375rem; }
.fx-ayuda { font-size: 0.9375rem; color: var(--tinta-2); line-height: 1.45; }
.fx-campo input[type="text"], .fx-campo input[type="email"], .fx-campo input[type="tel"], .fx-campo input[type="url"], .fx-campo input[type="date"],
.fx-campo input[type="password"], .fx-campo input[type="number"], .fx-campo input[type="search"], .fx-campo select, .fx-campo textarea {
  width: 100%; min-width: 0; min-height: 50px; padding: 11px 13px;
  border: 1.5px solid #BDB5D6; border-radius: 9px; background: #fff; color: var(--tinta);
  font: inherit; font-size: 1.0625rem; line-height: 1.4;
}
.fx-campo input[type="search"] { appearance: none; -webkit-appearance: none; }
.fx-campo textarea { min-height: 104px; resize: vertical; }
.fx-campo select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--indigo) 50%), linear-gradient(135deg, var(--indigo) 50%, transparent 50%); background-position: calc(100% - 21px) 22px, calc(100% - 15px) 22px; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.fx-campo input:disabled, .fx-campo textarea:disabled, .fx-campo select:disabled { background: var(--papel-2); color: var(--tinta-2); }
.fx-campo input:focus-visible, .fx-campo select:focus-visible, .fx-campo textarea:focus-visible { outline: 3px solid var(--foco); outline-offset: 1px; border-color: var(--indigo); }
.fx-campo.fx-mal input, .fx-campo.fx-mal select, .fx-campo.fx-mal textarea { border-color: #B3261E; }
.fx-error { color: #9B1C14; font-size: 0.9688rem; font-weight: 600; }
.fx-fila { display: grid; gap: 18px; }
@media (min-width: 640px) { .fx-fila { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Casillas y opciones: toda la fila se puede tocar. */
.fx-marca { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; min-height: 48px; padding: 11px 13px; border: 1.5px solid var(--linea); border-radius: 9px; background: #fff; cursor: pointer; line-height: 1.4; }
.fx-marca:hover { border-color: var(--lavanda); }
.fx-marca input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--indigo); }
.fx-marca:has(input:checked) { border-color: var(--indigo); background: var(--lavanda-tenue); }
.fx-marca:has(input:focus-visible) { outline: 3px solid var(--foco); outline-offset: 2px; }
.fx-marca small { display: block; color: var(--tinta-2); font-size: 0.9375rem; }
.fx-marca.fx-mal { border-color: #B3261E; }
.fx-opciones { display: grid; gap: 8px; }
@media (min-width: 640px) { .fx-opciones.fx-dos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fx-nose { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 44px; width: fit-content; padding-block: 4px; font-size: 0.9688rem; color: var(--tinta-2); cursor: pointer; }
.fx-nose input { width: 22px; height: 22px; accent-color: var(--indigo); margin: 0; flex: none; }
/* El logo de la cabecera también se toca: al menos 44 px de alto (en teléfono medía 39). */
.sv-cabeza .sv-marca { display: inline-flex; align-items: center; min-height: 44px; }
.sv-pie .sv-legal.fx-sin-linea { border-top: 0; padding-top: 0; }
.fx-pre { white-space: pre-line; overflow-wrap: anywhere; }

/* Avisos */
.fx-aviso { padding: 14px 16px; border-radius: 10px; border: 1px solid var(--linea); background: var(--papel); font-size: 1rem; }
.fx-aviso.fx-extra { border-color: #E6C27A; background: var(--aviso-fondo); color: #4A2A00; }
.fx-aviso.fx-mal { border-color: #E1A6A1; background: #FDECEA; color: #7A1610; }
.fx-aviso.fx-bien { border-color: #A9D8BE; background: #E6F5EC; color: #124B30; }
.fx-aviso.fx-info { border-color: var(--lavanda); background: var(--lavanda-tenue); }
.fx-aviso strong { font-weight: 700; }
.fx-aviso a { color: inherit; font-weight: 700; }

/* Botones */
.fx-acciones { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fx-boton-chico { min-height: 44px; padding: 8px 14px; font-size: 0.9688rem; }
.fx-boton-peligro { background: transparent; color: #9B1C14; border-color: #D9A29D; }
.fx-boton-peligro:hover { background: #FDECEA; border-color: #9B1C14; }
.sv-boton[disabled], .sv-boton[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.sv-boton.fx-ocupado { position: relative; color: transparent !important; pointer-events: none; }
.sv-boton.fx-ocupado::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.5); border-top-color: #fff; animation: fx-gira 0.8s linear infinite; }
.sv-boton-claro.fx-ocupado::after, .fx-boton-peligro.fx-ocupado::after { border-color: rgba(65, 46, 154, 0.3); border-top-color: var(--indigo); }
@keyframes fx-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sv-boton.fx-ocupado::after { animation-duration: 2.4s; } }
.fx-enlace { background: none; border: 0; padding: 0; min-height: 44px; color: var(--indigo); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }

/* Archivos */
.fx-suelta { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 18px; border: 1.5px dashed #BDB5D6; border-radius: 10px; background: var(--papel); }
.fx-suelta input[type="file"] { width: 100%; min-width: 0; max-width: 100%; font: inherit; font-size: 0.9688rem; }
.fx-suelta input[type="file"]::file-selector-button { min-height: 44px; margin-right: 12px; padding: 8px 14px; border: 1.5px solid var(--indigo); border-radius: 8px; background: #fff; color: var(--indigo); font: inherit; font-weight: 700; cursor: pointer; }
.fx-archivos { display: grid; gap: 8px; }
.fx-archivo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--linea); border-radius: 9px; background: #fff; }
.fx-archivo b { font-weight: 600; overflow-wrap: anywhere; }
.fx-archivo .fx-estado { grid-column: 1 / -1; font-size: 0.9375rem; color: var(--tinta-2); }
.fx-archivo[data-estado="error"] { border-color: #E1A6A1; background: #FDECEA; }
.fx-archivo[data-estado="error"] .fx-estado { color: #7A1610; font-weight: 600; }
.fx-archivo[data-estado="listo"] .fx-estado { color: var(--hecho); font-weight: 600; }
.fx-barra { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--papel-2); overflow: hidden; }
.fx-barra i { display: block; height: 100%; width: 0; background: var(--indigo); transition: width 0.15s linear; }

/* Datos en pares y listas */
.fx-datos { display: grid; gap: 0; }
.fx-datos > div { display: grid; gap: 2px 14px; padding: 10px 0; border-top: 1px solid var(--linea); }
.fx-datos > div:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 560px) { .fx-datos > div { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); } }
.fx-datos dt { color: var(--tinta-2); font-size: 0.9688rem; }
.fx-datos dd { font-weight: 600; overflow-wrap: anywhere; white-space: pre-line; }
.fx-etiqueta { display: inline-block; padding: 3px 11px; border-radius: 999px; background: var(--papel-2); border: 1px solid var(--linea); font-size: 0.875rem; font-weight: 700; color: var(--tinta); white-space: nowrap; }
.fx-etiqueta.fx-bien { background: #DDF1E6; border-color: #A9D8BE; color: #124B30; }
.fx-etiqueta.fx-ojo { background: var(--aviso-fondo); border-color: #E6C27A; color: #5A3200; }
.fx-etiqueta.fx-mal { background: #FDECEA; border-color: #E1A6A1; color: #7A1610; }
.fx-codigo { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9375rem; overflow-wrap: anywhere; }
.fx-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
