/* ============================================================
   system118 — panels.css
   HTML-панели тура (верхняя и нижняя) по макету Claude Design
   «Тур KrPano» (матовое стекло + круглые тёмные кнопки + SVG).
   Рендерятся из js/panels.js; krpano-панели pnl_top/pnl_bottom
   скрыты в skin/interface.xml (FIX 6).
   Шрифты: PT Sans — самохост (card-fonts.css).
   ============================================================ */

:root {
  --s118-accent:      var(--c-red, #c00d0d);
  --s118-panel-bg:    rgba(250, 250, 248, 0.44);
  --s118-panel-text:  #161616;
  --s118-panel-sub:   rgba(22, 22, 22, 0.52);
  --s118-panel-border:rgba(20, 20, 20, 0.10);
  --s118-hair:        rgba(20, 20, 20, 0.10);
  --s118-icon-bg:     #161616;
  --s118-icon-fg:     #fafaf8;
}

/* --- базовая «стекляшка» --- */
.s118-glass {
  background: var(--s118-panel-bg);
  -webkit-backdrop-filter: blur(34px) saturate(140%);
  backdrop-filter: blur(34px) saturate(140%);
  border: 1px solid var(--s118-panel-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.s118-panel {
  position: fixed;
  z-index: 9000;
  font-family: 'PT Sans', system-ui, sans-serif;
  color: var(--s118-panel-text);
  user-select: none;
  -webkit-user-select: none;
}

/* ═══ верх: логотип музея (слева) ═══ */
#s118-brand {
  top: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-radius: 8px;
}
#s118-brand a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
}
#s118-brand img {
  height: 30px;
  display: block;
}
#s118-brand .s118-brand-sep {
  width: 1px;
  height: 26px;
  background: var(--s118-hair);
  flex: none;
}
#s118-brand .s118-brand-label {
  font: 400 10px/1.3 'PT Sans', sans-serif;
  letter-spacing: 0.16em;
  color: var(--s118-panel-sub);
  text-transform: uppercase;
}

/* ═══ верх: название зала (по центру) ═══ */
#s118-hall {
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 26px;
  border-radius: 999px;
  max-width: min(56vw, 640px);
}
#s118-hall .s118-hall-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--s118-panel-sub);
  flex: none;
}
#s118-hall .s118-hall-text {
  font: 700 18px/1.15 'PT Sans', sans-serif;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══ низ: центральная панель управления ═══ */
#s118-nav {
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}
.s118-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--s118-icon-bg);
  color: var(--s118-icon-fg);
  cursor: pointer;
  flex: none;
  border: 0;
  padding: 0;
  transition: filter 0.15s, background 0.15s, opacity 0.15s;
}
.s118-btn:hover { filter: brightness(1.35); }
.s118-btn:active { filter: brightness(1.6); }
.s118-btn.is-active { background: var(--s118-accent); }
.s118-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}
.s118-btn svg { display: block; }
.s118-sep {
  width: 1px;
  height: 26px;
  background: var(--s118-hair);
  margin: 0 2px;
  flex: none;
}

/* ═══ низ: инфо-кнопка слева ═══ */
#s118-info {
  bottom: 24px;
  left: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--s118-panel-text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: filter 0.15s;
}
#s118-info:hover { filter: brightness(1.08); }

/* ═══ низ: правая группа (VR / галерея / залы / шеринг) ═══ */
#s118-cluster {
  bottom: 24px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.s118-round {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--s118-panel-text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: filter 0.15s, transform 0.12s, background 0.15s;
  flex: none;
}
/* усиленный ховер — чтобы было явно видно, что круглая кнопка кликается */
.s118-round:hover { filter: brightness(1.08); transform: scale(1.08); }
.s118-round:active { transform: scale(0.96); }

/* состояние «ЗАКРЫТО» (карта/галерея) — красная подсветка на бренд-акценте */
.s118-round.is-closed {
  background: var(--s118-accent);
  color: #fff;
  border-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.s118-round.is-closed:hover { filter: brightness(1.12); }

/* кастомный тултип — показывается при наведении на всю площадь кнопки */
#s118-tip {
  position: fixed;
  z-index: 9500;
  transform: translate(-50%, -100%);
  background: rgba(18, 18, 20, 0.92);
  color: #fff;
  font: 600 12px/1 'PT Sans', system-ui, sans-serif;
  letter-spacing: 0.01em;
  padding: 7px 11px;
  border-radius: 8px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
}
#s118-tip.is-on { opacity: 1; }

/* крестик «отмена» в панели шеринга */
.s118-share-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.06);
  color: var(--s118-panel-text, #161616);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.s118-share-close:hover { background: rgba(20, 20, 20, 0.12); }
.s118-share-close svg { display: block; }
.s118-pill {
  height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--s118-panel-text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: filter 0.15s;
  flex: none;
}
.s118-pill:hover { filter: brightness(1.08); }
.s118-pill .s118-pill-label {
  font: 700 13px/1 'PT Sans', sans-serif;
  letter-spacing: 0.06em;
}

/* скрыто (напр. VR на мобилке, prev на старте) */
.s118-hidden { display: none !important; }

/* ═══ средние экраны: прячем стрелки обзора (мышь/тач и так крутят) ═══ */
@media (max-width: 1180px) {
  .s118-look { display: none !important; }
}

/* ═══ мобильная раскладка: минимум кнопок (как решено для FIX 5) ═══ */
@media (max-width: 820px), (max-height: 500px) {
  #s118-brand { padding: 8px 12px; gap: 10px; }
  #s118-brand img { height: 24px; }
  #s118-brand .s118-brand-label { display: none; }
  #s118-brand .s118-brand-sep { display: none; }

  #s118-hall { top: 16px; padding: 9px 18px; max-width: 52vw; }
  #s118-hall .s118-hall-text { font-size: 14px; }
  #s118-hall .s118-hall-dot { display: none; }

  #s118-nav { bottom: 16px; gap: 6px; padding: 7px 9px; }
  .s118-btn { width: 40px; height: 40px; }
  /* на тач-устройствах обзор/зум — жестами; прячем лишнее */
  .s118-mobile-off { display: none !important; }

  #s118-info { display: none; }
  #s118-cluster { bottom: 16px; right: 12px; gap: 8px; }
  .s118-round { width: 42px; height: 42px; }
  #s118-vr { display: none; }
}
