/* HeidiWeb Database Manager - Compiled Styles & Desktop-Grade Dense UI */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-panel: #0b1120;
  --border-color: #334155;
  --text-primary: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #10b981;
}

html.light {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-panel: #f1f5f9;
  --border-color: #cbd5e1;
  --text-primary: #0f172a;
  --text-muted: #475569;
}

html.light body {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

html.light .bg-slate-950,
html.light .bg-slate-900,
html.light .bg-slate-900\/90,
html.light .bg-slate-900\/80,
html.light .bg-slate-900\/60 {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

html.light .bg-slate-800,
html.light .bg-slate-800\/60,
html.light .bg-slate-800\/50 {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
}

html.light .border-slate-800,
html.light .border-slate-700,
html.light .border-slate-700\/80 {
  border-color: #cbd5e1 !important;
}

html.light .text-slate-100,
html.light .text-slate-200,
html.light .text-slate-300 {
  color: #1e293b !important;
}

html.light .text-slate-400 {
  color: #475569 !important;
}

/* Custom Desktop Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.7);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.9);
}

/* HeidiSQL Dense Data Grid Table */
.heidi-grid-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.heidi-grid-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #0f172a;
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  border-bottom: 1px solid #334155;
  border-right: 1px solid #1e293b;
  padding: 0.375rem 0.625rem;
  text-align: left;
  user-select: none;
  white-space: nowrap;
}
.heidi-grid-table td {
  border-bottom: 1px solid rgba(30, 41, 59, 0.85);
  border-right: 1px solid rgba(30, 41, 59, 0.65);
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: nowrap;
  max-width: 22rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.heidi-grid-table tr:hover td {
  background-color: rgba(16, 185, 129, 0.08);
}
.heidi-grid-table tr.selected-row td {
  background-color: rgba(16, 185, 129, 0.18) !important;
}

/* HTMX Loading Indicator */
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-flex;
}

/* Resizable Splitters */
.splitter-v {
  width: 4px;
  cursor: col-resize;
  transition: background-color 0.15s ease;
}
.splitter-v:hover,
.splitter-v.dragging {
  background-color: #10b981;
}
.splitter-h {
  height: 4px;
  cursor: row-resize;
  transition: background-color 0.15s ease;
}
.splitter-h:hover,
.splitter-h.dragging {
  background-color: #10b981;
}

/* SQL & JSON Code Editor Styling */
.sql-editor-area {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  tab-size: 2;
  line-height: 1.5;
}

/* Mobile-First & Touch Optimizations */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.touch-scroll {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Prevent unwanted mobile text selection during drag/swipe */
.tap-highlight-transparent {
  -webkit-tap-highlight-color: transparent;
}

/* Mobile Modal Bottom Sheet Transition */
@media (max-width: 639px) {
  .mobile-bottom-sheet {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    max-height: 94vh !important;
    width: 100% !important;
  }
}

