/* Chat workspace: simple ChatGPT surface with project-aware storage underneath. */
.chat-history-drawer {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  width: min(340px, calc(100vw - 110px));
}

.workspace-history-brand {
  display: grid;
  gap: 4px;
  padding: 4px 4px 8px;
  border-bottom: 1px solid var(--line);
}

.workspace-history-brand strong {
  color: #0f172a;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.workspace-history-brand span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.history-create-button,
.history-stash-link,
.project-filter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #111827;
  font-weight: 850;
  text-align: left;
}

.history-create-button {
  background: #0f172a;
  color: #fff;
}

.history-create-button svg,
.history-stash-link svg {
  width: 17px;
  height: 17px;
}

.history-section {
  display: grid;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.history-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mini-icon-button {
  width: 28px;
  height: 28px;
}

.project-filter small,
.history-stash-link small {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  text-align: center;
}

.project-filter:hover,
.project-filter.active,
.history-stash-link:hover {
  border-color: #ccfbf1;
  background: #f0fdfa;
  color: #0f766e;
}

.chat-history-drawer .history-header {
  padding: 0 2px;
}

.chat-history-drawer .history-header strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-history-drawer .history-list {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.chat-history-drawer .history-item {
  min-height: 58px;
  border-radius: 14px;
}

.chat-history-drawer .history-item:hover,
.chat-history-drawer .history-item.active {
  border-color: #e5e7eb;
  background: #f8fafc;
}

.history-stash-link {
  border-color: var(--line);
  background: #fff;
}

.message-actions {
  gap: 8px;
  flex-wrap: wrap;
}

.message-asset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 850;
}

.message-asset-button svg {
  width: 15px;
  height: 15px;
}

.message-asset-button:hover {
  border-color: #ccfbf1;
  background: #f0fdfa;
  color: #0f766e;
}

@media (max-width: 900px) {
  .chat-history-drawer {
    left: 14px;
    top: 86px;
    width: min(340px, calc(100vw - 28px));
  }
}
