html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem var(--bs-body-bg), 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
/* ---------- Main navigation tabs (_Layout.cshtml, _LoginPartial.cshtml) ---------- */

/* The header's bottom border is the tabs' baseline, so it runs the full page width. The active tab overlaps it by
   a pixel (Bootstrap's nav-tabs margin) and takes the page background, joining the content below. */
.app-header {
  padding-top: 0.5rem;
}

.app-tabs {
  row-gap: 0.25rem;
}

.app-tabs .nav-link {
  white-space: nowrap;
}

.app-tabs .bi {
  font-size: 1.1rem;
  vertical-align: -0.125em;
}

/* Icons only: each tab's name shows as its tooltip (title) and stays readable by screen readers
   (the same technique as Bootstrap's .visually-hidden). */
.app-tab-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-tabs .nav-link {
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

/* ---------- Searchable dropdowns (Tom Select, see the combobox setup in site.js) ---------- */

/* Tom Select's Bootstrap 5 theme hard-codes a few light-mode colors; use Bootstrap's variables so the dropdown
   follows the light/dark theme. */
.ts-control,
.ts-control input,
.ts-dropdown {
  color: var(--bs-body-color);
}

.ts-dropdown,
.ts-dropdown .spinner:after {
  border-color: var(--bs-border-color);
}

.ts-dropdown .optgroup-header {
  color: var(--bs-secondary-color);
  font-weight: 600;
}

.plugin-dropdown_input .dropdown-input {
  border-color: var(--bs-border-color);
  color: var(--bs-body-color);
}

.plugin-dropdown_input .dropdown-input::placeholder {
  color: var(--bs-secondary-color);
}

/* ---------- Rendered Markdown (Documentation Content, see Services/MarkdownRenderer.cs) ---------- */

.markdown-body > :last-child {
  margin-bottom: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  font-size: 1.25rem;
  margin-top: 1rem;
}

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child {
  margin-top: 0;
}

.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-size: 1rem;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
}

.markdown-body blockquote {
  border-left: 0.25rem solid var(--bs-border-color);
  color: var(--bs-secondary-color);
  padding-left: 0.75rem;
}

.markdown-body pre {
  background: var(--bs-tertiary-bg);
  border-radius: var(--bs-border-radius);
  padding: 0.5rem 0.75rem;
}

.markdown-body .task-list-item {
  list-style: none;
}

.markdown-body .task-list-item input {
  margin-right: 0.35rem;
}

.markdown-body .table {
  margin-bottom: 1rem;
}
