:root{
  --green: #0a7a33;
  --green-dark: #075b26;
  --yellow: #f2b700;
  --text: #1d1d1f;
  --muted: #666;
  --border: #d9d9de;
  --bg: #ffffff;
  --page-bg: #f6f7fb;
  --error: #d92d20;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --radius: 14px;
  --maxw: 760px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{ box-sizing: border-box; }

html, body{
  height: 100%;
}

body{
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--page-bg);
}

/* Layout */
.page{
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.hash{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  padding: 6px 10px;
  background: #f1f2f6;
  border-radius: 10px;
  border: 1px solid #e4e6ef;
}

.pill{
  justify-self: end;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  background: #6c3df4; /* parecido al borde morado de tu captura */
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
}

.container{
  flex: 1;
  padding: 18px 14px 40px;
  display: flex;
  justify-content: center;
}

.card{
  width: 100%;
  max-width: var(--maxw);
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px;
  border: 1px solid #f0f0f6;
}

.brand{
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.brand__logo{
  width: min(260px, 70vw);
  height: auto;
}

.title{
  text-align: center;
  margin: 14px 0 10px;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 800;
  color: var(--green);
}

.lead{
  margin: 0 auto 18px;
  max-width: 64ch;
  font-size: 14.5px;
  line-height: 1.5;
  color: #2a2a2a;
  text-align: justify;
  text-justify: inter-word;
}

.muted{
  color: #000;
  margin-left: 6px;
  white-space: nowrap;
}

.form{
  margin-top: 8px;
}

.field{
  margin: 14px auto;
  max-width: 520px;
}

.label{
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
}

.req{
  color: var(--error);
  font-weight: 700;
}

.input{
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.input:focus{
  border-color: rgba(10, 122, 51, .55);
  box-shadow: 0 0 0 3px rgba(10, 122, 51, .12);
}

.error{
  margin: 0 0 8px;
  color: var(--error);
  font-size: 13px;
  line-height: 1.35;
}

.field.is-invalid .input{
  border-color: rgba(217, 45, 32, .55);
  box-shadow: 0 0 0 3px rgba(217, 45, 32, .10);
}

.terms{
  margin: 0 auto 18px;
  max-width: 64ch;
  font-size: 14.5px;
  line-height: 1.5;
  color: #333;
  text-align: justify;
  text-justify: inter-word;
}

.link{
  color: #0b5ed7;
  text-decoration: underline;
}

.btn{
  display: block;
  width: min(420px, 100%);
  margin: 0 auto;
  height: 54px;
  border: none;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover{
    filter: brightness(0.95);
}

.footer-links{
  max-width: 520px;
  margin: 18px auto 0;
  padding-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  border-top: none;
  text-align: center;
}

.footer-links__title{
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 13.5px;
}

.footer-links__col{
  display: grid;
  gap: 6px;
  justify-items: center;
}

/* Responsive extras */
@media (max-width: 520px){
  .card{
    padding: 18px 14px;
  }

  .footer-links{
    grid-template-columns: 1fr;
  }

  .pill{
    font-size: 12.5px;
    padding: 7px 10px;
  }

  .hash{
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce){
  *{
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* ============ Wizard steps (sin recarga) ============ */
.step{ display: none; }
.step.is-active{ display: block; }

/* Logo alineado a la izquierda (como tu captura) */
.brand--left{ justify-content: flex-start; }
.brand__logo--left{ width: min(260px, 62vw); }

/* Filas inline */
.inline-row{
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-row .dash,
.inline-row .slash{
  font-weight: 700;
  color: #333;
  user-select: none;
}

.input--small{ width: 90px; }
.input--tiny{ width: 64px; text-align: center; }


/* Link de ayuda debajo del campo */
.help-link{
  display: inline-block;
  margin-top: 10px;
}

/* Date con icono (simple) */
.date-wrap{
  position: relative;
}

.date-icon{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  pointer-events: none;
}

/* Labels secundarios del Paso 2 */
.label--sub{
  margin-top: 8px;
}


.btn--yellow{
  background: var(--yellow);
  color: #000;
}

.btn--yellow:hover{
  filter: brightness(0.95);
}

/* Mobile: botones en columna */
@media (max-width: 720px){
  .btn-row{
    grid-template-columns: 1fr 1fr; /* se mantiene en 2 columnas */
    gap: 12px;
  }

  .btn{
    width: 100%;
  }
}

/* ============ Step3 survey UI ============ */
.q-block{
  max-width: 520px;
  margin: 18px auto;
}

.q-title{
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.35;
}

.textarea{
  min-height: 140px;
  resize: vertical;
}

/* Likert */
.likert{
  display: grid;
  grid-template-columns: 72px 1fr; /* izquierda iconos / derecha opciones */
  gap: 18px;
  align-items: start;
}


.likert__icon{
  display: grid;
  place-items: center;
}

.likert__img{
  width: 32px;
  height: 32px;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}


@media (max-width: 720px){
  .likert{
    grid-template-columns: 56px 1fr;
    gap: 14px;
  }
  .likert__img{
    width: 28px;
    height: 28px;
  }
}



.likert__icon--top{
  grid-column: 1;
  grid-row: 1;
}

.likert__options{
  grid-column: 2;
  grid-row: 1 / span 2; /* ocupa el alto de los 2 iconos */
}

.likert__icon--bottom{
  grid-column: 1;
  grid-row: 2;
  align-self: end; /* para que quede abajo como en Wix */
}


.radio{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;   /* antes estaba más grande */
  line-height: 1.2;
  padding-top: 6px;
  padding-bottom: 6px;
}

.radio input[type="radio"]{
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

/* ============ NPS (Responsive) ============ */
.nps{
  max-width: 760px;
  margin: 0 auto;
}

.nps__header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 10px 0 12px;
}

.nps__side--left{
  align-items: flex-start;
  text-align: left;
}

.nps__side--right{
  align-items: flex-end;
  text-align: right;
}

.nps__side{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 120px;
}

.nps__img{
  width: 33px;
  height: 33px;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.nps__label{
  margin-top: 8px;
  font-size: 16px;
  color: #222;
}

.nps__scale{
  display: grid;
  grid-template-columns: repeat(11, minmax(44px, 1fr));
  gap: 3px;
  align-items: center;
}

/* Inputs ocultos, labels son los botones */
.nps__scale input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nps__btn{
  display: grid;
  place-items: center;
  height: 50px;
  border: 2px solid #d9d9de;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  background: #fff;
  user-select: none;
}

.nps__scale input:checked + .nps__btn{
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(10, 122, 51, .12);
}

.nps__btn:hover{
  border-color: var(--green);
}


/* Mobile: que NO se salga */
@media (max-width: 720px){
  /* NPS en UNA sola fila */
  .nps__scale{
    grid-template-columns: repeat(11, minmax(0, 1fr));
    gap: 2px;
  }

  .nps__btn{
    height: 38px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
  }

  .nps__img{
    width: 28px;
    height: 28px;
  }

  .nps__label{
    font-size: 13px;
  }
}


/* Step2 - Transacción: input + imagen */
.inline-row--trx{
  display: flex;
  align-items: center;
  gap: 14px;
}

/* PC: el input no se amarra pequeño, toma un ancho razonable */
.inline-row--trx .input{
  flex: 1 1 320px;   /* puede crecer y encoger */
  min-width: 220px;  /* evita que quede mini */
}

/* la imagen se mantiene a la derecha */
.inline-row--trx img{
  flex: 0 0 auto;
  display: block;
  max-width: 261px;
  height: auto;
}

/* Móvil: imagen abajo, input ocupa TODO el ancho */
@media (max-width: 720px){

  .inline-row--trx{
    flex-direction: column;
    align-items: stretch;
  }

  /* 👇 Reset completo del flex en móvil */
  .inline-row--trx .input{
    flex: unset;
    width: 100%;
    min-width: 0;
  }

  .inline-row--trx img{
    align-self: center;
    max-width: 100%;
    margin-top: 10px;
  }
}

.input--date{
  cursor: pointer;
}



/* Botonera: que no se pegue a los bordes */
.btn-row{
  width: 100%;
  max-width: 550px;     /* controla lo “ancho” que se ven */
  margin: 22px auto 0;  /* centra el bloque */
  padding: 0 18px;      /* aire lateral */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* Botones ocupan su celda, pero dentro del max-width */
.btn-row .btn{
  width: 100%;
}

/* En pantallas muy grandes, si aún los sientes enormes, baja el max */
@media (min-width: 1100px){
  .btn-row{
    max-width: 360px;
  }
}

/* Móvil: mantiene lado a lado y con aire */
@media (max-width: 720px){
  .btn-row{
    max-width: 420px;
    padding: 0 14px;
    gap: 12px;
  }
}


/* Overlay loading */
.overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.overlay__card{
  background: #fff;
  border-radius: 16px;
  padding: 18px 22px;
  width: min(360px, 92vw);
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

#overlayGif{
  width: 84px;
  height: 84px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
}

/* Result blocks */
.result{
  max-width: 720px;
  padding: 22px;
padding-top: 0px;
}



/* Si el overlay tiene hidden, jamás debe mostrarse */
#overlay[hidden]{
  display: none !important;
}

.offer {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.offer__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.offer__logo {
  height: 40px;
}

.offer__lead {
  font-weight: 600;
  margin-bottom: 15px;
}

.offer__codeBox {
  background: #11843b;
  color: white;
  padding: 20px;
  border-radius: 6px;
  text-align: center;
  margin: 10px 0;
}


.offer__expire {
  font-size: 16px;
}

.offer__note {
  margin: 20px 0;
}

.offer__receipt {
  margin-top: 30px;
  text-align: center;
}

.offer__receipt img {
  max-width: 100%;
  height: auto;
  width: 250px;
    height: 375px;
    border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.result--err{ border-left: 6px solid #d92d20; }

/* Mejor lectura del código en móvil */
.offer__code {
  word-break: keep-all;        /* evita cortes raros */
  overflow-wrap: anywhere;     /* si no cabe, corta donde sea */
  letter-spacing: 1px;         /* menos espaciado */
}

/* Ajustes responsive */
@media (max-width: 480px) {
  .offer__codeBox {
    padding: 22px 16px;        /* menos padding */
  }

  .offer__codeLabel {
    font-size: 16px;
  }

  .offer__code {
    font-size: 22px;           /* 👈 más chico para móvil */
    line-height: 1.15;
    letter-spacing: 0.5px;
  }

  .offer__expire {
    font-size: 16px;
  }
}

.msg-factura--hidden {
  display: none;
}

#msgFacturaRegistrada.msg-factura--hidden {
  display: none !important;
}

.msg-factura__box {
  background: #b30000; /* rojo */
  color: #fff;
  border-radius: 10px;
  padding: 18px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 10px 22px rgba(0,0,0,0.15);
}

.msg-factura__text {
  text-align: center;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

.msg-factura__imgwrap {
  display: flex;
  justify-content: center;
  margin-top: 14px;
    width: 250px;
    height: 375px;
}

.msg-factura__img {
  width: 100%;
  max-width: 520px;
  padding: 8px;
}

.msg-factura__actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.msg-factura__btn {
  border: 0;
  background: #ffffff;
  color: #b30000;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
}

.msg-factura__btn:hover {
  opacity: 0.92;
}

#msgFacturaImgWrap {
  display: flex;
  justify-content: center;   /* centra horizontal */
  align-items: center;       /* centra vertical si hay altura */
  margin-top: 30px;
}

#msgFacturaImg {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

#msgFacturaImgWrap {
  display: flex;
  justify-content: center;
}

#msgFacturaImg {
  max-width: 420px;   /* tamaño elegante */
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

#msgFacturaRegistrada {
  text-align: center;
}

.msg-factura {
  display: flex;
  flex-direction: column;
  align-items: center;   /* 🔥 centra TODO horizontalmente */
}

.offer-card{
  background:#137d39;               /* tu verde */
  color:#fff;
  border-radius:18px;
  padding:22px 18px;
  text-align:center;
  box-shadow:0 18px 40px rgba(0,0,0,.18);
}

.offer-label{
  font-weight:800;
  opacity:.95;
  /* tamaño fluido para que no se vea gigante en desktop ni micro en móvil */
  font-size:clamp(16px, 2.2vw, 26px);
  line-height:1.15;
  margin-bottom:12px;
}

/* El código: siempre entra, y se parte bonito */
.offer-code{
  display:inline-block;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.22);
  padding:12px 14px;
  border-radius:14px;

  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight:800;

  /* Fluido: reduce en móvil, se ve pro en desktop */
  font-size:clamp(16px, 3.2vw, 34px);
  line-height:1.15;

  /* ✅ CLAVE para que NUNCA se salga */
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;

  /* ayuda a que el corte sea natural en guiones */
  hyphens:auto;

  letter-spacing:.06em;
}

.offer-expire{
  margin-top:12px;
  font-weight:800;
  font-size:clamp(14px, 2.1vw, 22px);
  opacity:.95;
}

/* Ajuste fino en móviles pequeños */
@media (max-width: 420px){
  .offer-card{ padding:18px 14px; }
  .offer-code{ letter-spacing:.03em; }
}






