/* IP-restricted debugger output (the "Debugger" $_SESSION/$CFG dump printed by
   the various if($debugger){...} blocks — 13 near-identical copies across
   index.php, cart.php, admin/*.php, user.php). It's a bare print_r() with no
   line breaks of its own, so long array values (URLs, tokens, nested arrays)
   render as single unbroken lines wide enough to force horizontal scroll on
   the ENTIRE page on mobile, not just this element. .padd is only ever used on
   this debugger paragraph (grepped — nothing else uses it), so it's safe to
   target directly here instead of touching all 13 PHP files individually. */
.padd {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

/* Admin sidebar nav (templates/admin/navigation.php). Grouping the links under
   section headings (Content/Fundraising/People/Site) pushed the full Super-level
   list past the fold at 1920x1080 — Bootstrap's gap-1 (.25rem) between every
   item, py-1 padding per link, and mt-3 (1rem) above each heading added up fast
   across ~20 links + 4 headings. Tightened here instead of per-item inline
   styles so it stays one place to tune. */
.admin-nav-links {
  gap: .125rem;
}

.admin-nav-links .nav-link {
  padding-top: .2rem;
  padding-bottom: .2rem;
  /* Bootstrap's .nav-link default left/right padding (1rem) sat well past the
     heading's px-1 (.25rem), so every link looked indented under its section
     header instead of flush with it. Matching the heading's own horizontal
     padding lines the two up. */
  padding-left: .25rem;
  padding-right: .25rem;
  line-height: 1.25;
  border-radius: .3rem;
  transition: background-color .1s ease-in-out;
}

/* Bootstrap's .nav-pills .nav-link only changes text color on :hover by
   default (a background only ever shows up for .active, which this nav never
   sets) — so nothing visually tracked where you were about to click. A subtle
   themed tint on hover fixes that without needing to also implement "current
   page" highlighting. */
.admin-nav-links .nav-link:hover,
.admin-nav-links .nav-link:focus {
  background-color: rgba(var(--bs-primary-rgb), .1);
}

.admin-nav-links .admin-nav-heading {
  margin-top: .5rem;
  margin-bottom: .1rem;
  letter-spacing: .04em;
  /* Bootstrap's text-muted (--bs-secondary-color) reads too close in weight to
     the links themselves to tell headings apart at a glance — a lighter gray
     from Bootstrap's own scale sets them apart without a hardcoded color.
     !important is required: the heading also carries Bootstrap's own
     text-muted utility class, which sets color with !important itself. */
  color: var(--bs-gray-500, #adb5bd) !important;
}

.admin-nav-links .admin-nav-heading:first-child {
  margin-top: 0;
}

/* Collapsible sections (lib/admin_nav.php): the section heading is a toggle,
   styled mostly with Bootstrap classes in the markup (soft tint, rounded). */
.admin-nav-links .admin-nav-toggle {
  padding: .3rem .5rem;
  color: var(--bs-body-color);
}

.admin-nav-links .admin-nav-toggle:hover,
.admin-nav-links .admin-nav-toggle:focus-visible {
  background-color: rgba(var(--bs-primary-rgb), .1) !important;
}

.admin-nav-links .admin-nav-caret {
  opacity: .6;
  transition: transform .15s ease-in-out;
}

.admin-nav-links .admin-nav-toggle.collapsed .admin-nav-caret {
  transform: rotate(-90deg);
}

.admin-nav-links .admin-nav-group {
  display: flex;
  flex-direction: column;
  gap: .125rem;
  padding-left: .5rem;
}

/* The current page's link. */
.admin-nav-links .nav-link[aria-current="page"] {
  background-color: rgba(var(--bs-primary-rgb), .12);
  font-weight: 600;
}

.aspect-ratio-21x9 {
  aspect-ratio: 21/9;
}

.aspect-ratio-16x9 {
  aspect-ratio: 16/9;
}

.aspect-ratio-1x1 {
  aspect-ratio: 1/1;
}

.swiper-vertical {
  max-height: 100vh;
}

.swiper-nav-standalone .swiper-button-prev, .swiper-nav-standalone .swiper-button-next {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  width: auto;
  height: auto;
  margin: 0;
}

.swiper-nav-standalone .swiper-button-prev:after, .swiper-nav-standalone .swiper-button-next:after {
  content: "";
}

.swiper-nav-custom .swiper-button-prev:after, .swiper-nav-custom .swiper-button-next:after {
  content: "";
}

/* Givefuly [slider] shortcode: carousel items may contain arbitrary Redactor HTML */
.givefuly-carousel .carousel-item .givefuly-carousel-slide-body {
  min-height: 12rem;
}
.givefuly-carousel .carousel-item .givefuly-carousel-slide-body img {
  width: 100%;
  height: auto;
  display: block;
}

/* Span full inner width of <main class="container ..."> (matches default site_shell + px-md-4) */
main.container .givefuly-carousel-bleed,
main.container-sm .givefuly-carousel-bleed,
main.container-md .givefuly-carousel-bleed,
main.container-lg .givefuly-carousel-bleed,
main.container-xl .givefuly-carousel-bleed,
main.container-xxl .givefuly-carousel-bleed {
  max-width: none;
  width: calc(100% + var(--bs-gutter-x, 1.5rem));
  margin-left: calc(-0.5 * var(--bs-gutter-x, 1.5rem));
  margin-right: calc(-0.5 * var(--bs-gutter-x, 1.5rem));
}

@media (min-width: 768px) {

  main.container.px-md-4 .givefuly-carousel-bleed {
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
    margin-right: -1.5rem;
  }

  main.container.px-md-5 .givefuly-carousel-bleed {
    width: calc(100% + 6rem);
    margin-left: -3rem;
    margin-right: -3rem;
  }
}

main.container-fluid .givefuly-carousel-bleed {
  width: calc(100% + var(--bs-gutter-x, 1.5rem));
  margin-left: calc(-0.5 * var(--bs-gutter-x, 1.5rem));
  margin-right: calc(-0.5 * var(--bs-gutter-x, 1.5rem));
}

.givefuly-carousel-bleed .givefuly-carousel,
.givefuly-carousel-bleed .carousel-inner,
.givefuly-carousel-bleed .carousel-item {
  width: 100%;
  max-width: none;
}
