/*
 * Noibu A/B test "Donation chip-in bar" (test 806).
 * The bar exists only for the chip-in arm (js/modules/chip-in-bar.js adds
 * it and html.nb-test-chip-in). Control pages carry no markup this file
 * styles. Phones only.
 */

.ctf-chip-in-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* Under the error pop-up (9999) and modals; over page content. */
  z-index: 900;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 30%);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 220ms ease-out, visibility 0s linear 220ms;
}

.ctf-chip-in-bar.is-visible {
  transform: none;
  visibility: visible;
  transition: transform 220ms ease-out, visibility 0s;
}

.ctf-chip-in-bar__button.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  width: 100%;
  max-width: 28rem;
  min-height: 3.25rem;
  margin: 0 auto;
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.ctf-chip-in-bar__button.btn:focus-visible {
  outline: 3px solid #1a1a1a;
  outline-offset: 3px;
}

.ctf-chip-in-bar__arrow {
  font-size: 1.1em;
  line-height: 1;
}

/* Keep the end of the page clear of the bar. */
html.nb-test-chip-in body {
  padding-bottom: 5rem;
}

/* reCAPTCHA's badge sits in the bottom corner; lift it above the bar. */
html.ctf-chip-in-visible .grecaptcha-badge {
  bottom: 5.5rem !important;
  transition: bottom 220ms ease-out !important;
}

@media (min-width: 768px) {
  .ctf-chip-in-bar {
    display: none;
  }

  html.nb-test-chip-in body {
    padding-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ctf-chip-in-bar,
  .ctf-chip-in-bar.is-visible {
    transition: none;
  }
}
