.theme-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.theme-toggle .toggle-buttons {
  display: inline-flex;
  border: 1px solid var(--header-underline-border);
  border-radius: 8px;
  cursor: pointer;
}

.theme-toggle .toggle-buttons input {
  display: none;
}

.theme-toggle .toggle-buttons .option {
  flex: 1;
  padding: 8px 15px;
  text-align: center;
  color: var(--nav-button-text);
  white-space: nowrap;
}

.theme-toggle .toggle-buttons .option:hover {
  background-color: var(--nav-button-active-background);
  color: var(--nav-button-active-text);
}

.theme-toggle .toggle-buttons .option.light {
  border-inline-end: 1px solid var(--header-underline-border);
  border-start-start-radius: 8px;
  border-end-start-radius: 8px;
}

.theme-toggle .toggle-buttons .option.dark {
  border-start-end-radius: 8px;
  border-end-end-radius: 8px;
}

.theme-toggle .toggle-buttons input:not(:checked) ~ .option.light,
.theme-toggle .toggle-buttons input:checked ~ .option.dark {
  background-color: var(--nav-button-active-background);
  color: var(--nav-button-active-text);
}
