/* ════════════════════════════════════════════════════════════════════
   BENEFICIO TOR · TurisOnRoad
   Componente reutilizable. Todo va namespaced bajo .bt-* para no chocar
   con Bootstrap ni con estilos del proyecto.
   No depende de ninguna librería externa.
   ════════════════════════════════════════════════════════════════════ */

.bt-root {
  /* ---- Tokens de tema (sobrescribibles por instancia si hiciera falta) ---- */
  --bt-ink:        #0B1220;   /* navy casi negro: base del overlay        */
  --bt-card-a:     #3f7d5c;   /* degradado tarjeta (claro)  verde esmeralda */
  --bt-card-b:     #2a5942;   /* degradado tarjeta (oscuro)             */
  --bt-gold:       #E8C079;   /* dorado champán: insignia, sweep, destello */
  --bt-gold-deep:  #C9A24B;
  --bt-surface:    #F7F8FA;   /* caja de código (claro)                  */
  --bt-text:       #0B1220;
  --bt-on-dark:    #FFFFFF;
  --bt-muted:      rgba(255, 255, 255, .64);
  --bt-muted-2:    rgba(11, 18, 32, .56);
  --bt-hair:       rgba(255, 255, 255, .10);
  --bt-radius:     22px;
  --bt-ease:       cubic-bezier(.16, 1, .3, 1);

  --bt-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bt-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  font-family: var(--bt-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─────────────── TARJETA PROTAGONISTA (en la ficha) ────────────────
   Reutiliza el lenguaje visual de la tarjeta VIP: la propia tarjeta es
   ahora la pieza que muestra el beneficio de entrada. Estilos base de
   .bt-vip más abajo; aquí van los específicos del modo "trigger".        */

/* ── Aviso amarillo dentro de la tarjeta verde (param 'aviso') ── */
.bt-aviso {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #ffd658;
}
.bt-aviso__ic { flex: 0 0 auto; }
img.bt-aviso__ic { width: 20px; height: 20px; object-fit: contain; }
.bt-aviso__ic--glyph { font-size: 15px; line-height: 1; color: #ffd658; }

.bt-vip--trigger { cursor: default; padding: 26px 28px; }

.bt-vip__row {
  position: relative;            /* sobre el shimmer */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.bt-vip__main { flex: 1 1 280px; min-width: 0; }
.bt-vip--trigger .bt-vip__benefit { margin: 0; }
.bt-vip--trigger .bt-vip__note { margin: 8px 0 0; }

/* Tarjeta registrada (no bloqueada): el botón va debajo del texto, al fondo
   y a la derecha, sin hueco excesivo. */
.bt-vip:not(.is-locked) .bt-vip__row {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
/* En columna, el flex-basis de 280px se interpretaría como ALTURA y deja un
   hueco enorme bajo el texto. Lo reseteamos para que el main mida su contenido. */
.bt-vip:not(.is-locked) .bt-vip__main {
  flex: 0 0 auto;
}
.bt-vip:not(.is-locked) .bt-vip__cta {
  align-self: flex-end;
  color: #c2410c;                              /* texto naranja          */
  background: #ffe3cc;                          /* naranja pastel         */
  box-shadow: inset 0 0 0 1.5px #f0a060;        /* borde naranja          */
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.bt-vip:not(.is-locked) .bt-vip__cta:hover {
  background: #ffd6b8;
  transform: translateY(-1px);
}

.bt-vip__cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 650;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
  border-radius: 13px;
  color: var(--bt-on-dark);
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform .2s var(--bt-ease), background .2s var(--bt-ease);
}
.bt-vip__cta:hover { background: rgba(255, 255, 255, .2); transform: translateY(-1px); }
.bt-vip__cta:active { transform: translateY(0); }
.bt-vip__cta .bt-arrow { transition: transform .25s var(--bt-ease); }
.bt-vip__cta:hover .bt-arrow { transform: translateX(3px); }

/* Estado bloqueado (no registrado): el CTA pasa a dorado para invitar a registrarse */
.bt-vip.is-locked .bt-vip__cta {
  color: #1A1206;
  background: linear-gradient(135deg, var(--bt-gold), var(--bt-gold-deep));
  box-shadow: 0 2px 10px rgba(201, 162, 75, .35);
}
.bt-vip.is-locked .bt-vip__cta:hover { filter: brightness(1.05); }

/* Columna de acción del estado bloqueado: botón y, debajo, el enlace de registro.
   En escritorio el badge va en la cabecera; el badge--mobile permanece oculto. */
.bt-vip__action {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.bt-vip__badge.bt-vip__badge--mobile { display: none; }

.bt-vip__register {
  font-size: 13px;
  text-decoration: none;
  color: var(--bt-muted);
  transition: color .2s var(--bt-ease);
}
.bt-vip__register strong {
  color: var(--bt-gold);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bt-vip__register:hover { color: var(--bt-on-dark); }
.bt-vip__register:hover strong { color: #f1d8a6; }

/* ───────────────────────────── OVERLAY / MODAL ─────────────────────── */

.bt-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 11, 20, .55);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  transition: opacity .32s var(--bt-ease), visibility .32s var(--bt-ease);
}
.bt-overlay.is-open { opacity: 1; visibility: visible; }

.bt-modal {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 30px 32px 24px;
  border-radius: var(--bt-radius);
  background: #fff;
  box-shadow: 0 24px 70px rgba(7, 11, 20, .4), 0 2px 8px rgba(7, 11, 20, .2);
  transform: scale(.94) translateY(10px);
  opacity: 0;
  transition: transform .4s var(--bt-ease), opacity .4s var(--bt-ease);
}
.bt-overlay.is-open .bt-modal { transform: scale(1) translateY(0); opacity: 1; }

/* Cierre con animación inversa */
.bt-overlay.is-closing { opacity: 0; }
.bt-overlay.is-closing .bt-modal { transform: scale(.96) translateY(8px); opacity: 0; }

.bt-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  border-radius: 9px;
  font-size: 18px;
  line-height: 1;
  color: var(--bt-muted-2);
  background: rgba(11, 18, 32, .05);
  transition: background .2s, color .2s, transform .2s var(--bt-ease);
}
.bt-modal__close:hover { background: rgba(11, 18, 32, .1); color: var(--bt-text); transform: rotate(90deg); }

/* ── Cabecera ── */
.bt-header { padding-right: 28px; }
.bt-header__icon { font-size: 26px; line-height: 1; }
.bt-header__logo {
  height: 48px;
  max-width: 150px;
  object-fit: contain;
  object-position: left center;
  display: block;
}
.bt-header__sub {
  margin: 6px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #c2410c;
}
.bt-header__title {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--bt-text);
  white-space: pre-line;
}
.bt-divider {
  height: 1px;
  margin: 18px 0 20px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(232, 192, 121, .55), transparent);
}

/* ───────────────────────────── TARJETA VIP ─────────────────────────── */

.bt-vip {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 24px;
  border-radius: 20px;
  color: var(--bt-on-dark);
  background:
    radial-gradient(120% 120% at 85% 0%, rgba(232, 192, 121, .12), transparent 55%),
    linear-gradient(155deg, var(--bt-card-a), var(--bt-card-b));
  box-shadow: 0 10px 30px rgba(11, 18, 32, .3), inset 0 0 0 1px var(--bt-hair);
}

/* Brillo "glass" superior sutil */
.bt-vip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 40%);
  pointer-events: none;
}

.bt-vip__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.bt-vip__issuer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.bt-vip__mark {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  padding: 6px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(11, 18, 32, .18), inset 0 0 0 1px rgba(11, 18, 32, .06);
}
.bt-vip__issuer-text { display: flex; flex-direction: column; min-width: 0; }
.bt-vip__name {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  color: var(--bt-on-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bt-vip__cat {
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--bt-muted);
}

.bt-vip__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
  color: #1A1206;
  background: linear-gradient(135deg, var(--bt-gold), var(--bt-gold-deep));
  box-shadow: 0 2px 8px rgba(201, 162, 75, .35);
}
.bt-vip__benefit {
  position: relative;
  margin: 18px 0 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
  white-space: pre-line;
}
.bt-vip__note {
  position: relative;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--bt-muted);
}

/* ───────────────────────── ¿CÓMO BENEFICIARTE? ─────────────────────── */

.bt-how { margin-top: 22px; }
.bt-how__title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--bt-text);
}
.bt-how__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--bt-muted-2);
  white-space: pre-line;
}

/* ───────────────────────────── CÓDIGO ──────────────────────────────── */

.bt-code { margin-top: 22px; }

.bt-code__box {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 16px;
  border-radius: 14px;
  background: var(--bt-surface);
  box-shadow: inset 0 0 0 1px rgba(11, 18, 32, .07);
  overflow: hidden;
}
.bt-code__value {
  font-family: var(--bt-mono);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--bt-text);
  user-select: all;
  transition: filter .4s var(--bt-ease), opacity .4s var(--bt-ease);
}
.bt-code.is-hidden .bt-code__value {
  filter: blur(7px);
  opacity: .65;
  user-select: none;
}

/* Destello dorado al revelar (medio segundo, muy sutil) */
.bt-code__flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(60% 80% at 50% 50%, rgba(232, 192, 121, .55), transparent 70%);
}
.bt-code.is-flashing .bt-code__flash { animation: bt-flash .55s var(--bt-ease); }
@keyframes bt-flash {
  0%   { opacity: 0; transform: scale(.85); }
  35%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1.12); }
}
/* Chispitas doradas (se generan por JS) */
.bt-spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bt-gold);
  box-shadow: 0 0 6px rgba(232, 192, 121, .9);
  pointer-events: none;
  opacity: 0;
  animation: bt-spark .55s var(--bt-ease) forwards;
}
@keyframes bt-spark {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2); }
}

/* Acciones de código */
.bt-code__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 12px;
}
.bt-code.is-revealed .bt-btn-reveal { display: none; }
.bt-code:not(.is-revealed) .bt-btn-copy { display: none; }
.bt-code:not(.is-revealed) .bt-code__actions { grid-template-columns: 1fr; }

/* ───────────────────────────── BOTONES ─────────────────────────────── */

.bt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  border: 0;
  cursor: pointer;
  border-radius: 13px;
  transition: transform .2s var(--bt-ease), filter .2s var(--bt-ease), background .2s;
}
.bt-btn:active { transform: scale(.985); }

.bt-btn--dark {
  color: var(--bt-on-dark);
  background: linear-gradient(150deg, #3d8060, var(--bt-card-b));
  box-shadow: 0 2px 10px rgba(11, 18, 32, .22);
}
.bt-btn--dark:hover { filter: brightness(1.1); transform: translateY(-1px); }

.bt-btn--soft {
  color: var(--bt-text);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(11, 18, 32, .14);
}
.bt-btn--soft:hover { background: rgba(11, 18, 32, .03); }

.bt-btn--copy.is-copied {
  color: #0a7d33;
  box-shadow: inset 0 0 0 1px rgba(10, 125, 51, .4);
  background: rgba(10, 125, 51, .06);
}
.bt-btn--copy.is-copied .bt-btn-ico { display: none; }

/* Botón web colaborador (naranja pastel, a juego con el hero) */
.bt-collab {
  width: 100%;
  margin-top: 14px;
  text-decoration: none;
  color: #c2410c;
  background: #ffe3cc;
  box-shadow: inset 0 0 0 1.5px #f0a060;
}
.bt-collab:hover { background: #ffd6b8; transform: translateY(-1px); }
.bt-collab__logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 5px;
  background: rgba(0, 0, 0, .06);
}

/* ── Nota obligatoria ── */
.bt-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  padding: 11px 13px;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 600;
  color: #6b4b00;
  background: rgba(232, 192, 121, .14);
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgba(201, 162, 75, .28);
}
.bt-note__icon { flex: 0 0 auto; font-size: 14px; line-height: 1.4; color: var(--bt-gold-deep); }

/* ───────────────────────────── PIE ─────────────────────────────────── */

.bt-foot {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(11, 18, 32, .07);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
  color: var(--bt-muted-2);
}
.bt-foot span { display: block; }

/* ───────────────────────────── TOAST (aviso flotante) ──────────────── */

.bt-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 2147483600;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 32px);
  padding: 11px 18px 11px 13px;
  font-family: var(--bt-font);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(150deg, #1f3a2c, #142318);
  border-radius: 999px;
  box-shadow: 0 10px 34px rgba(7, 11, 20, .4), inset 0 0 0 1px rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .28s var(--bt-ease), transform .28s var(--bt-ease);
}
.bt-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.bt-toast__check {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #14321f;
  background: linear-gradient(135deg, #7ee2a8, #46c178);
}

/* ───────────────────────────── FOCUS / A11Y ────────────────────────── */

.bt-vip__cta:focus-visible,
.bt-btn:focus-visible,
.bt-modal__close:focus-visible,
.bt-collab:focus-visible {
  outline: 2px solid var(--bt-gold);
  outline-offset: 2px;
}

/* ───────────────────────────── RESPONSIVE ──────────────────────────── */

@media (max-width: 600px) {
  .bt-vip--trigger { padding: 22px 20px; }
  .bt-vip__row { gap: 16px; }
  .bt-vip__cta { width: 100%; justify-content: center; }
  .bt-vip__action { width: 100%; align-items: stretch; }
  .bt-vip__badge.bt-vip__badge--head { display: none; }
  .bt-vip__badge.bt-vip__badge--mobile { display: inline-flex; align-self: center; }
  .bt-vip__register { text-align: center; }
  .bt-modal { padding: 24px 20px 18px; border-radius: 20px; }
  .bt-vip__benefit { font-size: 20px; }
  .bt-code__actions { grid-template-columns: 1fr; }
  .bt-btn { width: 100%; }
}

/* ───────────────────────── MOVIMIENTO REDUCIDO ─────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .bt-code.is-flashing .bt-code__flash,
  .bt-spark { animation: none; }
  .bt-overlay, .bt-modal, .bt-vip, .bt-btn, .bt-vip__cta, .bt-toast { transition-duration: .01ms; }
}
