.query-workspace {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--gray-1);
}

.tabs-section {
  background: var(--gray-2);
  border-bottom: 1px solid var(--gray-4);
  padding: 2px 4px !important;
}

.workspace-panels {
  height: 100%;
}

.editor-panel {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.editor-header {
  background: var(--gray-2);
  border-bottom: 1px solid var(--gray-4);
  min-height: 40px;
}

.editor-container {
  flex: 1;
  overflow: hidden;
  padding: 1px;
}

.results-panel {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.results-header {
  background: var(--gray-2);
  border-bottom: 1px solid var(--gray-4);
  min-height: 40px;
}

.results-content {
  overflow: auto;
  background: var(--gray-1);
}

.result-table-container {
  height: 100%;
  overflow: auto;
}

.result-table-container table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.result-table-container th {
  background: var(--gray-2);
  padding: 6px 12px;
  text-align: left;
  font-weight: 500;
  border-bottom: 1px solid var(--gray-4);
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

.result-table-container td {
  padding: 6px 12px;
  border-bottom: 1px solid var(--gray-3);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-table-container tr:hover td {
  background: var(--gray-2);
}

.result-table-container tr:nth-child(even) td {
  background: var(--gray-1);
}

.result-table-container tr:nth-child(even):hover td {
  background: var(--gray-2);
}

.error-message {
  padding: 12px 16px;
  background: var(--red-2);
  border: 1px solid var(--red-4);
  border-radius: var(--radius-2);
  max-width: 600px;
  text-align: center;
}

/* Monaco Editor Theme Overrides */
.editor-container .monaco-editor {
  border: none;
}

.editor-container .monaco-editor .margin {
  background: var(--gray-2) !important;
}

.editor-container .monaco-editor .monaco-editor-background {
  background: var(--gray-1) !important;
}

.editor-container .monaco-editor .line-numbers {
  color: var(--gray-9) !important;
  font-size: 11px;
}

/* Override Monaco colors to use our theme variables */
.editor-container .mtk1 {
  color: var(--gray-12) !important;
} /* default text */
.editor-container .mtk4 {
  color: var(--gray-11) !important;
} /* identifiers */
.editor-container .mtk5 {
  color: var(--accent-11) !important;
} /* keywords */
.editor-container .mtk6 {
  color: var(--orange-11) !important;
} /* strings */
.editor-container .mtk7 {
  color: var(--green-11) !important;
} /* numbers */
.editor-container .mtk8 {
  color: var(--gray-10) !important;
  font-style: italic;
} /* comments */

.resize-handle-horizontal {
  height: 1px;
  background: var(--gray-4);
  cursor: row-resize;
  position: relative;
  transition: all 0.2s;
}

.resize-handle-horizontal:hover {
  background: var(--accent-9);
  height: 3px;
  margin: -1px 0;
}

.resize-handle-horizontal:active {
  background: var(--accent-9);
  height: 3px;
}

/* Spinner animation */
.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--gray-6);
  border-radius: 50%;
  border-top-color: var(--accent-9);
  animation: spin 0.8s linear infinite;
  margin-right: 4px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Export buttons hover effect */
.results-header button:hover {
  background: var(--gray-3);
}

/* Button cursor styles */
.editor-header button,
.results-header button {
  cursor: pointer;
}

/* Badge styling */
.editor-header [data-accent-color] {
  font-size: 10px;
  padding: 2px 6px;
}

/* Vertical resize handle for AI panel */
.resize-handle-vertical {
  width: 1px;
  background: var(--gray-4);
  cursor: col-resize;
  position: relative;
  transition: all 0.2s;
}

.resize-handle-vertical:hover {
  background: var(--accent-9);
  width: 3px;
  margin: 0 -1px;
}

.resize-handle-vertical:active {
  background: var(--accent-9);
  width: 3px;
}
