/* ===================================================================
   Visage Tickets — Mapa de assentos (refinado)
   =================================================================== */

.seatmap-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-5);
  align-items: start;
  padding-bottom: var(--space-9);
}
@media (max-width: 980px) {
  .seatmap-layout {
    grid-template-columns: 1fr;
    padding-bottom: 180px;
  }
}

/* ---- Mapa container ---- */
.seatmap {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-card);
}

.seatmap__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-base);
  flex-wrap: wrap;
}

.seatmap__title {
  font-size: var(--text-sm);
  font-weight: 700;
}

.seatmap__zoom {
  display: inline-flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 2px;
}
.seatmap__zoom button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.seatmap__zoom button:hover {
  background: var(--bg-base);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ---- Legenda ---- */
.seatmap__legend {
  display: flex;
  gap: var(--space-3) var(--space-5);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  background: var(--bg-surface);
}
.seatmap__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 500;
}
.seatmap__legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
  display: inline-block;
}

/* ---- Viewport ---- */
.seatmap__viewport {
  position: relative;
  height: clamp(480px, 68vh, 720px);
  overflow: auto;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(196, 18, 47, 0.04), transparent 70%),
    linear-gradient(180deg, #FAFAFA 0%, #F4F4F6 100%);
}

.seatmap__svg {
  display: block;
  margin: 0 auto;
  width: max(100%, 920px);
  user-select: none;
  -webkit-user-select: none;
  padding: 16px 0 32px;
}

/* ---- Stage (palco) ---- */
.stage {
  fill: #1F2937;
  stroke: var(--accent-1);
  stroke-width: 1.5;
  filter: drop-shadow(0 4px 12px rgba(31, 41, 55, 0.18));
}
.stage-label {
  fill: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

/* ---- Camarotes (caixas) ---- */
.camarote-box {
  fill: rgba(159, 18, 57, 0.04);
  stroke: rgba(159, 18, 57, 0.24);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.camarote-label {
  fill: #9F1239;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

/* ---- Section labels ---- */
.section-label {
  fill: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.section-sub {
  fill: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ---- Row labels ---- */
.row-label {
  fill: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  text-anchor: middle;
}

/* ---- Seats ---- */
.seat {
  cursor: pointer;
  transition: fill 0.18s ease, transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  transform-box: fill-box;
  transform-origin: center;
}

/* Paleta harmoniosa em saturação consistente */
.seat[data-cat="A"] { fill: #9F1239; }   /* Camarote VIP - rose-800 */
.seat[data-cat="B"] { fill: #B45309; }   /* Plateia A - amber-800 */
.seat[data-cat="C"] { fill: #A16207; }   /* Plateia B - yellow-700 */
.seat[data-cat="D"] { fill: #15803D; }   /* Plateia C - green-700 */
.seat[data-cat="E"] { fill: #475569; }   /* Mezanino - slate-600 */

.seat:hover {
  transform: scale(1.45);
  filter: brightness(1.12) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
}

.seat[data-state="selected"] {
  fill: #FFFFFF !important;
  stroke: var(--accent-1);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 0 2px rgba(196, 18, 47, 0.15)) drop-shadow(0 2px 6px rgba(196, 18, 47, 0.4));
  transform: scale(1.15);
}

.seat[data-state="sold"] {
  fill: #E5E7EB !important;
  cursor: not-allowed;
  opacity: 0.55;
}
.seat[data-state="sold"]:hover {
  transform: none;
  filter: none;
}

.seat[data-state="reserved"] {
  fill: var(--warning) !important;
  cursor: not-allowed;
  opacity: 0.4;
}
.seat[data-state="reserved"]:hover {
  transform: none;
  filter: none;
}

/* ---- Aside summary ---- */
.seatmap__aside {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
@media (max-width: 980px) {
  .seatmap__aside { position: static; }
}

.selected-seats {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: var(--space-4);
}

.selected-seat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  transition: border-color var(--transition-fast);
}
.selected-seat:hover { border-color: var(--border-strong); }
.selected-seat__id {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-primary);
}
.selected-seat__cat {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}
.selected-seat__price {
  font-weight: 700;
  color: var(--text-primary);
}
.selected-seat__remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  margin-left: var(--space-2);
}
.selected-seat__remove:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.empty-state {
  padding: var(--space-5) var(--space-3);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}
