/* Linear-inspired UI styles */

/* Tabs styling */
.linear-tabs {
  --tab-bg-active: rgba(255, 255, 255, 0.08);
  --tab-bg-hover: rgba(255, 255, 255, 0.04);
  --tab-text-muted: rgba(255, 255, 255, 0.6);
  --tab-text: rgba(255, 255, 255, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.1);
}

.theme-light .linear-tabs {
  --tab-bg-active: rgba(0, 0, 0, 0.04);
  --tab-bg-hover: rgba(0, 0, 0, 0.02);
  --tab-text-muted: rgba(0, 0, 0, 0.6);
  --tab-text: rgba(0, 0, 0, 0.9);
  --border-subtle: rgba(0, 0, 0, 0.1);
}

.linear-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
  height: 40px;
  border-bottom: 1px solid var(--border-subtle);
}

.linear-tabs-list {
  display: flex;
  gap: 2px;
  background: transparent;
  border: none;
  padding: 0;
}

.linear-tab {
  font-size: 12px !important;
  height: 24px !important;
  padding: 0 8px !important;
  border-radius: 4px !important;
  color: var(--tab-text-muted) !important;
  background: transparent !important;
  font-weight: 500 !important;
  transition: all 0.1s ease !important;
}

.linear-tab:hover {
  background: var(--tab-bg-hover) !important;
}

.linear-tab[data-state="active"] {
  background: var(--tab-bg-active) !important;
  color: var(--tab-text) !important;
}

.linear-tab svg {
  width: 14px !important;
  height: 14px !important;
}

/* Headers */
.linear-page-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

/* Right side controls */
.linear-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.linear-button {
  height: 26px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  border-radius: 4px !important;
  font-weight: 500 !important;
}

.linear-button-icon {
  width: 14px !important;
  height: 14px !important;
}

/* Refresh controls */
.linear-refresh-status {
  font-size: 11px;
  color: var(--tab-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Custom scrollbar for dark mode */
:root {
  --scrollbar-bg: rgba(255, 255, 255, 0.05);
  --scrollbar-thumb: rgba(255, 255, 255, 0.2);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.3);

  /* Agent log type colors for dark mode */
  --log-user-bg: rgba(59, 130, 246, 0.15);
  --log-assistant-bg: rgba(147, 51, 234, 0.15);
  --log-thought-bg: rgba(14, 165, 233, 0.15);
  --log-toolcall-bg: rgba(245, 158, 11, 0.15);
  --log-tooloutput-bg: rgba(16, 185, 129, 0.15);
  --log-default-bg: rgba(107, 114, 128, 0.15);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-bg);
}

/* Chrome, Edge, and Safari scrollbar */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-bg);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

/* Condensed log content styles */
.condensed-log-content {
  position: relative;
  overflow: hidden;
  white-space: pre-wrap;
}

.condensed-log-content.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  cursor: pointer;
}

.condensed-log-content.collapsed::after {
  content: "...";
  position: absolute;
  bottom: 0;
  right: 0;
  padding-left: 4px;
  background: inherit;
}

/* Agent log styling */
.style-log-user {
  background-color: var(--log-user-bg);
  border-left: 2px solid rgba(59, 130, 246, 0.5);
}

.style-log-assistant {
  background-color: var(--log-assistant-bg);
  border-left: 2px solid rgba(147, 51, 234, 0.5);
}

.style-log-thought {
  background-color: var(--log-thought-bg);
  border-left: 2px solid rgba(14, 165, 233, 0.5);
}

.style-log-toolcall {
  background-color: var(--log-toolcall-bg);
  border-left: 2px solid rgba(245, 158, 11, 0.5);
}

.style-log-tooloutput {
  background-color: var(--log-tooloutput-bg);
  border-left: 2px solid rgba(16, 185, 129, 0.5);
}

.style-log-default {
  background-color: var(--log-default-bg);
  border-left: 2px solid rgba(107, 114, 128, 0.5);
}
