/* Small tweaks on top of Tabler (tabler.min.css). Keep this file short: use Tabler's components. */

/* Keyboard focus is always visible, also on links and nav items, where Tabler only shows a ring
   on form controls and buttons. */
a:focus-visible,
.nav-link:focus-visible,
.navbar-brand:focus-visible {
  outline: 2px solid var(--tblr-primary);
  outline-offset: 2px;
  border-radius: var(--tblr-border-radius);
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1100;
}

/* The QR code stays dark-on-white and large enough to scan from a phone. */
.totp-qr-code {
  width: 220px;
  max-width: 100%;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
}
.totp-qr-code svg {
  display: block;
  width: 100%;
  height: auto;
}

/* One-time secrets and keys: long, monospace, never cut off. */
code.secret,
code.totp-secret {
  font-size: 1.05em;
  padding: 0.3rem 0.5rem;
  border: 1px dashed var(--tblr-border-color);
  overflow-wrap: anywhere;
}
code.secret {
  display: inline-block;
  user-select: all;
}

.recovery-codes {
  columns: 2;
  font-size: 1.1em;
}

.mw-confirm {
  max-width: 36rem;
}

/* A `<legend>` used as a card header: keep Bootstrap's float layout, use the header's spacing. */
legend.card-header {
  margin-bottom: 0;
  font-size: inherit;
  line-height: inherit;
}

/* Keep visually hidden table headers inside the scroll box, so narrow screens never scroll sideways. */
.table-responsive {
  position: relative;
}

/* WCAG AA contrast: alert text in a darker shade of its colour (Tabler uses the plain colour, which
   is too light on the tinted background). The same mix Tabler uses for its *-text-emphasis colours. */
.alert {
  --tblr-alert-color: color-mix(in oklab, var(--tblr-black) 60%, var(--tblr-alert-variant-color));
}
.alert-description {
  color: inherit;
}
