/* BM Parking hero simulation: isolated 3D scene and motion styles. */
.parking-simulator {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(20, 27, 36, 0.1);
  border-radius: 10px;
  background: linear-gradient(145deg, #f7f8fa 0%, #e8ebef 100%);
  box-shadow: 0 30px 80px rgba(20, 25, 33, 0.16);
}

.simulator-toolbar {
  position: relative;
  z-index: 4;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid rgba(20, 27, 36, 0.1);
  background: rgba(255, 255, 255, 0.9);
  color: #31363d;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.simulator-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.simulator-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2dbf73;
  box-shadow: 0 0 0 5px rgba(45, 191, 115, 0.12);
  animation: simulatorPulse 1.8s ease-in-out infinite;
}

.simulator-clock {
  color: #69717b;
  font-variant-numeric: tabular-nums;
}

.simulator-stage {
  position: relative;
  min-height: 355px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.9), transparent 48%),
    linear-gradient(180deg, #dfe4e8 0%, #bfc7cd 100%);
  perspective: 950px;
}

.simulator-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(255, 255, 255, 0.26) 50%, transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 35%);
  pointer-events: none;
}

.simulator-lot {
  position: absolute;
  inset: 12px 30px 18px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 3px, transparent 3px 38px),
    linear-gradient(145deg, #3f474d 0%, #252b30 100%);
  box-shadow: 0 38px 45px rgba(0, 0, 0, 0.28);
  transform: rotateX(54deg) rotateZ(-3deg) scale(0.93);
  transform-origin: center 57%;
}

.simulator-lot::before {
  content: "";
  position: absolute;
  inset: 42% 0 auto;
  height: 16%;
  border-top: 2px dashed rgba(255, 255, 255, 0.45);
  border-bottom: 2px dashed rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.025);
}

.simulator-camera,
.simulator-entry,
.simulator-lane-arrow {
  position: absolute;
  z-index: 2;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.simulator-camera {
  top: 8%;
  right: 4%;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: rgba(12, 18, 23, 0.5);
}

.simulator-entry {
  right: 4%;
  bottom: 8%;
}

.simulator-lane-arrow {
  right: 23%;
  bottom: 33%;
  font-size: 32px;
  transform: rotate(180deg);
}

.parking-bay {
  position: absolute;
  width: 19%;
  height: 31%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-top: 0;
  color: rgba(255, 255, 255, 0.74);
}

.parking-bay span {
  position: absolute;
  left: 8px;
  bottom: 7px;
  font-size: 9px;
  font-weight: 850;
}

.parking-bay b {
  position: absolute;
  top: 7px;
  left: 50%;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(240, 77, 36, 0.92);
  color: #fff;
  font-size: 7px;
  letter-spacing: 0.06em;
  transform: translateX(-50%);
  white-space: nowrap;
}

.bay-01 { top: 5%; left: 5%; }
.bay-02 { top: 5%; left: 27%; }
.bay-03 { top: 5%; left: 49%; }
.bay-04 { bottom: 4%; left: 5%; transform: rotate(180deg); }
.bay-05 { bottom: 4%; left: 27%; transform: rotate(180deg); }
.bay-06 { bottom: 4%; left: 49%; transform: rotate(180deg); }

.parking-bay.is-target {
  border-color: #ff6b35;
  background: rgba(240, 77, 36, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 53, 0.4);
  animation: targetGlow 1.5s ease-in-out infinite;
}

.sim-car {
  position: absolute;
  z-index: 5;
  width: 8.5%;
  height: 19%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 36% 36% 24% 24%;
  background: linear-gradient(90deg, #d9dde0 0 16%, #f6f7f8 16% 84%, #c4c9ce 84% 100%);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.35);
  transform-origin: center;
}

.sim-car::before {
  content: "";
  position: absolute;
  inset: 20% 18% 36%;
  border-radius: 30% 30% 15% 15%;
  background: linear-gradient(180deg, #7a8d99, #26323a);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.sim-car::after {
  content: "";
  position: absolute;
  inset: auto 19% 7%;
  height: 7%;
  border-radius: 999px;
  background: #ff5d45;
  box-shadow: 0 -68px 0 #f4f2c4;
}

.sim-car span {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 13%;
  padding: 1px 3px;
  border-radius: 2px;
  background: #f6f6f2;
  color: #222;
  font-size: 5px;
  font-weight: 900;
  transform: translateX(-50%);
  white-space: nowrap;
}

.sim-car-static {
  opacity: 0.95;
}

.sim-car-blue {
  background: linear-gradient(90deg, #163855 0 16%, #2f6b99 16% 84%, #10283e 84% 100%);
}

.sim-car-silver {
  background: linear-gradient(90deg, #757b80 0 16%, #d0d4d7 16% 84%, #656b70 84% 100%);
}

.bay-car-03 {
  top: 10%;
  left: 54.2%;
}

.bay-car-05 {
  bottom: 9%;
  left: 32.2%;
  transform: rotate(180deg);
}

.sim-car-moving {
  left: 94%;
  top: 72%;
  animation: driveToReservedBay 9.5s cubic-bezier(0.44, 0.08, 0.2, 1) infinite;
}

.simulator-status {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(90px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 15px 18px 17px;
  border-top: 1px solid rgba(20, 27, 36, 0.1);
  background: rgba(255, 255, 255, 0.94);
}

.simulator-status div {
  display: grid;
  gap: 1px;
}

.simulator-status small {
  color: #7a828b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.simulator-status strong {
  color: #20252b;
  font-size: 14px;
}

.simulator-status-pill {
  justify-self: end;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fff0e9;
  color: #c54316;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.simulator-status-pill.is-complete {
  background: #e5f7ed;
  color: #147a43;
}

@keyframes driveToReservedBay {
  0%, 8% {
    left: 94%;
    top: 72%;
    transform: translate(-50%, -50%) rotate(-90deg);
  }
  33% {
    left: 66%;
    top: 72%;
    transform: translate(-50%, -50%) rotate(-90deg);
  }
  51% {
    left: 48%;
    top: 54%;
    transform: translate(-50%, -50%) rotate(-132deg);
  }
  71% {
    left: 25%;
    top: 47%;
    transform: translate(-50%, -50%) rotate(-180deg);
  }
  88%, 100% {
    left: 14.4%;
    top: 21%;
    transform: translate(-50%, -50%) rotate(-180deg);
  }
}

@keyframes targetGlow {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 107, 53, 0.38), 0 0 0 rgba(240, 77, 36, 0); }
  50% { box-shadow: inset 0 0 0 1px rgba(255, 107, 53, 0.72), 0 0 18px rgba(240, 77, 36, 0.28); }
}

@keyframes simulatorPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.72); opacity: 0.55; }
}

@media (max-width: 1020px) {
  .parking-simulator { max-width: 820px; }
}

@media (max-width: 760px) {
  .simulator-stage { min-height: 300px; }
  .simulator-lot { inset: 8px 12px 8px; }
  .simulator-status { grid-template-columns: 1fr 1fr; }
  .simulator-status-pill { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .sim-car-moving {
    left: 14.4%;
    top: 21%;
    animation: none;
    transform: translate(-50%, -50%) rotate(-180deg);
  }
  .parking-bay.is-target,
  .simulator-live i { animation: none; }
}
