/*
 * Compact layout for the site-wide cookie notice (TermsFeed, injected by
 * global-scripts.js). Presentation only: the wording, privacy link, consent
 * settings and homeasap.com cookie are unchanged.
 *
 * global-scripts.js appends its own !important rules at runtime, so these use
 * the banner's id to win on specificity.
 */

/* Desktop and tablet: a card in the bottom-right corner, clear of the form and
   primary buttons on the left. */
#termsfeed-com---nb.termsfeed-com---nb-simple {
  left: auto !important;
  right: 20px !important;
  bottom: 20px !important;
  width: 400px !important;
  max-width: calc(100vw - 40px) !important;
  border: 1px solid #dbe3ea !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 36px rgba(12, 26, 104, .22) !important;
  overflow: hidden;
}
#termsfeed-com---nb .cc-nb-main-container {
  display: block !important;
  padding: 16px 18px !important;
}
#termsfeed-com---nb .cc-nb-title-container { flex-basis: auto !important; }
#termsfeed-com---nb .cc-nb-title {
  margin: 0 0 4px !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
}
#termsfeed-com---nb .cc-nb-text-container { padding: 0 !important; }
#termsfeed-com---nb .cc-nb-text {
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}
#termsfeed-com---nb .cc-nb-buttons-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
#termsfeed-com---nb .cc-nb-okagree {
  margin: 0 !important;
  padding: 9px 26px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
}

/* Phones: a slim strip. The title is redundant with the text's first words, so
   it stays for screen readers only. The script clamps the text to two lines and
   relies on a "Read more" toggle that usually fails to attach, which hides the
   privacy link; smaller full text keeps the whole notice readable instead. */
@media (max-width: 600px) {
  #termsfeed-com---nb.termsfeed-com---nb-simple {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    max-width: none !important;
    border-width: 1px 0 0 !important;
    border-radius: 14px 14px 0 0 !important;
  }
  #termsfeed-com---nb .cc-nb-main-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px;
    padding: 10px 14px !important;
  }
  #termsfeed-com---nb .cc-nb-title-container {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  #termsfeed-com---nb .cc-nb-text-container { flex: 1; min-width: 0; }
  #termsfeed-com---nb .cc-nb-text-container .cc-nb-text {
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
  }
  #termsfeed-com---nb #cc-nb-text + p {
    margin: 2px 0 0 !important;
    text-align: left !important;
    font-size: 12.5px;
  }
  #termsfeed-com---nb .cc-nb-buttons-container { flex: none; margin: 0; }
  #termsfeed-com---nb .cc-nb-okagree { padding: 9px 18px !important; }
}

/* Offer pages: sit above the sticky "Get started" bar instead of covering it.
   The script inserts the banner before #sticky-cta, so a sibling selector
   cannot reach it; :has() keys off the bar's state instead. */
@media (max-width: 767px) {
  body:has(#sticky-cta.show) #termsfeed-com---nb.termsfeed-com---nb-simple { bottom: 70px !important; }
}
