.summary-tool-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.summary-tool-heading h2 {
  margin: 0;
}

.transcript-toolbar,
.ask-video-row {
  display: flex;
  align-items: end;
  gap: 10px;
}

.transcript-toolbar label,
.ask-video-form {
  flex: 1;
}

.transcript-list,
.ask-video-messages {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.transcript-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d6e6f5;
  border-radius: 12px;
  background: #fff;
}

.transcript-row-highlighted {
  outline: 3px solid rgba(20, 90, 201, 0.25);
}

.transcript-time {
  min-width: 64px;
  padding: 7px 9px;
}

.transcript-copy {
  min-width: 38px;
  padding: 0 10px;
}

.ask-video-messages {
  margin-bottom: 14px;
}

.ask-video-message {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f1f7fd;
}

.ask-video-message-question {
  justify-self: end;
  background: #145ac9;
  color: #fff;
}

.ask-video-message p {
  margin: 0;
}

.ask-video-sources {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.ask-video-source {
  height: auto;
  min-height: 40px;
  padding: 8px 10px;
  text-align: left;
  white-space: normal;
}

:root[data-theme="dark"] .transcript-list li,
:root[data-theme="dark"] .ask-video-message {
  border-color: #31445c;
  background: #17263a;
  color: #d9e6f3;
}

:root[data-theme="dark"] .ask-video-message-question {
  background: #2f75d6;
  color: #fff;
}

:root[data-theme="dark"] .transcript-row-highlighted {
  outline-color: rgba(101, 164, 255, 0.55);
}

:root[data-theme="dark"] .transcript-time,
:root[data-theme="dark"] .transcript-copy,
:root[data-theme="dark"] .ask-video-source,
:root[data-theme="dark"] .summary-tool-heading .secondary-button {
  border-color: #3d5570;
  background: #21344b;
  color: #b9d7ff;
}

:root[data-theme="dark"] .transcript-time:hover,
:root[data-theme="dark"] .transcript-copy:hover,
:root[data-theme="dark"] .ask-video-source:hover,
:root[data-theme="dark"] .summary-tool-heading .secondary-button:hover {
  background: #2a4260;
}

@media (max-width: 640px) {
  .transcript-toolbar,
  .ask-video-row {
    align-items: stretch;
    flex-direction: column;
  }

  .transcript-list li {
    grid-template-columns: auto 1fr;
  }

  .transcript-copy {
    grid-column: 2;
    justify-self: end;
  }
}
