.ov-renderer,
.ov-inspector-shell {
  color: var(--jp-ui-font-color1);
  font-family: var(--jp-ui-font-family);
}

.ov-renderer,
.ov-inspector-shell {
  --ov-card-bg: #f0f4ff;
  --ov-card-border: #c5d0f5;
  --ov-card-fg: #283c50;
  --ov-card-title: #1a3cc4;
  --ov-card-badge-bg: #dde8ff;
  --ov-card-badge-border: #99b0f0;
  --ov-card-badge-fg: #1a3cc4;
  --ov-card-muted: #475569;
  --ov-row-label: #6c757d;
  --ov-active-bg: #e8f5e9;
  --ov-active-border: #0b7a27;
  --ov-active-fg: #0b7a27;
  --ov-selected-bg: rgba(37, 99, 235, 0.1);
  --ov-chip-hover-bg: rgba(37, 99, 235, 0.08);
  --ov-dtype-int-bg: #dbeafe;
  --ov-dtype-int-fg: #1d4ed8;
  --ov-dtype-int-border: #bfdbfe;
  --ov-dtype-float-bg: #dcfce7;
  --ov-dtype-float-fg: #166534;
  --ov-dtype-float-border: #bbf7d0;
  --ov-dtype-object-bg: #fef3c7;
  --ov-dtype-object-fg: #92400e;
  --ov-dtype-object-border: #fde68a;
  --ov-dtype-bool-bg: #fce7f3;
  --ov-dtype-bool-fg: #9d174d;
  --ov-dtype-bool-border: #fbcfe8;
  --ov-dtype-datetime-bg: #ede9fe;
  --ov-dtype-datetime-fg: #6d28d9;
  --ov-dtype-datetime-border: #ddd6fe;
  --ov-dtype-category-bg: #ecfdf5;
  --ov-dtype-category-fg: #065f46;
  --ov-dtype-category-border: #a7f3d0;
  --ov-dtype-other-bg: #f1f5f9;
  --ov-dtype-other-fg: #475569;
  --ov-dtype-other-border: #e2e8f0;
}

:root[data-jp-theme-light='false'] .ov-renderer,
:root[data-jp-theme-light='false'] .ov-inspector-shell {
  --ov-card-bg: #1a2540;
  --ov-card-border: #2d4070;
  --ov-card-fg: #dbe4f5;
  --ov-card-title: #7a9ff5;
  --ov-card-badge-bg: #1e2e55;
  --ov-card-badge-border: #3a5080;
  --ov-card-badge-fg: #9cb8ff;
  --ov-card-muted: #aebdd5;
  --ov-row-label: #9ca3af;
  --ov-active-bg: rgba(11, 122, 39, 0.2);
  --ov-active-border: #19a144;
  --ov-active-fg: #7adf95;
  --ov-selected-bg: rgba(37, 99, 235, 0.18);
  --ov-chip-hover-bg: rgba(37, 99, 235, 0.14);
  --ov-dtype-int-bg: rgba(59, 130, 246, 0.18);
  --ov-dtype-int-fg: #9cc2ff;
  --ov-dtype-int-border: rgba(96, 165, 250, 0.32);
  --ov-dtype-float-bg: rgba(34, 197, 94, 0.16);
  --ov-dtype-float-fg: #8ee5aa;
  --ov-dtype-float-border: rgba(74, 222, 128, 0.3);
  --ov-dtype-object-bg: rgba(245, 158, 11, 0.16);
  --ov-dtype-object-fg: #ffd38a;
  --ov-dtype-object-border: rgba(251, 191, 36, 0.28);
  --ov-dtype-bool-bg: rgba(236, 72, 153, 0.16);
  --ov-dtype-bool-fg: #f6a9d0;
  --ov-dtype-bool-border: rgba(244, 114, 182, 0.28);
  --ov-dtype-datetime-bg: rgba(139, 92, 246, 0.18);
  --ov-dtype-datetime-fg: #c6b1ff;
  --ov-dtype-datetime-border: rgba(167, 139, 250, 0.28);
  --ov-dtype-category-bg: rgba(20, 184, 166, 0.16);
  --ov-dtype-category-fg: #8ee3d7;
  --ov-dtype-category-border: rgba(45, 212, 191, 0.28);
  --ov-dtype-other-bg: rgba(148, 163, 184, 0.14);
  --ov-dtype-other-fg: #c8d2e0;
  --ov-dtype-other-border: rgba(148, 163, 184, 0.24);
}

.ov-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ov-card {
  background: var(--ov-card-bg);
  border: 1px solid var(--ov-card-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--jp-code-font-family);
  font-size: 12px;
  color: var(--ov-card-fg);
  line-height: 1.45;
}

.ov-card-title {
  font-weight: 700;
  color: var(--ov-card-title);
  font-size: 12px;
}

.ov-card-shape {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--ov-card-badge-bg);
  border: 1px solid var(--ov-card-badge-border);
  color: var(--ov-card-badge-fg);
  font-size: 11px;
  font-weight: 600;
}

.ov-card-name {
  margin-top: 4px;
  color: var(--ov-card-muted);
  font-size: 11px;
}

.ov-df-card {
  padding-bottom: 6px;
  background: var(--jp-layout-color1);
  border-color: var(--jp-border-color2);
  color: var(--jp-ui-font-color1);
}

.ov-df-card .ov-card-title {
  color: var(--jp-brand-color1, #2563eb);
}

.ov-df-card .ov-card-name {
  color: var(--jp-ui-font-color2);
}

.ov-df-card .ov-card-shape {
  background: var(--jp-layout-color2);
  border-color: var(--jp-border-color2);
  color: var(--jp-ui-font-color1);
}

:root[data-jp-theme-light='false'] .ov-renderer .ov-df-card,
:root[data-jp-theme-light='false'] .ov-inspector-shell .ov-df-card {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

:root[data-jp-theme-light='false'] .ov-renderer .ov-df-card .ov-card-title,
:root[data-jp-theme-light='false'] .ov-inspector-shell .ov-df-card .ov-card-title {
  color: #93c5fd !important;
}

:root[data-jp-theme-light='false'] .ov-renderer .ov-df-card .ov-card-name,
:root[data-jp-theme-light='false'] .ov-inspector-shell .ov-df-card .ov-card-name {
  color: #9ca3af !important;
}

:root[data-jp-theme-light='false'] .ov-renderer .ov-df-card .ov-card-shape,
:root[data-jp-theme-light='false'] .ov-inspector-shell .ov-df-card .ov-card-shape {
  background: #1f2937 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important;
}

.ov-card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ov-card-spacer {
  flex: 1 1 auto;
}

.ov-palette-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--ov-card-muted);
  font-family: var(--jp-code-font-family);
}

.ov-palette-select {
  min-width: 92px;
  border: 1px solid var(--jp-border-color2);
  border-radius: 4px;
  background: var(--jp-layout-color1);
  color: var(--jp-ui-font-color1);
  padding: 2px 24px 2px 8px;
  font-size: 10.5px;
  font-family: var(--jp-code-font-family);
}

.ov-palette-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18);
}

.ov-adata-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 10.5px;
  font-family: var(--jp-code-font-family);
}

.ov-adata-chip,
.ov-action-btn,
.ov-inspector-button {
  background: var(--jp-layout-color1);
  color: var(--jp-ui-font-color1);
  cursor: pointer;
}

.ov-adata-chip,
.ov-action-btn {
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.ov-adata-chip:hover,
.ov-action-btn:hover,
.ov-inspector-button:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.ov-chip-more,
.ov-meta,
.ov-empty,
.ov-table-footer,
.ov-inspector-status {
  font-size: 11px;
  color: var(--jp-ui-font-color2);
}

.ov-chip-more-btn {
  border: 1px dashed var(--jp-border-color2);
  border-radius: 999px;
  background: transparent;
  padding: 2px 8px;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, background-color 120ms ease;
}

.ov-chip-more-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: var(--ov-chip-hover-bg);
}

.ov-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 360px;
  border: 1px solid var(--jp-border-color2);
  border-radius: 6px;
  background: var(--jp-layout-color1);
}

.ov-table-notice {
  padding: 6px 8px;
  border-bottom: 1px solid var(--jp-border-color2);
  background: var(--jp-layout-color2);
  color: var(--jp-ui-font-color1);
  font-size: 11px;
}

:root[data-jp-theme-light='false'] .ov-renderer .ov-table-notice,
:root[data-jp-theme-light='false'] .ov-inspector-shell .ov-table-notice {
  background: #1f2937 !important;
  border-bottom-color: #374151 !important;
  color: #e5e7eb !important;
}

.ov-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--jp-code-font-family);
  font-size: 10.5px;
}

.ov-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 5px 8px;
  border-bottom: 2px solid var(--jp-border-color2);
  background: var(--jp-layout-color2);
  text-align: left;
  white-space: nowrap;
}

.ov-th-index {
  min-width: 44px;
  background: var(--jp-layout-color2);
}

.ov-table tbody td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--jp-border-color3);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ov-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--jp-layout-color2);
  color: var(--jp-ui-font-color2);
  border-right: 1px solid var(--jp-border-color2);
}

.ov-table tbody tr:hover td {
  background: rgba(59, 130, 246, 0.08);
}

.ov-table tbody tr:hover td:first-child {
  background: rgba(59, 130, 246, 0.12);
}

.ov-table-footer {
  padding: 5px 8px;
  border-top: 1px solid var(--jp-border-color2);
  background: var(--jp-layout-color2);
}

.ov-dtype-badge {
  display: inline-block;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.7;
  border: 1px solid transparent;
}

.ov-dtype-int {
  background: var(--ov-dtype-int-bg);
  color: var(--ov-dtype-int-fg);
  border-color: var(--ov-dtype-int-border);
}

.ov-dtype-float {
  background: var(--ov-dtype-float-bg);
  color: var(--ov-dtype-float-fg);
  border-color: var(--ov-dtype-float-border);
}

.ov-dtype-object {
  background: var(--ov-dtype-object-bg);
  color: var(--ov-dtype-object-fg);
  border-color: var(--ov-dtype-object-border);
}

.ov-dtype-bool {
  background: var(--ov-dtype-bool-bg);
  color: var(--ov-dtype-bool-fg);
  border-color: var(--ov-dtype-bool-border);
}

.ov-dtype-datetime {
  background: var(--ov-dtype-datetime-bg);
  color: var(--ov-dtype-datetime-fg);
  border-color: var(--ov-dtype-datetime-border);
}

.ov-dtype-category {
  background: var(--ov-dtype-category-bg);
  color: var(--ov-dtype-category-fg);
  border-color: var(--ov-dtype-category-border);
}

.ov-dtype-other {
  background: var(--ov-dtype-other-bg);
  color: var(--ov-dtype-other-fg);
  border-color: var(--ov-dtype-other-border);
}

.ov-adata-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ov-adata-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ov-adata-row-label {
  min-width: 48px;
  flex-shrink: 0;
  padding-top: 2px;
  color: var(--ov-row-label);
  font-weight: 600;
  font-size: 10.5px;
  font-family: var(--jp-code-font-family);
}

.ov-adata-row-values {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
  line-height: 1.6;
}

.ov-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ov-action-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ov-action-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ov-actions-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--jp-ui-font-color2);
}

.ov-action-btn,
.ov-inspector-button {
  border: 1px solid var(--jp-border-color2);
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 11px;
}

.ov-action-btn--compact {
  padding: 2px 8px;
  font-size: 10.5px;
}

.ov-preview-host {
  min-height: 0;
  display: none;
  margin-top: 2px;
}

.ov-preview-host.has-content {
  display: block;
}

.ov-plot-panel {
  gap: 8px;
}

.ov-plot-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ov-plot-stats,
.ov-legend-panel {
  border: 1px solid var(--jp-border-color2);
  border-radius: 10px;
  background: var(--jp-layout-color1);
  padding: 10px;
}

.ov-plot-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.ov-plot-stat {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  padding: 2px 0;
}

.ov-plot-stat-label {
  color: var(--jp-ui-font-color2);
}

.ov-plot-stat-value {
  font-family: var(--jp-code-font-family);
  color: var(--jp-ui-font-color1);
}

.ov-legend-title {
  margin-bottom: 0;
  margin-right: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--jp-ui-font-color1);
}

.ov-legend-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.ov-legend-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ov-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--jp-border-color2);
  background: var(--jp-layout-color0);
  font-size: 10.5px;
  line-height: 1.7;
  white-space: nowrap;
  color: var(--jp-ui-font-color1);
  cursor: pointer;
  transition: opacity 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.ov-legend-chip:hover {
  border-color: #2563eb;
}

.ov-legend-chip.is-selected {
  border-color: #2563eb;
  background: var(--ov-selected-bg);
}

.ov-legend-chip.is-dimmed {
  opacity: 0.32;
}

.ov-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  flex-shrink: 0;
}

.ov-legend-colorbar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 260px;
  min-width: 220px;
}

.ov-legend-colorbar-bar {
  flex: 1;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(90deg, #440154 0%, #414487 20%, #2a788e 40%, #22a884 60%, #7ad151 80%, #fde725 100%);
}

.ov-legend-colorbar-val {
  min-width: 44px;
  font-size: 10px;
  color: var(--jp-ui-font-color2);
  font-family: var(--jp-code-font-family);
}

.ov-subactions {
  display: none;
  align-items: center;
}

.ov-subactions.has-content {
  display: flex;
}

.ov-embedding-host {
  min-height: 320px;
  border: 1px solid var(--jp-border-color2);
  border-radius: 8px;
  overflow: hidden;
  background: var(--jp-layout-color1);
}

.ov-embedding-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 2px 0 0;
  font-size: 11px;
  color: var(--jp-ui-font-color2);
}

.ov-embedding-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ov-embedding-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.ov-action-btn.is-active,
.ov-adata-chip.is-active {
  background: var(--ov-active-bg);
  border-color: var(--ov-active-border);
  color: var(--ov-active-fg);
}

.ov-pre {
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--jp-border-color2);
  background: var(--jp-layout-color1);
  font-family: var(--jp-code-font-family);
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
}

.ov-error-card {
  border-left: 4px solid var(--jp-error-color1);
}

.ov-error-summary {
  margin-top: 8px;
  color: var(--jp-ui-font-color1);
  font-size: 12px;
}

.ov-error-friendly {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(59, 130, 246, 0.08);
}

.ov-error-details {
  border: 1px solid var(--jp-border-color2);
  border-radius: 6px;
  background: var(--jp-layout-color1);
}

.ov-error-details > summary {
  cursor: pointer;
  padding: 7px 10px;
  font-size: 11px;
  color: var(--jp-ui-font-color2);
}

.ov-error-details[open] > summary {
  border-bottom: 1px solid var(--jp-border-color2);
}

.ov-inspector-root,
.ov-inspector-shell {
  height: 100%;
}

.ov-inspector-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--jp-layout-color0);
}

.ov-inspector-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.ov-inspector-label {
  font-weight: 600;
}

.ov-inspector-input {
  min-width: 0;
  border: 1px solid var(--jp-border-color2);
  border-radius: 6px;
  padding: 6px 9px;
  background: var(--jp-layout-color1);
  color: var(--jp-ui-font-color1);
  font-family: var(--jp-code-font-family);
}

.ov-inspector-status[data-state="error"] {
  color: var(--jp-error-color1);
}

.ov-inspector-output {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
