/* Dictate workspace presentation — preserves the existing slate / indigo identity. */
.dictate-workspace {
  box-sizing: border-box;
  padding-bottom: 1.5rem !important;
}

.dictate-workspace *,
.dictate-workspace *::before,
.dictate-workspace *::after {
  box-sizing: border-box;
}

.dictate-workspace button,
.dictate-workspace input,
.dictate-workspace select,
.dictate-workspace textarea {
  font-family: inherit;
}

.dictate-workspace button:focus-visible,
.dictate-workspace input:focus-visible,
.dictate-workspace select:focus-visible,
.dictate-workspace textarea:focus-visible,
.dictate-workspace summary:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 3px;
}

.dictate-workspace .dictate-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

/* Keep the textarea and transcript mirror on precisely the same line grid. */
.dictate-workspace .dictate-live-editor__mirror,
.dictate-workspace .dictate-live-editor__input,
.dictate-workspace [data-testid="dictate-editor"] {
  line-height: 1.6 !important;
}

.dictate-workspace .dictate-live-editor__input,
.dictate-workspace [data-testid="dictate-editor"] {
  caret-color: #6366f1 !important;
}

@media (min-width: 768px) {
  .dictate-workspace .dictate-capture-dock {
    margin: 0 0 18px;
  }
}

.dictate-workspace .dictate-clear-all,
.dictate-workspace .dictate-copy-all {
  border-color: #6366f1;
  background: #4f46e5;
  color: #fff;
  font-size: 14px;
  min-height: 44px;
  padding-inline: 17px;
}

.dictate-workspace .dictate-clear-all:hover:not(:disabled),
.dictate-workspace .dictate-copy-all:hover:not(:disabled) {
  border-color: #818cf8;
  background: #4338ca;
}

.dictate-workspace .dictate-action-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.dictate-workspace .dictate-copy-all {
  min-width: 104px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dictate-workspace .dictate-share-secondary {
  min-height: 44px;
}

.dictate-workspace .dictate-clear-confirmation {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
  font-size: 14px;
}

.dictate-workspace .dictate-clear-confirmation[hidden] {
  display: flex;
  visibility: hidden;
  pointer-events: none;
}

.dictate-feedback {
  position: fixed;
  z-index: 60;
  inset-inline: max(16px, env(safe-area-inset-left, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px) + var(--dictate-keyboard-offset, 0px));
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.dictate-feedback > * {
  max-width: min(100%, 42rem);
  pointer-events: auto;
}

.dictate-workspace [data-testid="dictate-editor"] {
  width: 100%;
  min-height: min(60vh, 560px);
  max-height: none;
  resize: vertical;
}

.dictate-workspace .dictate-capture-dock {
  position: relative;
  z-index: 1;
  inset: auto;
  width: 100%;
  margin-top: 22px;
  color: #e2e8f0;
  background: #111c31;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  box-shadow: none;
  transform: none;
}

.dictate-workspace .dictate-capture-dock__inner {
  width: 100%;
  min-width: 0;
  margin-inline: auto;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dictate-workspace .dictate-capture-dock__readout {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.dictate-workspace .dictate-capture-dock__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
}

.dictate-workspace .dictate-capture-dock__status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #64748b;
}

.dictate-workspace .dictate-capture-dock__status--recording .dictate-capture-dock__status-dot {
  background: #818cf8;
}

.dictate-workspace .dictate-capture-dock__status--paused .dictate-capture-dock__status-dot {
  background: #fbbf24;
}

.dictate-workspace .dictate-capture-dock__status--connecting .dictate-capture-dock__status-dot,
.dictate-workspace .dictate-capture-dock__status--finishing .dictate-capture-dock__status-dot {
  background: #a5b4fc;
}

.dictate-workspace .dictate-capture-dock__status--disconnected .dictate-capture-dock__status-dot {
  background: #f87171;
}

.dictate-workspace .dictate-capture-dock__elapsed {
  color: #f8fafc;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: 0.035em;
  line-height: 1;
}

.dictate-workspace .dictate-capture-dock__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
}

.dictate-workspace .dictate-capture-dock button {
  box-sizing: border-box;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 10px;
  color: #e2e8f0;
  background: #1e293b;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.dictate-workspace .dictate-capture-dock button:hover:not(:disabled) {
  background: #334155;
  border-color: rgba(165, 180, 252, 0.45);
}

.dictate-workspace .dictate-capture-dock button:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 2px;
}

.dictate-workspace .dictate-capture-dock button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.dictate-workspace .dictate-capture-dock__primary,
.dictate-workspace .dictate-capture-dock__secondary {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  white-space: nowrap;
}

.dictate-workspace .dictate-capture-dock__primary {
  min-width: 104px;
  border-color: #6366f1;
  color: #fff;
  background: #4f46e5;
}

.dictate-workspace .dictate-capture-dock__primary:hover:not(:disabled) {
  border-color: #818cf8;
  background: #4338ca;
}

.dictate-workspace .dictate-capture-dock__secondary {
  min-width: 92px;
  background: #1e293b;
}

.dictate-workspace .dictate-capture-dock svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.dictate-workspace .dictate-capture-dock__primary svg rect {
  fill: currentColor;
  stroke: currentColor;
}

.dictate-workspace .dictate-capture-dock__level {
  display: inline-flex;
  width: 24px;
  height: 26px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #818cf8;
}

.dictate-workspace .dictate-capture-dock__level span {
  width: 3px;
  height: calc(5px + var(--dictate-level, 0) * 12px);
  border-radius: 3px;
  background: currentColor;
  opacity: 0.48;
}

.dictate-workspace .dictate-capture-dock__level span:nth-child(2) {
  height: calc(8px + var(--dictate-level, 0) * 16px);
  opacity: 0.85;
}

@media (min-width: 768px) {
  .dictate-workspace > .grid {
    align-items: start;
  }

  .dictate-workspace > .grid > main {
    min-height: calc(100dvh - 112px);
  }
}

@media (max-width: 767px) {
  .dictate-workspace {
    padding-bottom: calc(188px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .dictate-workspace input,
  .dictate-workspace select,
  .dictate-workspace textarea {
    font-size: 16px !important;
  }

  .dictate-workspace .dictate-editor-toolbar {
    align-items: center;
    gap: 8px;
  }

  .dictate-workspace .dictate-action-toolbar {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .dictate-workspace [data-testid="dictate-editor"] {
    min-height: 44vh;
    max-height: none;
  }

  .dictate-workspace .dictate-capture-dock {
    position: fixed;
    z-index: 40;
    inset-inline: 0;
    bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + var(--dictate-keyboard-offset, 0px));
    width: auto;
    margin: 0;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 8px 28px rgba(2, 6, 23, 0.3);
  }

  .dictate-feedback {
    bottom: calc(120px + max(12px, env(safe-area-inset-bottom, 0px)) + var(--dictate-keyboard-offset, 0px));
  }

  .dictate-workspace .dictate-capture-dock__inner {
    padding: 9px 12px 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .dictate-workspace .dictate-capture-dock__readout {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 22px;
  }

  .dictate-workspace .dictate-capture-dock__actions {
    justify-content: flex-start;
    gap: 8px;
  }

  .dictate-workspace .dictate-capture-dock__primary {
    min-width: 94px;
    padding-inline: 12px;
  }

  .dictate-workspace .dictate-capture-dock__secondary {
    min-width: 82px;
    padding-inline: 10px;
  }
}

@media (max-width: 380px) {
  .dictate-workspace .dictate-capture-dock__inner {
    padding-inline: 9px;
  }

  .dictate-workspace .dictate-capture-dock__actions {
    gap: 6px;
  }

  .dictate-workspace .dictate-capture-dock__primary,
  .dictate-workspace .dictate-capture-dock__secondary {
    gap: 5px;
    padding-inline: 8px;
  }

  .dictate-workspace .dictate-capture-dock__level {
    display: none;
  }
}

@media (max-width: 767px) and (max-height: 420px) {
  .dictate-workspace .dictate-capture-dock__inner {
    padding-block: 6px;
    gap: 5px;
  }

  .dictate-workspace .dictate-capture-dock__elapsed {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dictate-workspace .dictate-capture-dock,
  .dictate-workspace .dictate-capture-dock *,
  .dictate-workspace .dictate-capture-dock button {
    transition: none !important;
  }

}