/* ============================================================
   Seat Map — layout tokens + seat button styles
   Override pattern from JS (SeatMapLayout.applyCssVars):
     --seat-size, --seat-gap, --section-gap, --row-pitch,
     --curve-depth, --seat-start-y, --map-center-x
   Position each seat with:
     --seat-x, --seat-y  (set by SeatMapLayout.placeNode)
   ============================================================ */

#seat-map-shell {
  --seat-size: 26px;
  --seat-gap: 6px;
  --section-gap: 34px;
  --row-pitch: 34px;
  --curve-depth: 36px;
  --seat-start-y: 220px;
  --map-center-x: 490px;
  --canvas-width: 980px;

  background: #F4F5F7;
  border: 1px solid #e5e7eb;
  border-radius: 1.5rem;
  position: relative;
  height: min(72vh, 640px);
  overflow: hidden;
  user-select: none;
}

/* Availability loading / error overlay on the map shell (like floor loading). */
#seat-map-shell.is-availability-loading #seat-viewport,
#seat-map-shell.is-availability-error #seat-viewport {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.seat-availability-overlay {
  position: absolute;
  inset: 0;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(244, 245, 247, 0.55);
  backdrop-filter: blur(1px);
  pointer-events: auto;
}

.seat-availability-overlay[hidden] {
  display: none !important;
}

.seat-availability-overlay__panel {
  width: min(16rem, 80%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.seat-availability-overlay__track {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(91, 63, 248, 0.15);
  overflow: hidden;
}

.seat-availability-overlay__bar {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: #5B3FF8;
  animation: seat-availability-indeterminate 1.1s ease-in-out infinite;
}

.seat-availability-overlay.is-error .seat-availability-overlay__track {
  display: none;
}

.seat-availability-overlay__label {
  margin: 0;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.4;
  color: #4b5563;
}

.seat-availability-overlay.is-error .seat-availability-overlay__label {
  color: #b91c1c;
}

@keyframes seat-availability-indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}

/* Mobile: full-bleed map width; taller only while zoomed-in; at fit JS sets is-map-height-fitted. */
@media (max-width: 1023px) {
  #seat-map-shell {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  #seat-map-shell:not(.is-map-height-fitted) {
    height: min(62vh, 520px);
    min-height: 240px;
  }
  #seat-map-shell.is-map-height-fitted {
    min-height: 240px;
    max-height: min(62vh, 520px);
  }
}

@media (min-width: 1024px) {
  #seat-map-shell { height: 680px; }
}

#seat-map-shell.is-view-only {
  height: min(68vh, 560px);
}
@media (min-width: 1024px) {
  #seat-map-shell.is-view-only { height: 560px; }
}

#seat-viewport {
  position: absolute;
  inset: 0;
  z-index: 1;
  touch-action: none;
  cursor: grab;
}
#seat-viewport:active { cursor: grabbing; }

/*
 * Mobile page-scroll mode: keep touch-action:none on the map.
 * #seat-map-shell has overflow:hidden — native touch-action:pan-y would try to
 * scroll the shell (nowhere to go) instead of the document. JS window.scrollBy
 * on touchmove (passive:false) scrolls the page, including when the finger is on a seat.
 */
@media (max-width: 1023px) {
  #seat-map-shell.allows-page-scroll-y #seat-viewport,
  #seat-map-shell.allows-page-scroll-y #seat-viewport:active {
    cursor: default;
  }
  #seat-map-shell.allows-page-scroll-y .seat-btn {
    -webkit-tap-highlight-color: transparent;
    cursor: default;
  }
}

#seat-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--canvas-width, 980px);
  height: 980px;
  margin-left: 0;
  transform-origin: 0 0;
  transform: translate(0px, 0px) scale(1);
}

.seat-stage {
  position: absolute;
  left: var(--stage-center-x, 490px);
  top: 0;
  transform: translateX(-50%);
  width: var(--stage-width, 520px);
  height: var(--stage-height, 90px);
  background: #5B3FF8;
  border-radius: 0 0 100% 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1rem;
  box-shadow: 0 10px 15px -3px rgba(91, 63, 248, 0.2);
}
.seat-stage[data-shape="arc"] {
  border-radius: 0 0 100% 100%;
  clip-path: none;
}
.seat-stage[data-shape="rect"] {
  border-radius: 0 0 12px 12px;
  clip-path: none;
}
.seat-stage[data-shape="trap"] {
  border-radius: 0;
  clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%);
}
.seat-stage span {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.seat-best-zone {
  position: absolute;
  left: var(--stage-center-x, 490px);
  top: calc(var(--stage-height, 90px) + 10px);
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(91, 63, 248, 0.7);
  white-space: nowrap;
}

/* Seat hit target — size from tokens, position from --seat-x / --seat-y.
   Use div[role=button] (not <button>) so mobile page scroll works under the finger. */
.seat-btn {
  position: absolute;
  left: var(--seat-x, 0);
  top: var(--seat-y, 0);
  width: var(--seat-size, 26px);
  height: var(--seat-size, 26px);
  margin-left: calc(var(--seat-size, 26px) / -2);
  margin-top: calc(var(--seat-size, 26px) / -2);
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: calc(var(--seat-size, 26px) * 0.35);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  box-sizing: border-box;
  padding: 0;
  line-height: 1;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  background: #D1D5DB;
  color: #4B5563;
  border: 1.5px solid #9CA3AF;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-align: center;
  transform-origin: center center;
}
.seat-btn:hover { transform: scale(1.12); z-index: 5; }

/* Number glyph layer — fills the seat so digits stay optically centered at any zoom. */
.seat-btn__label {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  pointer-events: none;
  /* Persian digit fonts often sit slightly high in the em-box */
  transform: translateY(0.04em);
}

/* Scheme D: hide tiny numbers in full-hall overview; show high-contrast digits when readable.
   Cap counter-scale by seat size so glyphs never overflow / drift off-center (e.g. ~68% zoom). */
#seat-map-shell:not(.is-labels-on) .seat-btn {
  font-size: 0;
  color: transparent;
  text-shadow: none;
}
#seat-map-shell:not(.is-labels-on) .seat-btn__label {
  visibility: hidden;
}
#seat-map-shell.is-labels-on .seat-btn {
  font-size: min(
    calc(var(--seat-size, 26px) * 0.46),
    calc(10.5px * var(--seat-inv-scale, 1))
  );
  font-weight: 800;
  line-height: 1;
}
#seat-map-shell.is-labels-on .seat-btn.is-available,
#seat-map-shell.is-labels-on .seat-btn.is-vip,
#seat-map-shell.is-labels-on .seat-btn.is-standard {
  color: #1F2937;
  text-shadow: none;
}
#seat-map-shell.is-labels-on .seat-btn.is-sold,
#seat-map-shell.is-labels-on .seat-btn.is-occupied,
#seat-map-shell.is-labels-on .seat-btn.is-inactive,
#seat-map-shell.is-labels-on .seat-btn.is-selected {
  color: #fff;
  text-shadow: none;
}
#seat-map-shell.is-labels-on .seat-btn.is-held {
  color: #713F12;
  text-shadow: none;
}
/* Status colors only — VIP/standard type no longer drives fill. */
.seat-btn.is-available {
  background: #D1D5DB;
  color: #4B5563;
  border: 1.5px solid #9CA3AF;
}
.seat-btn.is-vip,
.seat-btn.is-standard {
  background: #D1D5DB;
  color: #4B5563;
  border: 1.5px solid #9CA3AF;
}
.seat-btn.is-sold,
.seat-btn.is-occupied,
.seat-btn.is-inactive {
  background: #EF4444;
  color: #fff;
  border: 1.5px solid #DC2626;
  cursor: not-allowed;
  opacity: 1;
  pointer-events: none;
}
.seat-btn.is-held {
  background: #EAB308;
  color: #713F12;
  border: 1.5px solid #CA8A04;
  cursor: not-allowed;
  opacity: 1;
  pointer-events: none;
}
/* Budget filter: mute available seats without inventing a new status color. */
.seat-btn.is-out-of-budget {
  opacity: 0.4;
  border-style: dashed;
  cursor: not-allowed;
}
.seat-btn.is-out-of-budget:hover {
  transform: none;
  z-index: 2;
}
.seat-btn.is-selected.is-out-of-budget {
  background: #22C55E;
  color: #fff;
  border: 2px solid #15803D;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35);
  cursor: pointer;
  opacity: 1;
  border-style: solid;
}

/* Compact dual-range above the map (reuses .price-range* from app.css). */
.seat-price-filter {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.35rem 0.25rem 0.15rem;
  max-width: 22rem;
  width: 100%;
  margin-inline-start: auto;
}
.seat-price-filter[hidden] {
  display: none !important;
}
.seat-price-filter__labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 10px;
  font-weight: 600;
  color: #6B7280;
}
.seat-price-filter__title {
  color: #9CA3AF;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.seat-price-filter__value {
  color: #5B3FF8;
  font-weight: 800;
  font-size: 12px;
  line-height: 1.2;
}
.seat-price-filter__range {
  height: 24px;
}
.seat-price-filter__range .price-range-thumb {
  height: 24px;
}
#seat-price-max-range {
  z-index: 3;
}
#seat-price-min-range {
  z-index: 4;
}
@media (max-width: 639px) {
  .seat-price-filter {
    max-width: none;
    margin-inline: 0;
  }
}
.seat-btn.is-selected {
  background: #22C55E;
  color: #fff;
  border: 2px solid #15803D;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35);
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
}
.seat-btn.is-owned {
  background: #5B3FF8;
  color: #fff;
  border: 1.5px solid #4C2FE0;
  box-shadow: 0 0 0 3px rgba(91, 63, 248, 0.25);
  cursor: default;
  pointer-events: none;
  opacity: 1;
}
#seat-map-shell.is-view-only .seat-btn:hover {
  transform: none;
  z-index: auto;
}

.seat-row-label,
.seat-section-label {
  position: absolute;
  left: var(--seat-x, 0);
  top: var(--seat-y, 0);
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-weight: 800;
}
.seat-row-label {
  font-size: 11px;
  color: #9CA3AF;
  letter-spacing: 0.04em;
}
.seat-section-label {
  font-size: 10px;
  color: #6B7280;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

#seat-popup::before {
  content: '';
  position: absolute;
  top: var(--arrow-top, 16px);
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
}
#seat-popup.popup-arrow-left::before {
  left: -6px;
  border-left: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
#seat-popup.popup-arrow-right::before {
  right: -6px;
  left: auto;
  border-right: 1px solid #e5e7eb;
  border-top: 1px solid #e5e7eb;
}

.session-dropdown { width: 100%; }
.session-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid #5B3FF8;
  background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(91, 63, 248, 0.12);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.session-trigger[aria-expanded="true"] .session-chevron {
  transform: rotate(180deg);
}
.session-chevron { transition: transform 0.2s ease; }
.session-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  padding: 0.35rem;
  max-height: 280px;
  overflow-y: auto;
}
.session-option {
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease;
}
.session-option:hover { background: #f9fafb; }
.session-option.is-active { background: #f5f3ff; }
.session-option.is-soldout { opacity: 0.72; }

/* Session sold-out: placeholder seats + centered message (no real seat interaction) */
#seat-map-shell.is-session-soldout #seat-canvas {
  display: none;
}

#seat-map-shell.is-session-soldout #seat-soldout-canvas {
  display: flex;
}

#seat-map-shell.is-session-soldout .seat-map-zoom-toolbar,
#seat-map-shell.is-session-soldout #seat-checkout-bar {
  display: none !important;
}

#seat-map-shell.is-session-soldout #seat-viewport {
  overflow: hidden;
  cursor: default;
}

.seat-soldout-canvas[hidden] {
  display: none !important;
}

.session-soldout-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(244, 245, 247, 0.35);
  pointer-events: none;
  direction: rtl;
  unicode-bidi: isolate;
}

.session-soldout-overlay[hidden] {
  display: none !important;
}

.session-soldout-overlay__card {
  pointer-events: none;
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e5e7eb;
  border-radius: 1.25rem;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  max-width: 22rem;
  width: 100%;
  direction: rtl;
  unicode-bidi: isolate;
}

.session-soldout-overlay__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.6;
}

/* Event held / finished: placeholder seats + centered message */
#seat-map-shell.is-event-held {
  pointer-events: auto;
}

#seat-map-shell.is-event-held #seat-viewport {
  overflow: hidden;
  cursor: default;
}

#seat-map-shell.is-event-held .seat-map-zoom-toolbar,
#seat-map-shell.is-event-held #seat-checkout-bar {
  display: none !important;
}

.event-held-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(244, 245, 247, 0.35);
  pointer-events: none;
  direction: rtl;
  unicode-bidi: isolate;
}

.event-held-overlay__card {
  pointer-events: none;
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e5e7eb;
  border-radius: 1.25rem;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  max-width: 22rem;
  width: 100%;
  direction: rtl;
  unicode-bidi: isolate;
}

.event-held-overlay__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.6;
}

/* Pre-sale placeholder (Event.sale_opens_at not reached yet) */
#seat-map-shell.is-presale {
  pointer-events: auto;
}

#seat-map-shell.is-presale #seat-viewport {
  overflow: hidden;
}

.seat-presale-canvas {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2.75rem;
  opacity: 0.55;
  filter: blur(1.5px);
  transform: scale(1.02);
  pointer-events: none;
  user-select: none;
}

.seat-presale-canvas .seat-stage {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  margin-bottom: 1.25rem;
  width: min(420px, 70%);
  height: 64px;
}

.seat-presale-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 0 1.5rem 2rem;
}

.seat-presale-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.seat-presale-seat {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid #A78BFA;
  background: #fff;
  flex-shrink: 0;
}

.seat-presale-seat.is-vip {
  border-color: transparent;
  background: #F5C542;
}

.sale-opens-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(244, 245, 247, 0.35);
  pointer-events: none;
  direction: rtl;
  unicode-bidi: isolate;
}

.sale-opens-overlay__card {
  pointer-events: none;
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e5e7eb;
  border-radius: 1.25rem;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  max-width: 22rem;
  width: 100%;
  direction: rtl;
  unicode-bidi: isolate;
}

.sale-opens-overlay__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.6;
}

.sale-opens-overlay__when {
  margin-top: 0.85rem;
}

.sale-opens-overlay__date {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.4;
  color: #111827;
  direction: rtl;
  unicode-bidi: isolate;
}

.sale-opens-overlay__clock {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #5B3FF8;
}

.sale-opens-overlay__countdown {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.7;
  color: #5B3FF8;
  direction: rtl;
}

/* Floor switcher (multi-floor halls) */
.floor-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.floor-switcher.hidden {
  display: none;
}

.floor-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.floor-switcher__btn:hover:not(:disabled) {
  background: #f5f3ff;
  color: #5B3FF8;
}

.floor-switcher__btn.is-active {
  background: #5B3FF8;
  color: #fff;
}

.floor-switcher__btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.floor-switcher__count {
  font-size: 0.65rem;
  font-weight: 800;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

.floor-switcher__btn.is-active .floor-switcher__count {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
}

#seat-map-shell.is-floor-loading #seat-viewport {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

#seat-map-shell.is-floor-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.75rem;
  height: 1.75rem;
  margin: -0.875rem 0 0 -0.875rem;
  border: 2.5px solid #c4b5fd;
  border-top-color: #5B3FF8;
  border-radius: 50%;
  animation: seat-floor-spin 0.7s linear infinite;
  z-index: 25;
}

@keyframes seat-floor-spin {
  to { transform: rotate(360deg); }
}

/* Zoom toolbar — centered without Tailwind translate (v4 translate breaks mobile). */
.seat-map-zoom-toolbar {
  position: absolute;
  top: 1rem;
  left: 0;
  right: 0;
  width: max-content;
  max-width: calc(100% - 1.5rem);
  margin-inline: auto;
  z-index: 30;
  pointer-events: auto;
}

/*
 * In-shell checkout bar (desktop + tablet).
 * Explicit width + left/right 0 + margin-inline:auto — never Tailwind translate
 * centering (v4 `translate` shifts the bar off-screen), never left+right with
 * width:auto alone (stretches full shell and looks like a mobile dock).
 */
#seat-checkout-bar.seat-checkout-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1rem;
  width: min(48rem, calc(100% - 2rem));
  max-width: min(48rem, calc(100% - 2rem));
  margin-inline: auto;
  z-index: 40;
  transform: none;
  translate: none;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  box-sizing: border-box;
}

/*
 * Mobile dock only below lg: JS moves bar to document.body + is-mobile-docked.
 * Media-query guard so a leaked class cannot full-bleed the bar on desktop.
 */
@media (max-width: 1023px) {
  #seat-checkout-bar.seat-checkout-dock.is-mobile-docked,
  #seat-checkout-bar.seat-checkout-dock.is-mobile-docked.is-visible {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px)) !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    translate: none !important;
    --tw-translate-x: 0 !important;
    --tw-translate-y: 0 !important;
    z-index: 56 !important;
    box-sizing: border-box;
  }

  #seat-checkout-bar.seat-checkout-dock.is-mobile-docked .seat-checkout-dock__inner {
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.22);
  }

  body:has(#seat-checkout-bar.is-mobile-docked.is-visible) {
    padding-bottom: calc(4.75rem + 9.25rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Sales-center credit summary — always visible in SC mode */
.sales-center-credit-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  padding: 0.95rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid #bbf7d0;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(16, 185, 129, 0.14), transparent 55%),
    linear-gradient(180deg, #ecfdf5 0%, #f8fffb 100%);
  box-shadow: 0 1px 2px rgba(6, 95, 70, 0.05);
}

.sales-center-credit-card__label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: #047857;
}

.sales-center-credit-card__remaining {
  margin: 0.15rem 0 0;
  font-size: 1.2rem;
  font-weight: 900;
  color: #065f46;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.sales-center-credit-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.sales-center-credit-card__meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 6.5rem;
}

.sales-center-credit-card__meta-label {
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
}

.sales-center-credit-card__meta-value {
  font-size: 12px;
  font-weight: 800;
  color: #111827;
  font-variant-numeric: tabular-nums;
}

/* Producer manual-sale receipts — classic ticket stub (do not share SC redesign) */
#producer-manual-receipts-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

#producer-manual-receipts .producer-receipt-ticket {
  --receipt-bg: #f3f4f8;
  --receipt-line: #d7dbe5;
  --receipt-notch: #ffffff;
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: var(--receipt-bg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: visible;
}

#producer-manual-receipts .producer-receipt-ticket.is-cancelled {
  opacity: 0.78;
}

#producer-manual-receipts .producer-receipt-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 8.5rem;
}

@media (min-width: 640px) {
  #producer-manual-receipts .producer-receipt-body {
    flex-direction: row;
  }
}

#producer-manual-receipts .producer-receipt-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.85rem 1rem;
}

#producer-manual-receipts .producer-receipt-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  font-size: 12px;
  line-height: 1.5;
  border-bottom: 1px solid rgba(215, 219, 229, 0.85);
}

#producer-manual-receipts .producer-receipt-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

#producer-manual-receipts .producer-receipt-row:first-child {
  padding-top: 0;
}

#producer-manual-receipts .producer-receipt-label {
  color: #6b7280;
  font-weight: 600;
  flex-shrink: 0;
}

#producer-manual-receipts .producer-receipt-value {
  color: #111827;
  font-weight: 700;
  text-align: left;
  word-break: break-word;
}

#producer-manual-receipts .producer-receipt-perforation {
  position: relative;
  flex: 0 0 auto;
  height: 1px;
  margin: 0 1rem;
  background-image: linear-gradient(to left, var(--receipt-line) 45%, transparent 0%);
  background-position: center;
  background-size: 8px 1px;
  background-repeat: repeat-x;
}

@media (min-width: 640px) {
  #producer-manual-receipts .producer-receipt-perforation {
    width: 1px;
    height: auto;
    align-self: stretch;
    margin: 0.85rem 0;
    background-image: linear-gradient(to bottom, var(--receipt-line) 45%, transparent 0%);
    background-size: 1px 8px;
    background-repeat: repeat-y;
  }
}

#producer-manual-receipts .producer-receipt-perforation::before,
#producer-manual-receipts .producer-receipt-perforation::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--receipt-notch);
  border: 1px solid #e5e7eb;
  z-index: 1;
}

#producer-manual-receipts .producer-receipt-perforation::before {
  top: 50%;
  right: -7px;
  transform: translateY(-50%);
  border-left: 0;
  border-radius: 0 999px 999px 0;
}

#producer-manual-receipts .producer-receipt-perforation::after {
  top: 50%;
  left: -7px;
  transform: translateY(-50%);
  border-right: 0;
  border-radius: 999px 0 0 999px;
}

@media (min-width: 640px) {
  #producer-manual-receipts .producer-receipt-perforation::before {
    top: -7px;
    right: 50%;
    left: auto;
    transform: translateX(50%);
    border: 1px solid #e5e7eb;
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
  }

  #producer-manual-receipts .producer-receipt-perforation::after {
    top: auto;
    bottom: -7px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border: 1px solid #e5e7eb;
    border-top: 0;
    border-radius: 0 0 999px 999px;
  }
}

#producer-manual-receipts .producer-receipt-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.5rem;
  min-width: 10.5rem;
  padding: 0.9rem 1rem;
}

#producer-manual-receipts .producer-receipt-download,
#producer-manual-receipts .producer-receipt-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

#producer-manual-receipts .producer-receipt-download {
  background: #111827;
  color: #fff;
}

#producer-manual-receipts .producer-receipt-download:hover {
  background: #000;
}

#producer-manual-receipts .producer-receipt-cancel {
  background: #c45c26;
  color: #fff;
}

#producer-manual-receipts .producer-receipt-cancel:hover {
  opacity: 0.92;
}

#producer-manual-receipts .producer-receipt-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  font-size: 11px;
  font-weight: 800;
  color: #be123c;
  background: #fff1f2;
}

/* Sales-center receipts — redesigned ticket cards only */
#sales-center-receipts-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

#sales-center-receipts .producer-receipt-ticket {
  --receipt-bg: #f8fafc;
  --receipt-line: #d7dbe5;
  --receipt-notch: #ffffff;
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 1.1rem;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--receipt-bg) 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  overflow: visible;
}

#sales-center-receipts .producer-receipt-ticket.is-cancelled {
  opacity: 0.78;
}

#sales-center-receipts .producer-receipt-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 8.5rem;
}

@media (min-width: 640px) {
  #sales-center-receipts .producer-receipt-body {
    flex-direction: row;
  }
}

#sales-center-receipts .producer-receipt-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.95rem 1.05rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#sales-center-receipts .producer-receipt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

#sales-center-receipts .producer-receipt-kicker {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
}

#sales-center-receipts .producer-receipt-code {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: #111827;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

#sales-center-receipts .producer-receipt-total {
  flex-shrink: 0;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

#sales-center-receipts .producer-receipt-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.75rem;
}

@media (max-width: 419px) {
  #sales-center-receipts .producer-receipt-meta {
    grid-template-columns: 1fr;
  }
}

#sales-center-receipts .producer-receipt-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  padding: 0;
  border: 0;
  font-size: 12px;
  line-height: 1.45;
}

#sales-center-receipts .producer-receipt-label {
  color: #6b7280;
  font-weight: 600;
  flex-shrink: 0;
  font-size: 10px;
}

#sales-center-receipts .producer-receipt-value {
  color: #111827;
  font-weight: 800;
  text-align: right;
  word-break: break-word;
}

#sales-center-receipts .producer-receipt-seats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

#sales-center-receipts .producer-receipt-seat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.55rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

#sales-center-receipts .producer-receipt-perforation {
  position: relative;
  flex: 0 0 auto;
  height: 1px;
  margin: 0 1rem;
  background-image: linear-gradient(to left, var(--receipt-line) 45%, transparent 0%);
  background-position: center;
  background-size: 8px 1px;
  background-repeat: repeat-x;
}

@media (min-width: 640px) {
  #sales-center-receipts .producer-receipt-perforation {
    width: 1px;
    height: auto;
    align-self: stretch;
    margin: 0.85rem 0;
    background-image: linear-gradient(to bottom, var(--receipt-line) 45%, transparent 0%);
    background-size: 1px 8px;
    background-repeat: repeat-y;
  }
}

#sales-center-receipts .producer-receipt-perforation::before,
#sales-center-receipts .producer-receipt-perforation::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--receipt-notch);
  border: 1px solid #e5e7eb;
  z-index: 1;
}

#sales-center-receipts .producer-receipt-perforation::before {
  top: 50%;
  right: -7px;
  transform: translateY(-50%);
  border-left: 0;
  border-radius: 0 999px 999px 0;
}

#sales-center-receipts .producer-receipt-perforation::after {
  top: 50%;
  left: -7px;
  transform: translateY(-50%);
  border-right: 0;
  border-radius: 999px 0 0 999px;
}

@media (min-width: 640px) {
  #sales-center-receipts .producer-receipt-perforation::before {
    top: -7px;
    right: 50%;
    left: auto;
    transform: translateX(50%);
    border: 1px solid #e5e7eb;
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
  }

  #sales-center-receipts .producer-receipt-perforation::after {
    top: auto;
    bottom: -7px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border: 1px solid #e5e7eb;
    border-top: 0;
    border-radius: 0 0 999px 999px;
  }
}

#sales-center-receipts .producer-receipt-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.5rem;
  min-width: 10.5rem;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.55);
}

#sales-center-receipts .producer-receipt-download,
#sales-center-receipts .producer-receipt-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.7rem 0.75rem;
  border-radius: 0.7rem;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

#sales-center-receipts .producer-receipt-download {
  background: #111827;
  color: #fff;
}

#sales-center-receipts .producer-receipt-download:hover {
  background: #000;
}

#sales-center-receipts .producer-receipt-cancel {
  background: #c45c26;
  color: #fff;
}

#sales-center-receipts .producer-receipt-cancel:hover {
  opacity: 0.92;
}

#sales-center-receipts .producer-receipt-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.7rem;
  font-size: 11px;
  font-weight: 800;
  color: #be123c;
  background: #fff1f2;
}

/* Producer / sales-center action button loading spinner */
.seat-action-btn-spinner {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: seat-action-btn-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes seat-action-btn-spin {
  to {
    transform: rotate(360deg);
  }
}

