/* Shared response actions and listening controls use the workspace theme. */
.response-audio-action { display: inline-flex; vertical-align: middle; max-width: 100%; min-width: 0; }
.response-audio-slot { display: contents; }
.response-audio-action.is-active { flex: 1 1 100%; order: -1; justify-content: flex-end; }
[data-tour="chat-response-actions"],
[data-tour="virtual-assistant-actions"]:has(.response-audio-action.is-active),
[data-tour="intelligent-analysis-actions"]:has(.response-audio-action.is-active),
[data-tour="search-results-analysis-actions"]:has(.response-audio-action.is-active),
.lexiusdoc-card__actions:has(.response-audio-action.is-active) { flex-wrap: wrap; min-width: 0; }
[data-tour="chat-response-actions"] {
  align-items: center; gap: 4px; padding-block: 8px; margin-top: 8px;
  border-top: 1px solid var(--border-fourth, #ececec);
}
[data-tour="chat-response-actions"] > button,
[data-tour="chat-response-actions"] .response-audio-button[data-action="play"] {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; min-width: 44px; min-height: 44px; padding: 0;
  border: 0; border-radius: 10px; background: transparent;
  color: var(--text-third, #7a7a7a); font-size: 18px; line-height: 1;
  transition: background-color .15s ease, color .15s ease;
}
[data-tour="chat-response-actions"] > button:hover:not(:disabled),
[data-tour="chat-response-actions"] .response-audio-button[data-action="play"]:hover:not(:disabled) {
  background: var(--fourth, #ececec); color: rgb(var(--theme-color-rgb, 9, 112, 230));
}
[data-tour="chat-response-actions"] > button:focus-visible,
.response-audio-button:focus-visible {
  outline: 2px solid rgb(var(--theme-color-rgb, 9, 112, 230)); outline-offset: 2px;
}
.response-audio-controls {
  display: flex; flex-direction: column; gap: 8px; box-sizing: border-box;
  width: 100%; min-width: 0; max-width: 560px; padding: 10px;
  border: 1px solid var(--border-fourth, #ececec); border-radius: 12px;
  background: var(--primary, #fff); font: inherit; color: var(--text-secondary, #3b3b3b);
}
.response-audio-transport { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; }
.response-audio-timeline { flex: 1 1 120px; min-width: 0; }
.response-audio-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; }
.response-audio-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 44px; min-height: 44px; padding: 8px; border: 0;
  border-radius: 8px; background: transparent; cursor: pointer;
  font: inherit; font-size: 12px; line-height: 1.3; white-space: nowrap;
}
.response-audio-button:where(:not([data-action="play"])) { color: inherit; }
.response-audio-button:hover:not(:disabled) { background: var(--fourth, #ececec); }
.response-audio-button:disabled { opacity: .45; cursor: default; }
.response-audio-icon { flex: 0 0 auto; font-size: 16px; line-height: 1; }
.response-audio-button[data-action="play"] {
  display: inline-block; min-width: 0; min-height: 0; padding: 4px 8px;
  border: 0; border-radius: 0; font: inherit; transition: color .3s ease;
}
.response-audio-button[data-action="play"]:hover:not(:disabled) { background: transparent; color: rgb(var(--theme-color-rgb, 9, 112, 230)); }
.response-audio-button[data-action="play"]:disabled { background: transparent; }
.response-audio-button[data-action="toggle"] {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px;
  color: rgb(var(--theme-color-rgb, 9, 112, 230)); background: var(--fourth, #ececec);
  background: color-mix(in srgb, rgb(var(--theme-color-rgb, 9, 112, 230)) 12%, var(--primary, #fff));
}
.response-audio-button[data-action="toggle"]:hover {
  background: color-mix(in srgb, rgb(var(--theme-color-rgb, 9, 112, 230)) 20%, var(--primary, #fff));
}
.response-audio-button[data-action="toggle"] .response-audio-icon { font-size: 22px; }
.response-audio-button[data-action="toggle"] .response-audio-caption { display: none; }
.response-audio-elapsed { color: var(--text-third, #7a7a7a); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.response-audio-status { color: var(--text-third, #7a7a7a); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.response-audio-progress {
  display: block; appearance: none; width: 100%; height: 5px; border: 0;
  overflow: hidden; border-radius: 8px; background: var(--fourth, #ececec);
  accent-color: rgb(var(--theme-color-rgb, 9, 112, 230));
}
.response-audio-progress::-webkit-progress-bar { background: var(--fourth, #ececec); border-radius: 8px; }
.response-audio-progress::-webkit-progress-value { background: var(--theme-color, #0970e6); border-radius: 8px; }
.response-audio-progress::-moz-progress-bar { background: var(--theme-color, #0970e6); border-radius: 8px; }
.response-audio-tools { display: flex; flex-wrap: wrap; gap: 4px; border-top: 1px solid var(--border-fourth, #ececec); padding-top: 6px; }
.response-audio-tools .response-audio-button { flex: 1 1 80px; min-width: max-content; color: var(--text-third, #7a7a7a); }
.response-audio-mini-player {
  /* Above the sidebar (10000) after a modal closes, below workspace overlays (10030). */
  position: fixed; z-index: 10020; left: max(16px, env(safe-area-inset-left));
  bottom: calc(var(--response-audio-bottom, 12px) + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box; width: min(420px, calc(100vw - 32px)); max-height: 45dvh; overflow-y: auto;
  padding: 12px; border: 1px solid var(--border-fourth, #ececec); border-radius: 16px;
  background: var(--primary, #fff); color: var(--text-secondary, #3b3b3b);
  box-shadow: 0 8px 32px #0002, 0 2px 6px #0001; font-family: inherit;
}
.response-audio-mini-player .response-audio-controls { padding: 0; border: 0; border-radius: 0; }
.response-audio-announcement {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.response-audio-controls[hidden], .response-audio-mini-player[hidden], .response-audio-button[hidden] { display: none !important; }
@media (max-width: 767px) {
  /* Leave room for the chat launcher when both controls cannot fit side by side. */
  .response-audio-mini-player { bottom: calc(max(var(--response-audio-bottom, 12px), 72px) + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 600px) {
  .response-audio-mini-player { left: max(8px, env(safe-area-inset-left)); width: calc(100vw - 16px); padding: 10px; }
  .response-audio-tools { gap: 2px; }
  .response-audio-tools .response-audio-button { padding-inline: 4px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-tour="chat-response-actions"] *, .response-audio-action *, .response-audio-mini-player * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
