/* EXP Tube home-map background tiles + scrollable thumbnail strip.
   Add this file at: /public/css/home-map-tiles.css
*/

/* Tile background layer created by js/home-map-tiles.js */
.exp-home-map-bg {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  background-image: url("../assets/home-map/exptube-home-map-preview.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 180ms ease;
}

.exp-home-map-bg.is-ready { opacity: 1; }

.exp-home-map-bg__track {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  will-change: transform;
}

.exp-home-map-bg__slot,
.exp-home-map-bg__tile {
  height: 100%;
  flex: 0 0 auto;
}

.exp-home-map-bg__tile {
  display: block;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

/* Only use the big tiled theme-park map on the main/home map. */
body:not(.exp-map-home-hq) .exp-home-map-bg {
  display: none !important;
}

body.exp-map-home-hq #hqBgImage {
  opacity: 0 !important;
  background-image: none !important;
}

body.exp-map-home-hq .hq-bg-layer--shade {
  z-index: 3;
  background:
    linear-gradient(to top, rgba(4,8,15,0.45) 0%, rgba(4,8,15,0.18) 42%, rgba(4,8,15,0.04) 100%),
    radial-gradient(circle at top center, rgba(255,255,255,0.03), transparent 42%) !important;
}

/* The old video card panel becomes a scrollable thumbnail shelf over the map. */
body.exp-map-home-hq .exp-video-panel--home-layer {
  left: 34px !important;
  right: 34px !important;
  top: auto !important;
  bottom: 34px !important;
  width: auto !important;
  max-height: 230px !important;
  z-index: 8 !important;
  opacity: 1 !important;
  background: rgba(5, 9, 19, 0.42) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 18px 50px rgba(0,0,0,0.30) !important;
}

body.exp-map-home-hq .exp-video-panel--home-layer.is-collapsed {
  width: 250px !important;
  right: 34px !important;
  left: auto !important;
}

body.exp-map-home-hq .exp-video-panel--home-layer .exp-video-grid {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 12px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  max-height: none !important;
  padding: 2px 4px 8px 2px !important;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

body.exp-map-home-hq .exp-video-panel--home-layer .exp-video-card {
  flex: 0 0 205px !important;
  width: 205px !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 7px !important;
  padding: 7px !important;
  scroll-snap-align: start;
  background: rgba(5, 9, 19, 0.72) !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
}

body.exp-map-home-hq .exp-video-panel--home-layer .exp-video-thumb {
  width: 100% !important;
  height: 104px !important;
  object-fit: cover !important;
}

body.exp-map-home-hq .exp-video-panel--home-layer .exp-video-grid::-webkit-scrollbar {
  height: 9px;
}

body.exp-map-home-hq .exp-video-panel--home-layer .exp-video-grid::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
}

body.exp-map-home-hq .exp-video-panel--home-layer .exp-video-grid::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.35);
  border-radius: 999px;
}

@media (max-width: 700px) {
  body.exp-map-home-hq .exp-video-panel--home-layer {
    left: 12px !important;
    right: 12px !important;
    bottom: 18px !important;
    max-height: 190px !important;
    padding: 9px !important;
  }

  body.exp-map-home-hq .exp-video-panel--home-layer .exp-video-card {
    flex-basis: 158px !important;
    width: 158px !important;
  }

  body.exp-map-home-hq .exp-video-panel--home-layer .exp-video-thumb {
    height: 82px !important;
  }
}
