/* Listen-to-this-page widget — floating read-aloud player (Web Speech API).
   Injected on every page by add-listen-feature.js. */

.c1-listen {
  position: fixed;
  left: 24px;          /* bottom-left: the bottom-right corner holds the
                          Salient share bar on case-study pages */
  bottom: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Hidden until JS confirms speech synthesis is supported. */
.c1-listen[hidden] { display: none; }

.c1-listen button {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: #fff;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.c1-listen button:hover { background: rgba(10, 10, 10, 0.92); }
.c1-listen button:active { transform: scale(0.96); }
.c1-listen button:focus-visible {
  outline: 2px solid #FF5D00;
  outline-offset: 2px;
}

/* Primary play / pause toggle — pill with icon + label. */
.c1-listen__toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 48px;
  padding: 0 20px 0 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.c1-listen__toggle svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* Accent the button while actively playing. */
.c1-listen.is-playing .c1-listen__toggle { background: #FF5D00; }
.c1-listen.is-playing .c1-listen__toggle:hover { background: #e85400; }

/* Secondary round controls (stop, speed) — only shown when active. */
.c1-listen__ctrl {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}
.c1-listen__ctrl svg { width: 16px; height: 16px; }

.c1-listen.is-active .c1-listen__ctrl { display: inline-flex; }

/* Speed pill shows current rate as text (e.g. "1x"). */
.c1-listen__speed { font-variant-numeric: tabular-nums; }

@media (max-width: 600px) {
  .c1-listen { left: 14px; bottom: 14px; gap: 6px; }
  .c1-listen__toggle { height: 44px; padding: 0 16px 0 14px; font-size: 14px; }
  .c1-listen__ctrl { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .c1-listen button { transition: none; }
  .c1-listen button:active { transform: none; }
}
