/* ---- Ticketshop (Weeztix, eigene Karten im KINKY-Design) ---- */
:root {
  /* Weeztix-Popup über Header (z 50) & Warenkorb-Leiste */
  --ot-shop-widget-z-index: 1000;
  --ot-shop-widget-popup-z-index: 1000;
  --ot-shop-widget-notification-container-z-index: 1100;
}
@keyframes ki-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes ki-bump { 0% { transform: scale(1); } 40% { transform: scale(1.3); color: var(--red-400); } 100% { transform: scale(1); } }
@keyframes ki-modal-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.tickets { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
.tickets__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-3) var(--space-5); }
.ticket-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }

.ticket {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px 40px;
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 32px);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--red-500);
  border-radius: var(--radius-md);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.ticket:hover { border-color: var(--red-hairline); border-left-color: var(--red-500); }
.ticket--featured {
  background: radial-gradient(ellipse at 100% 0%, var(--red-dim), transparent 65%), var(--ink-850);
  border-color: var(--red-500);
  box-shadow: var(--glow-md);
}
.ticket--soldout { opacity: .5; }
.ticket--soldout:hover { border-color: var(--border-subtle); }
.ticket--skeleton { grid-template-columns: 1fr; animation: ki-pulse 1.4s ease-in-out infinite; }

.ticket__info { min-width: 0; }
.ticket__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ticket__name {
  margin: 0;
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: clamp(20px, 2.2vw, 26px); line-height: 1.1;
  letter-spacing: var(--ls-headline); text-transform: uppercase;
  color: var(--white);
}
.ticket__desc { margin: 8px 0 0; max-width: 60ch; font-size: var(--fs-body-sm); color: var(--text-secondary); }

.ticket-tag {
  display: inline-flex; align-items: center;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  font-family: var(--font-label); font-size: 11px; font-weight: var(--fw-medium);
  letter-spacing: var(--ls-label); text-transform: uppercase; line-height: 1.2; white-space: nowrap;
}
.ticket-tag--badge { background: var(--red-dim); color: var(--red-300); border: 1px solid var(--red-hairline); }
.ticket--featured .ticket-tag--badge { background: var(--red-500); color: var(--white); border-color: var(--red-500); }
.ticket-tag--low { color: var(--white); border: 1px solid var(--border-strong); }
.ticket-tag--muted { color: var(--text-muted); border: 1px solid var(--border-subtle); padding: 10px 14px; }

.ticket__buy { display: flex; align-items: center; gap: clamp(20px, 3vw, 36px); }
.ticket__pricebox { text-align: right; }
.ticket__price {
  font-family: var(--font-display); font-weight: var(--fw-black);
  font-size: clamp(26px, 3vw, 34px); line-height: 1; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--white);
}
.ticket--featured .ticket__price { color: var(--red-500); }
.ticket__fee { margin-top: 6px; font-size: var(--fs-caption); color: var(--text-muted); white-space: nowrap; }

.stepper { display: flex; align-items: center; gap: 10px; }
.stepper__btn {
  width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  font-family: var(--font-display); font-size: 22px; font-weight: var(--fw-bold); line-height: 1;
  color: var(--white); background: transparent; border: 1px solid var(--border-strong);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.stepper__btn:hover { border-color: var(--red-500); background: var(--red-dim); }
.stepper__btn--plus { background: var(--red-500); border-color: var(--red-500); box-shadow: var(--glow-sm); }
.stepper__btn--plus:hover { background: var(--red-400); border-color: var(--red-400); }
.stepper__btn--plus:active { background: var(--red-600); }
.stepper__btn:disabled { opacity: .3; cursor: not-allowed; box-shadow: none; }
.stepper__btn:focus-visible, .cart-bar__btn:focus-visible, .shop-modal__close:focus-visible { outline: 2px solid var(--red-500); outline-offset: 2px; }
.stepper__qty {
  width: 30px; text-align: center;
  font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 24px; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--white);
}
.stepper__qty.is-bump { animation: ki-bump var(--dur-slow) var(--ease-out); }

.cart-bar {
  position: relative; z-index: 40; margin-top: var(--space-2);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 24px;
  background: rgba(0, 0, 0, .78);
  -webkit-backdrop-filter: var(--blur-panel); backdrop-filter: var(--blur-panel);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
/* Erst kleben, wenn etwas im Warenkorb liegt, sonst verdeckt die Leiste die Karten */
.cart-bar.is-active { position: sticky; bottom: 16px; border-color: var(--red-500); box-shadow: var(--shadow-lift), var(--glow-md); }
.cart-bar__sum { display: flex; align-items: baseline; gap: 16px; }
.cart-bar__count { font-family: var(--font-label); font-size: var(--fs-caption); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-muted); }
.cart-bar.is-active .cart-bar__count { color: var(--red-300); }
.cart-bar__total { font-family: var(--font-display); font-weight: var(--fw-black); font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--white); }
.cart-bar__btn[disabled] { opacity: .75; cursor: progress; }

.tickets__fallback { margin: 0; text-align: center; font-size: var(--fs-body-sm); color: var(--text-muted); }
.tickets__fallback a { display: inline-block; padding: 10px 2px; }

/* Ersatz-Kasse (falls das Weeztix-Popup nicht aufgeht) */
html.modal-open { overflow: hidden; }
.shop-modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: flex-end; }
.shop-modal.is-open { display: flex; }
.shop-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.shop-modal__panel {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  width: min(480px, 100%); height: min(860px, calc(100% - 32px)); margin: 16px;
  background: var(--ink-850); border: 1px solid var(--red-500);
  border-radius: var(--radius-md); box-shadow: var(--glow-md);
  animation: ki-modal-in var(--dur-slow) var(--ease-out);
}
.shop-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 22px; border-bottom: 1px solid var(--border-subtle); }
.shop-modal__title { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 22px; letter-spacing: var(--ls-headline); text-transform: uppercase; color: var(--white); }
.shop-modal__close {
  width: 42px; height: 42px; padding: 0; display: grid; place-items: center;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: transparent; color: var(--white); font-size: 22px; line-height: 1; cursor: pointer;
  transition: border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.shop-modal__close:hover { border-color: var(--red-500); color: var(--red-500); }
.shop-modal__frame { flex: 1; width: 100%; border: 0; background: var(--white); }

@media (max-width: 720px) {
  .ticket { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ticket__buy { justify-content: space-between; gap: 14px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
  .ticket__pricebox { text-align: left; min-width: 0; }
  .ticket__fee { white-space: normal; }
  .stepper { gap: 8px; flex: none; }
  .cart-bar { gap: 12px; padding: 8px 8px 8px 18px; }
  .cart-bar__sum { flex-direction: column; align-items: flex-start; gap: 5px; }
  .cart-bar__count { font-size: 11px; }
  .cart-bar__total { font-size: 22px; }
  .cart-bar__btn { padding: 14px 20px; font-size: 13px; flex: none; }
  .shop-modal__panel { margin: 0; width: 100%; height: 100%; border-radius: 0; border-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ticket--skeleton, .stepper__qty.is-bump, .shop-modal__panel { animation: none; }
}
