/* Rescales every Bootstrap rem-based measurement (font sizes, spacing, component
   sizing) proportionally — Bootstrap's own CSS was compiled assuming a 16px root. */
html {
    font-size: 14px;
}

/* Bootstrap's spacer scale stops at 5 (3rem) — extends it one step further, following
   the same naming convention, for the main content area's bottom padding. */
.pb-6 {
    padding-bottom: 9rem !important;
}

/* Trims the extra space line-height reserves above capital letters and below the
   baseline — tightens vertical centering for short bits of text like a badge. */
.text-box-trim {
    text-box: trim-both cap alphabetic;
}

/* Classic table trick: width: 1% makes the browser's table layout treat a column as
   needing minimal space, so it shrinks to fit its content instead of stretching. */
.w-min {
    width: 1%;
    white-space: nowrap;
}

/* Chip look for a copyable value (see copy-code.js) — border and subtle background make
   it clear what's being copied. Bootstrap's own custom properties, not hardcoded colors,
   so it stays correct across light/dark mode without a media query of its own. */
code[data-copy-value] {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.1rem 0.4rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-sm);
    background-color: var(--bs-tertiary-bg);
}

/* Recolors "primary" to black. Bootstrap's compiled CSS bakes its theme colors into hex
   literals per component instead of reading --bs-primary everywhere, so a single variable
   override doesn't reach .btn-primary, checked checkboxes or the focus ring — each has to
   be overridden directly. .nav-pills is the one exception already backed by a variable. */
.btn-primary {
    --bs-btn-bg: #000;
    --bs-btn-border-color: #000;
    --bs-btn-hover-bg: #1a1a1a;
    --bs-btn-hover-border-color: #1a1a1a;
    --bs-btn-active-bg: #333;
    --bs-btn-active-border-color: #333;
    --bs-btn-disabled-bg: #000;
    --bs-btn-disabled-border-color: #000;
    --bs-btn-focus-shadow-rgb: 51, 51, 51;
}

.nav-pills {
    --bs-nav-pills-link-active-bg: #000;
}

.form-check-input:checked {
    background-color: #000;
    border-color: #000;
}

.form-control:focus,
.form-select:focus {
    border-color: #666;
    box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.25);
}

/* Darker page background for dark mode than Bootstrap's own default (#212529) — applies
   wherever data-bs-theme="dark" lands, whether the page-wide toggle or a locally forced
   scope (sidebar, login screen). Border color darkened to match — Bootstrap's own dark
   default (#495057) reads too light against this darker background (table borders,
   notably, since --bs-table-border-color is wired to --bs-border-color). */
[data-bs-theme="dark"] {
    --bs-body-bg: #141415;
    --bs-body-bg-rgb: 20, 20, 21;
    --bs-border-color: #232425;
}

/* A wide table (e.g. redirect URIs collection, many columns) inside a card would otherwise
   push past the card's own border instead of scrolling within it. */
.card {
    overflow-x: auto;
}
