/* ============================================================
   Theatro Seatmap Viewer — seatmap.css
   All classes prefixed .smv-  |  Theme: velvet dark, gold accents
   ============================================================ */

:root {
  --smv-gold:    #d4a853;
  --smv-ivory:   #f3ecdd;
  --smv-bg:      #110d10;
  --smv-panel:   #1d1418;
  --smv-border:  rgba(212, 168, 83, 0.22);
  --smv-shadow:  0 4px 24px rgba(0,0,0,.55);
  --smv-font:    'Manrope', system-ui, -apple-system, sans-serif;
  --smv-radius:  12px;
  --smv-trans:   .25s ease;
}

/* ── Container ────────────────────────────────────────────── */
.smv-wrap {
  position: relative;
  width: 100%;
  padding: 20px;
  background: var(--smv-bg);
  border: 1px solid var(--smv-border);
  border-radius: var(--smv-radius);
  box-sizing: border-box;
  overflow: hidden;
  font-family: var(--smv-font);
}

/* ── SVG map ──────────────────────────────────────────────── */
.smv-map {
  width: 100%;
  height: auto;
  display: block;
  cursor: default;
}

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

/* ── Section hover / state ───────────────────────────────── */
.smv-hover path,
.smv-hover polygon {
  filter: brightness(1.35);
  cursor: pointer;
  transition: filter var(--smv-trans);
}

.smv-dim {
  opacity: .18 !important;
  pointer-events: none !important;
  transition: opacity var(--smv-trans);
}

.smv-soldout polygon,
.smv-soldout path {
  opacity: .25;
}

.smv-soldout {
  cursor: not-allowed;
}

/* ── Zone chip row ───────────────────────────────────────── */
.smv-zones {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--smv-gold) transparent;
}

.smv-zones::-webkit-scrollbar {
  height: 3px;
}
.smv-zones::-webkit-scrollbar-thumb {
  background: var(--smv-gold);
  border-radius: 2px;
}

.smv-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--smv-gold);
  background: transparent;
  color: var(--smv-ivory);
  font-family: var(--smv-font);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--smv-trans), color var(--smv-trans);
  user-select: none;
}

.smv-chip:hover {
  background: rgba(212, 168, 83, .12);
}

.smv-chip.active {
  background: var(--smv-gold);
  color: #1a1015;
  font-weight: 700;
}

.smv-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

/* ── Hint line ───────────────────────────────────────────── */
.smv-hint {
  font-size: 12px;
  color: rgba(243, 236, 221, .45);
  margin-bottom: 10px;
  text-align: center;
  font-family: var(--smv-font);
}

/* ── Price bubbles ───────────────────────────────────────── */
.smv-bubble {
  position: absolute;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(17, 13, 16, .88);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--smv-font);
  border: 1px solid var(--smv-gold); /* overridden per-bubble by JS */
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
  pointer-events: auto;
  white-space: nowrap;
  transition: opacity var(--smv-trans), transform var(--smv-trans);
  user-select: none;
  line-height: 1.4;
}

.smv-bubble:hover {
  transform: translate(-50%, -50%) scale(1.07);
}

.smv-bubble.smv-bubble-hidden {
  opacity: 0 !important;
  pointer-events: none;
}

/* ── Overlay ─────────────────────────────────────────────── */
.smv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--smv-trans);
  backdrop-filter: blur(2px);
}

.smv-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Slide modal (desktop: right panel, mobile: bottom sheet) */
.smv-modal {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(420px, 100%);
  height: 100%;
  background: var(--smv-panel);
  z-index: 101;
  display: flex;
  flex-direction: column;
  transition: right .3s cubic-bezier(.4,0,.2,1);
  box-shadow: -4px 0 40px rgba(0,0,0,.6);
  font-family: var(--smv-font);
  overflow: hidden;
}

.smv-modal.active {
  right: 0;
}

/* Mobile: bottom sheet */
@media (max-width: 768px) {
  .smv-modal {
    top: auto;
    right: 0;
    bottom: -100%;
    width: 100%;
    max-height: 88vh;
    border-radius: 18px 18px 0 0;
    transition: bottom .3s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 -4px 40px rgba(0,0,0,.6);
  }
  .smv-modal.active {
    bottom: 0;
    right: 0;
  }
  /* drag handle */
  .smv-modal::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(243,236,221,.2);
    margin: 12px auto 0;
    flex-shrink: 0;
  }
}

/* Modal header */
.smv-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--smv-border);
  flex-shrink: 0;
}

.smv-modal-zone-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.smv-modal-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--smv-ivory);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smv-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: none;
  color: var(--smv-ivory);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--smv-trans);
  line-height: 1;
}
.smv-close:hover {
  background: rgba(255,255,255,.14);
}

/* Modal body */
.smv-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--smv-gold) transparent;
}

.smv-modal-price-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.smv-price-big {
  font-size: 36px;
  font-weight: 800;
  color: var(--smv-gold);
  line-height: 1;
  letter-spacing: -.5px;
}

.smv-per-ticket {
  font-size: 13px;
  color: rgba(243,236,221,.5);
  font-weight: 400;
}

.smv-availability {
  font-size: 13px;
  color: rgba(243,236,221,.7);
  background: rgba(255,255,255,.05);
  border-radius: 6px;
  padding: 8px 12px;
  border-left: 3px solid var(--smv-gold);
}

/* Qty select */
.smv-qty-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.smv-qty-label {
  font-size: 12px;
  color: rgba(243,236,221,.55);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.smv-qty-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255,255,255,.07) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23d4a853' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--smv-border);
  border-radius: 8px;
  padding: 10px 36px 10px 14px;
  font-size: 15px;
  font-family: var(--smv-font);
  font-weight: 600;
  color: var(--smv-ivory);
  cursor: pointer;
  width: 100%;
  transition: border-color var(--smv-trans);
}

.smv-qty-select:focus {
  outline: none;
  border-color: var(--smv-gold);
}

/* Optional image */
.smv-modal-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--smv-border);
}

/* Modal footer */
.smv-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--smv-border);
  flex-shrink: 0;
}

.smv-buy {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--smv-gold);
  color: #1a1015;
  font-family: var(--smv-font);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  letter-spacing: .3px;
  transition: filter var(--smv-trans), transform var(--smv-trans);
}

.smv-buy:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.smv-buy:active {
  transform: translateY(0);
  filter: brightness(.95);
}

/* ── Loading skeleton ────────────────────────────────────── */
.smv-loading {
  width: 100%;
  aspect-ratio: 1000/760;
  border-radius: var(--smv-radius);
  background: linear-gradient(
    90deg,
    rgba(255,255,255,.04) 25%,
    rgba(255,255,255,.09) 50%,
    rgba(255,255,255,.04) 75%
  );
  background-size: 200% 100%;
  animation: smv-shimmer 1.6s infinite;
}

@keyframes smv-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
