/* Shared layout for the clickable orb pages (see orb.js). */

.orb-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 14px;
  overflow: hidden;
}

.orb-caption {
  flex: 0 0 auto;
  font-family: "Baloo", cursive;
  font-size: clamp(16px, 3vw, 26px);
  font-weight: 600;
  color: #fff;
  text-align: center;
  line-height: 1.25;
  max-width: 22em;
}

/* Sized from the photo's aspect ratio (--orb-ar, set by orb.js) so the box
   always matches the canvas exactly — the hotspot below is positioned in
   percentages of it. The width is whichever is smaller: the space available,
   or the width the photo can be at full height. */
.orb-wrap {
  position: relative;
  line-height: 0;
  aspect-ratio: var(--orb-ar);
  width: min(100%, calc(var(--orb-ar) * (100vh - 7rem)));
  width: min(100%, calc(var(--orb-ar) * (100dvh - 7rem)));
}

.orb-wrap canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

/* Invisible circular link sitting exactly over the orb in the photo. */
.orb-hotspot {
  position: absolute;
  box-sizing: border-box;
  border-radius: 50%;
  z-index: 2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.orb-hotspot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 6px;
}
