.group-dropdown {
  margin-top: 8px;
}

.group-dropdown > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--raised);
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.group-dropdown > summary::-webkit-details-marker {
  display: none;
}

.group-dropdown[open] > summary {
  border-color: rgba(127, 151, 255, 0.5);
  border-radius: 8px 8px 0 0;
}

.group-dropdown-panel {
  display: grid;
  gap: 9px;
  padding: 9px;
  border: 1px solid rgba(127, 151, 255, 0.35);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: #171d27;
}

.group-dropdown-choices {
  display: grid;
  gap: 5px;
  max-height: 180px;
  overflow: auto;
}

.group-dropdown-choices label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
}

.group-dropdown-choices label:hover {
  background: rgba(255, 255, 255, 0.05);
}

.group-dropdown-choices .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.dropdown-empty,
.group-save-status {
  color: var(--dim);
  font-size: 10px;
}

.group-note-field {
  display: grid;
  gap: 5px;
  color: var(--dim);
  font-size: 10px;
}

.group-note-field textarea {
  width: 100%;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0f131b;
  color: var(--text);
  resize: vertical;
}

.group-dropdown-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.group-dropdown-actions button {
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  background: #f5f6fa;
  color: #090b10;
  font-weight: 750;
  cursor: pointer;
}

.group-dropdown-actions button:disabled {
  opacity: 0.5;
}

.group-save-status {
  margin-right: auto;
}

.history-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
  font: 9px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  vertical-align: middle;
}

.cover-preview-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.cover-preview-hint {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(8, 10, 15, 0.78);
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.15s;
}

.bot-card:hover .cover-preview-hint,
.cover-preview-trigger:focus-visible .cover-preview-hint {
  opacity: 1;
}

.image-preview-dialog {
  width: min(1100px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  overflow: visible;
  background: rgba(10, 13, 19, 0.98);
}

.image-preview-stage {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 18px;
}

.image-preview-stage img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 10px;
  background: #05070a;
}

.image-preview-caption {
  width: 100%;
  padding: 12px 4px 0;
  color: var(--muted);
  font: 11px ui-monospace, monospace;
  text-align: center;
}

.image-preview-close {
  position: absolute;
  z-index: 2;
  top: -13px;
  right: -13px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #202735;
  color: var(--text);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}
