/* 🐹✈️ Hamster Travel Code screens (see src/ui/travel.js). Same cream cards, chunky buttons and rounded font as the rest. */

.travel-card [hidden] { display: none !important; }
.travel-card { position: relative; text-align: center; max-width: min(94vw, 620px); }
.travel-card.wide { max-width: min(96vw, 940px); }
.travel-card button { min-height: 56px; }
.travel-card .big { font-size: 26px; padding: 12px 26px; }
.travel-card .huge { font-size: 34px; padding: 14px 40px; }
.tv-title { font-size: clamp(24px, 4vw, 32px); font-weight: 900; line-height: 1.15; padding: 0 44px; }
.tv-say { font-size: 22px; font-weight: 800; line-height: 1.35; }
.tv-small { display: block; font-size: 15px; font-weight: 800; opacity: 0.75; max-width: 300px; margin: 4px auto 0; line-height: 1.3; }
.tv-hint { font-size: 18px; font-weight: 900; background: #fff3bf; border-radius: 16px; padding: 8px 14px; }
.tv-main { background: var(--sun); }
.tv-link { background: #a5d8ff; }
.tv-qr { background: #d0bfff; }
.tv-no { background: #ffe3e3; font-size: 20px !important; }
.tv-again { background: #e6fcf5; }
.tv-copied { background: #8ce99a !important; }
.tv-help { position: absolute; right: 10px; top: 10px; width: 56px; height: 56px; padding: 0; border-radius: 50%; font-size: 26px; background: white; }

/* title / pause buttons */
.tv-get-btn { background: #c3fae8; }
.tv-send-btn { background: #ffe8cc; }
/* phones on their side: no room for another row, so they stack in the empty space left of the logo */
@media (max-height: 520px) {
  .title-travel { position: absolute; left: max(14px, env(safe-area-inset-left)); top: max(84px, calc(env(safe-area-inset-top) + 70px)); flex-direction: column; align-items: stretch; gap: 10px; }
  .title-travel button { min-height: 56px; font-size: 24px; padding: 6px 14px; display: flex; align-items: center; gap: 8px; border-radius: 20px; }
  .title-travel .lbl { display: inline; margin: 0; font-size: 15px; opacity: 1; }
}

/* two columns on wide screens, one on narrow */
.tv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; align-items: center; width: 100%; }
.tv-col { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
@media (max-width: 720px) { .tv-grid { grid-template-columns: 1fr; } }

/* numbered steps */
.tv-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.tv-steps li { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 800; line-height: 1.25; background: white; border-radius: 18px; padding: 8px 14px; box-shadow: 0 3px 0 rgba(59, 42, 26, 0.15); }
.tv-num { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; font-size: 20px; }

/* the code: small and faded, kids never need to read it */
.tv-codebox { width: 100%; max-width: 360px; }
.tv-code { margin-top: 4px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; line-height: 1.3; opacity: 0.5; background: white; border-radius: 12px; padding: 6px 10px; max-height: 3.9em; overflow: hidden; word-break: break-all; text-align: left; }
.tv-code.tv-selectable { opacity: 0.9; max-height: 8em; overflow-y: auto; user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; touch-action: auto; }

/* ⏳ timer */
.tv-timer { display: flex; align-items: center; gap: 12px; background: #e7f5ff; border-radius: 20px; padding: 8px 18px; font-size: 20px; }
.tv-timer b { display: block; font-size: 22px; }
.tv-timer span:not(.tv-glass) { font-weight: 800; }
.tv-glass { font-size: 44px; display: inline-block; animation: tv-flip 3s ease-in-out infinite; }
.tv-timer.tv-hurry { background: #ffd8a8; color: #a8430a; }
.tv-timer.tv-hurry .tv-glass { animation-duration: 1s; }
@keyframes tv-flip { 0%, 80% { transform: rotate(0); } 100% { transform: rotate(180deg); } }

/* paste box */
.tv-in { font: inherit; font-size: 16px; font-weight: 700; width: min(480px, 84vw); min-height: 96px; padding: 12px 14px; border-radius: 18px; border: 3px solid #c9a77a; background: white; color: var(--ink); resize: none;
  user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; touch-action: auto; word-break: break-all; }
.tv-in:focus { outline: none; border-color: #f5b82e; }

/* 📱 QR: big, on white with a quiet zone (the SVG has a 4-cell white margin too) */
.tv-qrcard .tv-qrbox { order: 1; }
.tv-qrcard .tv-main { order: 2; }
.tv-qrbox { background: white; padding: 8px; border-radius: 18px; line-height: 0; }
.tv-qrbox canvas { display: block; image-rendering: pixelated; }

/* hamster pictures & little animations */
.tv-packing { position: relative; width: 260px; height: 140px; }
.tv-packing.small { width: 180px; height: 110px; }
.tv-ham { position: absolute; left: 50%; bottom: 18px; width: 96px; height: 96px; margin-left: -48px; }
.tv-packing.small .tv-ham { width: 84px; height: 84px; margin-left: -70px; }
.tv-case { position: absolute; left: 50%; bottom: 0; font-size: 70px; line-height: 1; transform: translateX(-50%); }
.tv-packing.small .tv-case { font-size: 56px; margin-left: 34px; }
.tv-zz { position: absolute; right: 8px; top: 0; font-size: 46px; animation: bob2 1.4s ease-in-out infinite; }
.tv-jump { animation: tv-jump 1.2s cubic-bezier(.3, .7, .4, 1) forwards; }
@keyframes tv-jump {
  0% { transform: translate(-110px, 0) rotate(0); }
  45% { transform: translate(-50px, -80px) rotate(-25deg); }
  80% { transform: translate(0, -10px) scale(0.6) rotate(-360deg); opacity: 1; }
  100% { transform: translate(0, 30px) scale(0.2) rotate(-360deg); opacity: 0; }
}
.tv-wiggle { animation: tv-wiggle 0.4s ease-in-out 1.05s 2; }
@keyframes tv-wiggle { 25% { transform: translateX(-50%) rotate(-10deg); } 75% { transform: translateX(-50%) rotate(10deg); } }
.tv-bounce { animation: tv-bounce 0.7s ease; }
@keyframes tv-bounce { 30% { transform: translateY(-34px) scale(1.1, 0.95); } 55% { transform: translateY(0) scale(1.1, 0.9); } 75% { transform: translateY(-10px); } }
.tv-sleepy { filter: saturate(0.6); transform: rotate(-80deg) translateX(-10px); }
.tv-tilt { animation: tv-tilt 1.6s ease-in-out infinite; }
@keyframes tv-tilt { 50% { transform: rotate(14deg); } }

.tv-hams { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.tv-pic { position: relative; display: inline-block; width: 64px; height: 64px; animation: bob2 1.2s ease-in-out infinite; animation-delay: calc(var(--i) * -0.15s); }
.tv-pic img { width: 64px; height: 64px; }
.tv-pic i { position: absolute; left: 0; right: 0; top: -10px; font-style: normal; font-size: 22px; }
.tv-found { font-size: 22px; font-weight: 800; line-height: 1.45; max-width: 520px; }

.tv-arrive { position: relative; width: min(560px, 84vw); height: 170px; }
.tv-arrive .tv-case { font-size: 80px; }
.tv-arrive .tv-pic { position: absolute; left: 50%; bottom: 40px; margin-left: -32px; }
.tv-pop { opacity: 0; animation: tv-pop 0.8s cubic-bezier(.3, 1.5, .5, 1) forwards; animation-delay: calc(0.2s + var(--i) * 0.14s); }
@keyframes tv-pop {
  0% { opacity: 0; transform: translate(0, 50px) scale(0.2); }
  60% { opacity: 1; transform: translate(var(--x), -60px) scale(1.1); }
  100% { opacity: 1; transform: translate(var(--x), 0) scale(1); }
}
.tv-open { animation: tv-wiggle 0.3s ease-in-out 3; }

@media (max-height: 520px) {
  .travel-card { padding: 14px 18px; gap: 10px; }
  .tv-title { font-size: 22px; }
  .tv-grid .tv-col:first-child .tv-packing { display: none; } /* the hamster already hopped in the suitcase */
  .tv-timer { padding: 4px 14px; }
  .tv-glass { font-size: 32px; }
  .tv-qrcard { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto 1fr; column-gap: 18px; align-items: center; }
  .tv-qrcard .tv-qrbox { grid-column: 1; grid-row: 1 / 4; }
  .tv-qrcard > :not(.tv-qrbox) { grid-column: 2; }
  .tv-packing { height: 110px; }
  .tv-packing.small { height: 90px; width: 160px; }
  .tv-packing.small .tv-ham { width: 64px; height: 64px; margin-left: -60px; }
  .tv-packing.small .tv-case { font-size: 44px; }
  .tv-steps li { font-size: 17px; padding: 6px 12px; }
  .tv-say, .tv-found { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .tv-jump, .tv-wiggle, .tv-bounce, .tv-tilt, .tv-pic, .tv-glass, .tv-open { animation: none; }
  .tv-pop { animation: none; opacity: 1; transform: translate(var(--x), 0); }
}
