/* BloxMaps: the result card's view carousel (static/js/views.js, templates/_views.html). */

.gen-visual.has-views { aspect-ratio: auto; display: flex; flex-direction: column; background: var(--surface-2); }
.gen-visual.has-views .visual-name { bottom: auto; top: 12px; max-width: calc(100% - 150px); }

.views-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: linear-gradient(180deg, #8fd3ff 0%, #d4f0ff 60%, #bdeaa5 100%); }
:root[data-theme="dark"] .views-stage { background: linear-gradient(180deg, #1c2a66 0%, #2c3f8a 60%, #1f5a3a 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .views-stage { background: linear-gradient(180deg, #1c2a66 0%, #2c3f8a 60%, #1f5a3a 100%); } }

.views-track { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; outline: none; }
.views-track::-webkit-scrollbar { display: none; }
.views-track:focus-visible { box-shadow: inset 0 0 0 3px var(--focus); }
.views-slide { flex: 0 0 100%; height: 100%; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; position: relative; }
.views-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.views-slide.is-top img { object-fit: contain; background: #0f5b66; }
.views-slide.is-broken img { visibility: hidden; }

.views-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 42px; height: 42px; border: 0;
  border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(12, 18, 40, 0.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background 0.15s ease, opacity 0.15s ease; }
.views-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.views-arrow:hover { background: rgba(12, 18, 40, 0.8); }
.views-arrow:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.views-arrow:disabled { opacity: 0; pointer-events: none; }
.views-prev { left: 10px; }
.views-next { right: 10px; }

.views-caption { position: absolute; right: 12px; top: 12px; z-index: 2; padding: 6px 12px; border-radius: 14px; max-width: 45%;
  background: rgba(12, 18, 40, 0.6); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.views-caption.is-hidden { display: none; }

/* width 0 + min-width 100%: the strip scrolls inside the card and never widens the page on phones */
.views-strip { display: flex; gap: 6px; padding: 8px 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin;
  width: 0; min-width: 100%; box-sizing: border-box; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.views-stage { min-width: 0; }
.views-tab { flex: 0 0 auto; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 108px; padding: 4px; border: 2px solid transparent; border-radius: 12px; background: transparent; cursor: pointer;
  color: var(--ink-2); font-family: var(--font-body); font-weight: 700; font-size: 0.78rem; line-height: 1.1; }
.views-tab img { display: block; width: 96px; height: 54px; object-fit: cover; border-radius: 8px; background: var(--surface-3); }
.views-tab:hover { background: var(--surface); color: var(--ink); }
.views-tab[aria-selected="true"] { border-color: var(--blue); background: var(--surface); color: var(--ink); }
.views-tab:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.views-tab-label { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 560px) {
  .views-tab { width: 80px; font-size: 0.72rem; }
  .views-tab img { width: 70px; height: 40px; }
  .views-arrow { width: 34px; height: 34px; }
  .views-arrow svg { width: 18px; height: 18px; }
  .views-caption { font-size: 0.82rem; max-width: 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .views-track, .views-strip { scroll-behavior: auto; }
  .views-arrow { transition: none; }
}
