/* Préstamos PA — Solicitud completa ([ppa_solicitud], página propia a ancho completo).
   Paleta unificada con el formulario compacto del home ([ppa_solicitud_home]) — mismo
   sistema visual en los dos puntos de entrada. MOBILE-FIRST: lo de aquí abajo son los
   estilos de celular; los @media (min-width: …) al final solo agrandan para escritorio,
   nunca al revés (esta página siempre es a ancho completo, no vive en una columna
   angosta como el widget del home, así que un @media normal es correcto aquí). */

#ppa-sol-app {
  --g:      #14432a;
  --g2:     #1a5c3a;
  --lime:   #c6dc3a;
  --lime-s: #f2f8cf;
  --ink:    #12291c;
  --mute:   #5b6b62;
  --line:   #e3eae5;
  --line2:  #c9d4cc;
  --err:    #b3261e;
  --err-s:  #fdecea;
  --bg:     #f6f7f2;
  --white:  #ffffff;
  --r:      16px;
  --r-sm:   12px;

  display: block;
  box-sizing: border-box;
  width: 100%;
  background: var(--bg);
  font-family: 'DM Sans', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
#ppa-sol-app *, #ppa-sol-app *::before, #ppa-sol-app *::after { box-sizing: border-box; }
#ppa-sol-app * { font-family: inherit; }
#ppa-sol-app p, #ppa-sol-app h1, #ppa-sol-app h2, #ppa-sol-app h3 { margin: 0; padding: 0; }
#ppa-sol-app svg { display: block; flex: none; }
#ppa-sol-app .sol-hp { position: absolute; left: -9999px; top: -9999px; }
.sol-inner { max-width: 640px; margin: 0 auto; padding: 0 18px 40px; }

/* ── Header: volver + progreso, pegado arriba mientras se hace scroll ── */
#sol-hdr {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg); padding: 16px 0 12px; margin: 0 -18px 8px; padding-left: 18px; padding-right: 18px;
  border-bottom: 1px solid var(--line);
}
#sol-hdr-inner { display: flex; align-items: center; gap: 10px; }
button.sol-hback {
  all: unset; box-sizing: border-box; flex: none; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-left: -8px; border-radius: 50%; color: var(--g); cursor: pointer;
  transition: background-color .12s, transform .1s; touch-action: manipulation;
}
button.sol-hback:active { background: var(--lime-s); transform: scale(.9); }
@media (hover: hover) { button.sol-hback:hover { background: var(--lime-s); } }
button.sol-hback:focus-visible { outline: 2.5px solid var(--g); outline-offset: 1px; }
.sol-hback svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

#sol-prog-wrap { flex: 1; display: flex; align-items: center; }
.sol-pi { flex: 1; display: flex; align-items: center; }
.sol-pi.last { flex: none; }
.sol-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line2); flex: none; transition: background-color .2s, transform .2s; }
.sol-line { flex: 1; height: 3px; background: var(--line2); margin: 0 4px; border-radius: 2px; transition: background-color .2s; }
.sol-pi.active .sol-dot, .sol-pi.done .sol-dot { background: var(--g); transform: scale(1.2); }
.sol-pi.done .sol-line { background: var(--g); }
.sol-count { flex: none; font-size: 12px; font-weight: 600; color: var(--mute); white-space: nowrap; }

/* ── Pasos ────────────────────────────────────────────── */
.sol-step { display: none; }
.sol-step.active { display: block; animation: sol-fade .25s ease; }
@keyframes sol-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.sol-step-hdr { margin: 4px 0 16px; }
.sol-step-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--g); line-height: 1.2; text-wrap: balance; }
.sol-step-title:focus { outline: none; }
.sol-step-sub { margin-top: 4px; font-size: 14px; color: var(--mute); }

.sol-card { display: flex; flex-direction: column; }

/* ── Campos ───────────────────────────────────────────── */
.sol-fg { display: flex; flex-direction: column; gap: 7px; margin: 0 0 16px; min-width: 0; }
.sol-row2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.sol-fg label, .sol-label-standalone { display: block; margin: 0; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.sol-req { color: var(--err); }
.sol-opt { font-weight: 400; color: var(--mute); }

#ppa-sol-app input[type=text], #ppa-sol-app input[type=tel], #ppa-sol-app select, #ppa-sol-app textarea {
  all: unset; box-sizing: border-box; display: block; width: 100%; min-height: 54px; padding: 14px 14px;
  border: 1.5px solid var(--line2); border-radius: var(--r-sm); background: #fff; color: var(--ink);
  font: 500 16px/1.3 'DM Sans', system-ui, sans-serif;
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
#ppa-sol-app textarea { min-height: 90px; resize: vertical; }
#ppa-sol-app input::placeholder, #ppa-sol-app textarea::placeholder { color: #7d8d84; opacity: 1; }
#ppa-sol-app select {
  /* Altura por padding (no por height:54px + padding:0): un <select> nativo no
     centra su texto de forma confiable así entre navegadores — se ve pegado
     arriba. Con padding vertical explícito y line-height a juego, sí se centra. */
  height: auto; min-height: 54px; padding: 16.2px 40px 16.2px 14px; line-height: 20px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235b6b62' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
@media (hover: hover) { #ppa-sol-app input:hover, #ppa-sol-app select:hover, #ppa-sol-app textarea:hover { border-color: #9fb0a5; } }
#ppa-sol-app input:focus, #ppa-sol-app select:focus, #ppa-sol-app textarea:focus { border-color: var(--g); box-shadow: 0 0 0 4px rgba(198, 220, 58, .5); }

.sol-inputwrap { position: relative; }
.sol-inputwrap > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 15px; font-weight: 600; color: var(--mute); pointer-events: none; }
#ppa-sol-app .sol-inputwrap input[type=text] { padding-left: 44px; }

.sol-fg.has-err input, .sol-fg.has-err select { border-color: var(--err); background-color: var(--err-s); }
.sol-fg.has-err input:focus, .sol-fg.has-err select:focus { box-shadow: 0 0 0 4px rgba(179, 38, 30, .18); }
.sol-fg.has-err .sol-chip span, .sol-fg.has-err .sol-opt-card span, .sol-fg.has-err .sol-tgl { border-color: var(--err); }
.sol-fld-err { margin: 0; font-size: 13px; line-height: 1.3; font-weight: 500; color: var(--err); }
.sol-fld-err:empty { display: none; }
.sol-err-box { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--err-s); color: var(--err); font-size: 14px; font-weight: 500; }

/* ── Monto: campo grande + deslizador ────────────────────── */
.sol-amount {
  display: flex; align-items: baseline; gap: 8px; padding: 12px 18px;
  background: var(--lime-s); border: 2px solid transparent; border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s;
}
.sol-amount:focus-within { border-color: var(--g); box-shadow: 0 0 0 4px rgba(198, 220, 58, .5); }
.sol-cur { font-size: 18px; font-weight: 700; color: var(--g); }
input.sol-amount-input {
  all: unset; box-sizing: border-box; flex: 1; min-width: 0;
  font: 800 36px/1.1 'DM Sans', system-ui, sans-serif; letter-spacing: -.02em; color: var(--g);
  font-variant-numeric: tabular-nums;
}
.sol-range {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; margin: 4px 0 0; padding: 0;
  background: transparent; cursor: pointer; --pct: 9%; touch-action: pan-x;
}
.sol-range::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(to right, var(--g) var(--pct), #dbe5de var(--pct)); }
.sol-range::-moz-range-track { height: 8px; border-radius: 99px; background: #dbe5de; }
.sol-range::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--g); }
.sol-range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: #fff; border: 4px solid var(--g); box-shadow: 0 2px 8px rgba(20, 67, 42, .3); }
.sol-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid var(--g); box-shadow: 0 2px 8px rgba(20, 67, 42, .3); }
.sol-range:focus-visible { outline: 3px solid var(--g); outline-offset: 2px; border-radius: 8px; }
.sol-scale { display: flex; justify-content: space-between; margin-top: -4px; font-size: 12px; color: var(--mute); }

/* ── Chips (plazo): fila deslizable en celular, cuadrícula en escritorio ── */
.sol-chips {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity;
  margin: 0 -18px; padding: 2px 18px 6px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.sol-chips::-webkit-scrollbar { display: none; }
.sol-chip { flex: 0 0 auto; position: relative; display: block; margin: 0; cursor: pointer; line-height: 1.2; touch-action: manipulation; scroll-snap-align: start; }
.sol-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.sol-chip span {
  display: flex; flex-direction: column; gap: 1px; align-items: center; justify-content: center;
  width: 72px; height: 60px; border: 1.5px solid var(--line2); border-radius: var(--r-sm); background: #fff;
  transition: border-color .15s, background-color .15s, box-shadow .15s, transform .1s;
}
.sol-chip:active span { transform: scale(.96); background: var(--lime-s); }
.sol-chip b { font-size: 19px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.sol-chip small { font-size: 11px; line-height: 1.2; color: var(--mute); }
@media (hover: hover) { .sol-chip:hover span { border-color: var(--g2); } }
.sol-chip input:checked + span { border-color: var(--g); background: var(--lime-s); box-shadow: inset 0 0 0 1px var(--g); }
.sol-chip input:focus-visible + span { outline: 3px solid var(--g); outline-offset: 2px; }

/* ── Tarjetas (tipo de empleo) ────────────────────────────── */
.sol-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sol-opt-card { position: relative; display: block; margin: 0; cursor: pointer; line-height: 1.2; touch-action: manipulation; }
.sol-opt-card input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.sol-opt-card span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 88px; padding: 12px 6px; border: 1.5px solid var(--line2); border-radius: var(--r-sm); background: #fff;
  transition: border-color .15s, background-color .15s, box-shadow .15s, transform .1s;
}
.sol-opt-card:active span { transform: scale(.97); background: var(--lime-s); }
.sol-opt-card i { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--lime-s); }
.sol-opt-card svg { width: 18px; height: 18px; fill: none; stroke: var(--g); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sol-opt-card em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.25; }
@media (hover: hover) { .sol-opt-card:hover span { border-color: var(--g2); } }
.sol-opt-card input:checked + span { border-color: var(--g); background: var(--lime-s); box-shadow: inset 0 0 0 1px var(--g); }
.sol-opt-card input:checked + span i { background: #fff; }
.sol-opt-card input:focus-visible + span { outline: 3px solid var(--g); outline-offset: 2px; }

/* ── Segmentado (Sí/No) ───────────────────────────────────── */
.sol-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 220px; }
button.sol-tgl {
  all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  min-height: 48px; border: 1.5px solid var(--line2); border-radius: var(--r-sm); background: #fff;
  font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: center;
  transition: border-color .15s, background-color .15s, box-shadow .15s, transform .1s;
  touch-action: manipulation;
}
button.sol-tgl:active { transform: scale(.97); }
@media (hover: hover) { button.sol-tgl:hover { border-color: var(--g2); } }
button.sol-tgl.act { border-color: var(--g); background: var(--lime-s); box-shadow: inset 0 0 0 1px var(--g); }
button.sol-tgl:focus-visible { outline: 3px solid var(--g); outline-offset: 2px; }

/* ── "¿Otros ingresos?" checkbox ──────────────────────────── */
.sol-otros-toggle { margin: 0 0 14px; }
.sol-chk-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); }
.sol-chk-box {
  flex: none; width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line2); background: #fff;
  display: flex; align-items: center; justify-content: center; transition: background-color .15s, border-color .15s;
  touch-action: manipulation;
}
.sol-chk-box svg { width: 12px; height: 10px; opacity: 0; transition: opacity .1s; }
.sol-chk-box[aria-checked="true"] { background: var(--g); border-color: var(--g); }
.sol-chk-box[aria-checked="true"] svg { opacity: 1; }
.sol-chk-box:focus-visible { outline: 3px solid var(--g); outline-offset: 2px; }
.sol-otros-box { padding: 14px 14px 2px; margin: 0 0 6px; background: var(--lime-s); border-radius: var(--r-sm); }

/* ── Nota, acciones, éxito ────────────────────────────────── */
.sol-note { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 8px; font-size: 13px; line-height: 1.4; color: var(--mute); }
.sol-note svg { width: 16px; height: 16px; margin-top: 1px; fill: none; stroke: var(--g); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sol-nav { margin-top: 20px; }
button.sol-btn-next {
  all: unset; box-sizing: border-box; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 24px; border-radius: 14px; background: var(--g); color: #fff; cursor: pointer;
  font: 700 16px/1 'DM Sans', system-ui, sans-serif; text-align: center; white-space: nowrap;
  box-shadow: 0 8px 18px -8px rgba(20, 67, 42, .6);
  transition: background-color .15s, transform .1s, box-shadow .15s;
  touch-action: manipulation;
}
@media (hover: hover) { button.sol-btn-next:hover { background: var(--g2); } }
button.sol-btn-next:active { background: var(--g2); transform: scale(.98); }
button.sol-btn-next:focus-visible { outline: 3px solid var(--g); outline-offset: 3px; }
button.sol-btn-next svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
@media (hover: hover) { button.sol-btn-next:hover svg { transform: translateX(3px); } }
button.sol-btn-next[disabled] { opacity: .8; cursor: progress; }
button.sol-btn-next[aria-busy="true"] svg { display: none; }
button.sol-btn-next[aria-busy="true"]::after {
  content: ''; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: sol-spin .7s linear infinite;
}
@keyframes sol-spin { to { transform: rotate(360deg); } }

.sol-success-box { text-align: center; padding: 40px 10px; }
.sol-badge { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--lime); }
.sol-badge svg { width: 30px; height: 30px; fill: none; stroke: var(--g); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sol-success-title { font-size: 22px; font-weight: 800; color: var(--g); margin-bottom: 8px; }
.sol-success-sub { font-size: 14px; color: var(--mute); max-width: 380px; margin: 0 auto; }

a.sol-btn-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; margin: 24px auto 0; border-radius: 14px;
  background: #25D366; color: #fff; text-decoration: none; cursor: pointer;
  font: 700 15px/1 'DM Sans', system-ui, sans-serif;
  box-shadow: 0 8px 18px -8px rgba(37, 211, 102, .5);
  transition: background-color .15s, transform .1s; touch-action: manipulation;
}
a.sol-btn-wa svg { width: 20px; height: 20px; flex: none; }
@media (hover: hover) { a.sol-btn-wa:hover { background: #1da851; } }
a.sol-btn-wa:active { background: #1da851; transform: scale(.98); }
a.sol-btn-wa:focus-visible { outline: 3px solid var(--g); outline-offset: 3px; }
#ppa-sol-app .sol-success-note { margin: 10px auto 0; text-align: center; font-size: 12px; color: var(--mute); max-width: 300px; }

/* ══════════════════════════════════════════════════════
   Solo mejoras para escritorio (ventana ancha) — esta página
   siempre es a ancho completo, así que un @media normal aplica bien. ══ */
@media (min-width: 480px) {
  .sol-row2 { grid-template-columns: 1fr 1fr; }
  .sol-chips { display: grid; grid-template-columns: repeat(4, 1fr); overflow-x: visible; scroll-snap-type: none; margin: 0; padding: 0; }
  .sol-chip { flex: initial; scroll-snap-align: none; }
  .sol-chip span { width: 100%; height: 54px; }
}
@media (min-width: 640px) {
  #ppa-sol-app { padding: 0 36px 56px; }
  .sol-step-title { font-size: 28px; }
  .sol-cur { font-size: 20px; }
  input.sol-amount-input { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  #ppa-sol-app *, #ppa-sol-app *::before, #ppa-sol-app *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation-duration: 0s !important; }
}
