/* ============================================================
   Ticket de reserva — impresora que imprime el ticket (estilo
   "Receipt Animation"), sello rojo y acciones para WhatsApp.
   ============================================================ */
.tk { position: fixed; inset: 0; z-index: 100; display: none; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(35, 39, 31, 0.8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tk.on { display: block; }
.tk [hidden] { display: none !important; }
.tk__box { position: relative; max-width: 460px; margin: 0 auto; min-height: 100%; padding: 64px 16px 40px;
  display: flex; flex-direction: column; align-items: center; }
.tk__close { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: rgba(241, 242, 236, 0.92); color: var(--fukamidori); font-size: 28px; line-height: 1; cursor: pointer; }
.tk__close:focus-visible, .tk button:focus-visible, .tk a:focus-visible, .tk input:focus-visible { outline: 3px solid var(--wakaba); outline-offset: 3px; }

/* Paso 1: datos de la clienta (letra grande, campos altos) */
.tk__form { width: 100%; background: var(--washi); border-radius: 18px; padding: 24px 20px; display: grid; gap: 16px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6); }
.tk__step { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--koke); }
.tk__form h3, .tk__card h3 { font-family: var(--font-display); color: var(--fukamidori); font-size: 1.5rem; line-height: 1.25; }
.tk__sum { background: #fff; border-left: 4px solid var(--koke); border-radius: 10px; padding: 10px 14px; font-size: 1rem; color: var(--sumi); }
.tk__change { background: none; border: 0; padding: 4px; font: inherit; font-size: 0.95rem; color: var(--fukamidori); text-decoration: underline; cursor: pointer; }
.tk__f { display: grid; gap: 6px; border: 0; min-width: 0; }
.tk__f > span, .tk__f legend { font-weight: 700; font-size: 1.05rem; color: var(--sumi); margin-bottom: 2px; }
.tk__f b { color: var(--shu); }
.tk__f em { font-style: normal; font-weight: 400; color: var(--sumi-soft); font-size: 0.95rem; }
.tk__f input, .tk__f textarea { width: 100%; min-height: 56px; border: 2px solid #B9BFAD; border-radius: 12px; padding: 12px 14px;
  font: inherit; font-size: 1.15rem; background: #fff; color: var(--sumi); }
.tk__f textarea { min-height: 88px; font-size: 1.05rem; resize: vertical; }
.tk__f input:focus, .tk__f textarea:focus { border-color: var(--koke); outline: 3px solid rgba(127, 139, 55, 0.3); outline-offset: 0; }
.tk__f [aria-invalid="true"] { border-color: var(--shu); background: #FFF7F5; }
.tk__tel { display: flex; align-items: stretch; }
.tk__tel i { font-style: normal; display: grid; place-items: center; padding: 0 12px; background: #E7E9DF; border: 2px solid #B9BFAD; border-right: 0;
  border-radius: 12px 0 0 12px; font-weight: 700; font-size: 1.1rem; color: var(--sumi-soft); }
.tk__tel input { border-radius: 0 12px 12px 0; }
.tk__err { color: var(--shu); font-weight: 700; font-size: 0.98rem; min-height: 0; }
.tk__err:empty { display: none; }
.tk__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tk__chips label { cursor: pointer; }
.tk__chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tk__chips span { display: inline-flex; align-items: center; min-height: 50px; padding: 8px 16px; border: 2px solid #B9BFAD; border-radius: 99px; background: #fff; font-size: 1rem; }
.tk__chips input:checked + span { background: var(--fukamidori); border-color: var(--fukamidori); color: #fff; font-weight: 700; }
.tk__chips input:focus-visible + span { outline: 3px solid var(--wakaba); outline-offset: 2px; }
.tk__chips:has(input[aria-invalid="true"]) span { border-color: var(--shu); background: #FFF7F5; }
.tk__duo { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 12px; align-items: start; }
.tk__f > span .tk__hint { display: block; margin-top: 1px; }
.tk__submit { width: 100%; min-height: 60px; font-size: 1.15rem; }
.tk__fine { font-size: 0.92rem; color: var(--sumi-soft); text-align: center; }
/* Impresora */
.tk__print { width: 100%; display: flex; flex-direction: column; align-items: center; }
.tk__machine { position: relative; z-index: 2; width: min(400px, 100%); height: 46px; border-radius: 14px;
  background: linear-gradient(180deg, #FFFFFF 0%, #ECEEE6 100%);
  box-shadow: 0 1px 0 #fff inset, 0 -2px 0 rgba(35, 39, 31, 0.08) inset, 0 18px 34px -14px rgba(0, 0, 0, 0.55); }
.tk__machine::before { content: ""; position: absolute; left: 6%; right: 6%; bottom: 10px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--sumi) 0 9%, #3a4034 9% 91%, var(--sumi) 91%); }
.tk__led { position: absolute; left: 16px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--koke);
  box-shadow: 0 0 8px var(--wakaba); }
.tk.printing .tk__led { animation: tkBlink 0.5s steps(2) infinite; background: var(--shu); box-shadow: 0 0 8px #E07A5F; }
@keyframes tkBlink { 50% { opacity: 0.25; } }
.tk__state { position: absolute; right: 14px; top: 9px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--sumi-soft); text-transform: uppercase; }

.tk__feed { position: relative; z-index: 1; width: min(352px, calc(100% - 28px)); margin-top: -12px; height: 0; overflow: hidden;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.35)); }
.tk__paper { position: relative; padding-top: 12px; transform-origin: 50% 0; transition: transform 0.7s var(--ease); }
.tk.torn .tk__paper { transform: rotate(-1.6deg) translateY(10px); }
.tk.torn .tk__feed { overflow: visible; }

/* Ticket (versión en pantalla; la imagen PNG se dibuja igual en canvas) */
.rc { background: #FBFBF7; color: var(--sumi); font-size: 15px; line-height: 1.35;
  -webkit-mask: radial-gradient(circle 7px at 50% 100%, transparent 6.5px, #000 7px) bottom / 16px 100% repeat-x;
          mask: radial-gradient(circle 7px at 50% 100%, transparent 6.5px, #000 7px) bottom / 16px 100% repeat-x;
  padding-bottom: 22px; }
.rc__band { position: relative; background: var(--fukamidori); color: var(--washi); padding: 16px 18px; display: flex; align-items: center; gap: 12px; overflow: hidden; }
.rc__band::after { content: ""; position: absolute; inset: 0; opacity: 0.12; pointer-events: none;
  background: radial-gradient(circle at 50% 100%, transparent 9px, #F1F2EC 10px, transparent 11px, transparent 15px, #F1F2EC 16px, transparent 17px) 0 0 / 34px 17px; }
.rc__band svg { width: 42px; height: 50px; flex: none; position: relative; z-index: 1; }
.rc__brand { position: relative; z-index: 1; }
.rc__brand b { display: block; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.1; }
.rc__brand span { font-size: 0.78rem; color: #CCD3BF; letter-spacing: 0.04em; }
.rc__body { padding: 16px 20px 0; position: relative; }
.rc__kick { text-align: center; color: var(--koke); font-weight: 700; letter-spacing: 0.3em; font-size: 0.8rem; }
.rc__title { text-align: center; font-family: var(--font-display); font-weight: 700; color: var(--fukamidori); font-size: 1.55rem; line-height: 1.15; margin: 2px 0 8px; }
.rc__code { text-align: center; font-weight: 700; letter-spacing: 0.08em; font-size: 1rem; }
.rc__issued { text-align: center; color: var(--sumi-soft); font-size: 0.8rem; }
.rc__cut { border: 0; border-top: 2px dashed #C9CDBE; margin: 12px 0; }
.rc__row { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; }
.rc__row dt { color: var(--sumi-soft); flex: none; }
.rc__row dd { font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.rc__total dd { font-family: var(--font-display); font-size: 1.35rem; color: var(--fukamidori); }
.rc__dep { margin: 6px -8px; padding: 8px; border-radius: 8px; background: rgba(184, 67, 47, 0.09); }
.rc__dep dt { color: var(--shu); font-weight: 700; }
.rc__dep dd { font-family: var(--font-display); font-size: 1.35rem; color: var(--shu); }
.rc__pay { text-align: center; }
.rc__pay p { font-size: 0.86rem; color: var(--sumi-soft); }
.rc__pills { display: flex; justify-content: center; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
.rc__pills span { border: 1.5px solid var(--fukamidori); color: var(--fukamidori); border-radius: 99px; padding: 2px 10px; font-weight: 700; font-size: 0.88rem; }
.rc__pills span.is-on { background: var(--fukamidori); color: var(--washi); padding: 3px 14px; font-size: 0.95rem; }
.rc__state { font-size: 0.86rem; text-align: center; color: var(--sumi); }
.rc__foot { text-align: center; font-size: 0.78rem; color: var(--sumi-soft); }
.rc__foot b { color: var(--fukamidori); font-size: 0.9rem; }

/* Sello hanko */
.rc__stamp { position: absolute; right: 8px; top: -40px; z-index: 2; background: rgba(251, 251, 247, 0.94); width: 80px; height: 80px; border-radius: 50%;
  border: 3.5px solid var(--shu); color: var(--shu); display: grid; place-items: center; text-align: center;
  transform: rotate(-14deg) scale(2.4); opacity: 0; pointer-events: none;
  -webkit-mask: radial-gradient(circle at 30% 40%, #000 55%, rgba(0,0,0,.75) 70%, #000 85%);
          mask: radial-gradient(circle at 30% 40%, #000 55%, rgba(0,0,0,.75) 70%, #000 85%); }
.rc__stamp::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1.5px solid var(--shu); }
.rc__stamp b { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; display: block; }
.rc__stamp i { font-style: normal; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.18em; display: block; margin-top: 3px; }
.tk.stamped .rc__stamp { animation: tkStamp 0.45s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes tkStamp { 0% { opacity: 0; transform: rotate(-14deg) scale(2.4); } 100% { opacity: 0.9; transform: rotate(-14deg) scale(1); } }

/* Pop-up de confirmación (después de "Completar mi reserva") */
.tk__pop { position: fixed; inset: 0; z-index: 3; display: grid; place-items: center; padding: 16px; background: rgba(20, 26, 18, 0.55);
  opacity: 0; transition: opacity 0.35s var(--ease); }
.tk__pop.in { opacity: 1; }
.tk__card { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--washi); border-radius: 22px; padding: 26px 22px 22px;
  display: grid; gap: 14px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7); transform: translateY(24px) scale(0.97); transition: transform 0.45s var(--ease); }
.tk__pop.in .tk__card { transform: none; }
.tk__card p { font-size: 1.05rem; color: var(--sumi); }
.tk__card h3:focus { outline: none; }
.tk__go { width: 100%; min-height: 66px; font-size: 1.25rem; }
.tk__how { background: #fff; border-radius: 12px; padding: 12px 14px; font-size: 1rem !important; line-height: 1.45; color: var(--sumi); border: 1px solid #DADDD0; }
.tk__how a { color: var(--fukamidori); font-weight: 700; }
.tk__row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tk__row2 .btn { min-height: 52px; font-size: 1rem; padding: 10px 12px; border-color: #C9CDBE; }
/* "Completar mi reserva": aparece debajo del ticket y queda a la vista mientras se baja */
.tk__bar { position: sticky; bottom: 0; z-index: 2; width: 100%; padding: 16px 0 12px; margin-top: 22px; }
.tk__bar .btn { width: 100%; min-height: 66px; font-size: 1.25rem; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.6); }
.tk__bar.in { animation: tkUp 0.5s var(--ease) both; }
@keyframes tkUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.tk__last { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 10px; width: fit-content; max-width: 100%;
  margin: 0 auto 12px; padding: 8px 16px; border-radius: 18px; background: var(--washi); color: var(--sumi); font-weight: 700; font-size: 1.02rem;
  line-height: 1.3; text-align: center; box-shadow: 0 12px 26px -12px rgba(0, 0, 0, 0.6); }
.tk__last span { background: var(--shu); color: #fff; border-radius: 99px; padding: 2px 10px; font-size: 0.85rem; letter-spacing: 0.04em; }

/* "Completar mi reserva": grande, en dos líneas, con halo que late, brillo que cruza, ícono que saluda y flecha */
.tk__go { position: relative; overflow: hidden; width: 100%; min-height: 76px; gap: 14px; padding: 12px 20px; justify-content: flex-start; text-align: left; }
.tk__go > span { display: grid; gap: 2px; line-height: 1.15; }
.tk__go b { font-size: 1.32rem; }
.tk__go small { font-size: 0.98rem; font-weight: 500; opacity: 0.95; }
.tk__go svg { width: 32px; height: 32px; transform-origin: 50% 80%; }
.tk__arrow { font-style: normal; font-size: 1.6rem; line-height: 1; margin-left: auto; }
.tk__go.vivo { animation: tkPulse 1.8s ease-out 0.6s infinite; }
@keyframes tkPulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 122, 77, 0.6), 0 16px 30px -12px rgba(0, 0, 0, 0.6); }
  70% { box-shadow: 0 0 0 18px rgba(31, 122, 77, 0), 0 16px 30px -12px rgba(0, 0, 0, 0.6); }
  100% { box-shadow: 0 0 0 0 rgba(31, 122, 77, 0), 0 16px 30px -12px rgba(0, 0, 0, 0.6); } }
.tk__go.vivo::after { content: ""; position: absolute; top: 0; bottom: 0; left: -45%; width: 32%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.42), transparent); transform: skewX(-18deg);
  animation: tkShine 2.8s ease-in-out 1s infinite; }
@keyframes tkShine { 0%, 55% { left: -45%; } 100% { left: 130%; } }
.tk__go.vivo svg { animation: tkWave 2.8s ease-in-out 1.2s infinite; }
@keyframes tkWave { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-16deg); } 82% { transform: rotate(14deg); } 88% { transform: rotate(-8deg); } 94% { transform: rotate(4deg); } }
.tk__go.vivo .tk__arrow { animation: tkNudge 1.1s ease-in-out infinite; }
@keyframes tkNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(7px); } }
.tk__card .tk__go { min-height: 76px; font-size: 1rem; gap: 12px; padding: 12px 16px; }
.tk__card .tk__go b { font-size: 1.16rem; white-space: nowrap; }
.tk__card .tk__go small { font-size: 0.9rem; }
.tk__after { width: 100%; display: grid; gap: 10px; }
.tk__after .tk__how { margin: 0; }
.tk__after .tk__row2 .btn { background: rgba(241, 242, 236, 0.94); }
@media (prefers-reduced-motion: reduce) {
  .tk__bar.in, .tk__go.vivo, .tk__go.vivo svg, .tk__go.vivo .tk__arrow { animation: none; }
  .tk__go.vivo::after { display: none; }
  .tk__paper, .tk__pop, .tk__card { transition: none; }
  .tk.stamped .rc__stamp { animation: none; opacity: 0.9; transform: rotate(-14deg); }
}
