/* Dinos.info - Discovery Map: 3D globe and fossil sites tour (discovery-globe.js; approved boards Globe-* and
   TourCard-States, Discovery Map canvas v10 1791850861-619b). Built on the Discovery Map's dm- classes and the design
   system's tokens and dn- classes; only what the globe adds is here.
   Avada (Maps Flyover Kit): nothing is position:fixed, and gmp-map-3d has an explicit size or it collapses to 0 high.
   Google's logo and credits sit at the foot of the map: nothing here is placed over them. */

/* Map type switch, beside the view tabs */
.dm-maptype { display: inline-flex; align-items: center; gap: 10px; }
.dm-maptype-label { font-family: var(--font-heading); font-weight: 700; font-size: 11px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted-on-dark); }
.dm-maptype .dn-tabs { display: inline-flex; }
.dm-maptype .dn-tab[aria-pressed="true"] { background-color: var(--action); border-color: var(--action); color: var(--on-action); }
.dm-globe-note { margin: 0 0 var(--space-3); padding: 10px 14px; background: var(--surface-dark-raised); border: 1px solid var(--line-dark); border-left: 3px solid var(--action); border-radius: var(--radius-sm); font-size: 14px; line-height: 20px; color: var(--text-on-dark); }

/* The globe: same box as the 2D map */
.dm-globe { isolation: isolate; position: relative; height: 620px; border: 1px solid var(--line-dark); border-radius: var(--radius-lg); overflow: hidden; background: #0e0f10; }
.dm-globe-canvas { position: absolute; inset: 0; }
.dm-globe-canvas:focus-visible { outline: 2px solid transparent; box-shadow: inset var(--focus-ring-dark); }
.dm-globe gmp-map-3d { display: block; width: 100%; height: 100%; }
.dm-globe-label { position: absolute; z-index: 2; left: 12px; top: 12px; margin: 0; display: inline-flex; align-items: center; height: 32px; padding: 0 10px; background: #121417f2; border: 1px solid var(--border-control-dark); border-radius: var(--radius-sm); font-family: var(--font-heading); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-on-dark); pointer-events: none; }
.dm-globe-loading { position: absolute; z-index: 3; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; background: #0e0f10; font-family: var(--font-heading); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-on-dark); }
.dm-globe-spin { width: 22px; height: 22px; border: 3px solid var(--line-dark); border-top-color: var(--action); border-radius: 50%; animation: dm-spin 1s linear infinite; }
@keyframes dm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dm-globe-spin { animation: none; } }
.dm-globe-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-3); }
/* Full screen (0.16.10): the globe fills the screen with its label, dots and the narration panel. */
.dm-globe { container-type: size; }
.dm-globe.is-full, .dm-globe:fullscreen { height: 100vh; width: 100vw; border: 0; border-radius: 0; }
.dm-globe-fs[aria-pressed="true"] { border-color: var(--action); }
/* The tour's narration panel over the globe (0.16.10, Ben 2026-10-18 21:18): top left under the label, stone and
   sediment (dark), Bone White text; never over Google's logo and credits (the foot: 56 px kept clear) or its controls
   (the right: 140 px kept clear); the transcript scrolls inside it, at most about half the globe's height. Folded: the
   Play button and the stop's name. Under 640 px of globe width: a bar under the globe (is-bar). */
.dm-tour-over { position: absolute; z-index: 2; left: 12px; top: 54px; box-sizing: border-box; width: min(340px, 100% - 152px); max-height: calc(100cqh - 54px - 56px); overflow: auto;
  padding: 10px 12px 12px; border-radius: 12px; color: #F5F1E6;
  background: radial-gradient(120% 90% at 0% 0%, rgba(255, 236, 200, .07), transparent 60%), linear-gradient(160deg, #3d3934 0%, #2b2825 55%, #1d1b19 100%);
  box-shadow: inset 0 0 0 1px rgba(234, 223, 201, .22), inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -3px 0 #5a4430, 0 12px 26px -10px rgba(0, 0, 0, .9); }
.dm-tour-over[hidden] { display: none; }
/* The tour's start over the globe (core 0.17.3, Ben 2026-10-24): where the panel opens, the same clearances (never over
   the right 140 px of Google's controls; it stays at the top, far from the foot's logo and credits). */
.dm-tour-go { position: absolute; z-index: 2; left: 12px; top: 54px; max-width: calc(100% - 152px); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .9); }
.dm-tour-go[hidden] { display: none; }
.dm-tour-over .dm-audio { padding: 0; background: none; border: 0; gap: 8px; }
.dm-over-top { display: flex; align-items: center; gap: 10px; }
.dm-over-top .dm-audio-play { flex: none; min-height: 40px; }
.dm-over-name { flex: 1 1 auto; min-width: 0; margin: 0; display: flex; flex-direction: column; font-size: 13px; line-height: 17px; }
.dm-over-name b { color: #F5F1E6; overflow-wrap: anywhere; }   /* the whole name, wrapping */
.dm-over-kick { font: 700 10px/14px var(--font-heading); letter-spacing: .08em; text-transform: uppercase; color: #D6C3A2; }
.dm-over-fold { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 8px; border: 1px solid rgba(234, 223, 201, .35); background: #1d1b19; color: #F5F1E6; cursor: pointer; }
.dm-over-fold svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.dm-over-fold[aria-expanded="false"] svg { transform: rotate(180deg); }
.dm-over-fold:hover { border-color: var(--action); color: var(--accent-on-dark); }
.dm-over-fold:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring-dark); }
.dm-over-body { display: flex; flex-direction: column; gap: 8px; }
.dm-over-body[hidden] { display: none; }
.dm-tour-over .dm-audio-time, .dm-tour-over .dm-audio-voice { color: #D6C3A2; }
.dm-tour-over .dm-transcript summary { color: #F5F1E6; min-height: 32px; display: flex; align-items: center; }
.dm-transcript-in { max-height: 45cqh; overflow: auto; padding-right: 4px; }
.dm-tour-over .dm-transcript p { color: #F5F1E6; }
.dm-tour-over.is-folded { width: auto; max-width: min(340px, 100% - 152px); }
.dm-tour-over.is-bar { position: static; width: auto; max-width: none; max-height: none; margin-top: var(--space-3); }
.dm-tour-over.is-bar .dm-transcript-in { max-height: 40vh; }
@media (prefers-reduced-motion: reduce) { .dm-over-fold svg { transition: none; } }

/* The fossil card docked in the side panel (no pointer, no Leaflet placement) */
.dm-globe-cardslot:empty { display: none; }
.dn-fc-anchor.in-globe { position: static; }
.dn-fc-anchor.in-globe::after { display: none; }
.dn-fc-anchor.in-globe .dn-fc { width: auto; max-height: none; box-shadow: none; }
.dn-fc-anchor.in-globe .fc-band { cursor: auto; touch-action: auto; user-select: auto; }

/* Tour intro and stop list */
.dm-tour-lede { margin: 0; font-size: 15px; line-height: 24px; color: var(--text-on-dark); }
.dm-tour-stops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dm-tour-n { flex: none; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-control-dark); border-radius: 50%; font-family: var(--font-heading); font-weight: 700; font-size: 12px; }
.dm-tour-stops .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dm-tour-stops .tx b { font-family: var(--font-heading); font-size: 15px; line-height: 20px; }
.dm-tour-stops .tx small { font-size: 12px; line-height: 17px; color: var(--text-muted-on-dark); }

/* Stop card */
.dm-tour-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.dm-tour-controls .dm-mini-btn[disabled] { opacity: .45; cursor: default; }
.dm-stop-where { margin: 6px 0 0; font-size: 14px; line-height: 20px; color: var(--text-muted-on-dark); }
/* "Most fossils here" (TourThumbs board, note n-thumbs; styles from design/discovery-map/source/tour-thumbs.css): two across,
   one 16:10 box for every picture on the species cards' dark backdrop. An approved cutout stands on a 4 px ground line in
   the species' ICS epoch colour (as .dn-species-card-fig.is-cut); group artwork fills the box over the same line; every
   picture tagged. Names in the name face (Names-Type board), two lines at most, wrapping at word breaks, with the count
   on its own line under them. */
.dm-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.dm-strip li { display: flex; flex-direction: column; min-width: 0; }
.dm-strip a { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--text-on-dark); text-decoration: none; border-radius: var(--radius-md); }
.dm-strip-img { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line-dark); border-radius: var(--radius-md); background: radial-gradient(ellipse at 50% 85%, #2c2e31 0%, #1a1b1d 70%); }
.dm-strip-img img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .25s ease; }
.dm-strip-img.is-cut img { object-fit: contain; object-position: center bottom; padding: 6px 3px 7px; box-sizing: border-box; }
.dm-strip-img.is-sil svg { position: absolute; left: 10%; right: 10%; bottom: 12%; width: 80%; height: 70%; }
.dm-strip-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; }
.dm-ai-tag { position: absolute; left: 5px; top: 5px; padding: 1px 5px; border-radius: 3px; background: #121417e6; color: var(--bone-white); font-family: var(--font-heading); font-weight: 700; font-size: 9.5px; line-height: 13px; letter-spacing: .04em; text-transform: uppercase; }
.dm-strip i { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; max-height: 36px; overflow: hidden; font-family: var(--font-name, "Barlow Semi Condensed", "Barlow Condensed", "Arial Narrow", sans-serif); font-weight: 700; font-style: italic; font-size: 15px; line-height: 18px; overflow-wrap: break-word; }
.dm-strip small { display: block; font-size: 12px; line-height: 16px; color: var(--text-muted-on-dark); }
.dm-strip a:hover i { color: var(--accent-on-dark); text-decoration: underline; text-underline-offset: 3px; }
.dm-strip a:hover .dm-strip-img img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { .dm-strip-img img { transition: none; } .dm-strip a:hover .dm-strip-img img { transform: none; } }
.dm-meet { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.dm-az { list-style: none; margin: 0; padding: 0; width: 100%; columns: 2; column-gap: 16px; }
.dm-az li { break-inside: avoid; padding: 3px 0; }
.dm-az a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-on-dark); text-decoration: none; font-size: 14px; line-height: 20px; }
.dm-az a:hover i { color: var(--accent-on-dark); }

/* Narration */
.dm-audio { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--surface-dark); border: 1px solid var(--line-dark); border-radius: var(--radius-md); }
.dm-audio-row { display: flex; align-items: center; gap: 12px; }
.dm-audio-play { padding: 8px 14px; }
.dm-audio-prog { flex: 1; min-width: 0; height: 6px; accent-color: var(--action); }
.dm-audio-time { flex: none; font-size: 12px; line-height: 16px; color: var(--text-muted-on-dark); font-variant-numeric: tabular-nums; }
.dm-audio-whole[aria-pressed="true"] { border-color: var(--action); color: var(--accent-on-dark); }
.dm-audio-voice { margin: 0; font-size: 12px; line-height: 17px; color: var(--text-muted-on-dark); }
.dm-transcript summary { cursor: pointer; font-family: var(--font-heading); font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.dm-transcript p { margin: 8px 0 0; font-size: 14px; line-height: 22px; }

.dm-tour-controls .dm-mini-btn:focus-visible, .dm-strip a:focus-visible, .dm-az a:focus-visible, .dm-maptype .dn-tab:focus-visible,
.dm-transcript summary:focus-visible, .dm-tour-stops .dm-res-row:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring-dark); }

/* Phones: the globe full width, its controls under it; the stop card a sheet below with the tour controls at its
   top and the narration pinned to its foot. */
@media (max-width: 760px) {
  .dm-globe { height: 460px; }
}
@media (max-width: 639.98px) {
  .dm-maptype { flex-wrap: wrap; }
  .dm-globe-bar .dn-btn { flex: 1 1 auto; justify-content: center; }
  .dm-side.dm-globe-sheet { border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding-top: var(--space-3); }
  .dm-side.dm-globe-sheet .dm-tour-controls { position: sticky; top: 0; z-index: 1; margin: calc(-1 * var(--space-3)) calc(-1 * var(--space-4)) 0; padding: var(--space-3) var(--space-4); background: var(--surface-dark-raised); border-bottom: 1px solid var(--line-dark); }
  .dm-side.dm-globe-sheet .dm-audio { position: sticky; bottom: 0; z-index: 1; }
}
