/* ==========================================================================
   Trenify — Planes (popup de la portada + sección #precio)
   Dos billetes: Básico (crema) y Plus (degradado de marca). Mismo lenguaje
   que .vj-ticket de viaje.css: perforación, tipografía mono para rótulos,
   Fraunces para el precio. Precios y llamadas: espejo de src/plans.py.
   ========================================================================== */

:root {
  --tp-night: #14092b;
  --tp-ink: #2a1b4e;
  --tp-ink-soft: #524766;
  --tp-cream: #fbf6ef;
  --tp-violet: #4b2e9c;
  --tp-magenta: #c41e8c;
  --tp-mint: #8dffc0;
  --tp-green: #2e8b57;
}

/* ---- Rejilla de billetes (compartida por popup y sección) --------------- */
.tp-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.tp-ticket {
  position: relative; display: flex; flex-direction: column;
  border-radius: 20px; background: #fff; color: var(--tp-ink);
  box-shadow: 0 30px 60px -36px rgba(20, 9, 43, .75);
}
.tp-ticket--plus {
  background: linear-gradient(150deg, var(--tp-violet), var(--tp-magenta));
  color: #fff;
  box-shadow: 0 34px 70px -34px rgba(196, 30, 140, .85);
}

.tp-ticket-top { padding: 24px 24px 18px; flex: 1; }
.tp-ticket-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tp-kicker {
  margin: 0; font-family: var(--vj-mono, ui-monospace, monospace);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #7a6f8d;
}
.tp-ticket--plus .tp-kicker { color: rgba(255, 255, 255, .78); }
.tp-badge {
  font-family: var(--vj-mono, ui-monospace, monospace); font-size: 10.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  padding: 5px 10px; border-radius: 999px;
  background: var(--tp-mint); color: #0f3d26;
}

.tp-price { display: flex; align-items: flex-end; gap: 8px; margin-top: 12px; }
.tp-price strong {
  font-family: var(--font-display, Georgia, serif); font-weight: 700;
  font-size: clamp(44px, 6vw, 58px); line-height: .92; letter-spacing: -.02em;
  background: linear-gradient(120deg, var(--tp-violet), var(--tp-magenta));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tp-ticket--plus .tp-price strong { background: none; color: #fff; }
.tp-price span { font-size: 15px; font-weight: 600; color: var(--tp-ink-soft); padding-bottom: 6px; }
.tp-ticket--plus .tp-price span { color: rgba(255, 255, 255, .82); }
.tp-sub { margin: 8px 0 0; font-size: 14px; color: var(--tp-ink-soft); }
.tp-ticket--plus .tp-sub { color: rgba(255, 255, 255, .85); }

.tp-calls {
  display: flex; align-items: center; gap: 12px; margin-top: 18px;
  padding: 12px 14px; border-radius: 14px;
  background: #f4effc;
}
.tp-ticket--plus .tp-calls { background: rgba(255, 255, 255, .14); }
.tp-calls-num {
  font-family: var(--font-display, Georgia, serif); font-weight: 700; font-size: 30px; line-height: 1;
  color: var(--tp-violet);
}
.tp-ticket--plus .tp-calls-num { color: #fff; }
.tp-calls-txt { font-size: 13.5px; line-height: 1.35; color: var(--tp-ink); }
.tp-calls-txt b { display: block; font-size: 14.5px; }
.tp-ticket--plus .tp-calls-txt { color: #fff; }

.tp-list { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 0; padding: 0; }
.tp-list li { display: flex; gap: 10px; list-style: none; font-size: 14.5px; line-height: 1.45; color: #3b3054; }
.tp-list li::before { content: "✓"; color: var(--tp-green); font-weight: 700; }
.tp-ticket--plus .tp-list li { color: rgba(255, 255, 255, .92); }
.tp-ticket--plus .tp-list li::before { color: var(--tp-mint); }

/* talón: separado por la perforación, a la altura de las muescas */
.tp-stub {
  padding: 18px 24px 22px;
  border-top: 2px dashed rgba(75, 46, 156, .25);
}
.tp-ticket--plus .tp-stub { border-top-color: rgba(255, 255, 255, .35); }
.tp-buy {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 15px 20px; border-radius: 999px;
  font-size: 15.5px; font-weight: 700; text-decoration: none; text-align: center;
  transition: filter .15s ease, transform .15s ease, background .15s ease;
}
.tp-buy:hover { transform: translateY(-1px); }
.tp-buy:focus-visible { outline: 3px solid var(--tp-mint); outline-offset: 3px; }
.tp-buy--basico { background: transparent; color: var(--tp-violet); box-shadow: inset 0 0 0 2px var(--tp-violet); }
.tp-buy--basico:hover { background: var(--tp-violet); color: #fff; }
.tp-buy--plus { background: var(--tp-cream); color: var(--tp-violet); box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .5); }
.tp-buy--plus:hover { background: #fff; }
.tp-stub-note {
  margin: 10px 0 0; text-align: center;
  font-family: var(--vj-mono, ui-monospace, monospace); font-size: 11px; letter-spacing: .04em; color: #7a6f8d;
}
.tp-ticket--plus .tp-stub-note { color: rgba(255, 255, 255, .78); }

/* franja "pago único" */
.tp-once {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 14px;
  padding: 12px 16px; border-radius: 14px;
  background: rgba(141, 255, 192, .12); border: 1px solid rgba(141, 255, 192, .35);
  color: #e9fff3; font-size: 14px; text-align: center;
}
.tp-once strong { color: var(--tp-mint); }
.tp-once svg { width: 18px; height: 18px; flex: none; color: var(--tp-mint); }
.tp-once--ink { background: #eefaf3; border-color: #bfe9d0; color: #1f4d35; }
.tp-once--ink strong, .tp-once--ink svg { color: var(--tp-green); }

/* ---- Popup -------------------------------------------------------------- */
.tp-dialog {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto; padding: 0; border: none; border-radius: 26px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(75, 46, 156, .55), transparent 60%),
    radial-gradient(90% 60% at 100% 0%, rgba(196, 30, 140, .35), transparent 60%),
    var(--tp-night);
  color: #fbf6ef;
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, .8);
  overflow: auto; overscroll-behavior: contain;
}
.tp-dialog::backdrop { background: rgba(8, 3, 18, .72); backdrop-filter: blur(4px); }
.tp-dialog[open] { animation: tpIn .32s cubic-bezier(.2, .9, .3, 1.1); }
.tp-dialog[open]::backdrop { animation: tpFade .3s ease; }
@keyframes tpIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes tpFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tp-dialog[open], .tp-dialog[open]::backdrop { animation: none; } }

.tp-dialog-inner { padding: clamp(22px, 4vw, 36px); }
.tp-dialog-title-focus:focus { outline: none; }
.tp-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px;
  border: none; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer;
  font-size: 18px; line-height: 1; transition: background .15s;
}
.tp-close:hover { background: rgba(255, 255, 255, .2); }
.tp-close:focus-visible { outline: 3px solid var(--tp-mint); outline-offset: 2px; }

.tp-head { text-align: center; max-width: 560px; margin: 0 auto; padding: 0 34px; }
.tp-eyebrow {
  margin: 0; font-family: var(--vj-mono, ui-monospace, monospace);
  font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: #ff7ad0;
}
.tp-title {
  margin: 10px 0 0; font-family: var(--font-display, Georgia, serif); font-weight: 600;
  font-size: clamp(28px, 4.4vw, 40px); line-height: 1.1; color: #fff; text-wrap: balance;
}
.tp-lead { margin: 12px 0 0; font-size: 15.5px; line-height: 1.55; color: rgba(251, 246, 239, .8); text-wrap: pretty; }
.tp-dialog .tp-once { margin: 22px 0 22px; }

.tp-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px;
  margin-top: 22px; font-size: 14px; color: rgba(251, 246, 239, .78);
}
.tp-foot a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tp-foot small { font-family: var(--vj-mono, ui-monospace, monospace); font-size: 11px; letter-spacing: .04em; opacity: .8; }

/* ---- Sección #precio de la portada -------------------------------------- */
.tp-section .tp-once { margin: 0 auto 22px; }
.tp-section-foot {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 20px;
  margin-top: 24px; font-size: 14.5px; color: var(--tp-ink-soft); text-align: center;
}
.tp-section-foot a { color: var(--tp-violet); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tp-link-btn {
  border: none; background: none; padding: 0; cursor: pointer; font: inherit;
  color: var(--tp-violet); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}

@media (max-width: 560px) {
  .tp-ticket-top { padding: 20px 18px 14px; }
  .tp-stub { padding: 16px 18px 18px; }
  .tp-foot { justify-content: center; text-align: center; }
}
.tp-dialog .tp-once, .tp-section .tp-once, .tp-section-foot { max-width: none; }
