/*
 * Project Myna — route-tour overview page styles.
 * Loaded only on /routes/* pages via extra_head.
 * Everything under .hg-myna-content is hidden unless body has .myna-on
 * (set by the ?myna=1 cookie gate in _includes/footer.html). Placeholder
 * shows to casual visitors.
 */

.hg-myna-placeholder { display: block; }
.hg-myna-content { display: none; }

body.myna-on .hg-myna-placeholder { display: none; }
body.myna-on .hg-myna-content { display: block; }

/* The site's default `.wrapper-sides` on a nosidebar page ships with 4%
   padding per side AND a 1404px max-width cap — at a 1920px viewport
   that puts 258px of empty space on each side, which reads as a deeply
   inset content column coming off a full-bleed hero. !important is
   required on max-width because the base rule `.nosidebar .wrapper-sides
   { max-width: 1404px }` has equal specificity (two classes) and source
   order doesn't consistently win. Pull the route content close to the
   viewport edges: slim padding, let it grow to 1700px on wide monitors
   so reading lines don't get unreadably long. */
.hg-myna-content .wrapper-sides {
  padding-left: 14px !important;
  padding-right: 14px !important;
  max-width: 1700px !important;
  margin-left: auto;
  margin-right: auto;
}
@media only screen and (min-width: 768px) {
  .hg-myna-content .wrapper-sides {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}
@media only screen and (min-width: 1280px) {
  .hg-myna-content .wrapper-sides {
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hg-myna-hero {
  padding: 30px 0 16px;
  border-bottom: 1px solid #eee;
  margin-bottom: 24px;
}
.hg-myna-hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #1D9771;
  margin-bottom: 8px;
}
.hg-myna-hero .entry-title {
  font-size: 38px;
  line-height: 1.15;
  margin: 0 0 10px;
  color: #222;
}
.hg-myna-hero-meta {
  font-size: 15px;
  color: #666;
  margin: 0 0 14px;
  line-height: 1.4;
}
.hg-myna-hero-desc {
  font-size: 18px;
  line-height: 1.55;
  color: #333;
  margin: 0;
  max-width: 780px;
}

/* ── Toolbar: voice toggle + Dry Run button ───────────────────────── */
.hg-myna-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: #f6f5fb;
  border-radius: 12px;
  margin-bottom: 10px;
}
.hg-myna-voice-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hg-myna-toggle-label {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-right: 4px;
}
.hg-myna-voice-btn {
  background: transparent;
  border: 1px solid #cfcfd9;
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  line-height: 1;
}
.hg-myna-voice-btn:hover { color: #1D9771; border-color: #1D9771; }
.hg-myna-voice-btn.is-active {
  background: #1D9771;
  color: #fff;
  border-color: #1D9771;
}
/* ── Mile marker navigator ─────────────────────────────────────────
   Primary Dry Run surface. Large inline SVG highway shield + mile sign
   flanked by prev/next arrows. Roadside-sign aesthetic — big, tactile,
   feels like standing at a real pullout. */
.hg-myna-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 16px 12px;
}
.hg-myna-nav-arrow {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #d8d8e0;
  background: #fff;
  color: #555;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform .12s ease, border-color .12s, color .12s, background .12s;
}
.hg-myna-nav-arrow:hover {
  border-color: #1D9771;
  color: #1D9771;
  transform: scale(1.05);
}
.hg-myna-nav-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}
.hg-myna-nav-arrow:disabled:hover {
  border-color: #d8d8e0;
  color: #555;
  transform: none;
}
.hg-myna-nav-arrow svg {
  width: 28px;
  height: 28px;
}

.hg-myna-nav-marker {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 150px;
}

/* Highway shield — uses the same SVG path as the attraction-page mile-
   marker badge (files/js/mile-marker-badge.js). viewBox is 100x105 so the
   width/height ratio matches the canonical shape. */
.hg-myna-shield {
  width: 110px;
  height: 116px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}
.hg-myna-shield-num {
  font-family: 'Arial Black', Arial, Helvetica, sans-serif;
  font-size: 42px;
  font-weight: 900;
  fill: #222;
  letter-spacing: -1px;
}

/* Green rectangular mile sign below the shield. Dynamically updates. */
.hg-myna-milesign {
  width: 110px;
  background: #1a6b44;
  color: #fff;
  border-radius: 6px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #1a6b44, 0 3px 6px rgba(0,0,0,0.15);
  padding: 6px 4px 8px;
  text-align: center;
  line-height: 1;
  font-family: 'Arial Black', Arial, Helvetica, sans-serif;
}
.hg-myna-milesign-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  opacity: 0.92;
  margin-bottom: 2px;
}
.hg-myna-milesign-num {
  font-size: 30px;
  font-weight: 900;
}
/* Smaller number when it's a range like "12–14" or text like "START" */
.hg-myna-milesign.hg-myna-milesign--long .hg-myna-milesign-num {
  font-size: 20px;
}

/* Nav status row — shows current segment name + playback controls. */
.hg-myna-nav-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 16px 12px;
  flex-wrap: wrap;
}
.hg-myna-nav-segname {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  text-align: center;
  min-width: 200px;
}
.hg-myna-nav-controls {
  display: flex;
  gap: 8px;
}
.hg-myna-nav-playbtn,
.hg-myna-nav-stopbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #1D9771;
  color: #fff;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background .12s;
}
.hg-myna-nav-playbtn:hover,
.hg-myna-nav-stopbtn:hover { background: #167a5b; }
.hg-myna-nav-playbtn:disabled {
  background: #c9d9d2;
  cursor: default;
}
.hg-myna-nav-playbtn svg,
.hg-myna-nav-stopbtn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.hg-myna-nav-stopbtn {
  background: #888;
  padding: 10px 14px;
}
.hg-myna-nav-stopbtn:hover { background: #555; }

/* Highlight the currently-active segment card in the list below. */
.hg-myna-segment.is-active {
  outline: 3px solid #1D9771;
  outline-offset: 2px;
  box-shadow: 0 6px 20px rgba(29, 151, 113, 0.15);
}

/* Mobile: stack marker + arrows compactly, shrink controls. */
@media (max-width: 640px) {
  .hg-myna-nav { gap: 14px; padding: 18px 8px 8px; }
  .hg-myna-nav-arrow { width: 48px; height: 48px; }
  .hg-myna-nav-marker { width: 120px; }
  .hg-myna-shield { width: 90px; height: 95px; }
  .hg-myna-milesign { width: 90px; padding: 4px 4px 6px; }
  .hg-myna-milesign-num { font-size: 24px; }
  .hg-myna-nav-segname { font-size: 17px; min-width: 0; width: 100%; }
}

.hg-myna-dryrun-btn {
  background: #1D9771;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.hg-myna-dryrun-btn:hover { background: #167a5b; }
.hg-myna-dryrun-btn:disabled { background: #9cc9bb; cursor: default; }
.hg-myna-toolbar-help {
  font-size: 17px;
  color: #555;
  line-height: 1.55;
  margin: 10px 4px 28px;
}

/* ── Segment list ─────────────────────────────────────────────────── */
/* The legacy 04-08-25-v1.css rule `.main.nopad ul, .main.nopad ol
   { padding-left: 6% !important }` forces ~60-86px of left padding on
   the segment list at desktop widths — that's the residual indent the
   Myna route page was showing even after the .wrapper-sides padding fix.
   Override with matching specificity + !important so the segments sit
   flush with the narrator toolbar and hero above. */
.main.nopad .hg-myna-segments,
.hg-myna-segments {
  list-style: none;
  padding-left: 0 !important;
  padding-right: 0;
  margin: 0;
  counter-reset: segment-counter;
}
.hg-myna-segment {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 14px;
  counter-increment: segment-counter;
  /* flow-root contains the right-floated thumbnail inside the segment box
     so it doesn't bleed into neighbors. The subplayers also `clear: right`
     below, which pushes audio + transcript BELOW the thumb image so they
     get the full container width and don't flow around the photo. */
  display: flow-root;
}
.hg-myna-segment-bookend { border-left: 6px solid #1D9771; background: #f4faf6; }
.hg-myna-segment-connector { border-left: 6px solid #b9a96c; background: #fbf9f0; }
.hg-myna-segment-stop { border-left: 6px solid #1866B4; }

.hg-myna-segment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.hg-myna-segment-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
}
.hg-myna-badge-bookend { background: #1D9771; }
.hg-myna-badge-connector { background: #b9a96c; }
.hg-myna-badge-stop { background: #1866B4; }
.hg-myna-segment-side {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.hg-myna-segment-name {
  font-size: 26px;
  line-height: 1.3;
  margin: 0;
  flex: 1 1 auto;
  color: #222;
}
/* Stops with a canonical attraction page get a clickable title. The anchor
   inherits the h2's size/weight so the card still reads as a single unit;
   hover shifts to Maui brand blue and underlines to signal tappability. */
.hg-myna-segment-name-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.hg-myna-segment-name-link:hover,
.hg-myna-segment-name-link:focus {
  color: #1866B4;
  border-bottom-color: #1866B4;
  text-decoration: none;
}
/* Small subordinate thumbnail — adds visual texture without overpowering
   the audio UI. Organic blob shape matches the site's tile aesthetic. */
.hg-myna-segment-thumb {
  float: right;
  margin: 0 0 10px 16px;
  width: 160px;
  height: 110px;
  border-radius: 60px 60px 60px 12px;
  overflow: hidden;
  background: #eee;
}
.hg-myna-segment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Tappable thumbnail — same blob shape, but wrapped in a link. Subtle zoom +
   overlay on hover signals "this goes somewhere" without being noisy. */
.hg-myna-segment-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.hg-myna-segment-thumb-link img {
  transition: transform 220ms ease, filter 220ms ease;
}
.hg-myna-segment-thumb-link:hover img,
.hg-myna-segment-thumb-link:focus img {
  transform: scale(1.06);
  filter: brightness(0.92);
}
.hg-myna-segment-thumb-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.35) 100%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}
.hg-myna-segment-thumb-link:hover::after,
.hg-myna-segment-thumb-link:focus::after {
  opacity: 1;
}
@media (max-width: 640px) {
  .hg-myna-segment-thumb {
    float: none;
    width: 100%;
    height: 180px;
    margin: 0 0 12px;
    border-radius: 80px 80px 80px 20px;
  }
}

.hg-myna-segment-notes {
  font-size: 18px;
  color: #555;
  line-height: 1.55;
  margin: 0 0 14px;
  font-style: italic;
}

/* ── Audio sub-players ─────────────────────────────────────────────── */
.hg-myna-subplayers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Float-clear the right-side thumbnail so audio rows sit BELOW it and
     always get the full container width — the transcript especially needs
     this or it wraps into a narrow column next to the photo. */
  clear: right;
}
.hg-myna-subplayer {
  background: #f9f9fb;
  border-radius: 8px;
  padding: 12px 16px;
}
.hg-myna-subplayer-label {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}
.hg-myna-hint {
  font-weight: 400;
  font-size: 13px;
  color: #888;
  margin-left: 6px;
}
.hg-myna-audio {
  width: 100%;
  height: 40px;
}
.hg-myna-audio-pending {
  font-size: 15px;
  color: #999;
  font-style: italic;
  padding: 10px 0;
}

/* ── Transcript toggle ─────────────────────────────────────────────
   Uses native <details>/<summary> so the toggle works without JS and
   is keyboard + screen-reader accessible out of the box. Transcript
   text is the author-written source from _data/route_tours/*.yml —
   same factual content as the narration, lightly tuned for voice by
   the 3-model editorial pipeline before TTS. */
.hg-myna-transcript {
  margin: 10px 0 0;
  border-top: 1px dashed #e0e0e0;
  padding-top: 10px;
}
.hg-myna-transcript summary {
  cursor: pointer;
  color: #1866B4;
  font-weight: 600;
  font-size: 15px;
  padding: 6px 0;
  list-style: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hg-myna-transcript summary::-webkit-details-marker { display: none; }
.hg-myna-transcript summary::before {
  content: "▸";
  display: inline-block;
  font-size: 12px;
  color: #1866B4;
  transition: transform 150ms ease;
}
.hg-myna-transcript[open] summary::before {
  transform: rotate(90deg);
}
.hg-myna-transcript summary:hover { color: #124e8a; }
.hg-myna-transcript[open] summary { margin-bottom: 8px; }
.hg-myna-transcript-body {
  font-size: 18px;
  line-height: 1.65;
  color: #2a2a2a;
  padding: 14px 18px;
  background: #fafafa;
  border-radius: 8px;
  border-left: 3px solid #1866B4;
}

/* ── Page link (bridge to canonical Whippoorwill attraction page) ─── */
.hg-myna-segment-pagelink {
  margin: 12px 0 0;
  font-size: 16px;
}
.hg-myna-segment-pagelink a {
  color: #1866B4;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted #1866B4;
}
.hg-myna-segment-pagelink a:hover { color: #124e8a; }

/* ── Disclaimer ───────────────────────────────────────────────────── */
.hg-myna-disclaimer {
  font-size: 13px;
  line-height: 1.6;
  color: #888;
  padding-top: 16px;
  border-top: 1px solid #eee;
  margin: 0;
}
.hg-myna-disclaimer a { color: #888; text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hg-myna-hero .entry-title { font-size: 28px; }
  .hg-myna-hero-desc { font-size: 16px; }
  .hg-myna-segment-name { font-size: 21px; }
  .hg-myna-segment-notes { font-size: 16px; }
  .hg-myna-transcript-body { font-size: 17px; }
  .hg-myna-toolbar { flex-direction: column; align-items: stretch; }
  .hg-myna-dryrun-btn { width: 100%; }
}

/* ── Print ────────────────────────────────────────────────────────── */
@media print {
  .hg-myna-toolbar, .hg-myna-audio, .hg-myna-audio-pending { display: none !important; }
}
