
/* v3.7.284: Recent positions stack + popover styles. */

/* The "Recent" button in the audio bar. */
.wtpp-tts-recent-btn {
  position: relative;
}
.wtpp-tts-recent-btn[data-empty="1"] {
  display: none !important;
}
.wtpp-tts-recent-btn .wtpp-tts-recent-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--red);
  color: var(--pure-white);
  font-size: 9px;
  font-weight: 700;
  border-radius: 8px;
  padding: 1px 4px;
  line-height: 1.2;
  min-width: 13px;
  text-align: center;
  pointer-events: none;
}

/* The popover that opens above the bar. */
.wtpp-tts-recent-popover {
  position: fixed;
  background: var(--surface-card);
  border-radius: 10px;
  box-shadow: 0 8px 32px var(--ov-black-25),
              0 0 0 1px var(--ov-black-06);
  padding: 6px;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 24px));
  z-index: 999;
  font-family: var(--sans, -apple-system, system-ui, sans-serif);
  animation: wtpp-recent-pop-in 0.15s ease-out;
}
html[data-theme="dark"] .wtpp-tts-recent-popover {
  background: var(--ink-17);
  color: var(--paper-89);
  box-shadow: 0 8px 32px var(--ov-black-50),
              0 0 0 1px var(--ov-white-10);
}
@keyframes wtpp-recent-pop-in {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.wtpp-tts-recent-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  padding: 6px 10px 4px 10px;
}
html[data-theme="dark"] .wtpp-tts-recent-header { color: var(--tone-69); }

.wtpp-tts-recent-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
  color: inherit;
  margin-top: 2px;
}
.wtpp-tts-recent-item:hover,
.wtpp-tts-recent-item:focus-visible {
  background: var(--surface-hover, var(--ov-black-06));
  outline: none;
}
html[data-theme="dark"] .wtpp-tts-recent-item:hover,
html[data-theme="dark"] .wtpp-tts-recent-item:focus-visible {
  background: var(--ov-white-10);
}
.wtpp-tts-recent-item-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.3;
}
html[data-theme="dark"] .wtpp-tts-recent-item-title {
  color: var(--paper-89);
}
.wtpp-tts-recent-item-meta {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
  font-family: var(--mono, "Inconsolata", monospace);
  letter-spacing: 0.02em;
}
html[data-theme="dark"] .wtpp-tts-recent-item-meta {
  color: var(--tone-69);
}
.wtpp-tts-recent-item-snippet {
  font-size: 12px;
  color: var(--ink-15);
  margin-top: 4px;
  font-style: italic;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
html[data-theme="dark"] .wtpp-tts-recent-item-snippet {
  color: var(--tone-76);
}

/* Pointer triangle on bottom of popover. */
.wtpp-tts-recent-popover::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid var(--pure-white);
}
html[data-theme="dark"] .wtpp-tts-recent-popover::after {
  border-top-color: var(--ink-17);
}

@media (max-width: 540px) {
  .wtpp-tts-recent-popover {
    min-width: 240px;
    padding: 4px;
  }
  .wtpp-tts-recent-item { padding: 6px 8px; }
  .wtpp-tts-recent-item-title { font-size: 12px; }
}
