/* CSS For double dropdowns */
.dropdown-submenu {
    position: relative;
  }

  .dropdown-submenu a::after {
    transform: rotate(-90deg);
    position: absolute;
    right: 6px;
    top: .8em;
  }

  .dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: .1rem;
    margin-right: .1rem;
  }
/* Text to speech (tts.js) controls near Sienna accessibility widget */
#tts-content {
  position: relative;
}

/* TTS controls near Sienna (bottom-left) */
.tts-controls--sienna {
  position: fixed;
  left: 18px;
  /* align with Sienna bubble */
  bottom: 110px;
  /* put it above Sienna bubble */
  z-index: 9999;
  display: flex;
  flex-direction: column;
  /* vertical stack */
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  /* Make buttons slightly bigger for accessibility */
}
.tts-controls--sienna .tts-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

/* Mobile: avoid overlapping */
@media (max-width: 768px) {
  .tts-controls--sienna {
    left: 12px;
    bottom: 96px;
    padding: 8px;
    gap: 8px;
  }
  .tts-controls--sienna .tts-btn {
    width: 40px;
    height: 40px;
  }
}
.tts-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.12s ease;
  /* Optional "active speaking" state */
  /* For accessibility focus */
}
.tts-btn:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  background: #fafafa;
}
.tts-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.tts-btn svg {
  width: 18px;
  height: 18px;
  fill: #222;
}
.tts-btn.is-active {
  border-color: rgba(0, 0, 0, 0.22);
  background: #f2f2f2;
}
.tts-btn:focus {
  outline: none;
}
.tts-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.25);
}
.tts-btn.is-playing {
  background: #eaf2ff;
  border-color: #3b82f6;
}
.tts-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
