/* Listen player for single posts. Solid panels and theme colours only: no shadows, no hover states, no transitions. */

.sn-listen {
  margin: 0 0 1.5em;
  padding: 16px;
  background: var(--sn-surface);
  border: 1px solid var(--sn-border);
  border-radius: var(--sn-radius);
  color: var(--sn-text);
  font-family: var(--sn-font-body);
}
.sn-listen[hidden],
.sn-listen [hidden] { display: none !important; }

.sn-listen__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.sn-listen__label {
  font-family: var(--sn-font-head);
  font-weight: 700;
  font-size: 16px;
  color: var(--sn-heading);
}

.sn-listen__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.sn-listen__play {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--sn-primary);
  color: var(--sn-on-primary);
  cursor: pointer;
}
.sn-listen__play svg { width: 26px; height: 26px; }
.sn-listen__play span { display: inline-flex; }

.sn-listen__skip {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--sn-bg);
  color: var(--sn-heading);
  cursor: pointer;
}
.sn-listen__skip svg { position: absolute; inset: 0; width: 44px; height: 44px; }
.sn-listen__skip span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 1px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.sn-listen__skip.is-fwd svg { transform: scaleX(-1); }

.sn-listen__track {
  flex: 1 1 220px;
  min-width: 0;
}
.sn-listen__bar {
  display: block;
  width: 100%;
  margin: 0;
  accent-color: var(--sn-primary);
}
.sn-listen__times {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 12px;
  color: var(--sn-muted);
  font-variant-numeric: tabular-nums;
}

.sn-listen__speed {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--sn-muted);
}
.sn-listen__speed select {
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--sn-border);
  border-radius: var(--sn-radius);
  background: var(--sn-bg);
  color: var(--sn-text);
  font: inherit;
}

.sn-listen__status.is-error { color: var(--sn-text); }

.sn-listen__follow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--sn-muted);
  cursor: pointer;
}
.sn-listen__follow input { margin: 0; accent-color: var(--sn-primary); }

.sn-listen__status {
  min-height: 1.2em;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--sn-muted);
}

/* The word being read, and the words you can click to start from. */
.sn-lw { cursor: pointer; }
.sn-lw.is-on {
  background: var(--sn-primary);
  color: var(--sn-on-primary);
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.sn-listen button:disabled,
.sn-listen input:disabled {
  opacity: 0.45;
  cursor: default;
}

.sn-listen button:focus-visible,
.sn-listen input:focus-visible,
.sn-listen select:focus-visible,
.sn-lw:focus-visible {
  outline: 2px solid var(--sn-primary);
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .sn-listen { padding: 14px; }
  .sn-listen__track { order: -1; flex-basis: 100%; }
  .sn-listen__row { justify-content: space-between; }
  .sn-listen__speed { margin-left: auto; }
}
