/* =========================
   Public Tour Scene Slider
   ========================= */

.tour-scene-drawer {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 3000;
  width: 0;
  pointer-events: none;
  font-family: inherit;
  overflow: visible;
}

/* Small visible tip when closed */
.tour-scene-drawer-tip {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 64px;
  height: 30px;
  border: 0;
  border-radius: 14px 14px 0 0;
  background: rgba(35,49,66, 0.75); /* rgba(10, 16, 24, 0.82);*/
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 -4px 18px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.tour-scene-tip-arrow {
  display: block;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  transform: translateY(2px);
  pointer-events: none;
}

/* Panel fits thumbs by default */
.tour-scene-panel {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 12px;
  height: 128px;
  width: max-content;
  max-width: calc(100vw - 16px);
  padding: 18px 14px 14px;
  background: rgba(35,49,66, 0.5);
  border-radius: 22px;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.36);
  backdrop-filter: blur(12px) saturate(115%);
  -webkit-backdrop-filter: blur(12px) saturate(115%);
  pointer-events: auto;

  opacity: 0;
  transform: translate(-50%, 118px);
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    transform 0.28s ease,
    visibility 0.28s ease;
}

/* When thumbs overflow available width */
.tour-scene-drawer.has-overflow .tour-scene-panel {
  width: min(94vw, 920px);
  padding-left: 44px;
  padding-right: 44px;
}

.tour-scene-drawer.is-open .tour-scene-panel {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.tour-scene-drawer.is-open .tour-scene-drawer-tip {
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  pointer-events: none;
}

/* Close */
.tour-scene-close {
  position: absolute;
  top: -13px;
  right: -13px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background:rgba(35, 49, 66, 0.75); /* rgba(10, 16, 24, 0.88);*/
  color: #fff;
  font-size: 22px;
  line-height: 28px;
  cursor: pointer;
  z-index: 4;
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@media (max-width: 575.98px) {
  .tour-scene-close {
    top: -10px;
    right: -8px;
    width: 28px;
    height: 28px;
    line-height: 26px;
  }
}

.tour-scene-close:hover {
  background: rgba(255,255,255,0.5);
}

/* Scroll area */
.tour-scene-scroll {
  width: 100%;
  height: 100%;
  max-width: calc(100vw - 44px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tour-scene-drawer.has-overflow .tour-scene-scroll {
  max-width: none;
}

.tour-scene-scroll::-webkit-scrollbar {
  display: none;
}

.tour-scene-track {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 100%;
  width: max-content;
}

/* Square thumbs */
.tour-scene-item {
  flex: 0 0 86px;
  width: 86px;
  height: 86px;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  position: relative;
  background: #111827;
  cursor: pointer;
  opacity: 0.76;
  scroll-snap-align: start;
  transition:
    opacity 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.tour-scene-item:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.tour-scene-item.is-active {
  opacity: 1;
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.18);
}

.tour-scene-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.tour-scene-title {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 5px;
  color: white;
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 1px 5px rgba(0,0,0,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

/* Same idea as admin left/right buttons */
.tour-scene-control {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 58px;
  border: 0;
  border-radius: 12px;
  background-color: transparent; /* rgba(0, 0, 0, 0.5);*/
  color: white;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  font-size: 34px;
  line-height: 1;
}

.tour-scene-drawer button.tour-scene-control.active,
.tour-scene-drawer button.tour-scene-control.active:hover,
.tour-scene-drawer button.tour-scene-control.active:focus,
.tour-scene-drawer button.tour-scene-control.active:active {
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #fff !important;
}

.tour-scene-drawer.has-overflow .tour-scene-control {
  display: block;
}

.tour-scene-control:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.tour-scene-control-left {
  left: 6px;
}

.tour-scene-control-right {
  right: 6px;
}

.tour-scene-control,
.tour-scene-control:hover,
.tour-scene-control:focus,
.tour-scene-control:active,
.tour-scene-control:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* Mobile */
@media (max-width: 575.98px) {
  .tour-scene-panel {
    height: 112px;
    bottom: 10px;
    padding: 16px 12px 12px;
    border-radius: 18px;
    max-width: calc(100vw - 16px);
  }

  .tour-scene-drawer.has-overflow .tour-scene-panel {
    width: calc(100vw - 16px);
    padding-left: 36px;
    padding-right: 36px;
  }

  .tour-scene-item {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
    border-radius: 12px;
  }

  .tour-scene-title {
    font-size: 9px;
  }

  .tour-scene-control {
    width: 28px;
    height: 48px;
    font-size: 28px;
  }

  .tour-scene-drawer-tip {
      width: 64px;
      height: 30px;
  }
}

.tour-scene-drawer button.tour-scene-control:focus,
.tour-scene-drawer button.tour-scene-control:focus-visible {
  background-color: transparent !important;
  background-image: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
  color: #fff !important;
}