.jdance-frontend {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  margin: 16px 0 24px;
}
.jdance-frontend .jd-canvas-wrap { border-radius: 0; }
.jdance-frontend .jd-sidebar {
  border-left: 1px solid #e5e7eb;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
  font-size: 13px;
}
.jdance-frontend h3 {
  margin: 0 0 4px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .6px; color: #6b7280; font-weight: 600;
}
.jd-legend { display: flex; flex-direction: column; gap: 6px; }
.jd-legend-row { display: flex; align-items: center; gap: 8px; color: #374151; font-size: 13px; }
.jd-swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.jd-sw-taken { background: #d0d5dd; }
.jd-sw-sel { background: #e11d48; border: 2px solid #111827; width: 10px; height: 10px; }
.jd-divider { height: 1px; background: #e5e7eb; }
.jd-cart { display: flex; flex-direction: column; gap: 6px; min-height: 60px; }
.jd-cart-empty { color: #6b7280; font-size: 13px; padding: 8px 0; }
.jd-cart-item {
  display: flex; justify-content: space-between;
  padding: 8px 10px;
  margin-bottom: 10px;
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
}
.jd-cart-item small { color: #6b7280; display: block; font-size: 11px; }
.jd-cart-price { display: flex; align-items: center; gap: 6px; }
.jd-remove { background: none; border: 0; color: #6b7280; cursor: pointer; font-size: 16px; padding: 0 0 0 6px; }
.jd-remove:hover { color: #e11d48; }
.jd-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 600; padding-top: 8px; border-top: 1px solid #e5e7eb; }
.jd-btn {
  background: #6d4aff; color: #fff; border: 0;
  padding: 10px; border-radius: 10px;
  font-weight: 600; cursor: pointer; font-size: 13px;
}
.jd-btn:disabled { opacity: .4; cursor: not-allowed; }
.jd-hint { font-size: 11px; color: #6b7280; line-height: 1.4; margin: 4px 0 0; }

@media (max-width: 900px) {
  .jdance-frontend { grid-template-columns: 1fr; }
  .jdance-frontend .jd-sidebar { border-left: 0; border-top: 1px solid #e5e7eb; }
}

/* Zoom button on main canvas */
.jdance-frontend .jd-canvas-wrap { position: relative; }
.jd-zoom-btn {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  background: rgba(17,24,39,0.85);
  color: #fff; border: 0;
  padding: 6px 12px; border-radius: 6px;
  font-size: 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.jd-zoom-btn:hover { background: rgba(17,24,39,1); }

/* Fullscreen modal for zoomed seatmap */
body.jd-zoom-lock { overflow: hidden; }
.jd-zoom-modal[hidden] { display: none; }
.jd-zoom-modal {
  position: fixed; inset: 0;
  z-index: 999999;
  background: rgba(10, 12, 20, 0.95);
  display: flex; flex-direction: column;
}
.jd-zoom-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  background: #111827; color: #f9fafb;
  border-bottom: 1px solid #1f2937;
}
.jd-zoom-title { font-weight: 600; font-size: 14px; }
.jd-zoom-controls { display: flex; align-items: center; gap: 8px; }
.jd-zoom-controls #jd-zoom-level { min-width: 48px; text-align: center; font-size: 12px; color: #d1d5db; }
.jd-zoom-ctrl {
  background: #1f2937; color: #f9fafb; border: 1px solid #374151;
  padding: 6px 12px; border-radius: 6px; cursor: pointer;
  font-size: 14px; font-weight: 600;
}
.jd-zoom-ctrl:hover { background: #374151; }
.jd-zoom-close {
  background: transparent; color: #f9fafb; border: 0;
  font-size: 26px; line-height: 1; cursor: pointer;
  padding: 0 8px;
}
.jd-zoom-close:hover { color: #ef4444; }

.jd-zoom-canvas {
  flex: 1; overflow: auto;
  padding: 20px;
  display: flex; align-items: flex-start; justify-content: center;
  --jd-zoom: 1;
}
.jd-zoom-canvas svg {
  transform: scale(var(--jd-zoom));
  transform-origin: top center;
  transition: transform .12s ease;
  width: auto;
  max-width: none;
  min-width: 860px;
  height: auto;
}

/* Hide source svg placeholder while moved into the modal */
.jd-canvas-zoomed-source::before {
  content: 'Opened in fullscreen view';
  display: block;
  color: #9ca3af; text-align: center;
  padding: 40px 10px; font-size: 13px;
}

/* Reservation countdown: bottom-left on the picker, the popup, and cart page. */
.jdance-frontend .jd-canvas-wrap { position: relative; }
.jd-countdown[hidden] { display: none; }
.jd-countdown {
  position: absolute; left: 12px; bottom: 12px; z-index: 4;
  background: rgba(17, 24, 39, .92); color: #f9fafb;
  font-size: 12px; line-height: 1.3;
  padding: 8px 12px; border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  font-weight: 500; letter-spacing: .1px;
}
.jd-countdown-time { font-variant-numeric: tabular-nums; font-weight: 700; }
.jd-countdown.is-warning { background: rgba(180, 35, 24, .94); }
.jd-countdown-zoom { z-index: 1000001; }

.jd-cart-countdown {
  display: block;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #111827; color: #f9fafb;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}
.jd-cart-countdown.is-warning { background: #b42318; }
.jd-cart-countdown.is-expired { background: #6b7280; }
.jd-cart-countdown-time { font-variant-numeric: tabular-nums; font-weight: 700; }
