/* Neutralize the previous WordPress footer shell before applying the V2 grid. */
html body #tbp_footer[data-sunday-footer-ready="true"] {
  display: block;
  gap: 0;
  grid-template-columns: none;
  padding: 0;
}

html body #tbp_footer[data-sunday-footer-ready="true"] h2,
html body #tbp_footer[data-sunday-footer-ready="true"] p,
html body #tbp_footer[data-sunday-footer-ready="true"] nav {
  margin-top: 0;
  margin-bottom: 0;
}

html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-shell {
  margin-right: auto !important;
  margin-left: auto !important;
}

html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-nav {
  gap: 0 !important;
}

html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-base nav {
  display: flex !important;
  gap: 16px !important;
  flex-wrap: nowrap !important;
}

html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-nav a {
  display: flex !important;
  justify-content: space-between !important;
}

html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-base > p {
  margin: 0 !important;
  color: rgba(255, 255, 255, .5) !important;
  font: 500 11px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif !important;
}

html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-base a {
  color: rgba(255, 255, 255, .58) !important;
  font: 550 9px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif !important;
}

html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-top {
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  white-space: nowrap !important;
}

html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-top span {
  display: grid !important;
  width: 24px !important;
  height: 24px !important;
  place-items: center !important;
  border: 1px solid rgba(255, 255, 255, .18) !important;
  border-radius: 50% !important;
}

@media (min-width: 641px) and (max-width: 980px) {
  html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-newsletter {
    display: grid !important;
    grid-template-columns: minmax(170px, .6fr) minmax(300px, 1.4fr) !important;
    grid-column: 1 / -1 !important;
    align-items: end !important;
    gap: 24px !important;
    min-height: 109px !important;
  }

  html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-nav {
    min-height: 118px !important;
  }

  html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-notice {
    grid-column: 1 / -1 !important;
  }

  html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-base {
    min-height: 40px !important;
    height: 40px !important;
  }
}

@media (max-width: 640px) {
  html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-shell {
    width: min(calc(100% - 32px), 600px) !important;
    padding: 18px 0 16px !important;
  }

  html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-intro {
    padding-bottom: 10px !important;
  }

  html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px 24px !important;
    padding-bottom: 12px !important;
  }

  html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-newsletter {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-column: 1 / -1 !important;
    gap: 10px !important;
    min-height: 96px !important;
  }

  html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-notice {
    grid-column: 1 / -1 !important;
  }

  html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-nav {
    min-height: 0 !important;
  }

  html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-base {
    min-height: 34px !important;
    padding-top: 8px !important;
  }

  html body #tbp_footer#tbp_footer[data-sunday-footer-ready="true"] .sunday-footer-base nav {
    gap: 16px !important;
    flex-wrap: wrap !important;
  }
}
