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 white, 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;
}

/* Custom church theme (architecture/ARCHITECTURE.md Technology Baseline: "Bootstrap 5 + custom
   church theme"). Retheme via Bootstrap 5.3's per-component CSS custom properties rather than
   recompiling Bootstrap's Sass — no new build tooling/package required. Colors below are chosen
   to keep white-on-primary and primary-on-white text at or above WCAG AA's 4.5:1 contrast ratio. */
:root {
  --bs-primary: #1f3a5c;
  --bs-primary-rgb: 31, 58, 92;
  --bs-link-color: #1f3a5c;
  --bs-link-color-rgb: 31, 58, 92;
  --bs-link-hover-color: #14263b;
  --bs-link-hover-color-rgb: 20, 38, 59;
}

.btn-primary {
  --bs-btn-bg: #1f3a5c;
  --bs-btn-border-color: #1f3a5c;
  --bs-btn-hover-bg: #14263b;
  --bs-btn-hover-border-color: #14263b;
  --bs-btn-active-bg: #0e1b29;
  --bs-btn-active-border-color: #0e1b29;
  --bs-btn-disabled-bg: #1f3a5c;
  --bs-btn-disabled-border-color: #1f3a5c;
}

/* Accessibility baseline (NFR-A11Y-001): a visible skip link as the first focusable element,
   layered on top of Bootstrap's .visually-hidden-focusable utility. */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1080;
}

.skip-link:focus {
  padding: 0.5rem 1rem;
  background-color: var(--bs-primary);
  color: #fff;
  text-decoration: none;
}

/* NFR-RESP-001 ("mobile friendly"): a real church name can be long ("Our Lady of Perpetual Help
   Roman Catholic Church"). Flex items default to min-width:auto, which stops the browser from
   shrinking/wrapping text below its unwrapped intrinsic width — that let a long .navbar-brand
   push past the viewport instead of wrapping, overflowing every page horizontally on mobile.
   min-width:0 is the standard fix: it lets the flex item actually shrink so the text wraps. */
.navbar-brand {
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  text-align: center;
}

.navbar-logo {
  height: 40px;
  width: auto;
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* Footer developer credit logo -- smaller than the header logo since it's a secondary
   attribution mark, not primary branding. Text color comes from the footer's own
   text-body-secondary class, so no extra color rule is needed here. */
.footer-credit-logo {
  height: 48px;
  width: auto;
  vertical-align: middle;
}

/* The KW mark fills its viewBox edge to edge, while the FourFox mark carries
   internal padding, so the same height reads larger. */
.footer-credit-logo-kw {
  height: 34px;
}

/* Bootstrap's .visually-hidden is position:absolute. Inside a .table-responsive scroller its
   containing block is otherwise the page, so it escapes the scroller's clipping and widens the whole
   page on phones (found by the SMS admin mobile browser test: a hidden "Actions" header pushed
   /admin/sms-prayer/members to 505px at a 375px viewport). Making the scroller the positioned
   ancestor keeps such elements inside it. */
.table-responsive {
  position: relative;
}
