/* calc-morosos.css — wizard de la calculadora de morosos (listademorosos.es).
   Se sirve DENTRO de un iframe: body transparente para fundirse con la pagina.
   Autocontenido: sin frameworks, sin fuentes externas (CSP: font-src 'self'). */

:root{
  --azul:#252D3A;
  --azul-2:#39455a;
  --naranja:#EC6907;
  --naranja-oscuro:#c85705;
  --texto:#1a1a1a;
  --texto-suave:#505050;
  --borde:#dce1e6;
  --bg-suave:#f5f7f9;
  --verde:#0f7b4f;
  --verde-bg:#e8f6ef;
  --rojo:#b3261e;
  --radio:12px;
  --sombra:0 6px 24px rgba(37,45,58,.10);
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:transparent;
  color:var(--texto);
  font-family:'Source Sans 3',system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:16px;
  line-height:1.5;
}
h2,h3,h4,p,ul,ol,li{margin:0}
button{font:inherit;color:inherit}

/* ---------- Contenedor ---------- */
.wizard{
  background:#fff;
  border:1px solid var(--borde);
  border-radius:var(--radio);
  box-shadow:var(--sombra);
  overflow:hidden;
  max-width:720px;
  margin:0 auto;
}
.wizard__head{
  background:linear-gradient(135deg,var(--azul) 0%,var(--azul-2) 100%);
  color:#fff;
  padding:20px 18px;
  text-align:center;
}
.wizard__head h2{font-size:1.25rem;font-weight:700;line-height:1.3}
.wizard__head p{margin-top:6px;font-size:.9rem;opacity:.85}
.wizard__body{padding:20px 18px;min-height:260px}
.wizard__nav{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:14px 18px;background:var(--bg-suave);border-top:1px solid var(--borde);
}

/* ---------- Botones ---------- */
.btn{
  border:0;border-radius:9px;padding:12px 16px;font-weight:600;cursor:pointer;
  transition:background-color .15s ease,opacity .15s ease;
  min-height:46px;
}
.btn--primary{background:var(--naranja);color:#fff}
.btn--primary:hover:not(:disabled){background:var(--naranja-oscuro)}
.btn--ghost{background:#e6eaee;color:var(--texto-suave)}
.btn--ghost:hover:not(:disabled){background:#d8dee4}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn--block{display:block;width:100%;margin-top:14px}

/* ---------- Progreso ---------- */
.progress{display:flex;gap:6px;flex:0 0 auto}
.progress span{width:9px;height:9px;border-radius:50%;background:#c9d1d9;transition:background-color .2s,width .2s}
.progress span.on{background:var(--naranja);width:22px;border-radius:5px}
.progress span.done{background:var(--azul)}

/* ---------- Pregunta ---------- */
.paso__num{font-size:.78rem;letter-spacing:.06em;text-transform:uppercase;color:var(--naranja);font-weight:700}
.paso__titulo{font-size:1.15rem;font-weight:700;margin-top:6px;line-height:1.35}
.paso__ayuda{font-size:.92rem;color:var(--texto-suave);margin-top:8px}

.ops{display:flex;flex-direction:column;gap:10px;margin-top:16px}
.op{
  display:flex;align-items:center;gap:12px;width:100%;text-align:left;
  background:#fff;border:2px solid var(--borde);border-radius:10px;
  padding:13px 14px;cursor:pointer;transition:border-color .15s,background-color .15s;
  min-height:52px;
}
.op:hover{border-color:var(--naranja);background:#fffaf5}
.op.sel{border-color:var(--naranja);background:#fff3e8}
.op__marca{
  flex:0 0 auto;width:20px;height:20px;border-radius:50%;border:2px solid #b9c2cb;
  display:inline-block;position:relative;
}
.op.sel .op__marca{border-color:var(--naranja)}
.op.sel .op__marca::after{
  content:"";position:absolute;inset:3px;border-radius:50%;background:var(--naranja);
}
.op__txt{font-size:.98rem;line-height:1.35}

/* ---------- Resultado ---------- */
.res__bloque{border-radius:10px;padding:14px;margin-bottom:14px}
.res__fallo{background:#fdf2f1;border:1px solid #f0cfcc}
.res__fallo h3{color:var(--rojo);font-size:1.02rem;font-weight:700;margin-bottom:6px}
.res__ok{background:var(--verde-bg);border:1px solid #bfe3d2}
.res__ok h3{color:var(--verde);font-size:1.02rem;font-weight:700;margin-bottom:6px}
.res__lista{margin-top:8px;padding-left:18px}
.res__lista li{margin-bottom:6px;font-size:.94rem}
.res__norma{display:block;font-size:.82rem;color:var(--texto-suave);margin-top:3px}

.horquilla{
  background:var(--bg-suave);border:2px solid var(--azul);border-radius:10px;
  padding:16px;text-align:center;margin-bottom:14px;
}
.horquilla__intro{font-size:.94rem;color:var(--texto-suave)}
.horquilla__cifra{
  font-size:1.7rem;font-weight:800;color:var(--azul);margin:6px 0;line-height:1.2;
  word-break:break-word;
}
.horquilla__aviso{font-size:.86rem;color:var(--texto-suave);font-weight:600}
.horquilla__refs{font-size:.8rem;color:var(--texto-suave);margin-top:8px;line-height:1.4}

.nota{font-size:.85rem;color:var(--texto-suave);background:var(--bg-suave);
  border-left:3px solid var(--naranja);padding:10px 12px;border-radius:0 8px 8px 0;margin-bottom:14px}

.sep{border:0;border-top:1px solid var(--borde);margin:18px 0}

/* ---------- Formulario ---------- */
.form h3{font-size:1.05rem;font-weight:700}
.form p.form__sub{font-size:.9rem;color:var(--texto-suave);margin-top:4px;margin-bottom:12px}
.campo{margin-bottom:12px}
.campo label{display:block;font-size:.88rem;font-weight:600;margin-bottom:5px}
.campo input[type=text],.campo input[type=tel],.campo input[type=email]{
  width:100%;padding:12px;border:1px solid var(--borde);border-radius:9px;
  font-size:1rem;font-family:inherit;background:#fff;color:var(--texto);
  min-height:46px;
}
.campo input:focus{outline:2px solid var(--naranja);outline-offset:1px;border-color:var(--naranja)}
.check{display:flex;align-items:flex-start;gap:9px;font-size:.86rem;color:var(--texto-suave);margin-bottom:10px}
.check input{margin-top:3px;width:18px;height:18px;flex:0 0 auto}
.check a{color:var(--azul);text-decoration:underline}
.error{color:var(--rojo);font-size:.88rem;margin-top:8px;font-weight:600}
.hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important}

/* ---------- Overlay y modal ---------- */
.hidden{display:none!important}
.overlay{position:fixed;inset:0;background:rgba(20,25,33,.55);display:flex;align-items:center;justify-content:center;z-index:60;padding:16px}
.overlay__box{background:#fff;border-radius:10px;padding:18px 22px;display:flex;align-items:center;gap:14px;font-weight:600}
.spinner{width:26px;height:26px;border:3px solid #e0e5ea;border-top-color:var(--naranja);border-radius:50%;animation:giro .8s linear infinite}
@keyframes giro{to{transform:rotate(360deg)}}

.modal{position:fixed;inset:0;background:rgba(20,25,33,.62);display:flex;align-items:center;justify-content:center;z-index:70;padding:16px}
.modal__box{background:#fff;border-radius:14px;padding:26px 22px;max-width:420px;width:100%;text-align:center;box-shadow:0 12px 40px rgba(0,0,0,.25);animation:entra .25s ease-out}
@keyframes entra{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}
.modal__icon{width:60px;height:60px;border-radius:50%;background:var(--verde-bg);color:var(--verde);display:flex;align-items:center;justify-content:center;margin:0 auto 12px}
.modal__icon svg{width:32px;height:32px}
.modal__box h3{font-size:1.2rem;font-weight:700;margin-bottom:8px}
.modal__box p{font-size:.95rem;color:var(--texto-suave)}

/* ---------- Movil (probado a 360 px) ---------- */
@media (max-width:520px){
  .wizard{border-radius:10px}
  .wizard__head{padding:16px 14px}
  .wizard__head h2{font-size:1.08rem}
  .wizard__head p{font-size:.84rem}
  .wizard__body{padding:16px 14px;min-height:0}
  .wizard__nav{padding:12px 14px;gap:8px}
  .btn{padding:11px 12px;font-size:.92rem}
  .paso__titulo{font-size:1.04rem}
  .op{padding:12px;min-height:50px}
  .op__txt{font-size:.94rem}
  .horquilla__cifra{font-size:1.35rem}
  .progress span{width:7px;height:7px}
  .progress span.on{width:18px}
}
@media (max-width:360px){
  .wizard__nav{flex-wrap:wrap;justify-content:center}
  .progress{order:3;width:100%;justify-content:center;margin-top:8px}
  .btn{flex:1 1 auto}
}
