/* Seating map builder (dashboard) + buyer seat selector shared styles */

.seatmap-canvas-wrap {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 280px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  isolation: isolate;
}

.seatmap-zoom-controls {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: none;
}

.seatmap-zoom-btn {
  pointer-events: auto;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  -webkit-tap-highlight-color: transparent;
}

.seatmap-zoom-btn:active {
  background: #f1f5f9;
  transform: scale(0.96);
}

.seatmap-zoom-reset {
  font-size: 0;
}

.seatmap-map-actions {
  position: absolute;
  left: 0.65rem;
  top: 0.65rem;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  max-width: calc(100% - 4.5rem);
  pointer-events: none;
}

.seatmap-map-clear {
  pointer-events: auto;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fca5a5;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  color: #dc2626;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}
.seatmap-map-clear svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.seatmap-map-clear:active {
  background: #fef2f2;
  transform: scale(0.96);
}

.seatmap-continue-cta {
  pointer-events: none;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.seatmap-continue-cta[hidden] {
  display: none !important;
}

.seatmap-continue-cta:not([hidden]) {
  display: block;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.seatmap-continue-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 2.5rem;
  min-height: 2.5rem;
  padding: 0 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.seatmap-continue-btn svg,
#seatmap-footer-continue-btn .seatmap-continue-arrow {
  display: block;
  flex-shrink: 0;
}

.seatmap-continue-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 9999px;
  animation: seatmap-continue-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.seatmap-continue-btn.is-loading,
#seatmap-footer-continue-btn.is-loading {
  opacity: 0.75;
  cursor: wait;
  pointer-events: none;
}

#seatmap-footer-continue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.seatmap-continue-btn.is-loading .seatmap-continue-label,
#seatmap-footer-continue-btn.is-loading .seatmap-continue-label {
  opacity: 0.85;
}

.seatmap-continue-btn.is-loading .seatmap-continue-arrow,
#seatmap-footer-continue-btn.is-loading .seatmap-continue-arrow {
  display: none;
}

.seatmap-continue-btn.is-loading .seatmap-continue-spinner,
#seatmap-footer-continue-btn.is-loading .seatmap-continue-spinner {
  display: inline-block;
}

@keyframes seatmap-continue-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .seatmap-continue-cta {
    transition: none;
    transform: none;
  }
}

.seatmap-viewport-hint {
  position: absolute;
  left: 0.65rem;
  bottom: 0.55rem;
  z-index: 2;
  margin: 0;
  padding: 0.25rem 0.5rem;
  max-width: calc(100% - 4rem);
  font-size: 0.72rem;
  line-height: 1.3;
  color: #64748b;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 0.375rem;
  pointer-events: none;
}

#seatmap-toast-host {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.seatmap-toast-item {
  pointer-events: auto;
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
  max-width: min(92vw, 22rem);
  border-radius: 0.5rem;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.seatmap-toast-warning {
  border-color: #f59e0b;
  background: #fffbeb;
}

.seatmap-toast-error {
  border-color: #ef4444;
  background: #fef2f2;
}

.seatmap-toast-info {
  border-color: #3b82f6;
  background: #eff6ff;
}

.seatmap-toast-success {
  border-color: #22c55e;
  background: #f0fdf4;
}

.seatmap-toast-out {
  opacity: 0;
  transform: translateY(-6px);
}

@media (max-width: 640px) {
  .seatmap-canvas-wrap {
    height: 55vh;
  }
  .seatmap-viewport-hint {
    font-size: 0.68rem;
  }
}

.seatmap-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  z-index: 1;
}
.seatmap-svg.is-panning { cursor: grabbing; }
.seatmap-svg.tool-active { cursor: crosshair; }

/* Seats */
.seat {
  cursor: pointer;
  stroke: #1e293b;
  stroke-width: 1;
  transition: fill 0.1s ease;
}
.seat.available { fill: #ffffff; }
.seat.held      { fill: #fbbf24; }
.seat.sold      { fill: #ef4444; stroke: #b91c1c; cursor: not-allowed; }
.seat.disabled  { fill: #f1f5f9; stroke: #cbd5e1; cursor: not-allowed; opacity: 0.55; } /* different ticket type */
.seat.selected  { fill: #22c55e; stroke: #15803d; stroke-width: 2; } /* my selection */

.seatmap-svg .seatmap-unit-shell {
  fill: none;
  stroke: #1e293b;
  stroke-width: 1.5;
  pointer-events: none;
  transition: stroke 0.15s ease, opacity 0.15s ease;
}
.seatmap-svg .seatmap-unit-shell-selected {
  stroke: #15803d;
  stroke-width: 2;
}
@media (hover: hover) and (pointer: fine) {
  .seatmap-svg .seatmap-unit-shell.seatmap-unit-shell-hover {
    stroke: #16a34a;
    stroke-width: 2.5;
  }
  .seatmap-svg .seatmap-unit-part.available.seatmap-unit-part-hover-full:not(.disabled) {
    fill: #bbf7d0;
  }
}
.seatmap-svg .seatmap-unit-part {
  cursor: pointer;
  stroke: none;
  transition: fill 0.15s ease, stroke 0.15s ease, opacity 0.15s ease;
}
.seatmap-svg .seatmap-unit-part.available { fill: #ffffff; }
.seatmap-svg .seatmap-unit-part.held { fill: #fbbf24; cursor: not-allowed; }
.seatmap-svg .seatmap-unit-part.sold { fill: #ef4444; cursor: not-allowed; }
.seatmap-svg .seatmap-unit-part.selected { fill: #22c55e; }
.seatmap-svg .seatmap-unit-part.available.disabled { fill: #f1f5f9; cursor: not-allowed; opacity: 0.55; }
.seatmap-svg .seatmap-unit-part.seatmap-unit-part-busy { cursor: wait; pointer-events: none; }
.seatmap-svg .seatmap-unit-part.available.seatmap-unit-part-busy { fill: #ffffff; }
.seatmap-svg .seatmap-unit-part.selected.seatmap-unit-part-busy { fill: #22c55e; }
.seatmap-svg .seatmap-unit-part.seatmap-unit-part-full {
  fill: #22c55e;
}
@media (hover: hover) and (pointer: fine) {
  .seatmap-svg .seatmap-unit-part.available:not(.disabled):hover,
  .seatmap-svg .seatmap-unit-part.available.seatmap-unit-part-hover:not(.disabled) {
    fill: #dcfce7;
    stroke: #16a34a;
    stroke-width: 2.5;
  }
  .seatmap-svg .seatmap-unit-part.available.seatmap-unit-part-hover-full:not(.disabled) {
    fill: #bbf7d0;
  }
}
.seatmap-svg .seatmap-unit-divider {
  stroke: #64748b;
  stroke-width: 1.75;
  pointer-events: none;
}
.seatmap-svg .seatmap-unit {
  cursor: pointer;
  stroke: #94a3b8;
  stroke-width: 1.5;
  fill: #e5e7eb;
  transition: fill 0.1s ease, stroke 0.1s ease, opacity 0.1s ease;
}
.seatmap-svg .seatmap-unit.available { fill: #ffffff; stroke: #1e293b; }
.seatmap-svg .seatmap-unit.held { fill: #fbbf24; cursor: not-allowed; }
.seatmap-svg .seatmap-unit.sold { fill: #ef4444; stroke: #b91c1c; cursor: not-allowed; }
.seatmap-svg .seatmap-unit.selected { fill: #22c55e; stroke: #15803d; stroke-width: 2; }
.seatmap-svg .seatmap-unit.available.disabled { fill: #f1f5f9; stroke: #cbd5e1; cursor: not-allowed; opacity: 0.55; }
.seatmap-svg .seatmap-unit.builder-selected { stroke: #2563eb; stroke-width: 2.5; }
.seatmap-svg .seatmap-unit.section-inactive { fill: #e2e8f0; stroke: #cbd5e1; opacity: 0.45; }
.seatmap-svg .seatmap-unit.section-inactive.builder-selected { opacity: 0.65; }
.seatmap-svg .seatmap-unit-label-plate {
  fill: #ffffff;
  fill-opacity: 0.94;
  stroke: none;
  pointer-events: none;
}
.seatmap-svg .seatmap-unit-label-plate.on-selected {
  fill: #ffffff;
  fill-opacity: 0.96;
}
.seatmap-svg .seatmap-unit-label {
  fill: #0f172a;
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  user-select: none;
}
.seatmap-svg .seatmap-unit-label.on-selected {
  fill: #0f172a;
}
@media (prefers-reduced-motion: reduce) {
  .seatmap-svg .seatmap-unit-shell,
  .seatmap-svg .seatmap-unit-part {
    transition: none;
  }
}
.seat.seat-busy { cursor: wait; pointer-events: none; }
.seat.available.seat-busy { fill: #ffffff; stroke: #1e293b; stroke-width: 1; }
.seat.selected.seat-busy { fill: #22c55e; stroke: #15803d; stroke-width: 2; }
.seat.builder-selected { stroke: #2563eb; stroke-width: 2.5; }
.seat.section-inactive { fill: #e2e8f0; stroke: #cbd5e1; opacity: 0.45; }
.seat.section-inactive.builder-selected { opacity: 0.65; }
.section-inactive-label { fill: #94a3b8; opacity: 0.45; }

.seat.sold + .seat-label {
  fill: #ffffff;
}
.seat-label {
  font-size: 7px;
  fill: #475569;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  user-select: none;
}
.seat-loading-spinner {
  fill: none;
  stroke: #475569;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 5 8;
  animation: seatmap-seat-spin 0.75s linear infinite;
  pointer-events: none;
}
.seat-loading-spinner.on-selected {
  stroke: #ffffff;
}
.seat-loading-spinner.on-sold {
  stroke: #ffffff;
}
@keyframes seatmap-seat-spin {
  to { stroke-dashoffset: -26; }
}

.seatmap-confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.seatmap-confirm-dialog[hidden] {
  display: none !important;
}
body.seatmap-confirm-open {
  overflow: hidden;
}
.seatmap-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.seatmap-confirm-panel {
  position: relative;
  width: 100%;
  max-width: 22rem;
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
}
.seatmap-confirm-message {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #1e293b;
  text-align: center;
}
.seatmap-confirm-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
}
@media (min-width: 480px) {
  .seatmap-confirm-actions {
    flex-direction: row;
    justify-content: flex-end;
  }
}
.seatmap-confirm-btn {
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 480px) {
  .seatmap-confirm-btn {
    width: auto;
    min-width: 6.5rem;
  }
}
.seatmap-confirm-btn-cancel {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}
.seatmap-confirm-btn-ok {
  background: #dc2626;
  color: #fff;
}
.seatmap-confirm-btn:active {
  transform: scale(0.98);
}

.seatmap-stage {
  fill: #1e293b;
}
.seatmap-stage-label {
  fill: #fff;
  font-size: 14px;
  text-anchor: middle;
  dominant-baseline: middle;
  letter-spacing: 2px;
  pointer-events: none;
}

/* Legend */
.seatmap-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.8rem; }
.seatmap-legend .item { display: flex; align-items: center; gap: 0.35rem; }
.seatmap-legend .swatch { width: 14px; height: 14px; border: 1px solid #1e293b; border-radius: 3px; display: inline-block; }
.seatmap-legend .swatch.available { background: #fff; }
.seatmap-legend .swatch.held { background: #fbbf24; }
.seatmap-legend .swatch.sold { background: #ef4444; }
.seatmap-legend .swatch.selected { background: #22c55e; }
.seatmap-legend .swatch.selected.half {
  background: linear-gradient(to bottom, #22c55e 50%, #ffffff 50%);
}
.seatmap-legend .swatch.selected.full {
  background: #22c55e;
}

/* Builder toolbar */
.seatmap-tool {
  padding: 0.4rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
}
.seatmap-tool.active { background: #16a34a; color: #fff; border-color: #16a34a; }

/* Grid toggle switch */
.seatmap-switch { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; user-select: none; }
.seatmap-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.seatmap-switch-track {
  position: relative; width: 36px; height: 20px; flex: none;
  background: #cbd5e1; border-radius: 9999px; transition: background 0.15s ease;
}
.seatmap-switch-track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
  transition: transform 0.15s ease;
}
.seatmap-switch input:checked + .seatmap-switch-track { background: #16a34a; }
.seatmap-switch input:checked + .seatmap-switch-track::after { transform: translateX(16px); }
.seatmap-switch input:focus-visible + .seatmap-switch-track { outline: 2px solid #86efac; outline-offset: 1px; }
.seatmap-switch-label { font-size: 0.85rem; color: #334155; font-weight: 500; }

/* Grid size stepper */
.seatmap-grid-size { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: #334155; }
.seatmap-grid-size input {
  width: 3.25rem; border: 1px solid #cbd5e1; border-radius: 0.375rem;
  padding: 0.3rem 0.4rem; font-size: 0.8rem; text-align: center;
}
.seatmap-grid-size input:focus { outline: none; border-color: #16a34a; box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15); }

/* Icon action buttons (add / undo / redo / zoom) */
.seatmap-toolgroup { display: inline-flex; align-items: center; gap: 0.25rem; }
.seatmap-iconbtn {
  width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #cbd5e1; border-radius: 0.375rem; background: #fff; color: #334155;
  font-size: 0.85rem; line-height: 1; cursor: pointer; padding: 0;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.seatmap-iconbtn:hover:not(:disabled) { background: #ecfdf5; border-color: #86efac; color: #166534; }
.seatmap-iconbtn:active:not(:disabled) { transform: scale(0.95); }
.seatmap-iconbtn:disabled { opacity: 0.4; cursor: default; }

/* Info icon with hover hints */
.seatmap-hint { position: relative; display: inline-flex; align-items: center; margin-left: 0.15rem; color: #94a3b8; cursor: help; outline: none; }
.seatmap-hint > i { font-size: 1rem; }
.seatmap-hint:hover > i, .seatmap-hint:focus > i { color: #64748b; }
.seatmap-hint-pop {
  position: absolute; top: calc(100% + 8px); right: 0; left: auto;
  display: flex; flex-direction: column; gap: 0.2rem; white-space: nowrap;
  background: #1e293b; color: #f1f5f9; font-size: 0.72rem; line-height: 1.35;
  padding: 0.5rem 0.65rem; border-radius: 0.4rem; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  opacity: 0; visibility: hidden; transform: translateY(4px); pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease; z-index: 30;
}
.seatmap-hint:hover .seatmap-hint-pop,
.seatmap-hint:focus .seatmap-hint-pop,
.seatmap-hint:focus-within .seatmap-hint-pop { opacity: 1; visibility: visible; transform: translateY(0); }
.seatmap-hint-pop::before {
  content: ''; position: absolute; bottom: 100%; right: 7px;
  border: 5px solid transparent; border-bottom-color: #1e293b;
}

/* Buyer selection summary */
.seatmap-selection-list { max-height: 220px; overflow-y: auto; }
.seatmap-selection-list .row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.4rem 0; border-bottom: 1px solid #f1f5f9;
}

/* Snap grid */
.seatmap-grid-line { stroke: #e2e8f0; stroke-width: 1; pointer-events: none; }

/* Row labels (both ends of each row) */
.seat-row-label {
  font-size: 9px; fill: #64748b; font-weight: 600;
  text-anchor: middle; dominant-baseline: middle;
  pointer-events: none; user-select: none;
}

/* Structures: boxes, free labels, walkways, icons */
.seatmap-structure { fill: #e5e7eb; stroke: #94a3b8; stroke-width: 1; cursor: pointer; }
.seatmap-structure-label {
  fill: #334155; font-size: 13px; font-weight: 700; letter-spacing: 1px;
  text-anchor: middle; dominant-baseline: middle; pointer-events: none; user-select: none;
}
.seatmap-free-label {
  fill: #1e293b; font-weight: 700; letter-spacing: 1px;
  text-anchor: middle; dominant-baseline: middle; cursor: pointer; user-select: none;
}
.seatmap-walkway {
  fill: #f8fafc;
  stroke: #94a3b8;
  stroke-width: 1.5;
  stroke-dasharray: 7 5;
  pointer-events: none;
}
.seatmap-walkway-center {
  stroke: #cbd5e1;
  stroke-width: 1;
  stroke-dasharray: 4 6;
  pointer-events: none;
}
.seatmap-walkway-hit {
  fill: transparent;
  stroke: transparent;
  cursor: pointer;
  pointer-events: all;
}
.seatmap-map-icon { cursor: pointer; pointer-events: all; }
.seatmap-icon-jamb { fill: #cbd5e1; stroke: #64748b; stroke-width: 1; }
.seatmap-icon-door { fill: #ffffff; stroke: #64748b; stroke-width: 1.2; }
.seatmap-icon-arrow-in { fill: #16a34a; stroke: #15803d; stroke-width: 0.6; }
.seatmap-icon-arrow-out { fill: #dc2626; stroke: #b91c1c; stroke-width: 0.6; }
.seatmap-icon-wheelchair {
  text-anchor: middle; dominant-baseline: middle; fill: #334155; font-size: 22px; user-select: none;
}
.seatmap-line { stroke: #334155; stroke-linecap: round; }
.seatmap-line-hit { stroke: transparent; cursor: pointer; }
.seatmap-icon {
  text-anchor: middle; dominant-baseline: middle; cursor: pointer; fill: #334155; user-select: none;
}

/* Selection highlight for non-seat elements + resize handle + marquee */
.seatmap-structure.builder-selected,
.seatmap-stage.builder-selected { stroke: #2563eb; stroke-width: 2.5; }
.seatmap-free-label.builder-selected,
.seatmap-map-icon.builder-selected { outline: none; }
.seatmap-map-icon.builder-selected .seatmap-icon-jamb,
.seatmap-map-icon.builder-selected .seatmap-icon-door { stroke: #2563eb; stroke-width: 2; }
.seatmap-walkway.builder-selected {
  stroke: #2563eb;
  stroke-width: 2.5;
  fill: rgba(37, 99, 235, 0.08);
}
.seatmap-line.builder-selected { stroke: #2563eb; }
.builder-handle { fill: #2563eb; cursor: pointer; }
.seatmap-marquee { fill: rgba(37, 99, 235, 0.08); stroke: #2563eb; stroke-dasharray: 4 3; stroke-width: 1; }

/* Right-click insert menu */
.seatmap-context {
  position: fixed; z-index: 9999; min-width: 190px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 0.625rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18); padding: 0.35rem;
  font-size: 0.85rem; user-select: none;
}
.seatmap-context-group { padding: 0.15rem 0; }
.seatmap-context-group + .seatmap-context-group { border-top: 1px solid #f1f5f9; margin-top: 0.2rem; padding-top: 0.35rem; }
.seatmap-context-header {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #94a3b8; padding: 0.15rem 0.55rem 0.25rem;
}
.seatmap-context button {
  display: flex; align-items: center; gap: 0.5rem; width: 100%; text-align: left;
  padding: 0.4rem 0.55rem; border: 0; background: transparent; border-radius: 0.4rem;
  color: #1e293b; cursor: pointer; transition: background 0.12s ease; white-space: nowrap;
}
.seatmap-context button:hover { background: #ecfdf5; color: #166534; }
.seatmap-context-icons { display: flex; gap: 0.35rem; padding: 0 0.4rem; }
.seatmap-context-icons button {
  width: 2.25rem; height: 2.25rem; justify-content: center; padding: 0;
  border: 1px solid #e2e8f0; border-radius: 0.5rem; font-size: 1.1rem;
}
.seatmap-context-icons button:hover { background: #ecfdf5; border-color: #86efac; }

/* "Row of seats" + its numbering-settings flyout (a separate floating box) */
.seatmap-context-rowitem { display: flex; align-items: stretch; gap: 0; }
.seatmap-context-rowmain { flex: 1; }
.seatmap-context-expander { width: 1.9rem; justify-content: center; padding: 0; font-size: 1.1rem; color: #64748b; }
.seatmap-context-rowsettings {
  position: absolute; left: calc(100% + 6px); top: 0; z-index: 1;
  grid-template-columns: 1fr 1fr; gap: 0.4rem; min-width: 215px; padding: 0.55rem;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 0.625rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}
.seatmap-context-rowsettings .seatmap-context-header { padding: 0 0 0.1rem; }
.seatmap-context-rowsettings label { display: flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; color: #475569; }
.seatmap-context-rowsettings .full { grid-column: 1 / -1; }
.seatmap-context-rowsettings input[type="number"],
.seatmap-context-rowsettings input[type="text"] {
  width: 100%; min-width: 0; border: 1px solid #cbd5e1; border-radius: 0.3rem;
  padding: 0.2rem 0.35rem; font-size: 0.75rem;
}
.seatmap-context-note { font-size: 0.68rem; color: #94a3b8; line-height: 1.3; }
.seatmap-context button.seatmap-context-apply {
  justify-content: center; margin-top: 0.15rem;
  background: #16a34a; color: #fff; font-size: 0.78rem; font-weight: 600;
  padding: 0.4rem 0.55rem; border-radius: 0.4rem;
}
.seatmap-context button.seatmap-context-apply:hover { background: #15803d; color: #fff; }

.sm-row-edit-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease-out;
}
.sm-row-edit-wrap--open { grid-template-rows: 1fr; }
.sm-row-edit-inner { overflow: hidden; min-height: 0; }
.sm-row-edit { margin: 0.25rem 0; }
.sm-row-item--dragging { opacity: 0.45; }
.sm-row-item {
  color: #475569;
}
.sm-row-item.is-highlighted {
  background: #eff6ff;
  color: #1d4ed8;
}
.sm-st-item {
  color: #475569;
}
.sm-st-item:hover {
  background: #f8fafc;
}
.sm-st-item.is-highlighted {
  background: #eff6ff;
  color: #1d4ed8;
}
.sm-row-drag:active { cursor: grabbing; }
.sm-section-card--drop-target {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Alignment guides shown while moving */
.seatmap-guide { stroke: #ec4899; stroke-width: 1; stroke-dasharray: 4 3; pointer-events: none; }

/* Row angle / curve manipulation handles */
.seatmap-handle-guide { stroke: #cbd5e1; stroke-dasharray: 3 3; stroke-width: 1; pointer-events: none; }
.builder-handle-angle { fill: #2563eb; stroke: #fff; stroke-width: 1.5; cursor: grab; }
.builder-handle-curve { fill: #f97316; stroke: #fff; stroke-width: 1.5; cursor: grab; }
.builder-handle-length { fill: #14b8a6; stroke: #fff; stroke-width: 1.5; cursor: ew-resize; }

.seatmap-list-item:hover:not(.is-selected) { background-color: #f9fafb; }
.seatmap-list-item.is-selected { background-color: rgba(4, 110, 88, 0.08); }
.seatmap-list-item:focus-visible {
  outline: 2px solid #046e58;
  outline-offset: -2px;
  position: relative;
  z-index: 1;
}
.seatmap-used-by {
  margin-top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.seatmap-used-by-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1.2;
}
.seatmap-used-by-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.seatmap-used-by-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.2rem 0.55rem;
  border-radius: 0.375rem;
  background: rgba(4, 110, 88, 0.08);
  color: #046e58;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seatmap-used-by-link:hover {
  background: rgba(4, 110, 88, 0.14);
  color: #035544;
}
.seatmap-shared-badge {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.375rem;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.seatmap-delete-dialog {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.seatmap-delete-dialog.hidden { display: none; }
.seatmap-delete-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.seatmap-delete-dialog__panel {
  position: relative;
  width: min(100%, 22rem);
  padding: 1.25rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}
.seatmap-delete-dialog__message {
  margin: 0 0 1rem;
  color: #1f2937;
  font-size: 0.95rem;
  line-height: 1.45;
}
.seatmap-delete-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.seatmap-price-catalog {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0;
  background: #f9fafb;
  overflow: hidden;
}
.seatmap-price-catalog-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #0f172a;
}
.seatmap-price-catalog-toggle:hover {
  background: #f3f4f6;
}
.seatmap-price-catalog-types {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1.15rem;
  min-width: 0;
  flex: 1 1 auto;
}
.seatmap-price-catalog-type {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.seatmap-price-catalog-type .seatmap-catalog-icon {
  margin-top: 0;
}
.seatmap-price-catalog-type-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}
.seatmap-price-catalog-toggle-end {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: 0 0 auto;
}
.seatmap-price-catalog-toggle-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.3;
  white-space: nowrap;
}
.seatmap-price-catalog-chevron {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  color: #64748b;
  transition: transform 0.15s ease-out;
}
.seatmap-price-catalog.is-open .seatmap-price-catalog-chevron {
  transform: rotate(180deg);
}
.seatmap-price-catalog-panel {
  display: none;
  padding: 0 0.85rem 0.75rem;
  border-top: 1px solid #e5e7eb;
}
.seatmap-price-catalog.is-open .seatmap-price-catalog-panel {
  display: block;
}
.seatmap-price-matrix {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.55rem;
}
.seatmap-price-matrix--desktop {
  display: none;
}
.seatmap-price-zone-cards--mobile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.seatmap-price-zone-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.2rem 0;
  font-size: 0.8125rem;
  line-height: 1.35;
}
.seatmap-price-zone-line-label {
  font-weight: 600;
  color: #0f172a;
  min-width: 0;
}
.seatmap-price-zone-line-prices {
  display: flex;
  gap: 0.85rem;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}
.seatmap-price-zone-line-money {
  min-width: 3.75rem;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.28rem;
}
.seatmap-price-zone-line--head {
  padding-bottom: 0.1rem;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0.1rem;
}
.seatmap-price-zone-line--head .seatmap-price-zone-line-money {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.seatmap-price-zone-line--head .seatmap-catalog-icon {
  width: 16px;
  height: 20px;
}
@media (min-width: 640px) {
  .seatmap-price-matrix--desktop {
    display: table;
  }
  .seatmap-price-zone-cards--mobile {
    display: none;
  }
}
.seatmap-price-matrix th,
.seatmap-price-matrix td {
  padding: 0.4rem 0.35rem;
  text-align: left;
  font-size: 0.8125rem;
  line-height: 1.3;
  vertical-align: top;
}
.seatmap-price-matrix th {
  font-weight: 600;
  color: #334155;
  border-bottom: 1px solid #e5e7eb;
}
.seatmap-price-matrix td {
  color: #0f172a;
  border-bottom: 1px solid #f1f5f9;
}
.seatmap-price-matrix tr:last-child td {
  border-bottom: 0;
}
.seatmap-price-matrix .seatmap-price-matrix-zone {
  font-weight: 600;
  padding-right: 0.5rem;
}
.seatmap-price-matrix .seatmap-price-matrix-money {
  font-variant-numeric: tabular-nums;
}
.seatmap-price-matrix-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}
.seatmap-price-matrix-amount {
  display: block;
  white-space: nowrap;
}
.seatmap-price-matrix-unit {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #64748b;
}
.seatmap-price-catalog.is-open .seatmap-catalog-desc--summary {
  display: none;
}
.seatmap-price-catalog-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.45rem 0.75rem;
}
.seatmap-price-catalog-row + .seatmap-price-catalog-row {
  border-top: 1px solid #e5e7eb;
}
.seatmap-catalog-icon {
  width: 18px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 0.1rem;
  border: 1px solid #1e293b;
  border-radius: 3px;
  background: #fff;
  box-sizing: border-box;
}
.seatmap-catalog-icon--half {
  background: linear-gradient(to bottom, #22c55e 50%, #ffffff 50%);
}
.seatmap-catalog-icon--full {
  background: #22c55e;
}
.seatmap-catalog-icon--seat {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #22c55e;
}
.seatmap-catalog-icon--lg {
  width: 24px;
  height: 30px;
  border-radius: 4px;
}
.seatmap-catalog-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1 1 auto;
}
.seatmap-catalog-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
}
.seatmap-catalog-meta {
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.3;
}
.seatmap-catalog-price {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
}
.seatmap-catalog-price-block {
  margin-left: auto;
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.28rem;
  max-width: 58%;
  text-align: right;
}
.seatmap-catalog-price-block .seatmap-catalog-price {
  margin-left: 0;
}
.seatmap-catalog-desc {
  display: block;
  font-size: 0.6875rem;
  font-weight: 400;
  color: #64748b;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.seatmap-step .seatmap-catalog-desc * {
  font-size: inherit;
  font-weight: inherit;
  font-style: inherit;
  color: inherit;
  line-height: inherit;
}
.seatmap-price-matrix-money .seatmap-catalog-desc,
.seatmap-price-zone-line-money .seatmap-catalog-desc {
  margin-top: 0;
  max-width: 11rem;
}
.seatmap-map-tip {
  position: fixed;
  z-index: 80;
  max-width: 22rem;
  padding: 0.5rem 0.7rem;
  border-radius: 0.375rem;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
  transform: translate(-50%, calc(-100% - 28px));
}
.seatmap-selection-total {
  text-align: right;
}
