/* An actual spherical View, framed by the public site's white canvas. */
.panorama-hero {
  padding: 24px;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  background: #fff;
}
.admin-bar .panorama-hero {
  height: calc(100svh - 32px);
}
.panorama-frame {
  --panorama-copy-inset: clamp(28px, 4vw, 72px);
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 32px;
  background: #22404d;
  color: #fff;
}
.panorama-poster,
.panorama-viewer,
.panorama-shade,
.panorama-markers {
  position: absolute;
  inset: 0;
}
.panorama-poster {
  background: url("../images/cockpit-panorama-poster-desktop.webp") center /
    auto 100% no-repeat;
}
.panorama-viewer {
  opacity: 0;
  pointer-events: none;
}
.panorama-frame.is-ready .panorama-viewer {
  opacity: 1;
  pointer-events: auto;
}
.panorama-frame.is-ready .panorama-poster {
  visibility: hidden;
}
.panorama-viewer:focus-visible {
  outline: 3px solid var(--bs-warning);
  outline-offset: -5px;
}
.panorama-viewer .psv-loader-container {
  display: none;
}
.panorama-viewer .psv-container {
  background: transparent;
}
.panorama-viewer .psv-canvas-container {
  transition: none;
}
.panorama-shade {
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgb(10 24 31 / 80%),
      rgb(10 24 31 / 25%) 48%,
      transparent 74%
    ),
    linear-gradient(0deg, rgb(10 24 31 / 55%), transparent 45%);
}
.panorama-copy {
  position: absolute;
  z-index: 3;
  left: var(--panorama-copy-inset);
  bottom: clamp(40px, 6vh, 80px);
  width: min(440px, 42%);
  pointer-events: none;
}
.panorama-copy h1 {
  margin: 0 0 20px;
  font-size: 2.5rem;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.panorama-copy p {
  margin: 0 0 24px;
  color: rgb(255 255 255 / 92%);
  font-size: 1rem;
}
.panorama-copy .hero-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 0;
  pointer-events: auto;
}
.panorama-toolbar {
  position: absolute;
  z-index: 5;
  inset: 24px 24px auto var(--panorama-copy-inset);
  /* Reserve the control height before the viewer reveals its toolbar. */
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.panorama-hint,
.panorama-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.panorama-hint {
  display: flex;
  width: fit-content;
  margin-bottom: 12px;
  visibility: hidden;
  text-shadow: 0 1px 4px rgb(0 0 0 / 65%);
}
.panorama-frame.is-ready .panorama-hint {
  visibility: visible;
}
.panorama-brand {
  display: inline-flex;
  align-items: center;
  pointer-events: auto;
}
.panorama-brand img {
  display: block;
  width: auto;
  height: 24px;
  user-select: none;
}
.panorama-hint .icon {
  width: 18px;
  height: 18px;
}
.panorama-controls {
  background: rgb(34 64 77 / 88%);
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: var(--bs-border-radius);
  padding: 0;
  gap: 0;
  pointer-events: auto;
}
.panorama-control {
  display: grid;
  place-items: center;
  width: 40px;
  height: 38px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: white;
}
.panorama-control:hover {
  background: rgb(255 255 255 / 15%);
}
.panorama-control:disabled {
  opacity: 0.35;
  cursor: default;
}
.panorama-control svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.panorama-brand:focus-visible,
.panorama-control:focus-visible,
.panorama-marker:focus-visible,
.panorama-cluster:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}
.panorama-markers {
  z-index: 2;
  pointer-events: none;
}
.panorama-marker,
.panorama-cluster {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease;
  padding: 0;
  pointer-events: auto;
  cursor: pointer;
  border-radius: 50%;
  font-weight: 700;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.panorama-marker {
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  background: var(--bs-warning);
  color: #212529;
  box-shadow: 0 4px 12px rgb(0 0 0 / 35%);
  font-size: 0.9rem;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease,
    transform 0.15s ease;
}
.panorama-marker.is-complete {
  background: var(--bs-success);
  color: white;
}
/* Match ar3D360's selected checklist marker title and its pointer. */
.panorama-marker-title {
  background: var(--bs-dark);
  border-radius: var(--bs-border-radius);
  bottom: calc(100% + 0.5rem);
  box-shadow: 0 0.25rem 0.75rem rgb(0 0 0 / 30%);
  color: var(--bs-white);
  font-size: 0.875rem;
  font-weight: 400;
  left: 50%;
  line-height: 1.25;
  max-width: min(15rem, calc(100vw - 2rem));
  padding: 0.375rem 0.625rem;
  pointer-events: none;
  position: absolute;
  text-align: center;
  transform: translateX(-50%);
  white-space: normal;
  width: max-content;
  z-index: 2;
}
.panorama-marker-title::after {
  border-color: var(--bs-dark) transparent transparent;
  border-style: solid;
  border-width: 0.35rem 0.35rem 0;
  content: "";
  left: 50%;
  position: absolute;
  top: 100%;
  transform: translateX(-50%);
}
.panorama-marker:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow:
    0 0 0 6px rgb(255 255 255 / 20%),
    0 4px 12px rgb(0 0 0 / 35%);
}
.panorama-cluster {
  width: 72px;
  height: 72px;
  border: 0;
  background: transparent;
}
.panorama-cluster::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: rgba(var(--bs-warning-rgb), 0.25);
  transition: background-color 0.15s ease;
}
.panorama-cluster span {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid white;
  border-radius: 50%;
  background: rgba(var(--bs-primary-rgb), 0.9);
  box-shadow: 0 4px 12px rgb(0 0 0 / 35%);
  color: #fff;
  font-size: 0.9rem;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}
.panorama-cluster.is-complete::before {
  background: rgba(var(--bs-success-rgb), 0.25);
}
.panorama-cluster:hover {
  transform: translate(-50%, -50%) scale(1.08);
}
.panorama-marker.is-expanded {
  z-index: 2;
}
.panorama-fallback-note {
  position: absolute;
  z-index: 3;
  right: 28px;
  bottom: 24px;
  font-size: 0.75rem;
  color: #fff;
  text-shadow: 0 1px 5px #000;
  pointer-events: none;
}
.panorama-detail {
  position: absolute;
  z-index: 6;
  top: 82px;
  right: 24px;
  width: min(330px, calc(100% - 48px));
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  color: var(--bs-body-color);
  box-shadow: 0 12px 40px rgb(0 0 0 / 22%);
}
.panorama-detail .btn-close {
  position: absolute;
  right: 14px;
  top: 14px;
}
.panorama-detail-label {
  display: block;
  margin-bottom: 12px;
  padding-right: 20px;
  color: #58666d;
  font-size: 0.75rem;
}
.panorama-detail h2 {
  font-size: 1.25rem;
  margin: 0 0 12px;
}
.panorama-detail p {
  font-size: 0.875rem;
  margin: 0 0 20px;
}
.panorama-frame [hidden] {
  display: none !important;
}
@media (max-width: 782px) {
  .admin-bar .panorama-hero {
    height: calc(100svh - 46px);
  }
}
@media (max-width: 767px) {
  .panorama-poster {
    background-image: url("../images/cockpit-panorama-poster-mobile.webp");
  }
  .panorama-hero {
    padding: 12px;
    min-height: 680px;
  }
  .panorama-frame {
    --panorama-copy-inset: 24px;
    border-radius: 24px;
  }
  .panorama-toolbar {
    inset: 16px 16px auto var(--panorama-copy-inset);
    min-height: 36px;
    gap: 8px;
  }
  .panorama-hint {
    gap: 6px;
    font-size: 0.75rem;
  }
  .panorama-control {
    width: 34px;
    height: 34px;
  }
  .panorama-copy {
    pointer-events: auto;
    touch-action: pan-y;
    right: 24px;
    bottom: 44px;
    width: auto;
  }
  .panorama-copy h1 {
    max-width: 420px;
    font-size: 2rem;
    margin-bottom: 16px;
  }
  .panorama-copy p {
    max-width: 460px;
    font-size: 0.875rem;
    margin-bottom: 20px;
  }
  .panorama-shade {
    background: linear-gradient(
      0deg,
      rgb(10 24 31 / 96%),
      rgb(10 24 31 / 72%) 35%,
      transparent 75%
    );
  }
  .panorama-fallback-note {
    bottom: 15px;
    right: 24px;
    font-size: 0.6875rem;
  }
  .panorama-detail {
    top: 72px;
    right: 16px;
    width: calc(100% - 32px);
    padding: 22px;
  }
}
@media (max-width: 359px) {
  .panorama-frame {
    --panorama-copy-inset: 20px;
  }
  .panorama-copy {
    right: 20px;
  }
  .panorama-copy h1 {
    font-size: 1.75rem;
  }
  .panorama-toolbar {
    right: 12px;
  }
  .panorama-copy .btn {
    font-size: 0.875rem;
  }
}
