button.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  line-height: 1;
}

button.theme-toggle:focus-visible {
  outline: 2px solid var(--tblr-primary);
  outline-offset: 2px;
}

/*
 * Appointment and meeting lists paint status rows with light fills.
 * Dark mode would otherwise inherit light text onto those fills.
 */
[data-bs-theme="dark"] tr.open td,
[data-bs-theme="dark"] tr.confirmed td,
[data-bs-theme="dark"] tr.archived td,
[data-bs-theme="dark"] tr.completed td,
[data-bs-theme="dark"] tr.heading td,
[data-bs-theme="dark"] tr.postponed td,
[data-bs-theme="dark"] tr.linked td,
[data-bs-theme="dark"] tr.file-archived td,
[data-bs-theme="dark"] tr.tomorrow td,
[data-bs-theme="dark"] tr.locked td,
[data-bs-theme="dark"] .status-chip {
  color: #182433;
}

[data-bs-theme="dark"] .legend {
  border-color: #4b5563;
}

@media print {
  html[data-bs-theme="dark"] {
    color-scheme: light;
    --tblr-body-color: #111827;
    --tblr-body-color-rgb: 17, 24, 39;
    --tblr-body-bg: #ffffff;
    --tblr-body-bg-rgb: 255, 255, 255;
    --tblr-emphasis-color: #000000;
    --tblr-secondary: #4b5563;
    --tblr-secondary-color: rgba(17, 24, 39, 0.75);
    --tblr-muted: #4b5563;
    --tblr-bg-surface: #ffffff;
    --tblr-bg-forms: #ffffff;
    --tblr-border-color: #e5e7eb;
    --tblr-table-color: #111827;
    --tblr-table-bg: transparent;
    --tblr-table-border-color: #e5e7eb;
  }
}
