/**
 * Theatre Events Seating – Frontend Styles
 * Primary stylesheet covering the booking launcher, overlay, and responsive seat map UI.
 */

.tes-mobile-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 0;
}

.tes-preload-hidden {
  opacity: 0;
  visibility: hidden;
}

.tes-preload-ready {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease;
}

.tes-mobile-launcher {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

.tes-mobile-launcher__button, .tes-launcher-button {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 16px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
  background: var(--tes-launcher-gradient, linear-gradient(120deg, #fbbf24 0%, #f97316 55%, #ef4444 100%));
  box-shadow: 0 18px 36px var(--tes-launcher-shadow, rgba(249, 115, 22, 0.35));
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  margin: 30px 0;
}

/* Elementor booking widget wrapper (styling hook) */
.tes-el-booking .tes-book-btn {
  border: none;
  border-radius: 999px;
  padding: 16px 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #fbbf24;
  color: #0f172a;
  cursor: pointer;
}
.tes-el-booking .tes-book-btn:hover { background: #f97316; color: #fff; }
.tes-el-booking__note { font-style: italic; }

/* Custom theme hook for Elementor booking button styling */
.tes-el-booking.custom-theme .tes-mobile-launcher__button,
.tes-el-booking.custom-theme .tes-book-btn {
  /* Intentionally empty: users/themes can override with their own gradients, borders, etc. */
}

.tes-mobile-launcher__button[disabled], .tes-launcher-button[disabled] {
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
  filter: grayscale(0.25);
}

.tes-mobile-launcher__button:hover,
.tes-mobile-launcher__button:focus,
.tes-launcher-button:hover,
.tes-launcher-button:focus {
  outline: none;
  filter: brightness(1.05);
  box-shadow: 0 22px 40px var(--tes-launcher-shadow-hover, rgba(249, 115, 22, 0.45));
  transform: translateY(-1px);
}

.tes-mobile-launcher__button:active,
.tes-launcher-button:active {
  transform: translateY(1px);
}

.tes-mobile-launcher .tes-event-closed-notice {
  margin: 0 auto 8px;
  padding: 12px 16px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.18);
  color: #111827;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.tes-mobile-booking .tes-event-closed-notice {
  margin: 48px auto;
  max-width: 360px;
  padding: 18px 20px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

#tes-add-to-cart,
#tes-go-to-checkout {
  border: none;
  cursor: pointer;
  background: #fbbf24; /* default gold for primary state */
  color: #0f172a;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 18px 30px rgba(248, 191, 22, 0.35);
}

#tes-add-to-cart:hover,
#tes-add-to-cart:focus,
#tes-go-to-checkout:hover,
#tes-go-to-checkout:focus {
  background: #f97316;
  color: #ffffff;
  box-shadow: 0 22px 40px rgba(249, 115, 22, 0.4);
  transform: translateY(-1px);
}

/* Ensure inner label spans inherit white on hover (checkout button markup) */
#tes-go-to-checkout:hover .tes-checkout-button__label,
#tes-go-to-checkout:focus .tes-checkout-button__label {
  color: #ffffff;
}

/* Also ensure add-to-cart text remains white on hover in all contexts */
.tes-mobile-toolbar #tes-add-to-cart:hover,
.tes-mobile-toolbar #tes-add-to-cart:focus {
  color: #ffffff;
}

#tes-add-to-cart.tes-btn-has-seats {
  background: #1e40af8c;
  color: #ffffff;
  box-shadow: 0 18px 32px rgba(30, 64, 175, 0.3);
}

/* Inactive/placeholder CTA (e.g., no occurrence yet) should not be gold */
#tes-add-to-cart.tes-btn-inactive {
  background: #1e40af8c;
  color: #ffffff;
  box-shadow: 0 18px 32px rgba(30, 64, 175, 0.25);
}

#tes-add-to-cart.tes-btn-has-seats:hover,
#tes-add-to-cart.tes-btn-has-seats:focus {
  background: #f97316;
  color: #ffffff;
}

/* Neutralize sticky hover/focus on mobile after programmatic updates */
#tes-add-to-cart.tes-neutral,
#tes-add-to-cart.tes-neutral:hover,
#tes-add-to-cart.tes-neutral:focus {
  transform: none;
}
#tes-add-to-cart.tes-neutral.tes-btn-has-seats,
#tes-add-to-cart.tes-neutral.tes-btn-has-seats:hover,
#tes-add-to-cart.tes-neutral.tes-btn-has-seats:focus {
  background: #1e40af8c;
  color: #ffffff;
  box-shadow: 0 18px 32px rgba(30, 64, 175, 0.3);
}
#tes-add-to-cart.tes-neutral.tes-btn-empty,
#tes-add-to-cart.tes-neutral.tes-btn-empty:hover,
#tes-add-to-cart.tes-neutral.tes-btn-empty:focus {
  background: #fbbf24;
  color: #0f172a;
  box-shadow: 0 18px 30px rgba(248, 191, 22, 0.35);
}

#tes-add-to-cart.tes-btn-empty {
  color: #0f172a;
}

#tes-go-to-checkout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#tes-go-to-checkout .tes-checkout-button__label {
  display: inline-block;
  line-height: 1.2;
}

#tes-go-to-checkout .tes-checkout-button__icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  background-color: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

#tes-add-to-cart:disabled,
#tes-go-to-checkout:disabled {
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* Override theme/Elementor dimming: keep toolbar CTAs visually bold even when disabled */
.tes-mobile-toolbar #tes-add-to-cart:disabled,
.tes-mobile-toolbar #tes-go-to-checkout:disabled {
  opacity: 1 !important;
  filter: none !important;
  box-shadow: 0 18px 30px rgba(248, 191, 22, 0.35); /* match normal */
}

#tes-add-to-cart:disabled:hover,
#tes-add-to-cart:disabled:focus,
#tes-go-to-checkout:disabled:hover,
#tes-go-to-checkout:disabled:focus {
  background: #f97316;
  color: #ffffff;
}

/* Checkout neutralization to avoid sticky orange after programmatic UI changes */
#tes-go-to-checkout.tes-neutral,
#tes-go-to-checkout.tes-neutral:hover,
#tes-go-to-checkout.tes-neutral:focus {
  background: #fbbf24;
  color: #0f172a;
  box-shadow: 0 18px 30px rgba(248, 191, 22, 0.35);
  transform: none;
}
#tes-go-to-checkout.tes-neutral .tes-checkout-button__label {
  color: inherit;
}

.tes-mobile-overlay {
  position: fixed;
  inset: 0;
  display: flex; /* keep in DOM so transitions can run */
  align-items: stretch;
  justify-content: center;
  z-index: 9999;
  pointer-events: none; /* disabled until active */
  opacity: 0; /* allow root to fade if critical CSS sets opacity */
  transition: opacity 220ms ease;
}

.tes-mobile-overlay.is-active {
  pointer-events: auto;
  opacity: 1;
}

/* During closing, keep drawer fixed while root fades */
.tes-mobile-overlay.is-closing .tes-mobile-booking {
  transform: none !important;
}

/* Centered welcome message over scrim while drawer stages in */
.tes-overlay-welcome {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1; /* above scrim, below content */
  opacity: 0;
  pointer-events: none;
}
.tes-overlay-welcome__box {
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  border: 1px solid rgba(248, 250, 252, 0.25);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}

.tes-overlay-welcome__box--image {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.tes-overlay-welcome__logo {
  display: block;
  width: 82vw;
  max-width: 640px;
  height: auto;
  filter: drop-shadow(0 8px 30px rgba(0,0,0,0.35));
}

@keyframes tesWelcomeFadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.tes-mobile-overlay.is-active .tes-overlay-welcome {
  opacity: 1; /* keep visible; drawer slides over it */
}

.tes-mobile-overlay__scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 170ms ease;
}

.tes-mobile-overlay__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  max-width: 100vw; /* ensure no element exceeds viewport width */
  --tes-booking-max-width: 100%;
  height: 100vh;
  max-height: 100vh;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  outline: none;
  opacity: 0;
  transition: opacity 180ms ease;
  overflow-x: hidden; /* lock out horizontal scroll on the root */
}

/* Animate in when overlay activates */
.tes-mobile-overlay.is-active .tes-mobile-overlay__scrim {
  opacity: 1;
}
.tes-mobile-overlay.is-active .tes-mobile-overlay__content { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .tes-mobile-overlay__scrim,
  .tes-mobile-overlay__content {
    transition: none !important;
  }
}

/* Staged chart entrance: slide the map frame after overlay is visible */
/* Stage the entire booking panel, not just the chart */
/* Drawer-style entrance for the full booking panel */
.tes-mobile-booking {
  /* Start off-screen above viewport; keep visible to allow transform animation */
  transform: translateY(-105%);
  opacity: 1;
  will-change: transform;
  transition: transform 520ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.tes-mobile-overlay.is-active .tes-mobile-booking {
  transform: translateY(0);
  /* Delay the panel entrance by ~0.75s on open only */
  transition-delay: 750ms;
}

/* Hide Woo notices inside the booking overlay so they don't trap in popup */
.tes-mobile-overlay__content .woocommerce-notices-wrapper,
.tes-mobile-overlay__content .woocommerce-message,
.tes-mobile-overlay__content .woocommerce-error,
.tes-mobile-overlay__content .woocommerce-info {
  display: none !important;
}

@supports (height: 100dvh) {
  .tes-mobile-overlay__content {
    height: 100dvh;
    max-height: 100dvh;
  }
}

.tes-mobile-overlay__close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: calc(((100% - var(--tes-booking-max-width, 100%)) / 2) + env(safe-area-inset-right, 0px) + 12px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(15, 23, 42, 0.5);
  color: #f8fafc;
  border: 1px solid rgba(248, 250, 252, 0.35);
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  z-index: 3;
}

.tes-mobile-overlay__close:hover,
.tes-mobile-overlay__close:focus {
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  transform: scale(1.05);
  outline: none;
}

html.tes-mobile-overlay-open,
body.tes-mobile-overlay-open {
  overflow: hidden;
}

.tes-mobile-overlay__content .tes-mobile-booking {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden; /* prevent sideways drag on the whole panel */
}

.tes-mobile-noscript {
  margin: 16px auto;
  padding: 12px 16px;
  max-width: 420px;
  text-align: center;
  background: #fde68a;
  color: #78350f;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
}

.tes-mobile-booking {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: calc(env(safe-area-inset-top, 0px) + 28px) 0 calc(env(safe-area-inset-bottom, 0px) + 24px);
  width: var(--tes-booking-max-width, 100%);
  margin: 0 auto;
  min-height: 100vh;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.96) 0%,
    rgba(15, 23, 42, 0.86) 35%,
    rgba(15, 23, 42, 0.6) 65%,
    rgba(15, 23, 42, 0.0) 100%
  );
  box-sizing: border-box;
}

.tes-mobile-notices {
  width: 100%;
}

.tes-mobile-frame {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  /* Ensure a visible margin on both sides across devices */
  padding-left: calc(env(safe-area-inset-left, 0px) + 14px);
  padding-right: calc(env(safe-area-inset-right, 0px) + 14px);
}

.tes-mobile-frame--top {
  flex: 0 0 auto;
  color: #ffffff;
  text-align: left;
}

.tes-mobile-header {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 18px;
  padding: 18px 18px 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(14px);
  position: relative;
}

.tes-mobile-event-title {
  margin: 0 0 10px;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #f8fafc;
}

.tes-header-occurrence {
  margin: 12px 0 6px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f8fafc;
}

.tes-mobile-header__row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tes-mobile-header__row .tes-header-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}



.tes-mobile-select-wrap {
  display: block;
  width: 100%;
}

.tes-mobile-header .tes-occurrence-select {
  width: 100%;
  margin: 14px 0 0;
  border-radius: 12px;
  padding: 12px 16px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.55), rgba(14, 116, 144, 0.45));
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35), 0 12px 24px rgba(15, 23, 42, 0.28);
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark; /* Hint UA to use dark popover palette where supported */
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

/* Ensure dropdown list items remain legible in browsers that inherit select colors */
.tes-mobile-header .tes-occurrence-select option,
.tes-mobile-header .tes-occurrence-select optgroup {
  background-color: #0b1220 !important; /* dark navy */
  color: #f8fafc !important;            /* near-white */
}
.tes-mobile-header .tes-occurrence-select option:checked,
.tes-mobile-header .tes-occurrence-select option:focus,
.tes-mobile-header .tes-occurrence-select option:hover {
  background-color: #cfe5ff !important; /* light blue highlight */
  color: #0f172a !important;            /* dark text */
}

.tes-mobile-header .tes-occurrence-select.tes-occurrence-select--placeholder {
  background: #fbbf24;
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.18), 0 12px 24px rgba(251, 191, 36, 0.3);
  padding-left: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%230f172a' d='M5 7 1.5 3h7Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px center;
  background-size: 10px 10px;
}

.tes-mobile-header .tes-occurrence-select.tes-occurrence-select--placeholder.tes-occurrence-select--cart-has-seats {
  background: #bedbf9;
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(30, 64, 175, 0.2), 0 12px 24px rgba(30, 64, 175, 0.25);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%230f172a' d='M5 7 1.5 3h7Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px center;
  background-size: 10px 10px;
}

.tes-mobile-header .tes-occurrence-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.5), 0 12px 24px rgba(14, 116, 144, 0.35);
}

.tes-mobile-frame--middle {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tes-mobile-map-region {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tes-mobile-legend {
  position: fixed;
  right: 16px;
  top: 16px;
  width: min(260px, 80vw);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  z-index: 30;
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.tes-mobile-legend .tes-tier-legend__header {
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
}

.tes-mobile-legend .tes-tier-legend__toggle {
  left: 18px;
  top: 16px;
}

.tes-mobile-legend .tes-tier-legend__content {
  max-height: 280px;
  overflow-y: auto;
}

.tes-mobile-legend.is-collapsed {
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
}

.tes-mobile-legend:not(.is-collapsed) {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.tes-mobile-map-shell {
  background: var(--tes-canvas-bg, #ffffff);
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  width: 95%; /* reduce width slightly to ensure visible side margins */
  max-width: 100%;
  margin: 0 auto; /* center within frame */
  box-sizing: border-box;
}

.tes-map-placeholder-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px 32px;
  border-radius: 18px;
  background: rgba(12, 21, 38, 0.75);
  color: #f8fafc;
  font-weight: 600;
  letter-spacing: 0.01em;
  max-width: 78%;
  pointer-events: none;
  gap: 8px;
  box-shadow: 0 26px 52px rgba(15, 23, 42, 0.55), 0 0 0 1px rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(6px);
  text-shadow: 0 2px 10px rgba(7, 11, 20, 0.75);
}

.tes-map-placeholder-message.is-visible {
  display: flex;
}

.tes-map-loading-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  padding: 14px 22px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.35);
  pointer-events: none;
  text-align: center;
}

.tes-map-loading-toast.is-visible {
  display: block;
}

.tes-map-loading-toast .tes-map-loading-icon {
  display: block;
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  line-height: 0;
}

/* Ensure inline loading SVG renders in white */
.tes-map-loading-toast .tes-map-loading-icon rect {
  fill: #fff;
}

.tes-map-locked {
  cursor: not-allowed;
  filter: grayscale(0.1);
}

.tes-map-locked .tes-seat {
  pointer-events: none;
}

.tes-zoom-disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}

/* ------------------------------------------------------------
 * Share Buttons Widget
 * ------------------------------------------------------------ */

.tes-map-placeholder-message span {
  font-weight: 400;
  font-size: 1rem;
  color: rgba(244, 247, 252, 0.96);
  text-shadow: 0 1px 6px rgba(7, 11, 20, 0.7);
}

.tes-checkout-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.78);
  z-index: 12000;
  padding: 24px;
}

.tes-checkout-overlay.is-active {
  display: flex;
}

.tes-checkout-overlay__panel {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 20px;
  padding: 28px 26px;
  color: #f8fafc;
  text-align: center;
  box-shadow: 0 25px 55px rgba(15, 23, 42, 0.45);
  max-width: min(420px, 90vw);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tes-checkout-overlay__spinner svg { width: 30px; height: 30px; display: inline-block; }
.tes-checkout-overlay__spinner rect { fill: #fff; }

.tes-checkout-overlay__message {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tes-checkout-overlay__event,
.tes-checkout-overlay__occurrence {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.92);
  display: none;
}

.tes-checkout-overlay__event {
  margin-top: 6px;
}

.tes-checkout-overlay__occurrence {
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.82);
  margin-top: 2px;
}

.tes-checkout-overlay__seats,
.tes-checkout-overlay__extra {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.88);
  line-height: 1.4;
  word-break: break-word;
}

.tes-checkout-overlay__seats:empty {
  display: none;
}

.tes-checkout-overlay__extra {
  font-style: italic;
  display: none;
}

@keyframes tes-overlay-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.tes-seat-removal-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 40;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.35);
  white-space: nowrap;
}

.tes-seat-removal-toast.is-visible {
  opacity: 1;
}

.tes-seat-removal-toast.is-fading-out {
  opacity: 0;
}

.tes-mobile-map-shell--legend {
  /* keep same padding as base; no extra top padding required */
  padding: 14px;
}

.tes-mobile-booking.is-waiting .tes-mobile-map-shell--legend {
  padding: 0;
}

.tes-mobile-legend-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: rgba(15, 23, 42, 0.65);
  color: #f8fafc;
  border: 1px solid rgba(248, 250, 252, 0.35);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
}

.tes-mobile-legend-button:hover,
.tes-mobile-legend-button:focus {
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  outline: none;
}

.tes-mobile-legend-button__icon {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.tes-mobile-legend-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.tes-mobile-legend-modal.is-active {
  display: flex;
}

.tes-mobile-legend-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
}

.tes-mobile-legend-modal__panel {
  position: relative;
  z-index: 1;
  background: #0f172a;
  border-radius: 18px;
  padding: 20px 20px 24px;
  width: min(320px, 90vw);
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tes-mobile-legend-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  color: #f8fafc;
  border: 1px solid rgba(248, 250, 252, 0.35);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
}

.tes-mobile-legend-panel {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #f8fafc;
}

.tes-mobile-legend-panel .tes-tier-legend__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tes-mobile-legend-panel .tes-tier-legend__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tes-mobile-legend-panel .tes-tier-legend__item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tes-mobile-legend-panel .tes-tier-legend__swatch {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.35);
}

.tes-mobile-legend-panel .tes-tier-legend__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tes-mobile-legend-panel .tes-tier-legend__label {
  color: #f8fafc;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tes-mobile-legend-panel .tes-tier-legend__price {
  color: rgba(226, 232, 240, 0.75);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.015em;
}

.tes-mobile-legend-panel__title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f8fafc;
}

.tes-mobile-booking.is-waiting .tes-mobile-map-viewport,
.tes-mobile-booking.is-waiting .tes-mobile-map-controls {
  display: none;
}

.tes-mobile-booking.is-waiting .tes-mobile-map-placeholder {
  display: flex;
  margin-top: 12px;
}

.tes-mobile-booking.is-waiting .tes-mobile-map-shell {
  background: transparent;
  box-shadow: none;
  padding: 0;
  gap: 0;
}

.tes-mobile-booking.is-waiting .tes-mobile-legend-button {
  display: none;
}

.tes-mobile-map-shell--legend .tes-mobile-legend-button {
  top: 20px;
  right: 18px;
}

.tes-mobile-map-placeholder {
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.7);
  padding: 24px 18px;
  text-align: center;
  color: #1e293b;
  background: rgba(226, 232, 240, 0.25);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tes-mobile-map-viewport {
  position: relative;
  flex: 1 1 auto;
  overflow: auto;
  border-radius: 16px;
  background: var(--tes-canvas-bg, #0f172a);
  touch-action: pan-x pan-y;
  overscroll-behavior: contain; /* keep scroll chaining inside viewport */
  aspect-ratio: var(--tes-canvas-aspect, 16 / 9);
  width: 100%;
  height: auto;
  min-height: 220px;
  max-height: 72vh;
  max-height: min(72vh, 640px);
  cursor: grab;
}

.tes-mobile-map-viewport.is-panning {
  cursor: grabbing;
}

.tes-mobile-map-track {
  position: relative;
  transform-origin: top left;
}

.tes-mobile-map-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.tes-mobile-map-stage .tes-frontend-map {
  position: absolute;
  left: 50%;
  top: 50%;
  background-color: transparent;
  border-radius: 12px;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: 50% 50%;
  background-image: var(--tes-canvas-image, none);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Seat styles (duplicated for isolation from desktop) */
.tes-seat {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 18px;
  border-radius: var(--tes-seat-radius, 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  color: #fff;
  cursor: pointer;
  user-select: none;
  background: var(--tes-seat-color, #2563eb);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.tes-seat::after {
  content: attr(data-label);
  font-weight: 600;
  font-size: 10px;
  line-height: 1;
  padding: 0 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.tes-frontend-map[data-show-seat-labels="1"] .tes-seat::after,
.tes-seat.tes-seat-selected::after,
.tes-seat.tes-seat-mine::after,
.tes-seat[data-status="mine"]::after {
  opacity: 1;
}

.tes-seat:hover:not([data-booked="1"]):not(.tes-seat-selected) {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.tes-seat.tes-seat-selected {
  background: var(--tes-seat-color-selected, #f97316) !important;
  box-shadow: 0 0 0 3px var(--tes-seat-shadow-selected, rgba(249, 115, 22, 0.35));
}

.tes-seat.tes-seat-mine:not(.tes-seat-selected) {
  background: var(--tes-seat-color-mine, #22c55e) !important;
  box-shadow: 0 0 0 3px var(--tes-seat-shadow-mine, rgba(34, 197, 94, 0.35));
}

.tes-seat.tes-seat-removing {
  background: var(--tes-seat-color-removing, rgba(252, 211, 77, 0.9)) !important;
  box-shadow: 0 0 0 3px rgba(252, 211, 77, 0.45);
  cursor: wait !important;
  pointer-events: none;
}

.tes-seat[data-booked="1"],
.tes-seat[data-status="booked"],
.tes-seat[data-status="held"] {
  background: var(--tes-seat-color-unavailable, #94a3b8) !important;
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
}

.tes-placeholder {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.82);
  color: #e2e8f0;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  text-align: center;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.4);
  z-index: 3;
  max-width: 88%;
}

.tes-map-placeholder-image {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 85vw);
  height: min(560px, calc(100% - 40px));
  max-width: 560px;
  max-height: calc(100% - 40px);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
  filter: saturate(0.9);
}

.tes-map-placeholder-image.is-visible {
  opacity: 0.15;
}

.tes-mobile-map-controls {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.tes-mobile-map-control,
.tes-mobile-map-control:focus {
  border: none;
  border-radius: 12px;
  padding: 12px 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: rgba(96, 165, 250, 0.22);
  color: #ffffff;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  flex: 1 1 0;
}


.tes-mobile-map-control--reset {
  font-size: 10pt;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 400;
}

.tes-mobile-map-control[data-zoom-in],
.tes-mobile-map-control[data-zoom-out] {
  font-size: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tes-mobile-map-control[data-zoom-in]::before,
.tes-mobile-map-control[data-zoom-out]::before {
  content: "";
  width: 22px;
  height: 22px;
  display: block;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  filter: brightness(0) invert(1);
}

.tes-mobile-map-control[data-zoom-in]::before {
  background-image: url('../img/zoom-in.svg');
}

.tes-mobile-map-control[data-zoom-out]::before {
  background-image: url('../img/zoom-out.svg');
}

.tes-mobile-map-control:hover {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(204, 220, 255, 0.25);
}

.tes-mobile-frame--bottom {
  flex: 0 0 auto;
}

.tes-mobile-footer {
  background: #0f172a;
  border-radius: 20px;
  padding: 18px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -18px 40px rgba(15, 23, 42, 0.35);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tes-total-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  align-items: flex-start;
}

.tes-total-summary__selection {
  font-size: 0.92rem;
  color: rgba(226, 232, 240, 0.85);
  line-height: 1.4;
  text-align: left;
  width: 100%;
}

.tes-total-summary__total {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 1.05rem;
}

.tes-total-summary__total span:first-child {
  color: rgba(226, 232, 240, 0.85);
  margin-right: 4px;
}

.tes-mobile-footer .tes-total-amount {
  color: #ff4f4f;
}

.tes-mobile-total {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 25px; /* center/space total block consistently across screens */
}

/* Mobile tweaks (<640px): compact totals and footer padding */
@media (max-width: 639px) {
  .tes-mobile-total {
    margin-top: 0;
  }
  .tes-mobile-footer {
    padding: 0 18px calc(20px + env(safe-area-inset-bottom, 0px));
  }
}


.tes-mobile-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
  width: 100%;
  align-items: stretch; /* stretch to full width; buttons will fill */
}

/* Ensure toolbar inner container spans its column */
.tes-mobile-toolbar #tes-toolbar {
  width: 100%;
}

/* Hide Elementor header cart toggle when empty (detected by TES helper) */
/* Hide the header cart toggle when empty; show inline-block when not */
.elementor-menu-cart__toggle_wrapper[data-tes-empty="1"] .elementor-menu-cart__toggle {
  display: none !important;
}
.elementor-menu-cart__toggle_wrapper[data-tes-empty="0"] .elementor-menu-cart__toggle {
  display: inline-block !important;
}

/* Fixed-height action area: single button centers vertically; two buttons share height */
.tes-mobile-toolbar .tes-actions {
  --tes-actions-height: 88px; /* increased to fit larger label text */
  --tes-btn-gap: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center; /* center single-button case vertically */
  align-items: stretch;
  gap: var(--tes-btn-gap);
  height: var(--tes-actions-height);
  width: 100%;
}

.tes-mobile-toolbar .tes-actions #tes-add-to-cart,
.tes-mobile-toolbar .tes-actions #tes-go-to-checkout {
  height: calc((var(--tes-actions-height) - var(--tes-btn-gap)) / 2);
}

/* Single-button mode: CTA fills the action area; checkout hidden */
.tes-mobile-toolbar .tes-actions.tes-actions--single #tes-add-to-cart {
  height: var(--tes-actions-height);
}
.tes-mobile-toolbar .tes-actions.tes-actions--single #tes-go-to-checkout {
  display: none !important;
}
.tes-mobile-toolbar .tes-actions.tes-actions--single #tes-go-to-checkout {
  display: none !important;
}

/* Double-button mode: checkout button visible */
.tes-mobile-toolbar #tes-go-to-checkout {
  display: inline-flex;
}
.tes-mobile-toolbar #tes-go-to-checkout.tes-mobile-visible {
  display: inline-flex;
}

.tes-mobile-toolbar .tes-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.tes-mobile-toolbar .tes-actions button + button {
  margin-top: 10px;
}

.tes-mobile-toolbar #tes-add-to-cart,
.tes-mobile-toolbar #tes-go-to-checkout {
  width: 100%;
  padding: 12px 16px; /* slightly reduced to balance with fixed heights */
  font-size: 1.05rem;
  border-radius: 14px;
  letter-spacing: 0.02em;
  font-weight: 700;
}

/* Ensure vertical centering of labels within fixed-height buttons */
.tes-mobile-toolbar #tes-add-to-cart,
.tes-mobile-toolbar #tes-go-to-checkout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tes-mobile-toolbar #tes-add-to-cart {
  border-radius: 14px;
  box-shadow: 0 18px 30px rgba(248, 191, 22, 0.35);
}

.tes-mobile-toolbar #tes-add-to-cart.tes-btn-has-seats {
  box-shadow: 0 18px 32px rgba(30, 64, 175, 0.3);
}

.tes-mobile-toolbar #tes-add-to-cart.tes-btn-inactive {
  background: #1e40af8c;
  color: #ffffff;
  box-shadow: 0 18px 32px rgba(30, 64, 175, 0.25);
}

.tes-mobile-toolbar #tes-go-to-checkout {
  border-radius: 14px;
  box-shadow: 0 18px 30px rgba(248, 191, 22, 0.35);
}

.tes-mobile-toolbar .tes-summary {
  display: none;
}

/* Responsive tweaks */
@media (min-width: 640px) {
  .tes-mobile-overlay__content {
    --tes-booking-max-width: min(96vw, 920px);
  }
  .tes-mobile-booking {
    max-width: none;
    margin: 0 auto 40px;
    border-radius: 28px;
  }

  .tes-mobile-map-shell {
    min-height: 420px;
  }

  .tes-mobile-footer {
    flex-direction: row;
    align-items: stretch; /* let columns stretch full height of footer row */
    gap: 18px;
  }

  .tes-mobile-total {
    flex: 0 0 25%; /* reduced to give toolbar more room */
    /* min-width removed per request to avoid forcing narrow layouts */
  }

  .tes-mobile-toolbar {
    flex: 1 1 75%;
  }

  /* Ensure the toolbar inner container and actions fill the column width */
  .tes-mobile-toolbar, .tes-toolbar-wrapper, .tes-toolbar-wrapper #tes-toolbar, .tes-toolbar-wrapper .tes-actions {
    width: 100%;
    box-sizing: border-box;
  }
}

@media (orientation: landscape) and (max-width: 1100px) {
  .tes-mobile-overlay__content {
    --tes-booking-max-width: 100vw;
  }
  .tes-mobile-overlay__content .tes-mobile-booking,
  .tes-mobile-booking {
    max-width: 100vw;
    margin: 0;
    border-radius: 0;
  }
  .tes-mobile-overlay__content .tes-mobile-booking {
    padding-left: calc(env(safe-area-inset-left, 0px));
    padding-right: calc(env(safe-area-inset-right, 0px));
  }
  .tes-mobile-frame {
    padding-left: calc(env(safe-area-inset-left, 0px) + 8px);
    padding-right: calc(env(safe-area-inset-right, 0px) + 8px);
  }
  .tes-mobile-map-shell {
    min-height: clamp(240px, 65vh, 460px);
    padding: 10px;
  }
  .tes-mobile-map-viewport {
    height: clamp(220px, 70vh, 480px);
    min-height: 200px;
    max-height: 78vh;
  }
  .tes-mobile-footer {
    flex-direction: row;
    align-items: center;
    gap: 18px;
  }
  .tes-total-summary {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .tes-mobile-toolbar {
    flex: 1 1 auto;
  }
}

@media (max-width: 360px) {
  .tes-seat {
    width: 24px;
    height: 20px;
  }

  .tes-mobile-map-control {
    font-size: 0.95rem;
    padding: 10px 8px;
  }
}

@media (orientation: portrait) and (min-width: 900px) {
  .tes-mobile-overlay__content {
    --tes-booking-max-width: 100vw;
  }
  .tes-mobile-overlay__content .tes-mobile-booking,
  .tes-mobile-booking {
    max-width: 100vw;
    margin: 0;
    border-radius: 0;
  }
  .tes-mobile-frame {
    padding-left: calc(env(safe-area-inset-left, 0px) + 18px);
    padding-right: calc(env(safe-area-inset-right, 0px) + 18px);
  }
}

/* ------------------------------------------------------------
 * Lightweight jQuery Lightbox (for shortcode images)
 * ------------------------------------------------------------ */
body.tes-lightbox-open {
  overflow: hidden;
}

.tes-lightbox-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.tes-lightbox-overlay.is-open {
  display: flex;
  animation: tesLightboxFade 120ms ease-out;
}

.tes-lightbox-modal {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tes-lightbox-content {
  max-height: 92vh;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 32px 60px rgba(15, 23, 42, 0.45);
  background: rgba(15, 23, 42, 0.72);
}

.tes-lightbox-figure {
  margin: 0;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tes-lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 64px);
  border-radius: 16px 16px 0 0;
}

.tes-lightbox-caption {
  display: block;
  width: 100%;
  padding: 14px 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  color: #f8fafc;
  background: transparent;
}

.tes-lightbox-close {
  position: absolute;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  border: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.tes-lightbox-close span {
  display: none;
}

.tes-lightbox-close:focus {
  outline: none;
}

@keyframes tesLightboxFade {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
