/* ===================================================
   МИНИ-ЛИФТ И ШАХТА (LIFT TOP)
   =================================================== */

/* Контейнер шахты (фиксирован у правого края экрана) */
.lift-shaft {
  position: fixed;
  top: 70px;
  bottom: 24px;
  right: 16px;
  width: 110px;
  pointer-events: none;
  z-index: 998;
}

/* Полный сброс старых псевдоэлементов */
.lift-shaft::before,
.lift-shaft::after {
  content: none !important;
  display: none !important;
}

/* Направляющий канат (строго по центру кабины) */
.lift-cable {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 21px; /* (кабина 44px / 2) - 1px полутолщины троса */
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(0, 110, 255, 0.15),
    rgba(0, 110, 255, 0.45) 50%,
    rgba(0, 110, 255, 0.15)
  );
  z-index: 1;
}

/* Зона ожидания пассажиров на этажах */
.lift-stations-track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

/* 
  Пассажир на площадке ожидания:
  Изначально скрыт за правым краем окна.
  При .is-arrived мягко выходит и ждёт слева от шахты.
*/
.lift-waiter {
  position: absolute;
  right: 54px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  transform: translateY(-50%) translateX(80px);
  opacity: 0;
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.25, 1), opacity 0.6s ease;
  will-change: transform, opacity;
  z-index: 2;
}

/* Пассажир вышел на платформу этажа */
.lift-waiter.is-arrived {
  transform: translateY(-50%) translateX(0);
  opacity: 0.95;
}

/* Анимация шага пассажира внутрь кабины */
.lift-waiter.is-entering {
  transform: translateY(-50%) translateX(32px) scale(0.85);
  opacity: 0 !important;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease !important;
}

/* Кабина лифта */
.lift-cabin {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 62px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 12px rgba(0, 136, 255, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px;
  box-sizing: border-box;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  z-index: 3;
}

/* Электронное табло этажа */
.lift-cabin__indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: monospace;
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  line-height: 1;
  margin-bottom: 3px;
}

.lift-cabin__arrow {
  font-size: 8px;
  transition: transform 0.2s ease;
}

.lift-cabin.is-moving-up .lift-cabin__arrow {
  transform: rotate(180deg);
}

/* Корпус и стеклянный интерьер кабины */
.lift-cabin__body {
  position: relative;
  width: 100%;
  flex: 1;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
}

.lift-cabin__interior {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(56, 189, 248, 0.2), transparent 70%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2px;
  gap: 1px;
  overflow: hidden;
  z-index: 1;
}

/* Пассажиры внутри кабины */
.lift-passenger-in-cabin {
  display: flex;
  align-items: flex-end;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lift-passenger-in-cabin .char-svg {
  transform: scale(0.8);
  transform-origin: bottom center;
}

@keyframes popIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  100% {
    transform: scale(0.85);
    opacity: 1;
  }
}

/* Створки дверей кабины */
.lift-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 0.5px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(4px);
  z-index: 3;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.lift-door--left {
  left: 0;
  transform: translateX(0);
}

.lift-door--right {
  right: 0;
  transform: translateX(0);
}

.lift-cabin.doors-open .lift-door--left {
  transform: translateX(-100%);
}

.lift-cabin.doors-open .lift-door--right {
  transform: translateX(100%);
}

/* Векторные монохромные силуэты персонажей */
.char-svg {
  display: block;
}

/* Мобильная адаптивность */
@media (max-width: 768px) {
  .lift-shaft {
    display: none;
  }
}