/* Site tour overlay — isolated layer, does not modify existing site styles */

.tour-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  pointer-events: none;
  display: none;
}

.tour-overlay.is-active {
  display: block;
}

/* Always-visible skip while voice tour runs — on body, above everything */
.btn-tour-skip-float {
  display: none;
  position: fixed !important;
  top: calc(10px + env(safe-area-inset-top, 0px)) !important;
  right: 10px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 2147483000 !important;
  pointer-events: auto !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border-radius: 999px !important;
  border: 2px solid #FFDE59 !important;
  background: rgba(6, 3, 6, 0.88) !important;
  color: #FFDE59 !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45) !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  overflow: visible !important;
}

.btn-tour-skip-float.is-visible {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* Hide city selector while tour skip button is on screen */
html.tour-active #cityBtn,
html.tour-active .city-btn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.tour-spotlight {
  position: absolute;
  border: 3px solid #593C90;
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(6, 3, 6, 0.85), 0 0 30px rgba(89, 60, 144, 0.8);
  transition: top 0.5s ease, left 0.5s ease, width 0.5s ease, height 0.5s ease;
  pointer-events: auto;
  opacity: 0;
}

.tour-overlay.is-active .tour-spotlight.is-visible {
  opacity: 1;
}

.tour-tooltip {
  position: fixed;
  bottom: 120px;
  left: 16px;
  right: 16px;
  background: #1a0b2e;
  border: 2px solid #593C90;
  border-radius: 16px;
  padding: 20px;
  pointer-events: auto;
  z-index: 100000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

.tour-text {
  color: #FFFFFF;
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 16px;
  font-family: 'Montserrat', sans-serif;
}

.tour-staged-wrap {
  margin: 0 0 16px;
}

.tour-staged-line {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 15px;
  line-height: 1.45;
  font-family: 'Montserrat', sans-serif;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s;
}

.tour-staged-line.is-visible {
  opacity: 1;
  transform: translateY(0);
  color: rgba(255, 255, 255, 0.9);
}

.tour-staged-line.is-speaking {
  color: #FFDE59;
}

.tour-staged-line.is-spoken {
  color: rgba(255, 255, 255, 0.95);
}

.tour-step-counter {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  margin: 0 0 8px;
  font-family: 'Montserrat', sans-serif;
}

.tour-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.btn-tour-next {
  display: none !important;
}

.btn-tour-skip {
  display: none;
  background: rgba(6, 3, 6, 0.55);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  min-width: 0;
}

html.tour-active .btn-tour-skip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Floating tour help CTA removed permanently */
.btn-tour-help,
.tour-help-btn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

html.tour-active .app-container {
  overflow: hidden;
}

html.tour-active .onboarding-modal.is-open {
  display: none !important;
}

@media (min-width: 769px) {
  .tour-tooltip {
    bottom: 24px;
    max-width: 420px;
    left: auto;
    right: 24px;
  }
}

/* Articles: single card + 10 reasons panel */
.articles-subtitle-only {
  text-align: center;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.75);
  font-family: 'Montserrat', sans-serif;
}

.article-card-single {
  max-width: 360px;
  margin: 0 auto 16px;
  border: 2px solid rgba(89, 60, 144, 0.45);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(89, 60, 144, 0.08);
}

.article-card-single-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border: none;
  background: linear-gradient(135deg, rgba(89, 60, 144, 0.22), rgba(89, 60, 144, 0.1));
  color: #fff;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
}

.article-card-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.article-card-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: #B794F6;
  line-height: 1.35;
}

.article-card-arrow {
  color: #FFDE59;
  font-size: 20px;
  font-weight: 700;
}

.article-card-single.is-open {
  border-color: rgba(255, 222, 89, 0.55);
}

.ten-reasons-panel {
  max-width: 360px;
  margin: 0 auto;
  border: 2px solid rgba(89, 60, 144, 0.35);
  border-radius: 16px;
  background: rgba(6, 3, 6, 0.92);
  padding: 16px;
}

.ten-reasons-panel.is-open {
  animation: fadeInUp 0.4s ease;
}

.ten-reasons-title {
  margin: 0 0 12px;
  text-align: center;
  color: #B794F6;
  font-size: 17px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
}

.ten-reasons-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ten-reason-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(89, 60, 144, 0.25);
  background: rgba(89, 60, 144, 0.06);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease, border-color 0.3s, box-shadow 0.3s;
}

.ten-reason-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.ten-reason-item.is-active,
.ten-reason-item.is-speaking {
  border-color: rgba(255, 222, 89, 0.65);
  box-shadow: 0 0 18px rgba(255, 222, 89, 0.18);
}

.ten-reason-check {
  color: #FFDE59;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.ten-reason-text {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  line-height: 1.45;
  font-family: 'Montserrat', sans-serif;
}

.ten-reason-text strong {
  color: #fff;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Avatar dock: figure BEHIND bottom chrome, bubble ABOVE it */
.alexander-dock-avatar-layer {
  position: fixed;
  left: 2px;
  right: auto;
  bottom: 52px;
  z-index: 9990; /* below .mobile-bottom-wrap (10000) */
  width: min(112px, 30vw);
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.35s ease, bottom 0.3s ease;
}

.alexander-dock-bubble-layer {
  position: fixed;
  left: 8px;
  right: 12px;
  bottom: calc(52px + min(112px, 30vw) * 0.92);
  z-index: 10010; /* above bottom chrome + avatar */
  width: auto;
  max-width: min(320px, calc(100vw - 24px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease, bottom 0.3s ease;
}

.alexander-dock-avatar-layer.is-visible,
.alexander-dock-bubble-layer.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.alexander-dock-avatar-layer.is-visible {
  animation: alexDockFloat 3.2s ease-in-out infinite;
}

/* halls: lean out from behind bottom nav */
html.tour-dock-halls .alexander-dock-avatar-layer {
  bottom: 48px;
  width: min(108px, 28vw);
}

html.tour-dock-halls .alexander-dock-bubble-layer {
  bottom: calc(48px + min(108px, 28vw) * 0.95);
}

/* prices: taller chrome (tabs + nav) */
html.tour-dock-prices .alexander-dock-avatar-layer,
html.prices-open.tour-active .alexander-dock-avatar-layer {
  bottom: 96px;
  width: min(100px, 26vw);
}

html.tour-dock-prices .alexander-dock-bubble-layer,
html.prices-open.tour-active .alexander-dock-bubble-layer {
  bottom: calc(96px + min(100px, 26vw) * 0.95);
}

/* booking / contacts: sit on CTA buttons */
html.tour-dock-booking .alexander-dock-avatar-layer {
  bottom: 64px;
  width: min(108px, 28vw);
}

html.tour-dock-booking .alexander-dock-bubble-layer {
  bottom: calc(64px + min(108px, 28vw) * 0.95);
}

/* hall modal open: nav hidden — avatar over modal footer */
html.tour-hall-modal .alexander-dock-avatar-layer {
  bottom: 72px;
  width: min(100px, 26vw);
  z-index: 40010;
}

html.tour-hall-modal .alexander-dock-bubble-layer {
  left: 8px;
  right: 8px;
  bottom: calc(72px + min(100px, 26vw) * 1.05);
  max-width: none;
  z-index: 40020;
}

/* During guided tour: no duplicate text panel / listen button / loft alert in ANY hall modal */
html.tour-active.tour-hall-modal .tour-tooltip,
html.tour-hall-modal .tour-tooltip {
  display: none !important;
}

html.tour-active .btn-speak-hall,
html.tour-hall-modal .btn-speak-hall {
  display: none !important;
}

html.tour-active .modal-alert,
html.tour-hall-modal .modal-alert {
  display: none !important;
}

html.tour-hall-modal .modal-footer,
html.tour-hall-modal .btn-check-date {
  display: none !important;
}

/* Tour hall modal: hide accordion "frames" (equipment / benefits) on all halls */
html.tour-hall-modal .accordion,
html.tour-hall-modal .accordion--equipment,
html.tour-hall-modal .accordion--benefits {
  display: none !important;
}

/* Tour hall modal: hide fact chips (площадь / вместимость / аренда) */
html.tour-hall-modal .modal-facts {
  display: none !important;
}

html.tour-hall-modal .modal-address {
  display: none !important;
}

/* Tour hall modal: full-bleed photo — no empty black strip under short copy */
html.tour-hall-modal .modal-dialog--hall {
  background: #060306;
}

html.tour-hall-modal .modal-hall-grid {
  position: relative;
  flex: 1;
  min-height: 0;
}

html.tour-hall-modal .modal-header-sticky {
  position: absolute !important;
  inset: 0;
  aspect-ratio: auto !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  z-index: 0;
  background: transparent !important;
}

html.tour-hall-modal .modal-dialog--hall .hall-photos,
html.tour-hall-modal .modal-dialog--hall .modal-slider {
  height: 100% !important;
  border-radius: 0 !important;
}

html.tour-hall-modal .modal-dialog--hall .modal-slider-dots {
  bottom: 42% !important;
}

html.tour-hall-modal .modal-scroll-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  flex: none !important;
  height: auto;
  max-height: none;
  overflow: visible;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(
    180deg,
    rgba(6, 3, 6, 0) 0%,
    rgba(6, 3, 6, 0.72) 28%,
    rgba(6, 3, 6, 0.94) 100%
  );
  padding-top: 28px;
}

html.tour-hall-modal .modal-body {
  padding: 8px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  flex: none !important;
}

html.tour-hall-modal .modal-close {
  z-index: 5;
}

.alexander-dock-avatar {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  overflow: visible;
  border: none;
  box-shadow: none;
  background: transparent !important;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.4));
}

.alexander-dock-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  background: transparent !important;
  mix-blend-mode: normal;
}

.alexander-dock-avatar.is-speaking {
  border: none;
  animation: alexTalkPulse 0.5s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(255, 222, 89, 0.35)) drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45));
}

.alexander-dock-bubble {
  margin: 0;
  background: rgba(6, 3, 6, 0.94);
  border: 1px solid rgba(89, 60, 144, 0.5);
  border-radius: 12px;
  padding: 10px 12px;
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  max-height: 38vh;
  overflow: auto;
  font-family: 'Montserrat', sans-serif;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.alexander-dock-bubble::after {
  content: '';
  position: absolute;
  /* reserved — bubble is in its own layer */
}

@keyframes alexDockFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes alexTalkPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.03); }
}

html.tour-halls-locked .halls-fullscreen-slider {
  overflow-x: hidden !important;
  touch-action: none !important;
}

@media (min-width: 769px) {
  .alexander-dock-avatar-layer,
  .alexander-dock-bubble-layer {
    display: none;
  }
}

/* P0: pulse primary booking CTA after tour ends */
.tour-cta-pulse {
  animation: tourCtaPulse 1.2s ease-in-out 5;
  outline: 2px solid #FFDE59;
  outline-offset: 4px;
}

@keyframes tourCtaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 222, 89, 0.65); }
  50% { box-shadow: 0 0 0 12px rgba(255, 222, 89, 0); }
}

.alexander-dock-avatar.tour-pose-pop {
  animation: avatarGesturePop 0.65s ease-in-out;
}

@keyframes avatarGesturePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08) translateY(-4px); }
  100% { transform: scale(1); }
}
