/* ВАЖНО: Сброс отступов и передача высоты */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Общий блок - теперь тоже 100% высоты */
.bb-tour-block {
  position: relative;
  width: 100%;
  height: 100%; /* ФИКС */
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden; /* ФИКС: visible меняем на hidden */
}

/* Постер-крышка */
.bb-tour-poster {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  min-height: 340px;
  background-color: #0c2338;
  cursor: pointer;
  width: 100%;
  /* Постеру высоту 100% не даем, он должен быть фиксированным пока не нажат */
}

.bb-tour-poster-bg {
  position: absolute;
  inset: 0;
  /* Ваша ссылка на картинку */
  background-image: url("https://bluebalcony.ge/wp-content/uploads/2025/12/authentic-balcony-design-hotel-tbilisi.webp");
  background-size: cover;
  background-position: center;
  filter: saturate(1.1) brightness(0.7);
  transform: scale(1.02);
}

.bb-tour-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 55%),
              linear-gradient(to top, rgba(0,0,0,0.6), transparent 50%);
}

.bb-tour-poster-content {
  position: relative;
  z-index: 2;
  padding: 40px 42px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 520px;
}

.bb-tour-poster-title {
  font-size: 22px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.bb-tour-poster-subtitle {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 600;
}

.bb-tour-enter-btn {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  background: #1c6ed9;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease-out, background 0.15s ease-out;
}

.bb-tour-enter-btn:hover {
  transform: translateY(-1px);
  background: #1f7ff1;
}

.bb-tour-enter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  font-size: 12px;
}

/* Контейнер для iframe - теперь 100% высоты */
.bb-tour-frame-wrapper {
  position: relative;
  width: 100%;
  height: 100%; /* ФИКС: Родитель должен иметь высоту, чтобы iframe знал от чего брать 100% */
}

/* Оверлеи */
.bb-tour-overlay {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  pointer-events: none;
}

/* Desktop overlay */
.bb-tour-overlay-desktop {
  top: 16px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-inline: 16px;
  gap: 14px;
  max-width: 100%;
}

.bb-tour-overlay-desktop .bb-tour-overlay-brand,
.bb-tour-overlay-desktop .bb-tour-desktop-scroll {
  pointer-events: auto;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 18, 40, 0.32);
  border-radius: 999px;
  border: 1px solid rgba(156, 185, 235, 0.55);
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
}

.bb-tour-overlay-brand {
  gap: 10px;
}

.bb-tour-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1c7dff;
}

.bb-tour-label {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #e1edff;
  opacity: 0.9;
}

/* Контейнер скролла */
.bb-tour-desktop-scroll {
  display: flex;
  align-items: center;
  flex-grow: 1;
  overflow: hidden;
  pointer-events: auto;
  max-width: 100%;
  position: relative;
  padding: 0 48px;
  width: 100%;
}

/* Навигация */
.bb-tour-nav-scroll {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 6px 0;
  max-width: 100%;
  white-space: nowrap;
  flex-grow: 1;
  scrollbar-width: none;
}

.bb-tour-nav-scroll::-webkit-scrollbar {
  display: none;
}

/* Items */
.bb-tour-nav-item {
  border: 0;
  background: transparent;
  color: #f3f6ff;
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0.78;
  transition: background 0.12s ease-out, opacity 0.12s ease-out, transform 0.12s ease-out;
  white-space: nowrap;
}

.bb-tour-nav-item:hover {
  background: rgba(255,255,255,0.2);
  opacity: 1;
}

.bb-tour-nav-item-active {
  background: #ffffff;
  color: #143864;
  opacity: 1;
}

/* Стрелки */
.bb-scroll-btn {
  pointer-events: auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,0.28);
  transition: opacity .15s ease-out, transform .15s ease-out, background .15s ease-out;
  z-index: 10;
}

.bb-scroll-btn:hover {
  background: rgba(255,255,255,0.35);
  transform: translateY(-50%) scale(1.1);
  opacity: 1;
}

.bb-scroll-left {
  left: 12px;
}

.bb-scroll-right {
  right: 12px;
}

/* Mobile overlay container */
.bb-tour-overlay-mobile {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: auto;
  pointer-events: none; /* Пропускаем клики сквозь пустые места */
  width: 100%;
  height: 100%;
  overflow: hidden; /* Чтобы панель пряталась за край */
  z-index: 50;
}

/* Сама панель (Шторка) */
.bb-tour-mobile-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 280px; /* Ширина шторки */
  max-width: 85%;

  /* СТИЛЬ BLUE GLASS */
  background: rgba(12, 35, 56, 0.85); /* Темно-синий полупрозрачный */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: -10px 0 30px rgba(0,0,0,0.4);

  /* Анимация: по умолчанию сдвинута вправо на 100% */
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
}

/* Состояние "Открыто" */
.bb-tour-mobile-panel-open {
  transform: translateX(0);
}

/* ЯЗЫЧОК (TAB) - висит слева от панели */
.bb-tour-side-tab {
  position: absolute;
  top: 20%; /* Высота расположения ярлыка */
  left: -42px; /* Выдвигаем влево из панели (ширина кнопки) */
  width: 42px;
  height: 110px; /* Высокий язычок */

  /* Стили язычка */
  background: rgba(12, 35, 56, 0.75); /* Чуть прозрачнее панели */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-right: 0; /* Стыкуемся с панелью */
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 4px 12px rgba(0,0,0,0.2);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: #fff;
  padding: 10px 0;
  transition: background 0.2s;
  z-index: 51;
}

.bb-tour-side-tab:active {
  background: #1c6ed9;
}

.bb-tour-tab-icon {
  font-size: 24px;
  line-height: 1;
  font-weight: 300;
  transition: transform 0.3s;
}

/* Поворот стрелки при открытии */
.bb-tour-mobile-panel-open .bb-tour-tab-icon {
  transform: rotate(180deg); /* Стрелка меняется < на > */
}

.bb-tour-tab-text {
  writing-mode: vertical-rl; /* Вертикальный текст */
  text-orientation: mixed;
  transform: rotate(180deg); /* Чтобы читалось снизу вверх */
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.9;
}

/* Внутренности панели */
.bb-tour-mobile-panel-inner {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
}

.bb-tour-mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.bb-tour-mobile-title {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  font-weight: 600;
}

/* Навигация (список комнат) */
#bbTourNavMobile {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#bbTourNavMobile .bb-tour-nav-item {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  color: #e5eeff;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.2s;
}

#bbTourNavMobile .bb-tour-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

#bbTourNavMobile .bb-tour-nav-item-active {
  background: rgba(28, 110, 217, 0.25); /* Активная комната подсвечена синим */
  border-color: #1c6ed9;
  color: #fff;
  font-weight: 500;
}

/* АДАПТИВНОСТЬ: Скрываем/показываем оверлеи */
@media (max-width: 768px) {
  .bb-tour-overlay-desktop { display: none; }
  .bb-tour-overlay-mobile { display: block; }
}

@media (min-width: 769px) {
  .bb-tour-overlay-desktop { display: flex; }
  .bb-tour-overlay-mobile { display: none; }
}

/* IFRAME: ЧИСТЫЙ АБСОЛЮТ */
.bb-tour-iframe-ratio {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  aspect-ratio: unset !important;
}

.bb-tour-iframe-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Mobile Media Queries */
@media (max-width: 768px) {
  .bb-tour-poster {
    min-height: 260px;
    border-radius: 0;
  }

  .bb-tour-poster-content {
    padding: 28px 22px;
  }

  .bb-tour-poster-subtitle {
    font-size: 22px;
  }

  /* ФИКС: Здесь удален блок, который задавал height: 85vh */
  .bb-tour-iframe-ratio {
    /* Оставляем пустым или повторяем 100%, главное не задавать vh */
    height: 100% !important;
    border-radius: 0;
  }

  .bb-tour-overlay-desktop {
    display: none;
  }

  .bb-tour-overlay-mobile {
    display: block;
  }
}

/* Desktop Media Queries */
@media (min-width: 769px) {
  .bb-tour-overlay-desktop {
    display: flex;
  }
  .bb-tour-overlay-mobile {
    display: none;
  }
}