/*
 * Checkout Tictra (web, iframe y hardticket).
 * Todo cuelga de .tck para no chocar con Bootstrap ni con home.css.
 * Dentro del iframe (.te) los colores salen de la configuración de la organización.
 * Las animaciones son solo visuales y se desactivan con prefers-reduced-motion.
 */
@font-face { font-family: "TckGrey"; src: url("/resources/fonts/GreyCliff/Greycliff-CF-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "TckGrey"; src: url("/resources/fonts/GreyCliff/Greycliff-CF-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "TckGrey"; src: url("/resources/fonts/GreyCliff/Greycliff-CF-Demi-Bold.otf") format("opentype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "TckGrey"; src: url("/resources/fonts/GreyCliff/Greycliff-CF-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "TckGrey"; src: url("/resources/fonts/GreyCliff/Greycliff-CF-Extra-Bold.otf") format("opentype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "TckBaloo"; src: url("/resources/fonts/Baloo2-Bold.ttf") format("truetype"); font-weight: 700 800; font-display: swap; }

.tck {
    --tk-page: #f2f4fa;
    --tk-card: #ffffff;
    --tk-line: #e3e7f0;
    --tk-soft: #f7f8fb;
    --tk-soft2: #eef1f7;
    --tk-ink: #0f1a33;
    --tk-tx: #3a4254;
    --tk-dim: #5b6475;
    --tk-mute: #6b7385;
    --tk-field: #ffffff;
    --tk-field-line: #d5dbe7;
    --tk-field-hover: #aeb8cc;
    --tk-off: #b9c2d3;
    --tk-focus: #13cbe7;
    --tk-ring: rgba(19, 203, 231, .22);
    --tk-head: #022f96;
    --tk-head2: #00185a;
    --tk-head-fg: #ffffff;
    --tk-head-dim: #a9b6d8;
    --tk-head-soft: rgba(255, 255, 255, .08);
    --tk-head-line: rgba(255, 255, 255, .18);
    --tk-head-ring: rgba(255, 255, 255, .42);
    --tk-acc: #13cbe7;
    --tk-acc-ink: #00216d;
    --tk-glow: rgba(19, 203, 231, .55);
    --tk-brand: #022f96;
    --tk-brand-fg: #ffffff;
    --tk-link: #022f96;
    --tk-tint: #ebfbfe;
    --tk-tint-line: #a9e8f3;
    --tk-err: #b42318;
    --tk-err-soft: #fdecea;
    --tk-err-tx: #b42318;
    --tk-sh: 0 1px 2px rgba(15, 26, 51, .04), 0 16px 40px -18px rgba(2, 47, 150, .18);
    --tk-sh-hi: 0 2px 4px rgba(15, 26, 51, .05), 0 22px 48px -18px rgba(2, 47, 150, .26);
    --tk-r: 20px;
    --tk-rb: 14px;
    --tk-rf: 12px;
    --tk-ease: cubic-bezier(.2, .8, .2, 1);
    --tk-font: "TckGrey", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --tk-hfont: "TckBaloo", "TckGrey", system-ui, sans-serif;

    position: relative;
    min-height: 100vh;
    background: var(--tk-page);
    color: var(--tk-ink);
    font-family: var(--tk-font);
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
    animation: tck-fade .35s ease both;
}

.tck *, .tck *::before, .tck *::after { box-sizing: border-box; }
.tck a { color: var(--tk-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-thickness .15s, color .15s; }
.tck a:hover { color: var(--tk-link); text-decoration-thickness: 2px; }
.tck button { font-family: inherit; }
.tck :focus-visible { outline: 3px solid var(--tk-focus); outline-offset: 2px; }
.tck svg { flex: none; }
.tck p { margin: 0; }
.tck ::selection { background: var(--tk-ring); }

@keyframes tck-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tck-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes tck-pop { 0% { opacity: 0; transform: scale(.4); } 60% { opacity: 1; transform: scale(1.08); } 100% { opacity: 1; transform: scale(1); } }
@keyframes tck-ring { from { opacity: .7; transform: scale(.85); } to { opacity: 0; transform: scale(1.7); } }
@keyframes tck-draw { to { stroke-dashoffset: 0; } }
@keyframes tck-flash { 0% { color: var(--tk-ink); } 30% { color: var(--tk-focus); transform: scale(1.06); } 100% { color: var(--tk-ink); transform: none; } }
@keyframes tck-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ estructura
   La cabecera queda siempre fija y solo se desplaza .tck-scroll */
#tck { display: flex; flex-direction: column; }
.tck-page #tck { height: 100vh; height: 100dvh; min-height: 0; }
.modal-body > #tck { height: calc(100vh - 4rem); height: calc(100dvh - 4rem); min-height: 0; }
.modal-fullscreen .modal-body > #tck { position: absolute; inset: 0; height: auto; }
.tck-scroll {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* ------------------------------------------------------------------ cabecera */
/* Azul liso como la barra superior de Tictra (en el iframe, el color de la marca) */
.tck-top {
    position: relative;
    flex: none;
    z-index: 20;
    background: var(--tk-head);
    color: var(--tk-head-fg);
    box-shadow: 0 2px 10px rgba(0, 24, 90, .22);
}
.tck-top-in {
    position: relative;
    box-sizing: border-box;
    max-width: 1200px;
    min-height: 67px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 24px;
}
.tck-logo { display: block; height: 30px; width: auto; flex: none; }
.tck-back {
    display: none;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 320px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tk-head-fg);
    text-align: left;
    cursor: pointer;
}
.tck-back-ico {
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 50%;
    background: var(--tk-head-soft);
    border: 1px solid var(--tk-head-line);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .25s var(--tk-ease), background .2s;
}
.tck-back:hover .tck-back-ico { transform: translateX(-3px); background: var(--tk-head-line); }
.tck-back-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.tck-back-txt small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tk-head-dim); }
.tck-back-txt b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Pasos: cápsula con una píldora que se desliza al paso activo (checkout.js le pasa posición y ancho) */
.tck-nav { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; }
.tck-now { display: none; }
.tck-steps {
    counter-reset: tck;
    position: relative;
    list-style: none;
    margin: 0;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 999px;
    background: var(--tk-head-soft);
}
.tck-steps::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: var(--tck-pill-w, 0px);
    transform: translateX(var(--tck-pill-x, 0px));
    border-radius: 999px;
    background: var(--tk-head-fg);
    box-shadow: 0 2px 8px rgba(0, 16, 64, .25);
    opacity: 0;
}
.tck-steps.has-pill::before { opacity: 1; }
.tck-steps.pill-anim::before { transition: transform .38s var(--tk-ease), width .38s var(--tk-ease); }
.tck-steps li { counter-increment: tck; position: relative; display: flex; }
.tck-steps li.d-none { display: none !important; }
.tck-sb {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--tk-head-dim);
    white-space: nowrap;
    cursor: default;
    transition: color .3s ease;
}
.tck-sb:focus-visible { outline: 2px solid var(--tk-acc); outline-offset: 2px; }
.tck-n {
    width: 22px;
    height: 22px;
    flex: none;
    box-sizing: border-box;
    border-radius: 50%;
    border: 1.5px solid var(--tk-head-ring);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--tk-hfont);
    font-size: 12.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: background .3s ease, color .3s ease, border-color .3s ease, transform .2s ease;
}
.tck-n::before { content: counter(tck); }
.tck-steps li.is-on .tck-sb { color: var(--tk-head); font-weight: 800; }
.tck-steps li.is-on .tck-n { border-color: var(--tk-head); background: var(--tk-head); color: var(--tk-head-fg); }
.tck-steps li.is-done .tck-sb { color: var(--tk-head-fg); font-weight: 700; }
.tck-steps li.is-done .tck-n { border-color: var(--tk-acc); background: var(--tk-acc); color: var(--tk-acc-ink); }
.tck-steps li.is-done .tck-n::before { content: "\2713"; }
/* Paso superado al que se puede volver */
.tck-steps li.is-done .tck-sb:enabled { cursor: pointer; }
.tck-steps li.is-done .tck-sb:enabled:hover .tck-t { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--tk-head-ring); }
.tck-steps li.is-done .tck-sb:enabled:hover .tck-n { transform: scale(1.08); }

/* Tooltips de la cabecera: solo con ratón o teclado (el texto también va en aria-label o en pantalla) */
.tck-top [data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    transform: translate(-50%, -4px);
    padding: 7px 10px;
    border-radius: 6px;
    background: #0b1430;
    color: #ffffff;
    font-family: var(--tk-font);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    z-index: 30;
    transition: opacity .18s ease, transform .18s ease;
}
.tck-top [data-tip=""]::after { display: none; }
.tck-top .tck-timer[data-tip]::after,
.tck-top .tck-close[data-tip]::after { left: auto; right: 0; transform: translateY(-4px); }
@media (hover: hover) {
    .tck-top [data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); }
    .tck-top .tck-timer[data-tip]:hover::after,
    .tck-top .tck-close[data-tip]:hover::after { transform: translateY(0); }
}
.tck-top [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.tck-top .tck-timer[data-tip]:focus-visible::after,
.tck-top .tck-close[data-tip]:focus-visible::after { transform: translateY(0); }

/* Temporizador: anillo que se vacía; ámbar con 3 min o menos, rojo y latiendo el último minuto */
.tck-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tck-timer {
    --tck-tm: var(--tk-acc);
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    margin: 0;
    padding: 0 14px 0 6px;
    border-radius: 999px;
    background: var(--tk-head-soft);
    border: 1px solid var(--tk-head-line);
    color: var(--tk-head-fg);
    white-space: nowrap;
    cursor: default;
    transition: background .2s ease, border-color .3s ease;
}
.tck-timer.d-none { display: none !important; }
.tck-timer:hover { background: var(--tk-head-line); }
.tck-timer:focus-visible { outline: 2px solid var(--tk-acc); outline-offset: 2px; }
.tck-ring { position: relative; display: block; width: 32px; height: 32px; flex: none; }
.tck-ring-c { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.tck-ring-c circle { fill: none; stroke-width: 3; stroke: var(--tk-head-line); }
.tck-ring-c circle + circle {
    stroke: var(--tck-tm);
    stroke-linecap: round;
    stroke-dasharray: 81.68;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke .3s ease;
}
.tck-ring-i { position: absolute; left: 50%; top: 50%; margin: -7px 0 0 -7px; }
.tck-timer-tx { display: flex; flex-direction: column; line-height: 1; }
.tck-timer-l { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tk-head-dim); }
.tck-timer strong {
    min-width: 4.6ch;
    margin-top: 3px;
    font-family: var(--tk-hfont);
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: color .3s ease;
}
.tck-timer.is-low { --tck-tm: #ffc46b; border-color: rgba(255, 196, 107, .45); background: rgba(255, 196, 107, .12); }
.tck-timer.is-low strong { color: #ffc46b; }
.tck-timer.is-crit { --tck-tm: #ff8a8a; border-color: rgba(255, 138, 138, .55); background: rgba(255, 138, 138, .14); animation: tck-tpulse 1s ease-in-out infinite; }
.tck-timer.is-crit strong { color: #ff8a8a; }
@keyframes tck-tpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 138, 138, .55); } 50% { box-shadow: 0 0 0 6px rgba(255, 138, 138, 0); } }

.tck-close {
    position: relative;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: var(--tk-head-fg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease;
}
.tck-close svg { transition: transform .3s var(--tk-ease); }
.tck-close:hover { background: var(--tk-head-soft); }
.tck-close:hover svg { transform: rotate(90deg); }
.tck-close:focus-visible { outline: 2px solid var(--tk-acc); outline-offset: 2px; }

/* Barra inferior: avance por los pasos */
.tck-bar { height: 3px; background: var(--tk-head-soft); overflow: hidden; }
.tck-bar i { display: block; width: 0; height: 3px; border-radius: 0 3px 3px 0; background: var(--tk-acc); transition: width .45s var(--tk-ease); }

/* Pantallas medianas: solo el paso activo lleva el nombre (el resto, número; los superados, con tooltip) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .tck-steps li:not(.is-on) .tck-sb { padding: 0 9px; }
    .tck-steps li:not(.is-on) .tck-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* ------------------------------------------------------------------ cuerpo */
.tck-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 44px 24px 72px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 32px;
}
.tck-flow { flex: 999 1 560px; min-width: 0; }
.tck-aside {
    flex: 1 1 340px;
    min-width: 0;
    position: sticky;
    top: 24px;
}

.tck-step { display: flex; flex-direction: column; gap: 24px; }
/* Cada paso llega por AJAX: sus bloques entran escalonados */
.tck-step > * { animation: tck-up .55s var(--tk-ease) both; }
.tck-step > *:nth-child(2) { animation-delay: .07s; }
.tck-step > *:nth-child(3) { animation-delay: .14s; }
.tck-step > *:nth-child(4) { animation-delay: .21s; }
.tck-step > *:nth-child(5) { animation-delay: .28s; }
.tck-step > *:nth-child(n+6) { animation-delay: .35s; }

.tck-intro { display: flex; flex-direction: column; gap: 10px; }
.tck .tck-h1 {
    margin: 0;
    font-family: var(--tk-hfont);
    font-size: 36px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.015em;
    color: var(--tk-ink);
}
.tck .tck-h1::after {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    margin-top: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--tk-acc), var(--tk-brand));
}
.tck .tck-h2 { margin: 0; font-family: var(--tk-font); font-size: 18px; font-weight: 700; letter-spacing: -.005em; color: var(--tk-ink); }
.tck .tck-lead { font-family: var(--tk-font); font-size: 16px; line-height: 1.55; color: var(--tk-dim); }
.tck-lead b { color: var(--tk-ink); font-weight: 700; word-break: break-all; }
.tck-card {
    background: var(--tk-card);
    border: 1px solid var(--tk-line);
    border-radius: var(--tk-r);
    box-shadow: var(--tk-sh);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* campos */
.tck-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.tck-grid > .tck-full, .tck-grid > .col-12 { grid-column: 1 / -1; }
.tck-grid > .d-none { display: none !important; }
.tck-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tck .tck-label {
    margin: 0;
    font-family: var(--tk-hfont);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--tk-ink);
}
.tck .tck-label small { font-family: var(--tk-font); font-size: 12.5px; font-weight: 500; color: var(--tk-mute); }
.tck .tck-input,
.tck .tck-select {
    display: block;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid var(--tk-field-line);
    border-radius: var(--tk-rf);
    background: var(--tk-field);
    color: var(--tk-ink);
    font: inherit;
    font-size: 15.5px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(15, 26, 51, .04);
    transition: border-color .2s ease, box-shadow .25s ease, background-color .2s ease;
}
.tck .tck-input::placeholder { color: var(--tk-mute); opacity: .85; transition: opacity .2s; }
.tck .tck-input:focus::placeholder { opacity: .45; }
.tck .tck-input:hover,
.tck .tck-select:hover { border-color: var(--tk-field-hover); }
.tck .tck-input:focus,
.tck .tck-select:focus {
    outline: 0;
    border-color: var(--tk-focus);
    box-shadow: 0 0 0 4px var(--tk-ring);
}
.tck .tck-input.is-invalid,
.tck .tck-select.is-invalid { border-color: var(--tk-err-tx); box-shadow: none; }
.tck .tck-input.is-invalid:focus,
.tck .tck-select.is-invalid:focus { box-shadow: 0 0 0 4px var(--tk-err-soft); }
.tck .tck-err { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--tk-err-tx); overflow-wrap: anywhere; }
.tck .tck-formerr { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.45; color: var(--tk-err-tx); text-align: right; overflow-wrap: anywhere; }
.tck [data-tck-step="pay"] > .tck-formerr { text-align: left; }
.tck .tck-input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.tck .tck-input[type=number]::-webkit-outer-spin-button,
.tck .tck-input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tck .tck-input[type=date] { min-width: 0; max-width: 100%; padding-right: 12px; }
/* Fecha en iOS: le da ancho propio (se salía de la tarjeta), centra el texto y vacía no enseña nada */
@supports (-webkit-touch-callout: none) {
    .tck .tck-input[type=date] { -webkit-appearance: none; appearance: none; display: flex; align-items: center; text-align: left; }
    .tck .tck-input[type=date]::-webkit-date-and-time-value { margin: 0; text-align: left; }
    .tck .tck-input[type=date][data-empty="1"]::before { content: attr(placeholder); color: var(--tk-mute); opacity: .85; white-space: nowrap; }
    .tck .tck-input[type=date][data-empty="1"]::-webkit-date-and-time-value { width: 0; overflow: hidden; color: transparent; }
}
.tck .tck-input[type=date]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; transition: opacity .15s; }
.tck .tck-input[type=date]:hover::-webkit-calendar-picker-indicator { opacity: .9; }
.tck-sel { position: relative; }
.tck .tck-sel .tck-select { -webkit-appearance: none; appearance: none; padding-right: 42px; cursor: pointer; }
.tck-sel::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid var(--tk-dim);
    border-bottom: 2px solid var(--tk-dim);
    transform: rotate(45deg);
    pointer-events: none;
    transition: transform .25s var(--tk-ease), border-color .2s;
}
.tck-sel:focus-within::after { border-color: var(--tk-focus); transform: translateY(3px) rotate(-135deg); }

/* código de verificación: una casilla por dígito */
.tck-otp-field { gap: 14px; position: relative; }
.tck-otp {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 14px repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 480px;
}
.tck-otp-sep { height: 2px; border-radius: 2px; background: var(--tk-field-line); }
.tck .tck-otp-i {
    width: 100%;
    height: 68px;
    margin: 0;
    padding: 0;
    border: 1.5px solid var(--tk-field-line);
    border-radius: var(--tk-rf);
    background: var(--tk-field) no-repeat center / 2px 28px;
    color: var(--tk-ink);
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace;
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    caret-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s ease, box-shadow .25s ease, background-color .2s ease;
}
.tck .tck-otp-i::selection { background: transparent; color: inherit; }
.tck .tck-otp-i:not(:placeholder-shown) { border-color: var(--tk-brand); animation: tck-digit .28s var(--tk-ease); }
.tck .tck-otp-i:focus { outline: 0; border-color: var(--tk-focus); box-shadow: 0 0 0 4px var(--tk-ring); }
/* Cursor propio, centrado y parpadeando en la casilla activa vacía */
.tck .tck-otp-i:focus:placeholder-shown {
    background-image: linear-gradient(var(--tk-brand), var(--tk-brand));
    animation: tck-caret 1.05s steps(1) infinite;
}
.tck .tck-otp.is-full .tck-otp-i { background-color: var(--tk-tint); }
.tck .tck-otp.is-full .tck-otp-sep { background: var(--tk-brand); }
.tck #checkoutVerifyCode.is-invalid ~ .tck-otp .tck-otp-i { border-color: var(--tk-err-tx); }
.tck #checkoutVerifyCode.is-invalid ~ .tck-otp { animation: tck-shake .4s ease; }
.tck #checkoutVerifyCode.is-invalid ~ .tck-otp .tck-otp-i:focus { box-shadow: 0 0 0 4px var(--tk-err-soft); }
@keyframes tck-caret { 50% { background-size: 0 28px; } }
@keyframes tck-digit { from { transform: scale(.94); } to { transform: none; } }
@keyframes tck-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* seguro de cancelación */
.tck-seg {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--tk-tint) 0%, var(--tk-card) 100%);
    border: 1px solid var(--tk-tint-line);
    border-radius: var(--tk-r);
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 20px;
}
.tck-seg-ico {
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 16px;
    background: var(--tk-card);
    color: var(--tk-brand);
    box-shadow: 0 6px 16px -8px rgba(2, 47, 150, .35);
    display: flex;
    align-items: center;
    justify-content: center;
}
.tck-seg-txt { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tck-seg-txt strong { font-size: 17px; font-weight: 700; letter-spacing: -.005em; color: var(--tk-ink); }
.tck-seg-txt p { font-size: 14px; line-height: 1.55; color: var(--tk-tx); }
.tck-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--tk-brand);
    cursor: pointer;
    user-select: none;
}
/* styles.css oculta todos los checkbox con display:none: aquí siguen en la página (sin verse)
   para que el interruptor reciba el foco y se pueda usar con el teclado */
.tck .tck-switch input,
.tck .tck-check input {
    position: absolute;
    display: block;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.tck-switch i,
.tck-check i {
    position: relative;
    width: 52px;
    height: 30px;
    flex: none;
    border-radius: 999px;
    background: var(--tk-off);
    transition: background .25s ease, box-shadow .25s ease;
}
.tck-switch i::after,
.tck-check i::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .25);
    transition: transform .25s var(--tk-ease);
}
.tck-switch input:checked + i,
.tck-check input:checked + i { background: var(--tk-brand); }
.tck-switch input:checked + i::after,
.tck-check input:checked + i::after { transform: translateX(22px); }
.tck-switch input:focus-visible + i,
.tck-check input:focus-visible + i { outline: 3px solid var(--tk-focus); outline-offset: 2px; }

/* botones */
.tck-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding-top: 4px;
}
.tck-actions.is-split { justify-content: space-between; }
.tck .tck-cta {
    height: 54px;
    padding: 0 32px;
    border: 0;
    border-radius: var(--tk-rb);
    background: var(--tk-brand);
    color: var(--tk-brand-fg);
    font-family: var(--tk-hfont);
    font-size: 18px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: background .2s ease;
}
.tck .tck-cta:hover,
.tck .tck-cta:active { background: var(--tk-head2); }
.tck .tck-cta[disabled] { opacity: .75; cursor: progress; }
.tck .tck-cta[aria-disabled="true"],
.tck .tck-cta[aria-disabled="true"]:hover { background: var(--tk-soft2); color: var(--tk-mute); cursor: not-allowed; }
.tck .tck-cta[aria-busy="true"],
.tck .tck-cta[aria-busy="true"]:hover { background: var(--tk-brand); color: var(--tk-brand-fg); opacity: .75; cursor: progress; }
.tck .tck-cta.is-block { width: 100%; height: 60px; font-size: 19px; }
.tck .tck-ghost {
    height: 48px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: var(--tk-tx);
    font-family: var(--tk-font);
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color .2s;
}
.tck .tck-ghost svg { transition: transform .25s var(--tk-ease); }
.tck .tck-ghost:hover { color: var(--tk-ink); }
.tck .tck-ghost:hover svg { transform: translateX(-3px); }
.tck-spin { animation: tck-spin .7s linear infinite; }

/* ------------------------------------------------------------------ resumen */
.tck-sum {
    background: var(--tk-card);
    border: 1px solid var(--tk-line);
    border-radius: var(--tk-r);
    padding: 26px;
}
.tck-sum-head { padding-bottom: 20px; border-bottom: 1px solid var(--tk-line); }
.tck-sum-title { margin-bottom: 8px; font-family: var(--tk-hfont); font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--tk-ink); overflow-wrap: anywhere; }
.tck-sum-meta { font-size: 14.5px; line-height: 1.5; color: var(--tk-dim); overflow-wrap: anywhere; }
.tck-sum-body { padding-top: 20px; display: flex; flex-direction: column; gap: 18px; }
.tck-items { display: flex; flex-direction: column; gap: 12px; }
.tck-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; font-size: 15px; }
.tck-item-name { min-width: 0; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.tck-item-name { text-align: left; }
.tck-item-name > span:not(.tck-item-qty) { flex: 1 1 0; min-width: 8ch; font-weight: 500; }
.tck-item-price { flex: none; font-weight: 700; }
.tck-item-qty { display: inline; flex: none; font-weight: 800; color: var(--tk-link); font-variant-numeric: tabular-nums; }
.tck-item-qty p { display: inline; margin: 0; }
.tck .tck-item-warn { display: block; order: 2; flex-basis: 100%; margin: 2px 0 0; font-size: 12px; font-weight: 600; color: var(--tk-err); }
.tck-promo { display: flex; gap: 8px; margin: 0; }
.tck-promo .tck-input {
    height: 44px;
    flex: 1;
    min-width: 0;
    box-shadow: none;
    font-size: 14.5px;
}
.tck .tck-promo-btn {
    height: 44px;
    min-width: 84px;
    padding: 0 16px;
    border: 1px solid var(--tk-field-line);
    border-radius: var(--tk-rf);
    background: var(--tk-card);
    color: var(--tk-ink);
    font-size: 14.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .2s;
}
.tck .tck-promo-btn:hover { border-color: var(--tk-field-hover); }
/* Error del cupón: a 8px del campo, como en .tck-field (el resumen separa sus bloques 18px) */
.tck .tck-promo-err { margin-top: -10px; }
.tck-vh {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.tck-totals {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--tk-line);
    font-size: 14px;
    color: var(--tk-tx);
}
.tck-row { display: flex; justify-content: space-between; gap: 12px; }
.tck-row.d-none { display: none !important; }
.tck-row > span:last-child { font-weight: 600; white-space: nowrap; }
.tck-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--tk-line);
    font-family: var(--tk-hfont);
    line-height: 1.1;
    color: var(--tk-ink);
}
.tck-total > span:first-child { font-size: 18px; font-weight: 700; }
.tck-total > span:last-child {
    display: inline-block;
    font-size: 26px;
    font-weight: 700;
    white-space: nowrap;
    transform-origin: right center;
}
.tck-total.is-flash > span:last-child { animation: tck-flash .7s var(--tk-ease); }

/* ------------------------------------------------------------------ pago */
.tck-pm:empty { display: none; }
.tck-pm > .alert { margin: 0; border-radius: var(--tk-rb); }
.tck-methods { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.tck-method {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 16px 18px;
    border: 1px solid var(--tk-field-line);
    border-radius: var(--tk-rb);
    background: var(--tk-card);
    box-shadow: var(--tk-sh);
    cursor: pointer;
    transition: border-color .2s, box-shadow .25s ease, transform .25s var(--tk-ease);
}
.tck-method:hover { border-color: var(--tk-focus); transform: translateY(-1px); box-shadow: var(--tk-sh-hi); }
.tck-method input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--tk-brand); cursor: pointer; }
.tck-method.is-on,
.tck-method:has(input:checked) { border-color: var(--tk-focus); box-shadow: 0 0 0 1px var(--tk-focus), 0 0 0 5px var(--tk-ring), var(--tk-sh); }
.tck-method-ico {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: var(--tk-rf);
    background: var(--tk-soft2);
    color: var(--tk-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .25s, transform .3s var(--tk-ease);
}
.tck-method.is-on .tck-method-ico,
.tck-method:has(input:checked) .tck-method-ico { background: var(--tk-tint); transform: scale(1.06); }
.tck-method-ico svg { display: none; }
.tck-method .i-card { display: block; }
.tck-method[data-m="3"] .i-card,
.tck-method[data-m="4"] .i-card,
.tck-method[data-m="5"] .i-card { display: none; }
.tck-method[data-m="3"] .i-phone { display: block; }
.tck-method[data-m="4"] .i-cash,
.tck-method[data-m="5"] .i-cash { display: block; }
.tck-method-name { font-size: 16px; font-weight: 700; color: var(--tk-ink); }

.tck-checks { gap: 0; padding: 6px 30px; }
.tck-check {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 0;
    padding: 20px 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--tk-tx);
    cursor: pointer;
}
.tck-check > span { min-width: 0; max-width: 62ch; }
.tck-check ~ .tck-check { border-top: 1px solid var(--tk-line); }
.tck-check input.is-invalid + i { box-shadow: 0 0 0 2px var(--tk-card), 0 0 0 4px var(--tk-err-tx); }
.tck-checks .tck-err { margin: -10px 0 20px; }
.tck-payarea:empty { display: none; }
.tck-payarea form { margin: 0; }
.tck-payarea > * { animation: tck-up .45s var(--tk-ease) both; }

/* ------------------------------------------------------------------ asistentes */
.tck-entry { gap: 20px; }
.tck-entry-head { display: flex; align-items: center; gap: 12px; }
.tck-entry-n {
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    flex: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--tk-brand), var(--tk-head2));
    color: var(--tk-brand-fg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.tck-entry-head strong { font-size: 16px; font-weight: 700; color: var(--tk-ink); overflow-wrap: anywhere; }
.tck-entry-head small { display: block; font-size: 13px; font-weight: 500; color: var(--tk-mute); }
.tck-note { font-size: 14px; color: var(--tk-dim); }

/* ------------------------------------------------------------------ móvil */
.tck-dock, .tck-scrim { display: none; }

@media (min-width: 992px) {
    .tck-aside { animation: tck-up .6s .12s var(--tk-ease) backwards; }
}

@media (max-width: 991.98px) {
    /* Cabecera: logo, temporizador y cerrar arriba; debajo, el paso actual y un segmento por paso */
    .tck-top-in { min-height: 0; padding: 8px 12px 12px 16px; gap: 8px 10px; }
    .tck-tools { gap: 6px; }
    .tck-nav { order: 3; flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 8px; }
    .tck-now { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; line-height: 1.2; }
    .tck-now b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 800; color: var(--tk-head-fg); }
    .tck-now small { flex: none; font-size: 12px; font-weight: 600; color: var(--tk-head-dim); }
    .tck-steps { padding: 0; gap: 6px; border-radius: 0; background: none; }
    .tck-steps::before { display: none; }
    .tck-steps li { flex: 1 1 0; min-width: 0; }
    .tck-sb { width: 100%; height: 24px; padding: 0; gap: 0; border-radius: 3px; }
    .tck-sb::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        height: 5px;
        margin-top: -2.5px;
        border-radius: 3px;
        background: var(--tk-head-line);
        transition: background .3s ease;
    }
    .tck-steps li.is-done .tck-sb::before { background: var(--tk-acc); }
    .tck-steps li.is-on .tck-sb::before { background: var(--tk-head-fg); }
    .tck-n { display: none; }
    .tck-steps .tck-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .tck-timer { height: 36px; padding: 0 12px 0 4px; gap: 8px; }
    .tck-ring { width: 26px; height: 26px; }
    .tck-timer strong { margin-top: 0; font-size: 18px; }
    .tck-timer .tck-timer-l { display: none; }
    .tck-bar { display: none; }
    /* Con menos de 16px, iOS amplía la página al tocar el campo */
    .tck .tck-input,
    .tck .tck-select { font-size: 16px; }

    #tck { overflow: hidden; overflow: clip; }
    .tck-main { padding: 26px 16px 32px; gap: 20px; }
    .tck .tck-h1 { font-size: 29px; }
    .tck .tck-h1::after { margin-top: 12px; }
    .tck-card { padding: 22px 20px; }
    .tck-checks { padding: 4px 20px; }
    .tck-check { gap: 20px; padding: 18px 0; }

    /* Barra inferior: total con desglose y botón del paso. Va en el flujo (no fixed), así no
       depende de cómo trate iOS los fixed dentro de zonas con scroll */
    .tck-main > .tck-aside { display: none; }
    .tck-dock { display: block; position: relative; z-index: 40; flex: none; }
    .tck-dock-in {
        position: relative;
        padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
        background: var(--tk-card);
        border-top: 1px solid var(--tk-line);
    }
    .tck-dock-prog { position: absolute; left: 0; right: 0; top: -1px; height: 2px; overflow: hidden; }
    .tck-dock-prog i { display: block; width: 0; height: 100%; background: var(--tk-brand); transition: width .35s var(--tk-ease); }
    .tck .tck-need {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        margin: 0 0 14px;
        padding: 0;
        border: 0;
        background: none;
        color: var(--tk-tx);
        font-size: 14px;
        font-weight: 600;
        line-height: 1.35;
        text-align: left;
        cursor: pointer;
    }
    .tck-need-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tck-need-n { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--tk-mute); }
    .tck .tck-need[data-st="bad"] { color: var(--tk-err-tx); }
    .tck .tck-need[data-st="ok"] { cursor: default; }
    .tck-dock-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
    .tck .tck-dock-sum {
        flex: none;
        display: flex;
        flex-direction: column;
        gap: 5px;
        margin: 0;
        padding: 2px 0;
        border: 0;
        background: none;
        color: var(--tk-ink);
        text-align: left;
        cursor: pointer;
    }
    .tck-dock-total { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; line-height: 1.15; }
    .tck-dock-total small { font-size: 13px; font-weight: 500; color: var(--tk-mute); }
    .tck-dock-total b { font-family: var(--tk-hfont); font-size: 21px; font-weight: 700; }
    .tck-dock-more { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--tk-link); }
    .tck-dock-more svg { transition: transform .3s var(--tk-ease); }
    .tck.is-sum .tck-dock-more svg { transform: rotate(180deg); }
    .tck .tck-dock-go { flex: 0 1 auto; min-width: 150px; max-width: 280px; height: 46px; padding: 0 18px; font-size: 16px; line-height: 1.1; }

    .tck-dock-sheet {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 100%;
        z-index: -1;
        max-height: 62vh;
        max-height: min(62dvh, 560px);
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--tk-card);
        border-radius: 22px 22px 0 0;
        transform: translateY(102%);
        visibility: hidden;
        transition: transform .4s var(--tk-ease), visibility 0s linear .4s;
    }
    .tck.is-sum .tck-dock-sheet { transform: none; visibility: visible; transition: transform .4s var(--tk-ease); }
    .tck-dock-sheet .tck-aside { position: static; }
    .tck-dock-sheet .tck-sum { border: 0; border-radius: 0; padding: 24px 20px 22px; background: none; }
    .tck-scrim {
        position: absolute;
        inset: 0;
        z-index: 35;
        display: block;
        background: rgba(6, 12, 30, .5);
        opacity: 0;
        visibility: hidden;
        touch-action: none;
        transition: opacity .3s ease, visibility 0s linear .3s;
    }
    .tck.is-sum .tck-scrim { opacity: 1; visibility: visible; transition: opacity .3s ease; }

    /* El botón del paso es el de la barra */
    #tck:not(.is-tall) .tck-actions .tck-cta,
    #tck:not(.is-tall) .tck-actions:not(.is-split),
    #tck:not(.is-tall) .tck-payarea .tck-cta { display: none; }
    .tck-actions.is-split .tck-ghost { width: 100%; justify-content: center; }

    /* Qué falta y qué está hecho: lápiz (por rellenar), puntero (por elegir), aviso o marca */
    .tck-field[data-st],
    .tck-need { --tk-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.4 16.6l.6-2.6 6.2-6.2a1.4 1.4 0 0 1 2 2L10 16z'/%3E%3C/svg%3E"); }
    .tck-need[data-kind="pick"] { --tk-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.6 7l9.4 3.8-4 1.6-1.6 4z'/%3E%3C/svg%3E"); }
    .tck-field[data-st="bad"],
    .tck-need[data-st="bad"] { --tk-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.6v6.2M12 17.2v.1'/%3E%3C/svg%3E"); }
    .tck-field[data-st="ok"],
    .tck-need[data-st="ok"] { --tk-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 12.5l3.8 3.8 7.2-8.1'/%3E%3C/svg%3E"); }
    .tck-field[data-st] > .tck-label { position: relative; padding-right: 30px; }
    .tck-field[data-st] > .tck-label::after,
    .tck-need-ico {
        content: "";
        flex: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: var(--tk-brand);
        -webkit-mask-image: var(--tk-ico), linear-gradient(#000, #000);
        -webkit-mask-composite: xor;
        mask-image: var(--tk-ico), linear-gradient(#000, #000);
        mask-composite: exclude;
        transition: background-color .2s;
    }
    .tck-field[data-st] > .tck-label::after { position: absolute; right: 0; top: 0; }
    .tck-field[data-st="bad"] > .tck-label::after,
    .tck-need[data-st="bad"] .tck-need-ico { background: var(--tk-err-tx); }
    .tck-field[data-st="todo"] > .tck-label::after {
        border-radius: 0;
        background: var(--tk-mute);
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l1-4.2L16.2 4.6a2 2 0 0 1 2.8 0l.4.4a2 2 0 0 1 0 2.8L8.2 19z'/%3E%3C/svg%3E") center / 17px no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l1-4.2L16.2 4.6a2 2 0 0 1 2.8 0l.4.4a2 2 0 0 1 0 2.8L8.2 19z'/%3E%3C/svg%3E") center / 17px no-repeat;
    }
    .tck-methods[data-st="todo"] .tck-method { border-color: var(--tk-brand); }
    .tck-check[data-st="todo"] input:not(.is-invalid) + i { box-shadow: 0 0 0 2px var(--tk-card), 0 0 0 3.5px var(--tk-brand); }
    .tck .tck-methods .tck-formerr { text-align: left; }
}

@media (max-width: 991.98px) and (max-height: 430px) {
    .tck .tck-need { display: none; }
    .tck-dock-in { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
    .tck .tck-dock-go { height: 42px; }
}

@media (max-width: 640px) {
    .tck-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .tck-logo { height: 24px; }
    .tck-close { width: 36px; height: 36px; }
    .tck .tck-h1 { font-size: 27px; }
    .tck-otp { grid-template-columns: repeat(3, minmax(0, 1fr)) 8px repeat(3, minmax(0, 1fr)); gap: 7px; }
    .tck .tck-otp-i { height: 58px; font-size: 25px; }
    .tck-seg { padding: 18px; }
    .tck-actions { flex-direction: column-reverse; align-items: stretch; }
    .tck-actions .tck-cta { width: 100%; }
    .tck-actions.is-split .tck-ghost { justify-content: center; }
    .tck .tck-formerr { text-align: left; }
}

/* ------------------------------------------------------------------ iframe */
.te .tck {
    --tk-page: var(--bg, #f2f4fa);
    --tk-card: var(--card);
    --tk-line: var(--line);
    --tk-soft: var(--soft);
    --tk-soft2: var(--soft);
    --tk-ink: var(--ink);
    --tk-tx: var(--tx);
    --tk-dim: var(--dim);
    --tk-mute: var(--mute);
    --tk-field: var(--card);
    --tk-field-line: var(--line);
    --tk-field-hover: var(--mute);
    --tk-off: var(--line);
    --tk-off: color-mix(in srgb, var(--ink) 26%, var(--card));
    --tk-focus: var(--ac);
    --tk-ring: rgba(127, 127, 127, .25);
    --tk-ring: color-mix(in srgb, var(--ac) 22%, transparent);
    --tk-head: var(--ac);
    --tk-head2: var(--ac);
    --tk-head2: color-mix(in srgb, var(--ac) 78%, #000);
    --tk-head-fg: var(--on);
    --tk-head-dim: rgba(255, 255, 255, .72);
    --tk-head-dim: color-mix(in srgb, var(--on) 72%, transparent);
    --tk-head-soft: rgba(255, 255, 255, .14);
    --tk-head-soft: color-mix(in srgb, var(--on) 12%, transparent);
    --tk-head-line: rgba(255, 255, 255, .3);
    --tk-head-line: color-mix(in srgb, var(--on) 26%, transparent);
    --tk-head-ring: rgba(255, 255, 255, .5);
    --tk-head-ring: color-mix(in srgb, var(--on) 50%, transparent);
    --tk-acc: var(--on);
    --tk-acc-ink: var(--ac);
    --tk-glow: rgba(255, 255, 255, .3);
    --tk-glow: color-mix(in srgb, var(--on) 30%, transparent);
    --tk-brand: var(--ac);
    --tk-brand-fg: var(--on);
    --tk-link: var(--hl, var(--ac));
    --tk-tint: var(--soft);
    --tk-tint: color-mix(in srgb, var(--ac) 7%, var(--card));
    --tk-tint-line: var(--line);
    --tk-tint-line: color-mix(in srgb, var(--ac) 25%, var(--card));
    --tk-sh: 0 1px 2px rgba(0, 0, 0, .04), 0 16px 40px -20px rgba(0, 0, 0, .18);
    --tk-sh-hi: 0 2px 4px rgba(0, 0, 0, .05), 0 22px 48px -20px rgba(0, 0, 0, .26);
    --tk-r: var(--r, 20px);
    --tk-rb: var(--rb, 14px);
    --tk-rf: var(--rb, 12px);
    --tk-font: var(--font, "TckGrey", system-ui, sans-serif);
    --tk-hfont: var(--head, var(--font, "TckGrey", system-ui, sans-serif));
}
.te .tck .tck-h1::after,
.te .tck-done-card::before { background: var(--tk-brand); }
.te.is-transparent .tck { --tk-page: var(--soft); }
.te.is-dark .tck { color-scheme: dark; --tk-err-tx: #ff9a90; --tk-err-soft: rgba(255, 154, 144, .2); }
.te.is-dark .tck .tck-switch i::after,
.te.is-dark .tck .tck-check i::after { background: var(--ink); }
.te .tck-logo, .te .tck-close { display: none; }
.te .tck-back { display: flex; }
.te #tictra-tickets-modal .modal-content { background: transparent; }
/* Venta en taquilla (hardticket): página propia, sin modal que cerrar */
.tck-page { margin: 0; }
.tck-page .tck-close { display: none; }

/* ------------------------------------------------------------------ éxito / error */
/* Fuera del iframe, el acento es el azul de la barra superior en vez del celeste */
.tck-done {
    --tk-focus: var(--tk-brand);
    --tk-ring: rgba(2, 47, 150, .22);
    --tk-acc: var(--tk-brand);
    --tk-acc-ink: var(--tk-brand-fg);
    --tk-glow: rgba(2, 47, 150, .45);
    --tk-tint: #edf1fa;
    --tk-tint-line: #b3c1e2;
    min-height: 100vh;
}
.tck-done-top {
    position: relative;
    background: var(--tk-head);
    color: var(--tk-head-fg);
    box-shadow: 0 2px 10px rgba(0, 24, 90, .22);
}
.tck-done-top-in { position: relative; max-width: 1200px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; gap: 16px; }
.tck .tck-done-top a.tck-back { display: flex; text-decoration: none; color: var(--tk-head-fg); max-width: 100%; }
.tck-done-main { max-width: 720px; margin: 0 auto; padding: 56px 24px 72px; }
/* Web: debajo de la barra fija de 70px del layout (el iframe lleva su propia cabecera) */
.tck-done > .tck-done-main:first-child { padding-top: 126px; }
.tck-done-card {
    position: relative;
    overflow: hidden;
    background: var(--tk-card);
    border: 1px solid var(--tk-line);
    border-radius: var(--tk-r);
    box-shadow: var(--tk-sh);
    padding: 48px 32px 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    animation: tck-up .6s var(--tk-ease) both;
}
.tck-done-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--tk-acc), var(--tk-brand));
}
/* El error puede ir en el contenedor (.tck-done.is-error) o en la propia tarjeta (.tck-done-card.is-error) */
.tck-done.is-error .tck-done-card::before,
.tck-done-card.is-error::before { background: var(--tk-err); }
.tck-done-ico {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--tk-acc);
    color: var(--tk-acc-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 8px var(--tk-tint), 0 14px 30px -10px var(--tk-glow);
    margin-bottom: 10px;
    animation: tck-pop .6s .15s var(--tk-ease) both;
}
.tck-done-ico::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--tk-acc);
    opacity: 0;
    animation: tck-ring 1.6s .5s ease-out 2;
}
.tck-done-ico svg path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: tck-draw .5s .45s ease-out forwards; }
.te .tck-done-ico { background: var(--tk-brand); color: var(--tk-brand-fg); }
.te .tck-done-ico::after { border-color: var(--tk-brand); }
.tck-done.is-error .tck-done-ico,
.te .tck-done.is-error .tck-done-ico,
.tck-done-card.is-error .tck-done-ico { background: var(--tk-err); color: #fff; box-shadow: 0 0 0 8px var(--tk-err-soft); }
.tck-done.is-error .tck-done-ico::after,
.tck-done-card.is-error .tck-done-ico::after { border-color: var(--tk-err); }
.tck .tck-done-h1 {
    margin: 0;
    font-family: var(--tk-hfont);
    font-size: 34px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.015em;
    color: var(--tk-ink);
}
.tck-done-card > p { font-size: 16px; line-height: 1.6; color: var(--tk-tx); max-width: 520px; }
.tck-loc {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 26px;
    border: 1px dashed var(--tk-tint-line);
    border-radius: var(--tk-rb);
    background: var(--tk-tint);
}
.tck-loc small { font-size: 11px; font-weight: 800; line-height: 1.4; letter-spacing: .1em; text-transform: uppercase; color: var(--tk-dim); max-width: 460px; }
.tck-loc b { font-size: 22px; font-weight: 800; letter-spacing: .14em; font-variant-numeric: tabular-nums; color: var(--tk-ink); }
.tck .tck-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    margin-top: 8px;
    padding: 0 26px;
    border: 2px solid var(--tk-brand);
    border-radius: var(--tk-rb);
    color: var(--tk-brand);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, color .2s, transform .25s var(--tk-ease), box-shadow .25s;
}
.tck .tck-outline:hover { background: var(--tk-brand); color: var(--tk-brand-fg); text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 22px -12px var(--tk-brand); }
.tck-done-main > form { margin: 0; }
/* Botones de la pantalla final: principal relleno y secundario con borde */
.tck-done-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.tck-done-acts .tck-outline { margin-top: 0; }
.tck .tck-solid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    padding: 0 26px;
    border: 2px solid var(--tk-brand);
    border-radius: var(--tk-rb);
    background: var(--tk-brand);
    color: var(--tk-brand-fg);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .25s var(--tk-ease), box-shadow .25s;
}
.tck .tck-solid:hover { color: var(--tk-brand-fg); text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 22px -12px var(--tk-brand); }
/* Iframe: sin la barra fija de la web ni alto de pantalla completa (el iframe se ajusta al contenido) */
.te .tck-done { min-height: 0; }
.te .tck-done > .tck-done-main:first-child { padding-top: 32px; }

@media (max-width: 640px) {
    .tck-done-main { padding: 28px 16px 48px; }
    .tck-done > .tck-done-main:first-child { padding-top: 98px; }
    .tck-done-card { padding: 36px 20px 32px; }
    .tck .tck-done-h1 { font-size: 27px; }
    .tck .tck-outline { width: 100%; }
    .te .tck-done > .tck-done-main:first-child { padding-top: 20px; }
    .tck-done-acts { flex-direction: column; width: 100%; }
    .tck .tck-solid { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .tck, .tck *, .tck *::before, .tck *::after { transition: none !important; animation: none !important; }
    .tck-done-ico svg path { stroke-dashoffset: 0; }
}
