/* TVPano — стили просмотрщика панорам. Стиль Apple/iOS в монохроме: чёрное «стекло», белый текст, скругления, без теней и цвета.
   Цвета жёсткие (не зависят от токенов страницы), потому что панорама лежит на фото. Цвет категории ставит seatview (CSSOM). */

/* Размеры контейнера по умолчанию (нулевая специфичность: любое правило страницы перебивает).
   Панорама не на всю высоту экрана, чтобы страницу можно было прокрутить мимо неё. */
:where(.tvp-host) { aspect-ratio: 16 / 10; min-height: 220px; max-height: 72vh; }
@supports (height: 1svh) { :where(.tvp-host) { max-height: 72svh; } }
@media (max-width: 600px) { :where(.tvp-host) { aspect-ratio: 4 / 3; } }

.tvp {
  position: absolute; inset: 0; overflow: hidden;
  background: #000; color: #FFF;
  font-family: Inter, system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  touch-action: none;                 /* свайп одним пальцем крутит панораму, а не страницу */
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  cursor: grab; outline: none; border-radius: var(--tvp-radius, 14px);
  isolation: isolate;
}
.tvp.tvp-drag { cursor: grabbing; }
.tvp [hidden] { display: none !important; }

.tvp-cv, .tvp-flat { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tvp-flat { background-color: #000; background-repeat: repeat-x; background-position: 0 0; }

/* видимый фокус клавиатуры: белое кольцо + чёрное внутри, читается на любом фоне */
.tvp:focus-visible::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  border: 2px solid #FFF; outline: 2px solid #000; outline-offset: -4px;
}

/* полноэкранный режим без Fullscreen API (iOS): цель — панорама или обёртка seatview (fsTarget) */
.tvp-css-fs {
  position: fixed !important; inset: 0 !important; width: 100% !important; height: 100vh !important; height: 100dvh !important;
  z-index: 2147483000; max-height: none !important; margin: 0 !important; border-radius: 0 !important;
}
.tvp-fs-on, .tvp-css-fs .tvp, .tvp-css-fs.tvp { border-radius: 0; }
:fullscreen .tvp, .tvp:fullscreen { border-radius: 0; }
html.tvp-lock { overflow: hidden; }

/* тонкая линия прогресса */
.tvp-bar {
  position: absolute; left: 0; top: 0; width: 100%; height: 2px; background: #FFF;
  transform-origin: 0 50%; transform: scaleX(0); opacity: 0; pointer-events: none; z-index: 3;
  transition: opacity .25s ease, transform .2s linear;
}
.tvp[data-state="loading"] .tvp-bar { opacity: 1; transition-delay: .12s, 0s; }
.tvp-bar.tvp-indet { width: 35%; transform: translateX(-100%); animation: tvp-slide 1.1s linear infinite; }
@keyframes tvp-slide { to { transform: translateX(290%); } }

/* общее «стекло» */
.tvp-badge, .tvp-btn, .tvp-cap, .tvp-hint {
  background: rgba(0, 0, 0, .52); color: #FFF;
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .16);
}

/* значок 360° */
.tvp-badge {
  position: absolute; top: 12px; left: 12px; height: 26px; padding: 0 10px;
  display: flex; align-items: center; border-radius: 13px;
  font: 600 12px/1 Inter, system-ui, sans-serif; letter-spacing: .04em; pointer-events: none;
}

/* кнопки */
.tvp-btns { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }
.tvp-btn {
  width: 36px; height: 36px; padding: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 18px;
  font: 500 13px/1 Inter, system-ui, sans-serif; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  transition: background-color .15s ease, transform .12s ease;
}
.tvp-btn:hover { background: rgba(0, 0, 0, .72); border-color: rgba(255, 255, 255, .4); }
.tvp-btn:active { background: #FFF; color: #000; border-color: #FFF; transform: scale(.96); }
.tvp-btn:focus-visible { outline: 2px solid #FFF; outline-offset: 2px; }
.tvp-btn[aria-pressed="true"] { background: #FFF; color: #000; border-color: #FFF; }

/* подписи снизу-слева */
.tvp-cap {
  position: absolute; left: 12px; bottom: 12px; max-width: min(520px, calc(100% - 24px));
  padding: 9px 13px; border-radius: 14px; pointer-events: none;
}
.tvp-t { font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; letter-spacing: -.01em; }
.tvp-n { margin-top: 2px; font-size: 12px; font-weight: 400; line-height: 1.35; color: #E5E5E5; overflow-wrap: anywhere; }

/* подсказка «Потяните…» — под верхним рядом (значок и кнопки), не закрывает сцену и подпись; исчезает после первого касания */
.tvp-hint {
  position: absolute; left: 50%; top: 60px; transform: translateX(-50%);
  max-width: calc(100% - 24px); padding: 8px 14px; border-radius: 18px;
  font: 500 13px/1.3 Inter, system-ui, sans-serif; text-align: center; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
.tvp[data-state="ready"]:not([data-touched]) .tvp-hint { opacity: 1; transition-delay: .5s; }
.tvp-bare .tvp-hint { top: 24%; }   /* не на октагоне: он всегда в центре кадра */

/* слой внешнего интерфейса (seatview) и слот мини-карты (виден только во весь экран) */
.tvp-ui { position: absolute; inset: 0; pointer-events: none; }
.tvp-ui > * { pointer-events: auto; }
.tvp-slot {
  position: absolute; left: 12px; top: 12px; width: min(220px, 34vw); aspect-ratio: 1; display: none;
  border-radius: 16px; overflow: hidden; pointer-events: auto;
  background: rgba(0, 0, 0, .52); border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.tvp-fs-on .tvp-slot:not(:empty) { display: block; }

/* слои: подписи, значок и кнопки всегда над сообщением об ошибке */
.tvp-badge, .tvp-btns, .tvp-cap, .tvp-hint, .tvp-ui, .tvp-slot { z-index: 2; }

/* ошибка загрузки */
.tvp-err {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px 16px; text-align: center; background: #000; color: #FFF;
}
.tvp-errmsg { font: 500 14px/1.4 Inter, system-ui, sans-serif; max-width: 320px; }
.tvp-retry { width: auto; height: 36px; padding: 0 18px; background: transparent; border-radius: 18px; }
.tvp-retry:hover { background: #FFF; color: #000; }

/* только для скринридеров */
.tvp-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

@media (max-width: 480px) {
  .tvp-badge { top: 10px; left: 10px; }
  .tvp-btns { top: 10px; right: 10px; gap: 6px; }
  .tvp-cap { left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 7px 10px; }
  .tvp-t { font-size: 13px; }
  .tvp-hint { top: 56px; font-size: 12px; padding: 7px 12px; }
  :has(> .tv-approx) .tvp-hint { top: 84px; }   /* плашка «Примерный вид» на телефоне — в две строки: подсказка ниже неё */
  .tvp-slot { width: 38vw; left: 10px; top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .tvp-bar.tvp-indet { animation: none; width: 35%; transform: none; }
  .tvp-hint, .tvp-bar, .tvp-btn { transition: none; }
}
