/* Seite: Meine Tickets (past_tickets_page.dart) und Ticket (ticket_detail_page.dart).
   Wie „In deiner Nähe“ ohne Kacheln: Bilder 12 eingerückt mit Radius 20, feine Linie
   zwischen den Einträgen. Der QR-Code steht immer auf Weiß (Scanner lesen helle
   Codes auf dunklem Grund nicht zuverlässig). */

@media (min-width: 768px) {
  .page--tickets { padding-top: 16px; }
}

/* ---------- Kopf: Zusammenfassung, Suche, Filter ---------- */
.tk-tools {
  display: grid;
  gap: 10px;
  padding: 0 var(--gutter) 10px;
}
.tk-summary {
  margin-top: -4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}
.tk-summary:empty { display: none; }
.tk-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.tk-filterbtn { justify-content: flex-start; padding: 0 16px; }
.tk-filterbtn__text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Monate und Einträge ---------- */
.tk-month { padding-bottom: 22px; }
.tk-month__title {
  padding: 8px var(--gutter) 12px;
  font-size: 18px;
  font-weight: 800;
}
.tk-month__title .text-accent { display: inline-block; }
.tk-card {
  display: block;
  color: var(--text);
}
.tk-card__media {
  position: relative;
  display: block;
  margin: 0 12px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-media);
  background: var(--placeholder);
  isolation: isolate;
}
.tk-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tk-card__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.tk-card__ph .icon { width: 42px; height: 42px; }
.tk-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .10), rgba(0, 0, 0, .70));
  pointer-events: none;
}
.tk-card__pills {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.tk-pill--live { background: rgba(0, 0, 0, .55); }
.tk-pill--notice { background: #B3261E; border-color: transparent; }
.tk-card__title {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tk-card__date {
  display: block;
  padding: 10px 14px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tk-sep {
  height: 1px;
  margin: 13px 12px 12px;
  background: var(--line);
}
.tk-card--sk { margin-bottom: 26px; }
.tk-card__sk {
  display: block;
  margin: 0 12px;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-media);
}
.tk-card__sk-line { margin: 12px 14px 0; }
.tk-list { padding-top: 6px; }

/* Filter-Fenster: Auswahl als Kreis */
.tk-filter {
  display: grid;
  gap: 16px;
  padding: 14px 16px 18px;
}
.tk-filter__label {
  margin-bottom: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
}
.tk-filter__options { display: grid; }
.tk-filter__option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 4px 2px;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.tk-filter__foot {
  display: flex;
  gap: 10px;
}
.tk-filter__foot .btn { flex: 1 1 0; min-height: 46px; }

/* ---------- Ein Ticket ---------- */
.tk-header { gap: 4px; padding-left: 8px; }
.tk-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 18px 32px;
  text-align: center;
}
.tk-detail__title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.tk-detail__line {
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.tk-detail__line--soft { margin-top: 4px; font-size: 13px; }
.tk-detail__line--small { margin-top: 4px; font-size: 12px; color: var(--text-3); }

.tk-qr {
  position: relative;
  margin-top: 22px;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  line-height: 0;
}
.tk-qr .cv-qr {
  display: block;
  width: min(240px, calc(100vw - 100px));
  height: auto;
}
.tk-qr--void .cv-qr { opacity: .35; }
.tk-qr__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(0, 0, 0, .72);
  line-height: 1.3;
}
.tk-qr__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: #B3261E;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2px;
}
.tk-qr__chip .icon { width: 14px; height: 14px; }
.tk-qr__msg {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .92);
}

/* Status unter dem Code */
.tk-detail__status { margin-top: 16px; }
.tk-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.tk-status .icon { width: 16px; height: 16px; fill: url(#cv-accent); }
.tk-status__dot { width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; }
.tk-status--bad .tk-status__dot { background: #FF5A5F; }
.tk-detail__hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-2);
}
.tk-detail__event { margin-top: 20px; gap: 8px; }
.tk-detail__event .icon { width: 18px; height: 18px; }

/* Leiser Hinweis: neue Tickets nur in der App */
.tk-app {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text);
  text-align: left;
}
.tk-app .icon { width: 22px; height: 22px; flex: none; }
.tk-app__text { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.tk-app__title { font-size: 14.5px; font-weight: 800; }
.tk-app__sub { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.tk-app .tk-app__out { width: 17px; height: 17px; color: var(--text-3); }

/* ---------- Laden, Fehler, abgemeldet ---------- */
.tk-sk-center { margin: 8px auto 0; }
.tk-qr-sk {
  display: block;
  width: 272px;
  max-width: 100%;
  aspect-ratio: 1;
  margin: 24px auto 0;
  border-radius: 24px;
}
.tk-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 44px 24px 24px;
  text-align: center;
}
.tk-error__text {
  max-width: 320px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-2);
}
.tk-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 24px 8px;
  text-align: center;
}
.tk-login__text { max-width: 320px; font-size: 14px; color: var(--text-2); }

/* QR-Grafik aus qr.js: Punkte im Akzent-Verlauf, dunkel genug für Scanner auf Weiß. */
.cv-qr__stop1 { stop-color: #C2185B; }
.cv-qr__stop2 { stop-color: #A65300; }
