/* plugins/reservados/ui/reservados.css
   Estilos del picker de reservados.
   Espejo VISUAL de plugins/seatpicking/ui/seatpicking.css renombrando sp-/SP- -> rsv-/RSV-.
   Nota: el proyecto evita `gap` y `gap-N` en CSS — usamos margin/padding para los huecos. */

#rsv-picker {
  max-width: 1280px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#rsv-picker svg text,
#rsv-picker .rsv-seat {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* =========================
   LAYOUT (main + sidebar)
   ========================= */
#rsv-picker .rsv-layout {
  display: flex;
  align-items: flex-start;
}
#rsv-picker .rsv-main {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 24px; /* en lugar de gap: 24px */
}
#rsv-picker .rsv-side {
  flex: 0 0 360px;
  max-width: 360px;
}

@media (min-width: 992px) {
  #rsv-picker .rsv-side {
    position: sticky;
    top: 90px;
  }
}

/* =========================
   SVG WRAP + ZOOM
   ========================= */
.rsv-svg-wrap {
  position: relative;
  width: 100%;
  /* La altura la marca el ratio del viewport (1000:600). Quitamos la
     altura fija de 520px y los fondos claros para que no queden franjas
     blancas arriba/abajo cuando el SVG tiene su propio fondo (foto/dibujo
     de la sala). Se ve solo lo que pinta el mapa. */
  aspect-ratio: 1000 / 600;
  border-radius: 10px;
  overflow: visible !important;
  background: transparent;
}

.rsv-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: transparent;
  cursor: grab;
  aspect-ratio: 1000 / 600;
}
.rsv-viewport:active { cursor: grabbing; }

#rsv-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.rsv-zoom-controls {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.rsv-zoom-btn {
  width: 42px;
  height: 42px;
  border: 0;
  background: #7A5EFE;
  color: #fff;
  font-size: 22px;
  line-height: 42px;
  cursor: pointer;
}
.rsv-zoom-btn + .rsv-zoom-btn {
  border-top: 1px solid #7A5EFE;
}

/* =========================
   TOOLTIP (hover sobre mesa)
   Espejo de plugins/seatpicking/ui/seatpicking.css renombrado sp- -> rsv-.
   ========================= */
.rsv-tooltip {
  position: absolute;
  display: none;
  min-width: 180px;
  max-width: 240px;
  padding: 10px 12px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  pointer-events: none;
  text-align: center;
  line-height: 1.15;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.rsv-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(255,255,255,.92);
  filter: drop-shadow(0 -1px 0 rgba(0,0,0,.08));
}
.rsv-tooltip .rsv-tt-title {
  font-weight: 700;
  font-size: 13px;
  color: #222;
  margin-bottom: 3px;
}
.rsv-tooltip .rsv-tt-sub {
  font-size: 12px;
  color: #2e7d32;
  font-weight: 600;
  margin-bottom: 6px;
}
.rsv-tooltip .rsv-tt-sub.is-selected { color: #7A5EFE; }
.rsv-tooltip .rsv-tt-sub.is-taken { color: #b00020; }
.rsv-tooltip .rsv-tt-price {
  font-size: 12px;
  color: #1e4db7;
  font-weight: 700;
}

/* =========================
   ASIENTOS (SVG)
   ========================= */
.rsv-seat {
  cursor: pointer;
  transition: filter .15s ease, stroke-width .15s ease;
}
.rsv-seat:hover { filter: brightness(1.15); }
.rsv-seat.is-taken { fill: #888; cursor: not-allowed; opacity: 0.7; }
.rsv-seat.is-selected { stroke: #000; stroke-width: 3; }

/* =========================
   LEYENDA — lista vertical con badge de descripcion.
   1 fila por tier, orden ascendente por precio.
   ========================= */
.rsv-legend {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(80,45,180,.06);
  padding: 6px 18px;
  margin-top: 18px;
}
.rsv-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  border-bottom: 1px solid #f1eefe;
}
.rsv-legend-row:last-child { border-bottom: none; }
.rsv-legend-left {
  display: flex;
  align-items: center;
  min-width: 0;
}
.rsv-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,.1);
  margin-right: 14px;
  flex-shrink: 0;
}
.rsv-legend-name {
  font-size: 15px;
  font-weight: 700;
  color: #1a1230;
}
.rsv-legend-badge {
  display: inline-block;
  background: #f1eefe;
  color: #7A5EFE;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: 10px;
  text-transform: lowercase;
  letter-spacing: .2px;
}
.rsv-legend-right {
  flex-shrink: 0;
  margin-left: 16px;
  white-space: nowrap;
}
.rsv-legend-price-from {
  font-size: 13px;
  color: #707a82;
  margin-right: 6px;
}
.rsv-legend-price {
  font-size: 18px;
  font-weight: 800;
}

@media (max-width: 575.98px) {
  .rsv-legend { padding: 4px 14px; }
  .rsv-legend-row { padding: 12px 0; }
  .rsv-legend-name { font-size: 14px; }
  .rsv-legend-price { font-size: 16px; }
  /* En movil apilamos "desde" sobre el precio para ganar espacio
     horizontal (los nombres de tipo + descripcion ya ocupan ancho).
     Quitamos el margin-right del "desde" y lo ponemos en columna. */
  .rsv-legend-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
  }
  .rsv-legend-price-from { margin-right: 0; }
}

/* =========================
   CART (Detalles de la compra)
   Mismo look que seatpicking.
   ========================= */
.rsv-cart {
  font-size: 15px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  background: #fff;
  display: flex;
  flex-direction: column;
}

.rsv-cart-header {
  background: #fff;
  padding: 18px 22px;
  border-bottom: 1px solid #eee;
}
.rsv-cart-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}
.rsv-cart-icon {
  font-size: 18px;
  margin-right: 8px;
}

.rsv-cart-body {
  background: #F8F9F9;
  padding: 0;
  flex: 1;
  overflow: auto;
}

.rsv-cart-empty {
  padding: 28px 18px;
  text-align: center;
  color: #666;
}
.rsv-cart-empty-title {
  font-weight: 700;
  margin-bottom: 4px;
  color: #333;
}
.rsv-cart-empty-sub { font-size: 13px; }

.rsv-cart-list {
  padding: 0;
  margin: 0;
}

.rsv-cart-item {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 14px 22px;
  background: transparent;
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.rsv-cart-item:last-child { border-bottom: none; }

.rsv-cart-left { min-width: 0; padding-right: 12px; }
.rsv-cart-seat {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
.rsv-cart-color-box {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.2);
  margin-right: 6px;
  vertical-align: middle;
}
.rsv-cart-zone {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  opacity: .6;
  text-transform: uppercase;
}

.rsv-cart-right {
  text-align: right;
  white-space: nowrap;
  padding-right: 18px;
}
.rsv-cart-price {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}
.rsv-cart-surcharge {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  opacity: .55;
}

.rsv-cart-item-remove {
  position: absolute;
  top: 8px;
  right: 6px;
  background: transparent;
  border: 0;
  color: #c33;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: .6;
  padding: 2px 6px;
}
.rsv-cart-item-remove:hover { opacity: 1; }

.rsv-cart-footer {
  background: #fff;
  padding: 16px 22px 20px 22px;
  border-top: 1px solid #eee;
}

.rsv-cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 0;
}

.rsv-cart-total {
  font-size: 17px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0 0;
  border-top: 1px solid rgba(0,0,0,.08);
  margin-top: 8px;
}
.rsv-cart-total strong {
  font-size: 18px;
  font-weight: 800;
}

.rsv-hold-timer {
  display: block;
  margin-top: 10px;
  color: #888;
  font-size: 12px;
  text-align: center;
}

/* =========================
   MODAL capacity picker
   Match estetica del proyecto: morado #7A5EFE, radius 16px en card,
   botones radius 999px estilo pill, sombras suaves moradas.
   ========================= */
.rsv-modal {
  position: fixed;
  inset: 0;
  background: rgba(26, 18, 48, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}
.rsv-modal-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 28px 24px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 48px -16px rgba(80, 45, 180, .35);
  color: #1a1230;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.rsv-modal-card h4 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: #1a1230;
  text-align: center;
}
#rsv-modal-tier-info {
  margin: 0 0 18px;
  color: #707a82;
  font-size: 14px;
  text-align: center;
}

.rsv-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px 0 14px;
}
.rsv-stepper button {
  width: 44px;
  height: 44px;
  font-size: 22px;
  line-height: 1;
  background: #7A5EFE;
  color: #fff;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  transition: filter .15s ease, transform .15s ease;
}
.rsv-stepper button:hover { filter: brightness(1.08); }
.rsv-stepper button:active { transform: scale(.96); }
.rsv-stepper input {
  width: 72px;
  height: 44px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin: 0 12px;
  border: 1.5px solid #e6e0fb;
  border-radius: 12px;
  color: #1a1230;
  background: #fafaff;
  outline: none;
}
.rsv-stepper input:focus { border-color: #7A5EFE; }
/* ocultar spinners de input number en webkit/firefox para look limpio */
.rsv-stepper input::-webkit-outer-spin-button,
.rsv-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rsv-stepper input[type=number] { -moz-appearance: textfield; }

#rsv-modal-total {
  color: #7A5EFE;
  font-size: 18px;
  font-weight: 800;
}
.rsv-modal-card > p:last-of-type {
  text-align: center;
  margin: 6px 0 22px;
  font-size: 14px;
  color: #707a82;
}

.rsv-modal-actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}
.rsv-modal-actions button {
  margin-left: 10px;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  border: 0;
  font-size: 14px;
  font-weight: 700;
  transition: filter .15s ease, box-shadow .15s ease, transform .15s ease;
}
.rsv-modal-actions .btn-secondary {
  background: #f1eefe;
  color: #4b3a8d;
}
.rsv-modal-actions .btn-secondary:hover { background: #e6e0fb; }
.rsv-modal-actions .btn-primary {
  background: #7A5EFE;
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(122, 94, 254, .55);
}
.rsv-modal-actions .btn-primary:hover { filter: brightness(1.08); box-shadow: 0 8px 20px -8px rgba(122, 94, 254, .65); }
.rsv-modal-actions button:active { transform: translateY(1px); }

/* =========================
   RESPONSIVE (movil/tablet)
   ========================= */
@media (max-width: 991.98px) {
  #rsv-picker .rsv-layout {
    flex-direction: column;
  }
  #rsv-picker .rsv-main {
    width: 100%;
    padding-right: 0;
    padding-bottom: 16px; /* en lugar de gap: 16px */
  }
  #rsv-picker .rsv-side {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    order: 2;
    margin-top: 8px;
  }
  .rsv-svg-wrap {
    max-width: none !important;
    width: 100% !important;
  }
}
