/* Custom styles for DataTables to blend better with Tailwind and support dark mode */
.dataTables_wrapper {
  font-family: "Inter", sans-serif;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  padding: 1rem 0;
  color: #475569;
  /* slate-600 */
}

html.dark .dataTables_wrapper .dataTables_length,
html.dark .dataTables_wrapper .dataTables_filter,
html.dark .dataTables_wrapper .dataTables_info,
html.dark .dataTables_wrapper .dataTables_paginate {
  color: #94a3b8;
  /* slate-400 */
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid #d1d5db;
  /* gray-300 */
  background-color: white;
  padding: 0.5rem;
  border-radius: 0.375rem;
  margin-left: 0.5rem;
}

html.dark .dataTables_wrapper .dataTables_filter input,
html.dark .dataTables_wrapper .dataTables_length select {
  border-color: #475569;
  /* slate-600 */
  background-color: #1e293b;
  /* slate-800 */
  color: #e2e8f0;
  /* slate-200 */
}

.dataTables_wrapper .paginate_button {
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  /* gray-300 */
  cursor: pointer;
}

html.dark .dataTables_wrapper .paginate_button {
  border-color: #475569;
  /* slate-600 */
}

.dataTables_wrapper .paginate_button.current,
.dataTables_wrapper .paginate_button:hover {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

table.dataTable thead th {
  background-color: #f3f4f6;
  /* gray-100 */
}

html.dark table.dataTable thead th {
  background-color: #334155;
  /* slate-700 */
}

table.dataTable.no-footer {
  border-bottom: 1px solid #e5e7eb;
  /* gray-200 */
}

html.dark table.dataTable.no-footer {
  border-bottom-color: #475569;
  /* slate-600 */
}

/* Custom slider styles */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #e5e7eb; /* gray-200 */
  border-radius: 3px;
  outline: none;
  transition: background 0.3s;
}

html.dark input[type="range"] {
  background: #4b5563; /* gray-600 */
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #3b82f6; /* blue-600 */
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

html.dark input[type="range"]::-webkit-slider-thumb {
  border-color: #1f2937; /* dark:gray-800 */
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

html.dark input[type="range"]::-moz-range-thumb {
  border-color: #1f2937;
}

/* For code blocks */
code {
  font-family: "Courier New", Courier, monospace;
  background-color: #f1f5f9;
  /* neutral-100 */
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  border-radius: 3px;
}

html.dark code {
  background-color: #1e293b;
  /* neutral-800 */
  color: #e2e8f0;
  /* neutral-200 */
}

pre > code {
  display: block;
  padding: 1rem;
  white-space: pre-wrap;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
}

.scenario-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  /* gray-300 */
  background-color: white;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

html.dark .scenario-btn {
  background-color: #374151;
  /* gray-700 */
  border-color: #4b5563;
  /* gray-600 */
}

.scenario-btn.active-scenario,
.scenario-btn:hover,
html.dark .scenario-btn.active-scenario {
  background-color: #3b82f6;
  /* blue-600 */
  color: white;
  border-color: #3b82f6;
}
.mc-btn {
  flex-grow: 1;
  text-align: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  color: #4b5563; /* text-gray-600 */
}
.dark .mc-btn {
  color: #d1d5db; /* dark:text-gray-300 */
}
.mc-btn.active-mc-btn {
  background-color: white;
  color: #2563eb; /* text-primary-600 */
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border-color: #d1d5db;
}
.dark .mc-btn.active-mc-btn {
  background-color: #374151; /* dark:bg-gray-700 */
  color: #eff6ff; /* dark:text-gray-50 */
  border-color: #4b5563;
}
.mc-input-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}
.dark .mc-input-group label {
  color: #d1d5db;
}
.mc-input-group .dist-label {
  font-size: 0.75rem;
  font-weight: 400;
  color: #6b7280;
  background-color: #f3f4f6;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}
.dark .mc-input-group .dist-label {
  color: #9ca3af;
  background-color: #374151;
}
.mc-input-group .input-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 0.5rem;
}
.mc-input-group input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: #fff;
}
.dark .mc-input-group input {
  border-color: #4b5563;
  background-color: #374151;
}
.mc-chart-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563; /* Corresponds to text-neutral-600 */
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
}

.dark .mc-chart-btn {
    color: #d1d5db; /* Corresponds to dark:text-neutral-300 */
}

.mc-chart-btn.active-mc-chart-btn {
    background-color: white;
    color: #2563eb; /* Corresponds to text-primary-600 */
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.dark .mc-chart-btn.active-mc-chart-btn {
    background-color: #0f172a; /* Corresponds to dark:bg-slate-900 */
    color: #38bdf8; /* Corresponds to dark:text-cyan-400 */
}
/* Add this CSS for the toggle button styling */
.fm-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  border: 2px solid transparent;
  color: #4b5563; /* text-gray-600 */
}
.dark .fm-btn {
  color: #d1d5db; /* dark:text-gray-300 */
}
.fm-btn.active-fm-btn {
  background-color: white;
  color: #2563eb; /* text-primary-600 */
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border: 2px solid #3b82f6; /* border-primary-500 */
}
.dark .fm-btn.active-fm-btn {
  background-color: #1f2937; /* dark:bg-gray-800 */
  color: #60a5fa; /* dark:text-primary-400 */
  border: 2px solid #60a5fa; /* dark:border-primary-400 */
}
