/* ------------------------------------------------------------------
   Bolton Mansion - narration player for the Cards timeline (12580).
   Transport bar and word highlight are the era 1 player's (player.css);
   the rest is for the Cards layout.

   Sizes in px: the theme sets html{font-size:62.5%}, so rem is 10px here.
   No ampersand character in this file (WordPress re-encodes it inside
   wp:html blocks). Checked by verify-cards.mjs.
   ------------------------------------------------------------------ */

/* ---------- word + block highlighting ---------- */

.bm-cards .bm-w {
  border-radius: 3px;
  padding: 1px 3px;
  margin: 0 -3px;
}
.bm-cards .bm-w.is-now {
  background: rgba(180, 132, 132, .34);
  box-shadow: inset 0 -2px 0 0 #b48484;
  color: #2a1f1f;
}
/* on the coloured cover cards the word light is white */
.bm-cards .bmc__cover .bm-w.is-now {
  background: rgba(255, 255, 255, .28);
  box-shadow: inset 0 -2px 0 0 #fff;
  color: #fff;
}

/* the card being read stands out; the others recede a little */
.bm-cards.is-narrating .bmc { transition: opacity .3s ease, box-shadow .3s ease; }
.bm-cards.is-narrating .bmc:not(.is-narrated):not(.bmc--intro) { opacity: .62; }
.bm-cards .bmc.is-narrated { box-shadow: 0 0 0 2px #8daca6, 0 10px 28px rgba(40, 30, 30, .12); }
/* The paragraph being read gets a faint tint. A tint, not a side line: the
   text box scrolls (overflow clips anything outside it) and has no left
   padding on phones. Box-shadow spread matches the tint to the text, no reflow. */
.bm-cards .bmc__prose p.is-narrated {
  background: rgba(141, 172, 166, .10);
  box-shadow: 0 0 0 6px rgba(141, 172, 166, .10);
  border-radius: 2px;
}

/* tap a paragraph to start there */
.bm-cards.is-narratable .bm-nar-block { cursor: pointer; }
.bm-cards.is-narratable .bmc__prose p.bm-nar-block:hover { background: rgba(180, 132, 132, .06); box-shadow: 0 0 0 6px rgba(180, 132, 132, .06); }

/* ---------- Listen buttons (added by the script) ---------- */

.bm-nar__listen {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  background: #b48484;
  color: #fff;
  padding: 7px 14px 7px 11px;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.bm-nar__listen:hover { background: #8d6161; }
.bm-nar__listen:focus-visible { outline: 3px solid #8daca6; outline-offset: 2px; }
.bm-nar__listen svg { width: 14px; height: 14px; fill: currentColor; }

.bm-nar__era {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  padding: 8px 16px 8px 12px;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.bm-nar__era:hover { background: rgba(255, 255, 255, .26); }
.bm-nar__era:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.bm-nar__era svg { width: 14px; height: 14px; fill: currentColor; }
.bm-nar__era small { font-size: 11px; font-weight: 400; opacity: .85; text-transform: none; letter-spacing: 0; }

/* ---------- sticky transport bar (as player.css) ---------- */

.bm-nar__bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: #fff;
  border-top: 1px solid #e2d9d1;
  box-shadow: 0 -6px 24px rgba(35, 32, 30, .1);
  transform: translateY(110%);
  transition: transform .28s ease;
  font-family: Roboto, Helvetica, Arial, sans-serif;
}
.bm-nar__bar.is-up { transform: translateY(0); }
.bm-nar__barin {
  max-width: 980px;
  margin: 0 auto;
  padding: 9px 16px 11px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.bm-nar__btn {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #8d6161;
  cursor: pointer;
  padding: 6px;
  border-radius: 3px;
  font-size: 13px;
  font-family: inherit;
}
.bm-nar__btn:hover { background: #f4eeea; }
.bm-nar__btn:focus-visible { outline: 2px solid #8daca6; outline-offset: 2px; }
.bm-nar__btn svg { width: 16px; height: 16px; fill: currentColor; display: block; }
.bm-nar__btn--main {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #b48484;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bm-nar__btn--main:hover { background: #8d6161; }
.bm-nar__btn.is-on { color: #4d7b73; background: #eef4f3; }
.bm-nar__scrub { flex: 1 1 auto; min-width: 60px; height: 22px; position: relative; cursor: pointer; }
.bm-nar__track { position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; background: #ece4de; overflow: hidden; }
.bm-nar__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #b48484; }
.bm-nar__scrub:focus-visible { outline: 2px solid #8daca6; outline-offset: 2px; border-radius: 3px; }
.bm-nar__time { flex: 0 0 auto; font-size: 12.5px; color: #6f6660; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bm-nar__where { flex: 0 1 auto; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: #8d6161; }
.bm-nar__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bm-nar__audio { display: none; }

@media (max-width: 720px) {
  .bm-nar__where { display: none; }
  .bm-nar__barin { gap: 9px; padding: 8px 10px 10px; }
  .bm-nar__listen { order: 3; }
  .bm-nar__era { margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .bm-nar__bar { transition: none; }
  .bm-cards.is-narrating .bmc { transition: none; }
}
