/* =====================================================================
   Sitzplan Parlamentssaal — toolspezifisches Stylesheet
   (ausgelagert aus der ursprünglichen index.html)
   ===================================================================== */

/* Legende */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Bühne */
.hemicycle-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

.hemicycle-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hemicycle-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Sitz-Layer – absolut, über dem SVG */
.seats-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}

/* Einzelner Sitz */
.seat {
  position: absolute;
  width: 5.7%;   /* responsiv: entspricht dem Sitzabstand der Reihen */
  aspect-ratio: 1.25 / 1;
  border-radius: 4px;
  border: 2px solid rgba(0,0,0,.32);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: transform .12s, box-shadow .12s, opacity .12s;
  user-select: none;
  transform: translate(-50%, -50%);  /* auf der Koordinate zentrieren */
  overflow: visible;
}

.seat:hover {
  z-index: 30;
}

.seat .party-badge {
  font-size: clamp(6px, 0.85vw, 9px);
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  pointer-events: none;
}

.seat .faction-star {
  font-size: clamp(6px, 0.75vw, 8px);
  color: #fff;
  line-height: 1;
  opacity: .9;
  pointer-events: none;
}

/* verschiebbare Sitze */
.seat.draggable { cursor: grab; }
.seat.draggable:active { cursor: grabbing; }

.seat.draggable:hover {
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
  z-index: 30;
}

/* Drag-Zustände */
.seat.dragging {
  opacity: 0.45;
  z-index: 10;
}

.seat.drag-over {
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #111;
  z-index: 20;
}

/* Freier Sitz (Person liegt im Pool) */
.seat.empty-seat {
  border-style: dashed;
  border-color: rgba(0,0,0,.28);
  background: transparent;
}

.seat .empty-badge {
  color: #777;
  text-shadow: none;
  font-weight: 600;
}

/* ─── Pool: temporäre Ablage in der Saalmitte ─────────────────────── */
.seat-pool {
  position: absolute;
  left: 50%;
  top: 17%;
  transform: translateX(-50%);
  width: min(28%, 260px);
  min-height: 74px;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem 0.4rem;
  border: 2px dashed #b3b3a2;
  border-radius: 10px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s, border-color .12s, box-shadow .12s;
  z-index: 40;
}

.seat-pool.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.seat-pool.drag-over {
  border-color: #111;
  border-style: solid;
  background: rgba(255,255,255,.97);
  box-shadow: 0 0 0 3px rgba(17,17,17,.14), 0 4px 14px rgba(0,0,0,.18);
}

.pool-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #666;
}

.pool-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  min-height: 26px;
  align-items: flex-start;
  align-content: flex-start;
  flex: 0 0 auto;
  width: 100%;
}

.pool-hint {
  font-size: 0.68rem;
  color: #999;
  flex: 0 0 auto;
}

/* Sitz-Chip im Pool */
.pool-seat {
  position: relative;
  width: 34px;
  height: 27px;
  border-radius: 4px;
  border: 2px solid rgba(0,0,0,.32);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  transition: transform .12s, box-shadow .12s, opacity .12s;
}

.pool-seat:active { cursor: grabbing; }

.pool-seat:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
  z-index: 50;
}

.pool-seat.dragging { opacity: .45; }

.pool-seat .party-badge {
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  pointer-events: none;
}

.pool-seat .faction-star {
  font-size: 7px;
  color: #fff;
  line-height: 1;
  opacity: .9;
  pointer-events: none;
}

.pool-seat:hover .seat-tooltip { display: block; }

/* Tooltip */
.seat-tooltip {
  position: absolute;
  background: rgba(10,10,10,.9);
  color: #fff;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  display: none;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

/* Pfeil */
.seat-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(10,10,10,.9);
}

.seat:hover .seat-tooltip { display: block; }

/* Tooltip unterhalb des Sitzes (obere Sitzreihen) */
.seat.tip-below .seat-tooltip {
  bottom: auto;
  top: calc(100% + 6px);
}

.seat.tip-below .seat-tooltip::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: rgba(10,10,10,.9);
}

/* Vordere Reihen – statisch */
.seat.static-seat {
  cursor: default;
}

.seat.static-seat:hover {
  transform: translate(-50%, -50%);
  box-shadow: none;
}

/* Publikum */
.publikum-label {
  text-align: center;
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.6rem;
  letter-spacing: .05em;
}

/* ─── Mobile / Touch ──────────────────────────────────────────────── */
/* Ohne Drag & Drop bleiben nur Ansicht und Tooltips: Greif-Cursor und
   Hover-Vergrösserung entfallen, damit nichts Interaktives suggeriert wird. */
body.seating-no-drag .seat.draggable,
body.seating-no-drag .pool-seat {
  cursor: default;
}

body.seating-no-drag .seat.draggable:hover {
  transform: translate(-50%, -50%);
  box-shadow: none;
}

body.seating-no-drag .pool-seat:hover {
  transform: none;
  box-shadow: none;
}

@media (max-width: 700px) {
  /* Der Sitzplan bleibt auf voller Breite sichtbar (kein Scrollen); die
     Sitze skalieren mit und werden dadurch etwas kleiner. */
  .legend { font-size: 0.7rem; gap: 0.3rem 0.6rem; }
  .publikum-label { font-size: 0.72rem; }
}
