/* Spain Tax Experts — Wizard de diagnóstico (componente autocontenido) */
/* El contenedor real en el HTML es [data-diagnostico]; se incluye para que las
   variables --w-* y el estilo de tarjeta se apliquen aunque el JS no añada la clase. */
.stx-wiz, [data-diagnostico] {
  --w-bg: #101828;
  --w-soft: #1b2437;
  --w-text: #e7edf5;
  --w-muted: #9fb0c3;
  --w-primary: #4A90E2;
  --w-accent: #7dd3fc;
  --w-border: #1f2a45;
  --w-ok: #22c55e;
  --w-danger: #ef4444;
  --w-warn: #f59e0b;
  max-width: 680px;
  margin: 0 auto;
  background: var(--w-bg);
  border: 1px solid var(--w-border);
  border-radius: 18px;
  padding: 24px;
  color: var(--w-text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.55;
  box-sizing: border-box;
}
.stx-wiz *, .stx-wiz *::before, .stx-wiz *::after,
[data-diagnostico] *, [data-diagnostico] *::before, [data-diagnostico] *::after { box-sizing: border-box; }

.stx-wiz__bar { height: 6px; border-radius: 999px; background: var(--w-soft); overflow: hidden; margin-bottom: 18px; }
.stx-wiz__bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--w-primary), var(--w-accent)); width: 0; transition: width .3s ease; }

.stx-wiz__step { text-transform: uppercase; letter-spacing: .5px; font-size: 11px; font-weight: 700; color: var(--w-accent); margin-bottom: 8px; }
.stx-wiz__q { font-size: 20px; font-weight: 700; margin: 0 0 16px; line-height: 1.3; }

.stx-wiz__opts { display: grid; gap: 12px; }
.stx-wiz__opt {
  position: relative;
  display: block; width: 100%; text-align: left;
  background: #18233f;                /* tarjeta: más clara que el fondo del wizard (#101828) */
  border: 1px solid #2b3c5e;          /* borde visible */
  border-radius: 14px;
  color: var(--w-text); font-size: 15px; font-weight: 600; line-height: 1.4;
  padding: 16px 46px 16px 18px;       /* hueco a la derecha para el chevron */
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
/* chevron de affordancia (señala que es pulsable) */
.stx-wiz__opt::after {
  content: '\203A'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--w-accent); font-size: 22px; font-weight: 700; line-height: 1; opacity: .55;
  transition: opacity .18s ease, right .18s ease;
}
/* HOVER (escritorio): se eleva y resalta el borde, como las service-card del sitio */
.stx-wiz__opt:hover {
  background: #1f2d4d; border-color: var(--w-primary);
  transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.35);
}
.stx-wiz__opt:hover::after { opacity: 1; right: 13px; }
.stx-wiz__opt:focus-visible { outline: 2px solid var(--w-accent); outline-offset: 2px; }
/* SELECCIÓN / pulsado: feedback claro al elegir la opción */
.stx-wiz__opt:active,
.stx-wiz__opt[aria-pressed="true"] {
  background: rgba(74,144,226,.20); border-color: var(--w-accent);
  transform: translateY(0); box-shadow: inset 0 0 0 1px var(--w-accent);
}

.stx-wiz__nav { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 12px; flex-wrap: wrap; }
.stx-wiz__back {
  background: none; border: none; color: var(--w-muted); font-size: 14px; font-weight: 600;
  cursor: pointer; padding: 8px 4px;
}
.stx-wiz__back:hover { color: var(--w-text); }
.stx-wiz__back[hidden] { visibility: hidden; }

/* Email gate */
.stx-wiz__teaser { background: rgba(74,144,226,.1); border: 1px solid var(--w-primary); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.stx-wiz__teaser p { margin: 0; font-size: 14px; color: var(--w-text); }
.stx-wiz__field { margin-bottom: 12px; }
.stx-wiz__field label { display: block; font-size: 13px; font-weight: 600; color: var(--w-muted); margin-bottom: 6px; }
.stx-wiz input[type="text"], .stx-wiz input[type="email"] {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--w-border);
  background: #0f172a; color: var(--w-text); font-size: 15px; font-family: inherit;
}
.stx-wiz input:focus-visible { outline: 2px solid var(--w-accent); outline-offset: 1px; }
.stx-wiz__legal { display: flex; gap: .5rem; align-items: flex-start; font-size: 13px; color: var(--w-muted); margin: 4px 0 14px; }
.stx-wiz__legal input { margin-top: 3px; flex-shrink: 0; }
.stx-wiz__legal a { color: var(--w-accent); }
.stx-wiz__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.stx-wiz__btn {
  display: inline-block; width: 100%; padding: 14px 20px; border: none; border-radius: 12px;
  background: var(--w-primary); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer;
  font-family: inherit; transition: background .2s, transform .15s; text-align: center; text-decoration: none;
}
.stx-wiz__btn:hover { background: #3a7bc8; transform: translateY(-1px); }
.stx-wiz__btn:disabled { opacity: .6; cursor: default; transform: none; }
.stx-wiz__msg { font-size: 14px; margin-top: 10px; min-height: 1.2em; }

/* Result */
.stx-wiz__result-h { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.stx-wiz__principal { background: var(--w-soft); border: 1px solid var(--w-border); border-left: 4px solid var(--w-accent); border-radius: 12px; padding: 16px; margin: 14px 0; }
.stx-wiz__principal p { margin: 0; font-size: 16px; }
.stx-wiz__urgent { background: rgba(245,158,11,.12); border: 1px solid var(--w-warn); border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 12px 0; }
.stx-wiz__comps { font-size: 14px; color: var(--w-muted); margin: 12px 0; }
.stx-wiz__comps a { color: var(--w-accent); }
.stx-wiz__ctas { display: grid; gap: 10px; margin-top: 16px; }
.stx-wiz__wa { display: inline-block; width: 100%; text-align: center; padding: 14px 20px; border-radius: 12px; background: transparent; border: 2px solid #25D366; color: #25D366; font-weight: 700; text-decoration: none; }
.stx-wiz__wa:hover { background: #25D366; color: #fff; }
.stx-wiz__restart { background: none; border: none; color: var(--w-muted); font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 6px; text-decoration: underline; }
.stx-wiz__ok { color: var(--w-ok); font-size: 14px; margin: 12px 0 0; }

@media (max-width: 480px) {
  .stx-wiz { padding: 18px; border-radius: 14px; }
  .stx-wiz__q { font-size: 18px; }
  .stx-wiz__opt { font-size: 14px; padding: 14px 42px 14px 15px; }
}
