/* IA-OPS Web Forms — estilos compartidos (PQRS y Paz y Salvo)
 * Branding Logros: coral #E06A3D, gris #D9DBE3, texto #2D2D2D, fondo blanco.
 * Mobile-first, accesible (AA), pensado para embeber por iframe. */

:root {
  --lfc-coral: #E06A3D;
  --lfc-coral-dark: #C4552B;
  --lfc-gris: #D9DBE3;
  --lfc-gris-claro: #F4F5F8;
  --lfc-texto: #2D2D2D;
  --lfc-texto-suave: #5B5F6B;
  --lfc-blanco: #FFFFFF;
  --lfc-error: #B3261E;
  --lfc-error-bg: #FCECEA;
  --lfc-ok: #1E7A46;
  --lfc-ok-bg: #E7F4EC;
  --lfc-radio: 10px;
  --lfc-foco: #1A5FB4;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  /* En iframe el body no debe generar scroll horizontal. */
  overflow-x: hidden;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--lfc-texto);
  background: var(--lfc-blanco);
  line-height: 1.5;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

.lfc-wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 18px 40px;
}

/* Encabezado */
.lfc-header {
  border-bottom: 3px solid var(--lfc-coral);
  padding-bottom: 14px;
  margin-bottom: 22px;
}

.lfc-header h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 6px;
  color: var(--lfc-texto);
  font-weight: 700;
}

.lfc-header p {
  margin: 0;
  color: var(--lfc-texto-suave);
  font-size: 0.95rem;
}

/* Campos */
.lfc-field {
  margin-bottom: 18px;
}

.lfc-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--lfc-texto);
}

.lfc-req {
  color: var(--lfc-coral-dark);
  font-weight: 700;
}

.lfc-hint {
  display: block;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--lfc-texto-suave);
  margin-top: 2px;
}

.lfc-field input[type="text"],
.lfc-field input[type="email"],
.lfc-field input[type="tel"],
.lfc-field input[type="file"],
.lfc-field select,
.lfc-field textarea {
  width: 100%;
  padding: 11px 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--lfc-texto);
  background: var(--lfc-blanco);
  border: 1.5px solid var(--lfc-gris);
  border-radius: var(--lfc-radio);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.lfc-field textarea {
  min-height: 120px;
  resize: vertical;
}

.lfc-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235B5F6B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
}

.lfc-field input:hover,
.lfc-field select:hover,
.lfc-field textarea:hover {
  border-color: #BFC3CF;
}

/* Foco visible (accesibilidad) */
.lfc-field input:focus,
.lfc-field select:focus,
.lfc-field textarea:focus,
.lfc-btn:focus-visible {
  outline: 3px solid var(--lfc-foco);
  outline-offset: 2px;
  border-color: var(--lfc-coral);
  box-shadow: 0 0 0 3px rgba(224, 106, 61, 0.18);
}

.lfc-field input[aria-invalid="true"],
.lfc-field select[aria-invalid="true"],
.lfc-field textarea[aria-invalid="true"] {
  border-color: var(--lfc-error);
}

.lfc-field-error {
  display: none;
  color: var(--lfc-error);
  font-size: 0.83rem;
  margin-top: 5px;
}

.lfc-field-error.is-visible { display: block; }

/* Turnstile */
.lfc-turnstile {
  margin: 8px 0 20px;
  min-height: 65px;
}

/* Botón */
.lfc-actions {
  margin-top: 8px;
}

.lfc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  font-size: 1.02rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--lfc-blanco);
  background: var(--lfc-coral);
  border: none;
  border-radius: var(--lfc-radio);
  cursor: pointer;
  transition: background .15s ease;
}

.lfc-btn:hover:not(:disabled) { background: var(--lfc-coral-dark); }

.lfc-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Spinner */
.lfc-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.45);
  border-top-color: var(--lfc-blanco);
  border-radius: 50%;
  animation: lfc-spin .7s linear infinite;
  display: none;
}

.lfc-btn.is-loading .lfc-spinner { display: inline-block; }

@keyframes lfc-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .lfc-spinner { animation-duration: 2s; }
}

/* Mensajes de resultado */
.lfc-alert {
  display: none;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: var(--lfc-radio);
  font-size: 0.95rem;
  border: 1.5px solid transparent;
}

.lfc-alert.is-visible { display: block; }

.lfc-alert-ok {
  color: var(--lfc-ok);
  background: var(--lfc-ok-bg);
  border-color: #B7DEC5;
}

.lfc-alert-error {
  color: var(--lfc-error);
  background: var(--lfc-error-bg);
  border-color: #F1C4BF;
}

.lfc-alert strong { display: block; margin-bottom: 2px; }

.lfc-alert ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

/* Responsive: dos columnas en pantallas amplias */
@media (min-width: 560px) {
  .lfc-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }
}

/* Autorización de tratamiento de datos (habeas data, Ley 1581/2012) */
.lfc-consent {
  background: var(--lfc-gris-claro);
  border: 1.5px solid var(--lfc-gris);
  border-radius: var(--lfc-radio);
  padding: 14px 14px;
  margin: 4px 0 20px;
}

.lfc-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400 !important;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--lfc-texto);
  cursor: pointer;
  margin-bottom: 0 !important;
}

.lfc-consent-label input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--lfc-coral);
  cursor: pointer;
}

.lfc-consent-label a {
  color: var(--lfc-coral-dark);
  font-weight: 600;
  text-decoration: underline;
}

.lfc-consent-label input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--lfc-foco);
  outline-offset: 2px;
}
