.seat-map-root {
  touch-action: manipulation;
}

.seat-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  font-size: 0.68rem;
  color: #94a3b8;
}

.seat-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.seat-map-legend-swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.55rem;
  border-radius: 0.2rem 0.2rem 0.12rem 0.12rem;
  flex-shrink: 0;
}

.seat-map-legend-swatch--free {
  background: linear-gradient(180deg, #34d399, #059669);
}

.seat-map-legend-swatch--pending {
  background: linear-gradient(180deg, #fcd34d, #d97706);
}

.seat-map-legend-swatch--taken {
  background: linear-gradient(180deg, #f87171, #b91c1c);
}

.seat-map-legend-swatch--selected {
  background: linear-gradient(180deg, #38bdf8, #4f46e5);
  box-shadow: 0 0 0 1px #fcd34d;
}

.seat-map-venue {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgb(42 107 95 / 0.28);
  background: linear-gradient(180deg, rgb(15 20 32 / 0.95), rgb(9 12 20 / 0.98));
  padding: 0.55rem 0.45rem 0.65rem;
}

.seat-map-hint {
  margin: 0 0 0.55rem;
  font-size: 0.68rem;
  color: #7c8da3;
}

.seat-map-hall-scroll {
  min-width: 0;
  overflow: auto;
  max-height: min(65vh, 500px);
  border-radius: 0.65rem;
  background: rgb(6 9 15 / 0.65);
  padding: 0.5rem 0.35rem 0.6rem;
}

.seat-map-zoom-canvas {
  --seat-map-zoom: 0.72;
  transform: scale(var(--seat-map-zoom));
  transform-origin: top center;
  width: fit-content;
  margin: 0 auto;
}

.seat-map-screen-bar {
  margin: 0 auto;
  height: 0.55rem;
  width: min(78%, 20rem);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(180deg, rgb(94 234 212 / 0.35), rgb(45 212 191 / 0.08));
  border: 1px solid rgb(94 234 212 / 0.25);
  border-bottom: none;
}

.seat-map-screen-label {
  margin-top: 0.25rem;
  font-size: 0.62rem;
  font-weight: 600;
  color: #5eead4;
  text-align: center;
}

.seat-map-hall {
  --seat-w: 1.38rem;
  --seat-gap: 0.13rem;
  --aisle-w: 0.5rem;
  --block-left-w: calc(var(--seat-cols-left) * var(--seat-w) + (var(--seat-cols-left) - 1) * var(--seat-gap));
  --block-center-w: calc(var(--seat-cols-center) * var(--seat-w) + (var(--seat-cols-center) - 1) * var(--seat-gap));
  --block-right-w: calc(var(--seat-cols-right) * var(--seat-w) + (var(--seat-cols-right) - 1) * var(--seat-gap));
  margin: 0 auto;
}

.seat-map-hall-matrix {
  position: relative;
  display: grid;
  grid-template-columns: 1.15rem var(--block-left-w) var(--aisle-w) var(--block-center-w) var(--aisle-w) var(--block-right-w);
  grid-template-rows: auto repeat(var(--seat-map-rows, 6), auto);
  row-gap: 0.1rem;
  align-items: center;
}

.seat-map-section-labels--in-hall {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  font-size: 0.58rem;
  color: #64748b;
  text-align: center;
}

.seat-map-center-zone {
  grid-column: 4;
  grid-row: 2 / -1;
  border-radius: 0.35rem;
  background: rgb(30 41 59 / 0.22);
  border: 1px solid rgb(51 65 85 / 0.35);
  pointer-events: none;
}

.seat-map-row-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  color: #64748b;
}

.seat-map-stacked-row--left .seat-map-seat-group { justify-content: flex-end; width: 100%; }
.seat-map-stacked-row--right .seat-map-seat-group { justify-content: flex-start; width: 100%; }
.seat-map-stacked-row--center .seat-map-seat-group { justify-content: center; width: 100%; }

.seat-map-seat-group {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--seat-gap);
}

.seat-map-aisle-long {
  grid-row: 2 / -1;
  min-height: 100%;
  background: rgb(15 23 42 / 0.85);
  box-shadow: inset 0 0 0 1px rgb(74 155 140 / 0.22);
}

.seat-map-aisle-long--first { grid-column: 3; }
.seat-map-aisle-long--second { grid-column: 5; }

.seat-map-seat {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--seat-w);
  height: calc(var(--seat-w) * 0.92);
  border-radius: 0.35rem 0.35rem 0.22rem 0.22rem;
  border: 1px solid transparent;
  font-size: 0.54rem;
  font-weight: 700;
  color: #fff;
  padding: 0;
}

button.seat-map-seat {
  cursor: pointer;
  font: inherit;
}

.seat-map-seat--free {
  background: linear-gradient(180deg, #3ecf9a, #047857);
}

.seat-map-seat--selected {
  background: linear-gradient(180deg, #7dd3fc, #4338ca);
  border: 1.5px solid #fde047;
}

.seat-map-seat--selected-scale { transform: scale(1.08); z-index: 2; }

.seat-map-seat--pending {
  background: linear-gradient(180deg, #fde68a, #d97706);
  color: #422006;
}

.seat-map-seat--taken {
  background: linear-gradient(180deg, #fca5a5, #b91c1c);
  opacity: 0.92;
}

.seat-map-seat-num {
  pointer-events: none;
}

/* ——— صفحه ثبت‌نام صندلی (/seat-registration) ——— */
.seat-reg-page { max-width: 56rem; }

.seat-reg-step { margin-bottom: 2rem; }
.seat-reg-step__head { margin-bottom: 1rem; }
.seat-reg-step__head h2 {
  margin: 0 0 0.35rem; font-size: 1.35rem; font-weight: 600;
}
.seat-reg-step__sub {
  margin: 0; font-size: 0.9rem; color: var(--muted); line-height: 1.5;
}

.seat-reg-card {
  border-radius: 1rem;
  border: 1px solid rgb(42 107 95 / 0.28);
  background: rgb(18 24 38 / 0.55);
  padding: 1.25rem 1.25rem 1.5rem;
}
.seat-reg-card--map { padding: 0.85rem 0.65rem 1rem; }

.seat-reg-actions {
  display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center;
  justify-content: flex-end; margin-top: 1.25rem;
}
.seat-reg-actions--center { justify-content: center; }

.seat-reg-summary {
  margin: 1rem 0 0; padding: 0.85rem 1rem 1rem; border-radius: 0.65rem;
  font-size: 0.9rem;
  background: rgb(74 155 140 / 0.1); border: 1px solid rgb(74 155 140 / 0.28);
  color: var(--text);
}
.seat-reg-summary--form { margin-bottom: 1rem; }
.seat-reg-summary__empty { margin: 0; color: var(--muted); font-size: 0.9rem; }
.seat-reg-summary__title { margin: 0 0 0.35rem; font-weight: 600; color: var(--teal-soft); }
.seat-reg-summary__labels { margin: 0 0 0.5rem; font-size: 0.8125rem; color: var(--muted); line-height: 1.5; }
.seat-reg-summary__rows {
  margin: 0 0 0.75rem; padding: 0 1rem 0 0; list-style: disc;
  color: var(--text); font-size: 0.875rem; line-height: 1.55;
}
.seat-reg-summary__row-label { font-weight: 600; color: var(--teal-soft); }
.seat-reg-summary__pay {
  margin: 0; padding-top: 0.65rem; border-top: 1px solid rgb(42 107 95 / 0.25);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.65rem;
  font-size: 0.9375rem;
}
.seat-reg-summary__pay strong { font-size: 1.05rem; color: #a7f3d0; }
.seat-reg-summary__pay--free strong { color: var(--teal-soft); }
.seat-reg-summary__pay-detail { font-size: 0.75rem; color: var(--muted); width: 100%; }

.seat-reg-check__panel {
  max-width: 26rem; margin: 1rem auto 0; text-align: right;
}
.seat-reg-check__result {
  margin-top: 0.85rem; font-size: 0.875rem; color: var(--muted); line-height: 1.55;
}

.seat-reg-form__grid {
  display: grid; gap: 1rem 1.15rem;
}
@media (min-width: 640px) {
  .seat-reg-form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.seat-reg-form__grid .span-full { grid-column: 1 / -1; }

.seat-reg-field {
  display: flex; flex-direction: column; gap: 0.35rem; margin: 0;
}
.seat-reg-field__label {
  font-size: 0.8125rem; font-weight: 500; color: var(--text);
}
.seat-reg-field__optional { font-weight: 400; color: var(--muted); font-size: 0.75rem; }
.seat-reg-field__hint {
  font-size: 0.75rem; color: var(--muted); line-height: 1.4;
}

.seat-reg-form__actions {
  display: flex; flex-wrap: wrap; gap: 0.65rem; justify-content: flex-end;
  margin-top: 1.35rem; padding-top: 1.25rem;
  border-top: 1px solid rgb(42 107 95 / 0.22);
}
.seat-reg-form__actions .btn-primary { min-width: 10rem; }
@media (max-width: 479px) {
  .seat-reg-form__actions .btn { flex: 1 1 100%; }
  .seat-reg-actions .btn { flex: 1 1 auto; }
}
