/* Minimal Tola theme overrides for Scalar Docs. */

:root {
  --scalar-font: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --scalar-font-code: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
}

.light-mode {
  --scalar-color-1: #172033;
  --scalar-color-2: #4d5a73;
  --scalar-color-3: #7f8ca5;
  --scalar-color-accent: #f5b400;
  --scalar-background-1: #ffffff;
  --scalar-background-2: #ffffff;
  --scalar-background-3: #ffffff;
  --scalar-background-accent: rgba(245, 180, 0, 0.12);
  --scalar-border-color: rgba(17, 28, 55, 0.1);
}

.light-mode .sidebar {
  --scalar-sidebar-background-1: #10245c;
  --scalar-sidebar-item-hover-background: rgba(255, 255, 255, 0.08);
  --scalar-sidebar-item-active-background: rgba(39, 96, 222, 0.42);
  --scalar-sidebar-border-color: rgba(255, 255, 255, 0.12);
  --scalar-sidebar-color-1: rgba(255, 255, 255, 0.96);
  --scalar-sidebar-color-2: rgba(255, 255, 255, 0.72);
  --scalar-sidebar-color-active: #ffffff;
  --scalar-sidebar-search-background: rgba(255, 255, 255, 0.08);
  --scalar-sidebar-search-border-color: rgba(255, 255, 255, 0.14);
  --scalar-sidebar-search-color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #17327e 0%, #0e1f54 100%);
}

.light-mode .sidebar a:hover,
.light-mode .sidebar button:hover {
  color: #f5b400 !important;
}

.light-mode .sidebar img {
  max-height: 40px;
}

.light-mode .sidebar a[aria-current="page"],
.light-mode .sidebar button[aria-current="page"],
.light-mode .sidebar [data-active="true"],
.light-mode .sidebar .active-page,
.light-mode .sidebar .active {
  background:
    linear-gradient(90deg, rgba(70, 126, 244, 0.42), rgba(32, 84, 196, 0.52)) !important;
  color: #ffffff !important;
  box-shadow: inset 3px 0 0 #f5b400;
}

.light-mode .sidebar a:has(> img) {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.light-mode .sidebar a:has(> img)::after {
  content: "API Documentation";
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-left: 0.7rem;
  text-transform: uppercase;
}

.light-mode .flow-tabs {
  margin: 1.4rem 0 1.8rem;
  width: 100%;
}

.light-mode .flow-tabs input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.light-mode .flow-tab-list {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(17, 28, 55, 0.08);
  padding-bottom: 0.2rem;
}

.light-mode .flow-tab-list label {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 12px 12px 0 0;
  color: #687691;
  cursor: pointer;
  font-weight: 700;
  transition: color 160ms ease, background-color 160ms ease;
}

.light-mode #charge-flow-pin:checked ~ .flow-tab-list label[for="charge-flow-pin"],
.light-mode #charge-flow-web:checked ~ .flow-tab-list label[for="charge-flow-web"] {
  color: #10245c;
  background: linear-gradient(180deg, rgba(245, 180, 0, 0.1), rgba(255, 255, 255, 0));
  box-shadow: inset 0 -3px 0 #f5b400;
}

.light-mode .flow-panels {
  position: relative;
  border: 1px solid rgba(17, 28, 55, 0.08);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.52);
}

.light-mode .flow-panel {
  position: absolute;
  inset: 1rem 1.1rem;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.light-mode #charge-flow-pin:checked ~ .flow-panels .flow-panel-pin,
.light-mode #charge-flow-web:checked ~ .flow-panels .flow-panel-web {
  position: relative;
  inset: auto;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.light-mode .flow-panel h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.6rem;
}

.light-mode main.content img[src$=".svg"] {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1rem 0 1.25rem;
  padding: 0.85rem;
  border: 1px solid rgba(17, 28, 55, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(16, 36, 92, 0.08);
}

.page-mdx-layout .page-node {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.page-mdx-layout .page-mdx__content {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.light-mode .diagram-placeholder {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(15, 87, 214, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(15, 87, 214, 0.06), rgba(245, 180, 0, 0.08)),
    rgba(255, 255, 255, 0.82);
  color: #1f335a;
}

.light-mode .diagram-placeholder strong {
  display: inline-block;
  margin-right: 0.35rem;
  color: #0d3c9f;
}
