/* StatLLM Dual-Theme Academic Styles */

/* Navigation tabs active state */
.nav-tab.active {
  background-color: #f1f5f9;
  color: #0284c7;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

html.dark .nav-tab.active {
  background-color: rgb(15 23 42);
  color: rgb(56 189 248);
  border: 1px solid rgb(12 74 110);
  box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.1), 0 2px 4px -2px rgba(2, 132, 199, 0.1);
}

/* Submission row transition */
.submission-row {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.submission-row:hover {
  border-color: #94a3b8;
}

html.dark .submission-row:hover {
  border-color: #475569;
}

/* Range input custom styling with robust cross-browser tracks */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #cbd5e1;
  border-radius: 9999px;
  outline: none;
  cursor: pointer;
  margin: 8px 0;
}

html.dark input[type=range] {
  background: #334155;
}

/* WebKit Track */
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: #cbd5e1;
  border-radius: 9999px;
  cursor: pointer;
  border: none;
}

html.dark input[type=range]::-webkit-slider-runnable-track {
  background: #334155;
}

/* WebKit Thumb */
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px; /* vertically center thumb on 6px track */
  border-radius: 50%;
  background: #0284c7;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

html.dark input[type=range]::-webkit-slider-thumb {
  background: #38bdf8;
  border: 2px solid #0f172a;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Firefox Track */
input[type=range]::-moz-range-track {
  width: 100%;
  height: 6px;
  background: #cbd5e1;
  border-radius: 9999px;
  cursor: pointer;
  border: none;
}

html.dark input[type=range]::-moz-range-track {
  background: #334155;
}

/* Firefox Thumb */
input[type=range]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0284c7;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

html.dark input[type=range]::-moz-range-thumb {
  background: #38bdf8;
  border: 2px solid #0f172a;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

input[type=range]::-moz-range-thumb:hover {
  transform: scale(1.2);
}

/* KaTeX formula display readability */
.katex-display {
  margin: 0.6em 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.25em 0;
}

.katex {
  font-size: 1.05em;
  color: #1e293b;
}

html.dark .katex {
  color: #e2e8f0;
}

.math-rate-badge .katex {
  color: inherit !important;
  font-size: 1.05em;
}

/* Custom crisp scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

html.dark ::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}
