/* ==========================================================================
   Seating Chart Maker — canvas, tables, seats, drag state, escort-card print
   Loaded only by /tools/seating-chart-maker.html
   ========================================================================== */

/* Seating canvas */
.vk-canvas-wrap {
  position: relative;
  overflow: auto;
  background: #fafaf7;
  border: 1px solid var(--bordersoft);
  border-radius: 10px;
  min-height: 480px;
  max-height: 70vh;
}
.vk-canvas {
  position: relative;
  transform-origin: 0 0;
  background-image:
    linear-gradient(to right, rgba(122,46,63,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(122,46,63,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}
.vk-table {
  position: absolute;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.vk-table.dragging { cursor: grabbing; z-index: 50; opacity: 0.9; }
.vk-table.selected .vk-table-body { outline: 2px solid var(--primary); outline-offset: 4px; }
.vk-table-body {
  position: absolute;
  background: white;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  text-align: center;
  font-size: 12px;
  font-weight: 500;
}
.vk-table-label { font-family: 'Playfair Display', serif; font-size: 14px; line-height: 1.1; }
.vk-table-warn {
  position: absolute; top: -10px; right: -10px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--danger); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.vk-seat {
  position: absolute;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #f5efe9;
  border: 2px solid #cfc4b8;
  transform: translate(-50%, -50%);
  cursor: pointer;
  font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
}
.vk-seat.filled {
  background: white;
  border-color: var(--primary);
}
.vk-seat.empty::before { content: '+'; color: #cfc4b8; font-size: 14px; }
.vk-seat:hover { transform: translate(-50%, -50%) scale(1.15); z-index: 10; }
.vk-feature {
  position: absolute;
  border: 2px dashed #b9a99a;
  background: rgba(212,165,165,0.15);
  color: #6b5b4f;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 6px;
}
.vk-feature[data-type="dance-floor"] { background: rgba(226,185,127,0.2); border-color: #c9a578; }
.vk-feature[data-type="bar"] { background: rgba(124,46,63,0.1); border-color: #7A2E3F; color: var(--primary); }
.vk-feature[data-type="stage"] { background: rgba(167,139,189,0.15); border-color: #a78bbd; }
.vk-feature[data-type="dj-booth"] { background: rgba(156,175,136,0.15); border-color: var(--sage); }
.vk-popover {
  position: fixed;
  z-index: 200;
  background: white;
  border: 1px solid var(--bordersoft);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  width: 280px;
  max-height: 400px;
  overflow-y: auto;
}
.vk-unassigned-side {
  background: white;
  border: 1px solid var(--bordersoft);
  border-radius: 10px;
  padding: 12px;
  max-height: 70vh;
  overflow-y: auto;
}
.vk-unassigned-side .guest-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--bordersoft);
  border-radius: 6px;
  margin-bottom: 4px;
  cursor: grab;
  font-size: 13px;
  background: white;
}
.vk-unassigned-side .guest-pill.dragging { opacity: 0.5; }

/* Seating-specific print output: escort cards + table number cards */

.escort-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 0;
  page-break-inside: avoid;
}
.escort-card {
  border: 1px dashed #999;
  padding: 1cm 0.5cm;
  text-align: center;
  page-break-inside: avoid;
  min-height: 6cm;
  display: flex; flex-direction: column; justify-content: center;
}
.escort-name { font-family: 'Playfair Display', serif; font-size: 22pt; color: #7A2E3F; }
.escort-table { margin-top: 0.5cm; font-size: 12pt; color: #555; }
.table-card-page {
  page-break-after: always;
  width: 100%;
  min-height: 90vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.table-card-num { font-family: 'Playfair Display', serif; font-size: 96pt; color: #7A2E3F; line-height: 1; }
.table-card-name { font-family: 'Playfair Display', serif; font-size: 28pt; color: #555; margin-top: 0.5cm; }
