/* Read Aloud — Edge Neural TTS controls */
.read-aloud-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0.25rem;
}

.read-aloud-top .read-aloud-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(13, 90, 110, 0.35);
  background: rgba(13, 90, 110, 0.08);
  color: var(--primary, #0d5a6e);
  font-weight: 600;
  cursor: pointer;
  font: inherit;
}

.read-aloud-top .read-aloud-btn:hover {
  background: rgba(13, 90, 110, 0.16);
}

.read-aloud-btn {
  gap: 0.4rem;
}

.read-aloud-btn.is-playing {
  background: rgba(13, 90, 110, 0.12);
  color: var(--primary, #0d5a6e);
  border-color: rgba(13, 90, 110, 0.35);
}

.read-aloud-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0 0 1.25rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 40, 55, 0.1);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(15, 40, 55, 0.06);
}

[data-theme="dark"] .read-aloud-bar {
  background: rgba(22, 32, 40, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
}

.read-aloud-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.85rem;
  font-size: 0.9rem;
}

.ra-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(15, 40, 55, 0.12);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font: inherit;
}

.ra-ctrl:hover:not(:disabled) {
  border-color: rgba(13, 90, 110, 0.45);
  color: var(--primary, #0d5a6e);
}

.ra-ctrl:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ra-gender {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted, #5a6b78);
}

.ra-gender select {
  border-radius: 8px;
  border: 1px solid rgba(15, 40, 55, 0.15);
  background: transparent;
  color: inherit;
  padding: 0.25rem 0.4rem;
  font: inherit;
  max-width: min(100%, 280px);
}

.ra-status {
  margin-left: auto;
  color: var(--muted, #5a6b78);
  font-size: 0.85rem;
}

.article-content .read-aloud-active,
.wiki-content .read-aloud-active,
.lq-article-content .read-aloud-active {
  outline: 2px solid rgba(20, 138, 158, 0.45);
  outline-offset: 3px;
  border-radius: 6px;
  background: rgba(20, 138, 158, 0.08);
  transition: background 0.2s ease, outline-color 0.2s ease;
}

@media (max-width: 640px) {
  .ra-status {
    margin-left: 0;
    width: 100%;
  }
  .read-aloud-btn .ra-label {
    display: none;
  }
}
