/* ====================================================================
   Lístek a vyzvednutí (/vyzvednout/): v jazyce popupů aplikace
   Rádius 24 karta, rámeček a přechod v barvě sekce, hlavní tlačítko jako .ticket-cta-btn.
   Vstup karty 300 ms ease-out, stisk scale(.97), žádné záře, hover jen myší.
   ==================================================================== */
.is-ticket { --accent: var(--sec-green, #9bd843); --out: cubic-bezier(.2, .9, .25, 1); }
.tk-main { max-width: 420px; margin: 14px auto 8px; padding: 0 16px; }

.tk {
  position: relative; overflow: hidden; border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: radial-gradient(120% 50% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%), #0d1d13;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .85);
  animation: tkIn 320ms var(--out) backwards;
}
@keyframes tkIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.tk-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px 8px; }
.tk-logo { flex-shrink: 0; width: 56px; height: 56px; object-fit: contain; }
.tk-title { display: grid; gap: 2px; min-width: 0; }
.tk-title span { font-family: var(--font-mono, monospace); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.tk-title strong { font-family: var(--font-mono, monospace); font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; }
.tk-meta { display: grid; gap: 6px; padding: 4px 20px 16px; font-size: 13px; color: var(--text-2, #b9c9b3); }
.tk-meta div { display: flex; gap: 10px; align-items: flex-start; }
.tk-meta i { width: 16px; margin-top: 2px; text-align: center; color: var(--accent); }
.tk-meta span { min-width: 0; overflow-wrap: anywhere; }
.tk-metalink { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 40px; margin: 0 -8px; padding: 2px 8px; border-radius: 10px; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background-color 160ms var(--ease, ease), transform 120ms var(--out); }
.tk-metalink i { margin-top: 0; }
.tk-metalink em { font-style: normal; white-space: nowrap; font-family: var(--font-mono, monospace); font-size: 11px; font-weight: 700; color: var(--accent); }
.tk-metalink em i { width: auto; font-size: 10px; color: inherit; }
.tk-metalink:active { transform: scale(.98); background: rgba(255, 255, 255, .05); }
.tk-metalink:focus-visible { outline: 2px solid var(--sec-green, #9bd843); outline-offset: 2px; }

/* perforace s vykousnutými půlkruhy po stranách */
.tk-cut { position: relative; height: 24px; margin: 0; }
.tk-cut::before { content: ""; position: absolute; left: 22px; right: 22px; top: 11px; border-top: 2px dashed rgba(255, 255, 255, .16); }
.tk-cut::after, .tk-cut > i { content: ""; position: absolute; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--bg, #07120b); }
.tk-cut::after { left: -12px; box-shadow: calc(100% + 0px) 0 0 0 transparent; }
.tk-cut { --notch: var(--bg, #07120b); }
.tk-cut::after { left: -12px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--notch); }
.tk-cut > i { right: -12px; left: auto; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--notch); }

.tk-body { padding: 8px 20px 22px; display: grid; gap: 14px; }
.tk-row { display: grid; gap: 4px; }
.tk-row .k { font-size: 11px; font-family: var(--font-mono, monospace); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3, #8fa38a); }
.tk-row .v { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.tk-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 15px; }
.tk-items li { overflow-wrap: anywhere; } .tk-items b { font-family: var(--font-mono, monospace); color: var(--accent); }
.tk-used { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft, rgba(242, 180, 65, .12)); border: 1px solid var(--warn-line, rgba(242, 180, 65, .4)); font-size: 13px; }
.tk-used.is-all { background: var(--danger-soft); border-color: var(--danger-line); }
.tk-qrwrap { display: grid; place-items: center; }
.tk-qr { padding: 14px; border-radius: 18px; background: #fff; line-height: 0; }
.tk-qr img, .tk-qr canvas { display: block; width: min(240px, 62vw); height: auto; aspect-ratio: 1; }
.tk-code { display: grid; justify-items: center; gap: 4px; }
.tk-code span { font-size: 11px; font-family: var(--font-mono, monospace); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3, #8fa38a); }
.tk-code strong { font-family: var(--font-mono, monospace); font-size: 40px; line-height: 1; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.tk-hint { margin: 0; text-align: center; font-size: 12.5px; color: var(--text-2, #b9c9b3); }

.tk-actions { display: grid; gap: 10px; margin-top: 16px; }
.tk-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tk-pair .tk-btn { padding: 0 10px; }
.tk-btn { min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .035); color: var(--text, #eef5ea); font-family: var(--font-mono, monospace); font-size: 13.5px; font-weight: 700; text-decoration: none; text-align: center; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform 160ms var(--out), background-color 160ms var(--ease, ease), border-color 160ms var(--ease, ease); }
.tk-btn:active { transform: scale(.97); }
.tk-btn.is-main { background: var(--sec-green, #9bd843); border-color: var(--sec-green, #9bd843); color: #10170a; box-shadow: 0 12px 24px -14px rgba(155, 216, 67, .9); }
.tk-btn.is-main[hidden], .tk-btn[hidden] { display: none; }
.tk-btn[aria-busy="true"] { opacity: .55; cursor: progress; }
.tk-btn[aria-pressed="true"] { border-color: var(--brand-line, rgba(132, 204, 22, .5)); background: var(--brand-soft, rgba(132, 204, 22, .1)); }
.tk-btn:focus-visible { outline: 2px solid var(--sec-green, #9bd843); outline-offset: 3px; }
.tk-note { margin: 0; text-align: center; font-size: 12.5px; color: var(--text-2, #b9c9b3); }
.tk-small { margin: 14px 4px 0; font-size: 12px; line-height: 1.55; color: var(--text-3, #8fa38a); text-align: center; }
.tk-small a { color: var(--accent); }

.tk-choices { display: grid; gap: 8px; margin-top: 10px; }
.tk-choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; min-height: 64px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .08); color: var(--text); text-decoration: none; transition: transform 100ms var(--out), border-color 200ms var(--ease, ease); }
.tk-choice:active { transform: scale(.985); }
.tk-choice .n { font-family: var(--font-mono, monospace); font-weight: 700; font-size: 14px; } .tk-choice .i { grid-column: 1; font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; } .tk-choice i { grid-row: 1 / 3; grid-column: 2; color: var(--text-3); }

@media (hover: hover) and (pointer: fine) {
  .tk-btn:not(.is-main):hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .26); }
  .tk-btn.is-main:hover { background: #b0e35f; }
  .tk-choice:hover { border-color: var(--accent); }
  .tk-metalink:hover { background: rgba(255, 255, 255, .05); }
}
@media (prefers-reduced-motion: reduce) { .tk { animation: none; } .tk-btn:active, .tk-choice:active, .tk-metalink:active { transform: none; } }

/* ---------- připomenutí lístku v aplikaci (js/ticket-reminder.js) ---------- */
.tk-remind {
  position: fixed; left: 12px; right: 12px; z-index: 8000; max-width: 430px; margin: 0 auto;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 10px 10px 14px;
  border-radius: 18px; border: 1px solid color-mix(in srgb, var(--sec-green, #9bd843) 45%, transparent);
  background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--sec-green, #9bd843) 16%, transparent), transparent 60%), #0d1d13;
  box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .85); color: var(--text, #eef5ea);
  opacity: 0; transform: translateY(14px); transition: opacity 180ms var(--ease, ease-out), transform 180ms var(--ease, ease-out);
}
.tk-remind.is-in { opacity: 1; transform: none; transition: opacity 240ms var(--ease, ease-out), transform 320ms cubic-bezier(.2, .9, .25, 1); }
.tk-remind > i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--sec-green, #9bd843) 16%, transparent); color: var(--sec-green, #9bd843); font-size: 15px; }
.tk-remind-t { display: grid; gap: 2px; min-width: 0; }
.tk-remind-t strong { font-family: var(--font-mono, monospace); font-size: 13.5px; line-height: 1.25; }
.tk-remind-t small { font-size: 12px; color: var(--text-2, #b9c9b3); overflow-wrap: anywhere; }
.tk-remind-go { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 12px; background: var(--sec-green, #9bd843); color: #10170a; font-family: var(--font-mono, monospace); font-size: 12.5px; font-weight: 700; text-decoration: none; touch-action: manipulation; transition: transform 120ms; }
.tk-remind-go:active { transform: scale(.97); }
.tk-remind-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--text-3, #8fa38a); font-size: 14px; cursor: pointer; touch-action: manipulation; }
.tk-remind.is-thanks { grid-template-columns: 36px minmax(0, 1fr) auto; }
@media (prefers-reduced-motion: reduce) { .tk-remind, .tk-remind.is-in { transform: none; } }

/* ---------- upozornění nad lístkem ---------- */
.tk-preview-bar, .tk-inapp { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; font-size: 12.5px; line-height: 1.45; border: 1px solid var(--warn-line, rgba(242, 180, 65, .4)); background: var(--warn-soft, rgba(242, 180, 65, .12)); color: var(--text, #eef5ea); }
.tk-preview-bar i, .tk-inapp i { flex-shrink: 0; color: var(--warn, #f2b441); }
.tk-inapp[hidden] { display: none; }
.tk-inapp span { flex: 1; min-width: 0; }
.tk-inapp button { flex-shrink: 0; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: var(--text, #eef5ea); font-family: var(--font-mono, monospace); font-size: 12px; font-weight: 700; cursor: pointer; touch-action: manipulation; }

/* ---------- okno „Ulož si lístek“ (stejný jazyk jako popupy aplikace: zespodu, ease-drawer, rychlý odchod) ---------- */
html:has(.tk-sheet:not([hidden])) { overflow: hidden; }
.tk-sheet { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: flex-end; justify-content: center; }
.tk-sheet[hidden] { display: none; }
.tk-sheet-back { position: absolute; inset: 0; background: rgba(3, 9, 5, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity 180ms var(--out); }
.tk-sheet-panel { position: relative; width: 100%; max-width: 520px; max-height: 94vh; max-height: 94dvh; display: flex; flex-direction: column; border-radius: 24px 24px 0 0; background: #0d1d13; border: 1px solid rgba(255, 255, 255, .14); border-bottom: 0; box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .8); transform: translateY(100%); transition: transform 180ms var(--out); }
.tk-sheet.is-in .tk-sheet-back { opacity: 1; }
.tk-sheet.is-in .tk-sheet-panel { transform: none; transition: transform 300ms cubic-bezier(.32, .72, 0, 1); }
.tk-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.tk-sheet-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--font-mono, monospace); font-size: 16px; line-height: 1.3; }
.tk-sheet-head h2 i { color: var(--accent); }
.tk-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--text-2, #b9c9b3); font-size: 16px; cursor: pointer; touch-action: manipulation; }
.tk-x:focus-visible { outline: 2px solid var(--sec-green, #9bd843); outline-offset: 2px; }
.tk-sheet-body { padding: 14px 18px calc(18px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: grid; gap: 12px; }
.tk-sheet-img { display: grid; place-items: center; }
.tk-sheet-img img { display: block; width: auto; max-width: 100%; height: auto; max-height: 52dvh; max-height: 52vh; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .12); -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.tk-sheet-hint { margin: 0; text-align: center; font-size: 13px; line-height: 1.5; color: var(--text-2, #b9c9b3); }
.tk-sheet .tk-actions { margin-top: 0; }
a.tk-btn.is-main { background: var(--sec-green, #9bd843); border-color: var(--sec-green, #9bd843); color: #10170a; }
@media (prefers-reduced-motion: reduce) {
  .tk-sheet-panel, .tk-sheet.is-in .tk-sheet-panel { transform: none; transition: opacity 160ms var(--out); opacity: 0; }
  .tk-sheet.is-in .tk-sheet-panel { opacity: 1; }
}

.is-ticket .legal-main h1::before { content: "\f145"; }
