/**
 * Informe Presty Accessibility — player pill (isolado do CSS do tema).
 */

.presty-speech-player,
.presty-speech-player *,
.presty-speech-player *::before,
.presty-speech-player *::after {
  box-sizing: border-box;
}

.presty-speech-player {
  --psp-bg: #eef3ff;
  --psp-ink: #000b2b;
  --psp-muted: #5f6b84;
  --psp-primary: #163aff;
  --psp-primary-dark: #0f2ecf;
  --psp-line: rgba(22, 58, 255, 0.12);
  --psp-font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --psp-bar-h: 44px;
  --psp-toggle: 36px;
  --psp-btn: 32px;
  --psp-glyph: 12px;
  --psp-vol: 15px;
  --psp-stop: 10px;
  --psp-rate-size: 13px;
  --psp-pad-y: 4px;
  --psp-pad-x: 10px;

  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 1.75rem;
  padding: 0;
  color: var(--psp-ink);
  font: 400 15px/1.2 var(--psp-font);
  -webkit-font-smoothing: antialiased;
}

.presty-speech-player--sm {
  --psp-bar-h: 36px;
  --psp-toggle: 28px;
  --psp-btn: 26px;
  --psp-glyph: 10px;
  --psp-vol: 13px;
  --psp-stop: 8px;
  --psp-rate-size: 12px;
  --psp-pad-y: 4px;
  --psp-pad-x: 8px;
}

.presty-speech-player--xs {
  --psp-bar-h: 30px;
  --psp-toggle: 24px;
  --psp-btn: 22px;
  --psp-glyph: 9px;
  --psp-vol: 11px;
  --psp-stop: 7px;
  --psp-rate-size: 11px;
  --psp-pad-y: 3px;
  --psp-pad-x: 6px;
}

.entry-content > .presty-speech-player,
.single-article__content > .presty-speech-player {
  margin-top: 0 !important;
}

.presty-speech-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
}

.presty-speech-meta-row .single-article__date {
  margin: 0;
}

.presty-speech-meta-row .presty-speech-player {
  margin: 0;
}

.presty-speech-player .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.presty-speech-player__bar {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  max-width: 100%;
  height: var(--psp-bar-h);
  min-height: var(--psp-bar-h);
  margin: 0;
  padding: var(--psp-pad-y) var(--psp-pad-x) var(--psp-pad-y) var(--psp-pad-y);
  overflow: hidden;
  background: var(--psp-bg);
  border: 1px solid var(--psp-line);
  border-radius: 999px;
}

.presty-speech-player button {
  all: unset;
  box-sizing: border-box;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  font-family: var(--psp-font);
  line-height: 1 !important;
  letter-spacing: normal;
  text-decoration: none !important;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transform: none !important;
  box-shadow: none;
}

.presty-speech-player button:hover,
.presty-speech-player button:focus,
.presty-speech-player button:active {
  transform: none !important;
}

.presty-speech-player svg {
  display: block !important;
  flex-shrink: 0;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.presty-speech-player__toggle {
  width: var(--psp-toggle) !important;
  height: var(--psp-toggle) !important;
  min-width: var(--psp-toggle) !important;
  min-height: var(--psp-toggle) !important;
  color: #fff !important;
  background: var(--psp-primary) !important;
  border-radius: 50% !important;
  box-shadow: 0 4px 12px rgba(22, 58, 255, 0.28) !important;
}

.presty-speech-player__toggle:hover {
  background: var(--psp-primary-dark) !important;
}

.presty-speech-player__toggle:focus-visible,
.presty-speech-player__rate:focus-visible,
.presty-speech-player__stop:focus-visible,
.presty-speech-player__volume:focus-visible {
  outline: 2px solid var(--psp-primary) !important;
  outline-offset: 2px !important;
}

.presty-speech-player__glyph {
  width: var(--psp-glyph) !important;
  height: var(--psp-glyph) !important;
  margin-left: 1px !important;
  pointer-events: none;
}

.presty-speech-player[data-state="speaking"] .presty-speech-player__glyph {
  margin-left: 0 !important;
}

.presty-speech-player__rate {
  width: auto !important;
  min-width: 36px !important;
  height: var(--psp-btn) !important;
  padding: 0 8px !important;
  color: var(--psp-ink) !important;
  background: transparent !important;
  border-radius: 999px !important;
  font-size: var(--psp-rate-size) !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.presty-speech-player__rate:hover {
  color: var(--psp-primary) !important;
  background: rgba(255, 255, 255, 0.7) !important;
}

.presty-speech-player__divider {
  display: block !important;
  flex: 0 0 auto;
  width: 1px !important;
  height: 14px !important;
  min-width: 1px;
  margin: 0 2px !important;
  padding: 0 !important;
  background: rgba(15, 40, 153, 0.16) !important;
  border: 0 !important;
}

.presty-speech-player__stop {
  width: var(--psp-btn) !important;
  height: var(--psp-btn) !important;
  min-width: var(--psp-btn) !important;
  color: var(--psp-muted) !important;
  background: transparent !important;
  border-radius: 50% !important;
  opacity: 0.45;
}

.presty-speech-player[data-state="speaking"] .presty-speech-player__stop,
.presty-speech-player[data-state="paused"] .presty-speech-player__stop {
  opacity: 1;
}

.presty-speech-player__stop:hover:not(:disabled) {
  color: var(--psp-ink) !important;
  background: rgba(255, 255, 255, 0.7) !important;
}

.presty-speech-player__stop:disabled {
  cursor: default;
}

.presty-speech-player__stop-icon {
  width: var(--psp-stop) !important;
  height: var(--psp-stop) !important;
}

.presty-speech-player__volume {
  width: var(--psp-btn) !important;
  height: var(--psp-btn) !important;
  min-width: var(--psp-btn) !important;
  color: var(--psp-primary) !important;
  background: transparent !important;
  border-radius: 50% !important;
}

.presty-speech-player__volume:hover {
  background: rgba(255, 255, 255, 0.7) !important;
}

.presty-speech-player__vol-glyph {
  width: var(--psp-vol) !important;
  height: var(--psp-vol) !important;
  pointer-events: none;
}

.presty-speech-player__volume[data-volume="0"] {
  color: var(--psp-muted) !important;
}

.presty-speech-player__unsupported {
  margin: 10px 0 0;
  color: var(--psp-muted);
  font-size: 13px;
  line-height: 1.4;
}

.presty-speech-player.is-unsupported .presty-speech-player__bar {
  display: none !important;
}

@media (max-width: 480px) {
  .presty-speech-meta-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .presty-speech-player {
    width: 100%;
  }

  .presty-speech-player__bar {
    width: 100%;
  }

  .presty-speech-player__rate {
    margin-right: auto !important;
  }
}
