.threadPanel {
  padding: 0.625rem 0.875rem 0.75rem;
  border-radius: 0 0 16px 16px;
  margin-top: -6px;
  background: #fff;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.06);
}

.threadPanelDark {
  padding: 0.625rem 0.875rem 0.75rem;
  border-radius: 0 0 16px 16px;
  margin-top: -6px;
  background: #1e1e1e;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.35),
    0 8px 32px rgba(0, 0, 0, 0.18),
    0 0 0 1px #333333;
}

.replies {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.125rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--tool-chrome-border, #333333);
}

.repliesDark {
  border-left-color: rgba(255, 255, 255, 0.14);
}

.replyRow {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-right: 3.25rem;
}

.replyAvatar {
  margin-top: 1px;
  flex-shrink: 0;
}

.replyContent {
  flex: 1;
  min-width: 0;
}

.replyText {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary, rgba(0, 0, 0, 0.7));
  margin: 0;
}

.replyTextDark {
  color: rgba(255, 255, 255, 0.75);
}

.rowActions {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.replyRow:hover .rowActions,
.replyRow:focus-within .rowActions,
.rowActionsVisible {
  opacity: 1;
  pointer-events: auto;
}

.iconBtn {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border-solid, rgba(0, 0, 0, 0.1));
  background: var(--bg-main, #fff);
  color: var(--text-secondary, rgba(0, 0, 0, 0.55));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(0, 0, 0, 0.06));

  &:hover {
    border-color: var(--border-medium, rgba(0, 0, 0, 0.16));
    color: var(--text-primary, rgba(0, 0, 0, 0.85));
  }
}

.iconBtnDark {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
  box-shadow: none;

  &:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
  }
}

.iconBtnDanger:hover {
  color: var(--error, #dc2626);
  border-color: color-mix(in srgb, var(--error, #dc2626) 35%, transparent);
}

.textarea {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-primary, #e0e0e0);
  border: 1px solid var(--border-medium, rgba(0, 0, 0, 0.12));
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  outline: none;
  resize: none;
  width: 100%;
  font-family: inherit;
  box-sizing: border-box;
  background: var(--bg-main, #fff);
  min-height: 3.25rem;
}

.textareaDark {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.rowComposerActions,
.composerActions {
  display: flex;
  justify-content: flex-end;
  gap: 0.375rem;
  margin-top: 0.375rem;
}

.replyLink {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary, rgba(0, 0, 0, 0.55));
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;

  &:hover {
    color: var(--text-primary, rgba(0, 0, 0, 0.85));
  }
}

.replyLinkDark {
  color: rgba(255, 255, 255, 0.55);

  &:hover {
    color: rgba(255, 255, 255, 0.9);
  }
}

.root {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
