.panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 0 var(--mantine-spacing-sm) 0;
  border-bottom: 1px solid light-dark(var(--mantine-color-gray-2), var(--mantine-color-dark-5));
}

.toolbarSpacer {
  flex: 1;
}

.titleButton {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--mantine-radius-sm);
  font-size: var(--mantine-font-size-sm);
  font-weight: 500;
  color: light-dark(var(--mantine-color-gray-8), var(--mantine-color-dark-0));
  max-width: 60%;
  min-width: 0;
}

.titleButton:hover {
  background-color: light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-6));
}

.titleText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--mantine-spacing-sm) 0;
  scroll-behavior: smooth;
}

.inputArea {
  padding-top: var(--mantine-spacing-sm);
}

.emptyState {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--mantine-spacing-md);
  padding: var(--mantine-spacing-xl) var(--mantine-spacing-sm);
}

.emptyStateIcon {
  color: light-dark(var(--mantine-color-gray-5), var(--mantine-color-dark-3));
}

.emptyStateTitle {
  font-size: var(--mantine-font-size-lg);
  font-weight: 600;
  color: light-dark(var(--mantine-color-gray-7), var(--mantine-color-dark-1));
  text-align: center;
}

.quickActions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.quickAction {
  display: flex;
  align-items: center;
  gap: var(--mantine-spacing-sm);
  padding: var(--mantine-spacing-xs) var(--mantine-spacing-sm);
  border: 1px solid light-dark(var(--mantine-color-gray-2), var(--mantine-color-dark-5));
  border-radius: var(--mantine-radius-md);
  cursor: pointer;
  background: transparent;
  color: light-dark(var(--mantine-color-gray-7), var(--mantine-color-dark-1));
  font-size: var(--mantine-font-size-sm);
  text-align: left;
  width: 100%;
  transition: background-color 150ms, border-color 150ms;

  @mixin hover {
    background: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-6));
    border-color: light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
  }
}

.quickActionIcon {
  flex-shrink: 0;
  color: light-dark(var(--mantine-color-gray-5), var(--mantine-color-dark-3));
}

.historyList {
  max-height: 300px;
  overflow-y: auto;
}

.historyItem {
  display: flex;
  align-items: center;
  padding: var(--mantine-spacing-xs) var(--mantine-spacing-sm);
  cursor: pointer;
  border-radius: var(--mantine-radius-sm);
  font-size: var(--mantine-font-size-sm);
  color: light-dark(var(--mantine-color-gray-7), var(--mantine-color-dark-1));
  transition: background-color 150ms;

  @mixin hover {
    background: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-6));
  }

  &[data-active] {
    background: light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-5));
  }
}

.historyItemTitle {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
