/* ================================================================
   SPEAKEASY STICKY + COLLAPSIBLE PLAYER
   The real player (.speakeasy-container) pins below the header once
   scrolled past. The full transport (play / pause / stop / seek) is
   always visible; an injected toggle opens the voice/speed settings
   below the bar, and the open/closed choice persists (localStorage).
   ================================================================ */

/* ── Collapse model ──────────────────────────────────────────────── */
/* The module's gear is replaced by our expand toggle. */
#speakeasy-settings-toggle { display: none !important; }

/* While collapsed, the whole bar is a click target to open the full player. */
.speakeasy-container:not(.se-expanded) .speakeasy-media-player { cursor: pointer; }

/* Drop every "Listen to the Description" label — the in-bar text span and the
   block's <h2> title — the player itself makes its purpose obvious. Also pull
   the player up tight to the content above it. */
.speakeasy-label { display: none; }
.speakeasy-container .block__title { display: none; }
.speakeasy-container { margin-top: 0; }

/* Collapsed (default): the full transport — play / pause / stop / seek — and
   the toggle stay visible. Only the voice/speed settings tuck away. */
.speakeasy-container #speakeasy-settings.speakeasy-settings {
  display: none;
}

/* Expanded: reveal the voice/speed settings. The panel carries an inline
   style="display:none" from the template, so its reveal needs !important. */
.speakeasy-container.se-expanded #speakeasy-settings.speakeasy-settings {
  display: flex !important;
}

/* Expand / collapse toggle (injected by speakeasy-float.js). */
.speakeasy-expand-toggle {
  flex-shrink: 0;
  margin-left: auto;            /* sit at the right edge of the bar */
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--sk-smoke, #5f4b8b);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.speakeasy-expand-toggle:hover { background: rgba(155, 89, 182, 0.12); }
.speakeasy-expand-toggle:focus-visible {
  outline: 2px solid var(--sk-rose, #d15f8a);
  outline-offset: 2px;
}
.speakeasy-expand-toggle svg { transition: transform 0.22s ease; }
.speakeasy-container.se-expanded .speakeasy-expand-toggle svg { transform: rotate(90deg); }

/* Expanded: the voice/speed panel sits as its own full-width row attached
   directly to the bar (no gap) so the bar's width never changes, with a clear
   border framing the section. The ✦ notch is dropped since it straddled the
   old gap. */
.speakeasy-container.se-expanded #speakeasy-settings.speakeasy-settings {
  margin-top: 0;
  border: 2px solid var(--sk-rose, #d15f8a);
}
.speakeasy-container.se-expanded #speakeasy-settings.speakeasy-settings::before {
  display: none;
}

/* ── Pinned (sticky) state — all widths ──────────────────────────── */
/* position / top / left / width are set inline by speakeasy-float.js. */
.speakeasy-container.sf-stuck {
  z-index: 900;
  animation: sf-drop 0.18s ease-out;
}
.speakeasy-container.sf-stuck .speakeasy-media-player {
  box-shadow:
    0 0 0 2px rgba(224, 122, 159, 0.38),
    0 10px 30px rgba(95, 74, 139, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
@keyframes sf-drop {
  from { transform: translateY(-8px); opacity: 0.6; }
  to   { transform: translateY(0);    opacity: 1; }
}

.speakeasy-sticky-spacer {
  pointer-events: none;
}

/* ── Speakeasy text highlight — high-contrast yellow ─────────────── */
.speakeasy-current {
  background-color: #fde047 !important;
  color: #1a1a1a !important;
  border-radius: 3px;
  padding: 0 2px;
  transition: background-color 0.15s;
}
