/* Video tour (web/tour.js createTourView): the tile over the map and the
   panel beside it. Sizes in px come from tour.js (the video's aspect); the
   top layout (body.tour-top: the top third of the screen, on phones and
   wherever the column would leave the map under 520 px) is in web/mobile.css. */

/* ---- the tile: bottom-left over the map, clear of the Mapbox logo ---- */
#tour-tile { position: absolute; z-index: 2; left: 10px; bottom: 40px; width: 113px; height: 200px;
             padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
             background: #1b1b1b; color: #fff; font: inherit;
             box-shadow: 0 2px 14px rgba(0, 0, 0, 0.3); opacity: 0;
             transition: opacity 260ms ease, transform 160ms ease, box-shadow 160ms ease; }
#tour-tile[hidden] { display: none; }
#tour-tile.is-ready { opacity: 1; }
#tour-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); }
#tour-tile:focus-visible { outline: 2px solid #2b7fff; outline-offset: 2px; }
#tour-tile .tour-tile-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#tour-tile::after { content: ""; position: absolute; inset: 0;
                    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0) 48%); }
#tour-tile .tour-tile-play { position: absolute; z-index: 1; top: 50%; left: 50%; width: 44px; height: 44px;
                             margin: -22px 0 0 -22px; display: grid; place-items: center; border-radius: 50%;
                             color: #1f1f1f; background: rgba(255, 255, 255, 0.92);
                             box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3); }
#tour-tile .tour-tile-play svg { margin-left: 3px; }
#tour-tile .tour-tile-label { position: absolute; z-index: 1; left: 8px; right: 8px; bottom: 7px;
                              font-size: 12px; font-weight: 600; line-height: 1.2; text-align: left;
                              text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); font-variant-numeric: tabular-nums; }
/* "Rondleiding", the length below it (smaller): never "Rondleiding ·" / "1:06" */
#tour-tile .tour-tile-title, #tour-tile .tour-tile-duration { display: block; white-space: nowrap;
                                                              overflow: hidden; text-overflow: ellipsis; }
#tour-tile .tour-tile-duration { font-size: 11px; font-weight: 500; opacity: 0.85; }

/* ---- the panel: desktop a column left of the sidebar; the map ends where it starts ---- */
body.tour-open { background: #e9e5df; }
/* the pill centred over the narrowed map, clear of the panel and of the map
   tools top-left (64 px each side, as on phones; tour.js keeps the map
   >= 520 px, else the top layout): the building name gives way first */
body.tour-open #focus-bar { left: calc((100% - var(--tour-map-right, 0px)) / 2); width: max-content;
                            max-width: calc(100% - var(--tour-map-right, 0px) - 128px); }
body.tour-open #focus-bar .pill { max-width: 100%; box-sizing: border-box; min-width: 0; }
body.tour-open #focus-bar .focus-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body.tour-open #focus-bar .focus-card { max-width: 100%; box-sizing: border-box; }

#tour-panel { position: absolute; z-index: 3; top: 0; bottom: 0; right: var(--tour-sidebar-w, 0px);
              width: 380px; display: flex; flex-direction: column; justify-content: center;
              background: #111; color: #fff; outline: none;
              animation: tour-panel-in 240ms ease-out both; }
#tour-panel[hidden] { display: none; }
#tour-panel .tour-stage { position: relative; display: flex; justify-content: center; background: #000; }
#tour-panel video { display: block; object-fit: contain; background: #000; }
/* the subtitle line over the video's bottom */
#tour-panel .tour-subtitle { position: absolute; left: 10px; right: 10px; bottom: 12px; text-align: center;
                             pointer-events: none; }
#tour-panel .tour-subtitle:empty, #tour-panel .tour-subtitle[hidden] { display: none; }
#tour-panel .tour-subtitle { box-sizing: border-box; margin: 0 auto; max-width: 100%; width: max-content;
                             padding: 4px 10px; border-radius: 6px; background: rgba(0, 0, 0, 0.72);
                             font-size: 15px; line-height: 1.35; }

/* two rows: the progress bar + time, then the buttons (Sluiten on the right) */
#tour-panel .tour-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px;
                             font-size: 13px; }
#tour-panel .tour-controls .tour-close { margin-left: auto; }
#tour-panel .tour-controls button { flex: none; font: inherit; font-size: 13px; font-weight: 600;
                                    padding: 7px 12px; border-radius: 999px; cursor: pointer;
                                    border: 1px solid rgba(255, 255, 255, 0.28); background: transparent;
                                    color: #fff; transition: background 150ms ease, border-color 150ms ease; }
#tour-panel .tour-controls button:hover { background: rgba(255, 255, 255, 0.12); }
#tour-panel .tour-controls .tour-play { min-width: 82px; border-color: #fff; background: #fff; color: #111; }
#tour-panel .tour-controls .tour-play:hover { background: #e8e8e8; }
#tour-panel .tour-controls .tour-subs[aria-pressed="false"] { color: rgba(255, 255, 255, 0.55);
                                                               text-decoration: line-through; }
#tour-panel button:focus-visible, #tour-panel .tour-seek:focus-visible { outline: 2px solid #2b7fff;
                                                                         outline-offset: 2px; }
#tour-panel .tour-seek { order: -2; flex: 1 1 200px; min-width: 40px; margin: 0; accent-color: #fff; }
#tour-panel .tour-time { order: -1; flex: none; font-size: 11px; color: rgba(255, 255, 255, 0.7);
                         font-variant-numeric: tabular-nums; }

@keyframes tour-panel-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  #tour-tile, #tour-panel { transition: none; animation: none; }
  #tour-tile:hover { transform: none; }
}

/* ---- the live highlight's markers (createTourHighlight): over the map, never clickable ---- */
.tour-label { pointer-events: none; padding: 4px 9px; border-radius: 999px; white-space: nowrap;
              background: rgba(17, 17, 17, 0.82); color: #fff; font-size: 13px; font-weight: 600;
              line-height: 1.25; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35); border: 1px solid #f2b134;
              animation: tour-marker-in 200ms ease-out both; }
.tour-sun { pointer-events: none; width: 30px; height: 30px; display: grid; place-items: center;
            border-radius: 50%; background: #ffe08a; color: #8a5a00; font-size: 19px; line-height: 1;
            box-shadow: 0 0 12px 4px rgba(255, 210, 90, 0.55); animation: tour-marker-in 200ms ease-out both; }
/* the arrow: points up in the element; the marker's rotation turns it towards the wall */
.tour-sun::after { content: ""; position: absolute; top: -9px; left: 50%; margin-left: -6px;
                   border: 6px solid transparent; border-top: 0; border-bottom: 9px solid #f2b134; }
@keyframes tour-marker-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tour-label, .tour-sun { animation: none; } }
