/* Turntable + facade-explorer styles. Split out of app.css; loaded by
   components/layout.html right after app.css (cascade order preserved). */

/* Subtle dim while a different mode (day↔night) is loading. The previous
 * frame is still painted underneath, so this is just a hint that a swap
 * is in progress, not a full blank screen. */
.facade-stage__turntable[data-loading-mode] .facade-stage__turntable-canvas {
  filter: brightness(0.65) saturate(0.85);
  transition: filter 220ms ease;
}
.facade-stage__turntable[data-loading-mode]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.35) 100%);
  z-index: 4;
}

.facade-stage__turntable-status {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100% - 40px));
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 245, 234, 0.18);
  border-radius: 8px;
  background: rgba(28, 22, 18, 0.78);
  color: #fff7ed;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}
.facade-stage__turntable-status[hidden] {
  display: none;
}
.facade-stage__turntable-status strong {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
}
.facade-stage__turntable-status span {
  min-width: 0;
  color: rgba(255, 247, 237, 0.78);
  font-size: 12px;
  font-weight: 600;
}
.facade-stage__turntable[data-turntable-state="error"] .facade-stage__turntable-status {
  border-color: rgba(255, 125, 98, 0.38);
  background: rgba(56, 24, 19, 0.84);
}
.facade-stage__turntable-retry {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 247, 237, 0.24);
  border-radius: 7px;
  background: rgba(255, 247, 237, 0.1);
  color: #fff7ed;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.facade-stage__turntable-play {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(39, 31, 25, 0.92) !important;
  color: #fff7ed !important;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  transition: background 180ms ease, transform 180ms ease;
  padding: 0;
  line-height: 1;
}
.facade-stage__turntable-play:hover {
  background: rgba(20, 14, 10, 1) !important;
  transform: translateY(-50%) scale(1.05);
}
.facade-stage__turntable-play [data-turntable-play-icon] {
  font-size: 18px;
  color: #fff7ed;
  letter-spacing: -1px;
  display: inline-block;
  pointer-events: none;
}

@media (max-width: 720px) {
  .facade-zone-tooltip {
    max-width: min(260px, calc(100% - 24px));
    padding: 9px 11px;
    transform: none;
  }

  .facade-stage__turntable-status {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .facade-stage__turntable-zones polygon,
  .facade-stage__turntable-zones path {
    stroke-width: 2;
  }
  .facade-stage__turntable-zones polygon:hover,
  .facade-stage__turntable-zones polygon:focus-visible,
  .facade-stage__turntable-zones path:hover,
  .facade-stage__turntable-zones path:focus-visible {
    stroke-width: 3;
  }
  .facade-stage__turntable-play {
    right: 14px;
    top: auto;
    bottom: calc(92px + env(safe-area-inset-bottom));
    transform: none;
    width: 46px;
    height: 46px;
  }
  .facade-stage__turntable-play:hover {
    transform: none;
  }
}

/* When turntable is active, fade out facade scene + zones */
.facade-explorer[data-stage-mode="turntable"] .facade-stage__scene > .facade-stage__image,
.facade-explorer[data-stage-mode="turntable"] .facade-zone-layer,
.facade-explorer[data-stage-mode="turntable"] .facade-building-labels,
.facade-explorer[data-stage-mode="turntable"] .facade-stage__veil,
.facade-explorer[data-stage-mode="turntable"] .facade-stage__glow {
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.access-required {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(15, 18, 23, 0.14), rgba(15, 18, 23, 0.34)),
    url("/static/images/facade-master.svg") center / cover no-repeat,
    linear-gradient(180deg, #efe4d5 0%, #d9c7b4 100%);
}

.access-required__panel {
  width: min(640px, 100%);
  display: grid;
  gap: 18px;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(255, 249, 241, 0.46);
  border-radius: 8px;
  background: rgba(255, 250, 244, 0.92);
  box-shadow: 0 24px 70px rgba(34, 27, 22, 0.2);
  backdrop-filter: blur(18px);
}

.access-required__panel h1 {
  margin: 0;
  color: #2f261f;
  font-family: var(--font-display);
  font-size: clamp(42px, 8vw, 74px);
  line-height: 0.95;
}

.access-required__panel p {
  max-width: 48rem;
  margin: 0;
  color: #5f5146;
  font-size: 16px;
  line-height: 1.7;
}

.access-required__meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.access-required__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(73, 56, 42, 0.08);
  color: #45362d;
  font-size: 12px;
  font-weight: 800;
}

.page-access-required .favorites-float {
  display: none;
}

@media (max-width: 720px) {
  .access-required {
    align-items: end;
    padding: 16px;
  }

  .access-required__panel {
    padding: 24px;
  }

  .access-required__meta {
    display: grid;
  }
}
