/* fig3.css: Sheet 03, Fig. 3, the living chart (owned by the fig3 agent). */
.fig3 .map { -webkit-tap-highlight-color: transparent; cursor: pointer; }
.fig3 .map canvas { z-index: 0; pointer-events: none; }
.fig3 .map .anim { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fig3 .map .anim canvas { position: absolute; inset: auto; display: block; }
.js .fig3 .bubble { z-index: 2; pointer-events: none; }
.js .fig3 .bubble.on.wait { opacity: .2; transition-duration: .35s; }
/* a bubble under an open note fades as a whole, in step with the note (map.js holes()) */
.js .fig3 .bubble.on.under { opacity: .12; transition: opacity .3s ease .14s; }
.js .fig3 .bubble.was-under { transition: opacity .18s ease; }
.fig3 .bubble.reply-b b { background: linear-gradient(var(--pencil), var(--pencil)) 0 100% / 0 1.5px no-repeat; }
.fig3 .bubble.reply-b.arrive b { animation: f3-under .9s .25s cubic-bezier(.3, .6, .3, 1) forwards; }
@keyframes f3-under { to { background-size: 100% 1.5px; } }

/* stops: invisible hit areas over each part of the drawing, reachable from the keyboard */
.fig3 .stop {
  position: absolute; z-index: 4; margin: 0; padding: 0; border: 0; background: none; border-radius: 10px;
  color: transparent; font-size: 1px; overflow: hidden; cursor: help;
}
.fig3 .stop:focus-visible { outline: 2px dashed var(--red); outline-offset: 3px; }
/* while a stop's note is open the note covers the stop, so its focus ring goes round the note instead */
.fig3 .stop[aria-expanded="true"]:focus-visible { outline-color: transparent; }
/* the ring's outer edge sits 1px inside the paper drawn round the note (CO_PAD in js/figures/map.js) */
.fig3 .stop:focus-visible + .callout.on { outline: 2px dashed var(--red); outline-offset: calc(var(--co-pad, 8px) - 3px); border-radius: 6px; }
.fig3 .callout {
  position: absolute; z-index: 5; margin: 0; padding: .62em .8em; box-sizing: border-box;
  font-family: var(--serif); line-height: 1.32; color: var(--text); text-wrap: pretty;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s ease, visibility 0s linear .2s;
}
.fig3 .callout.on { opacity: 1; visibility: visible; transition: opacity .3s ease .14s; }
/* the note's pen box and paper are on the canvas, under the figure's HTML: map.js cuts the phone's bubbles
   away round an open note, and the note's own paper (inset, so the pen line shows) keeps any stop's ring off its words */
.fig3 .callout::before { content: ""; position: absolute; inset: 4px; z-index: -1; border-radius: 3px; background: rgb(var(--paper-label-rgb)); }
.fig3 .callout b { font-weight: 600; color: var(--ink); }

.fig3 .replay {
  display: block; margin: 6px 0 0 auto; padding: 8px 2px; border: 0; background: none; cursor: pointer;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft);
}
.fig3 .replay::before { content: "\21BB"; display: inline-block; margin-right: .6em; font-size: 1.15em; transition: transform .6s ease; }
.fig3 .replay:hover { color: var(--red); }
.fig3.sailing .replay { color: var(--soft); opacity: .45; cursor: default; }
.fig3.sailing .replay::before { transform: rotate(-360deg); transition-duration: 7s; }
@media (max-width: 819px) { .fig3 .replay { margin-inline: auto; max-width: 520px; width: 100%; text-align: right; } }

.no-js .fig3 .stop, .no-js .fig3 .callout, .no-js .fig3 .replay { display: none; }
@media (prefers-reduced-motion: reduce) {
  .fig3 .replay { display: none; }
  .fig3 .map { cursor: default; }
  .fig3 .callout, .fig3 .callout.on, .js .fig3 .bubble.on.under, .js .fig3 .bubble.was-under { transition: none; }
  .fig3 .bubble.reply-b b { background-size: 100% 1.5px; animation: none; }
}
