/* ------------------------------------------------------------------
   Topical banner for dhcp.appliansys.com
   The wording, link and ON/OFF switch live in
   /components/topic-banner.html

   If you change anything in THIS file, also change "?v=2" to the next
   number ("?v=3" and so on) on the stylesheet line of the eight pages
   that show the banner, so returning visitors get the new version.
   ------------------------------------------------------------------ */


/* ---------- The banner itself (all pages) ---------- */
.topic-banner {
  background: rgba(10, 6, 20, 0.85);
  border-left: 4px solid #ffc000;
  padding: 0.75rem 1.5rem;
}

.topic-banner__text {
  margin: 0;
  color: #ffffff;
  font-family: 'roboto', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.topic-banner__text strong {
  font-weight: bold;
}

.topic-banner__link,
.topic-banner__link:visited {
  color: #ffc000;
  font-weight: bold;
  white-space: nowrap;
  text-decoration: none;
}

.topic-banner__link:hover,
.topic-banner__link:focus {
  color: #ffc000;
  text-decoration: underline;
}

/* Laptops and wider: keep the message on one line */
@media (min-width: 992px) {
  .topic-banner__text {
    white-space: nowrap;
  }
}

/* Narrow laptops: slightly smaller text so one line still fits */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .topic-banner__text {
    font-size: 14px;
  }
}


/* ---------- Inner pages ----------
   Slot sits under the menu, the same width as the white content
   box. Height is reserved so the page does not jump when the
   banner text arrives. */
.topic-banner-slot.container {
  padding-left: 0;
  padding-right: 0;
  margin-top: 1.5rem;
  /* pulls the white content box up closer to the banner */
  margin-bottom: -2.75rem;
  min-height: 48px;
}

/* Large screens: the white content box widens to 70% here */
@media (min-width: 1700px) {
  .topic-banner-slot.container {
    max-width: 70%;
    margin-bottom: -0.75rem;
  }
}

/* Up to 800px wide the white content box sits flush left */
@media (max-width: 800px) {
  .topic-banner-slot.container {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: -1.75rem;
  }
}

/* Success Stories page: match its wider content box */
.topic-banner-slot.container.topic-banner-slot--evidence {
  width: auto;
  max-width: none;
  margin-left: 4rem;
  margin-right: 4rem;
}
@media (min-width: 1700px) {
  .topic-banner-slot.container.topic-banner-slot--evidence {
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
  }
}
@media (max-width: 800px) {
  .topic-banner-slot.container.topic-banner-slot--evidence {
    margin-left: 0;
    margin-right: 0;
  }
}


/* ---------- Home page ----------
   Laptops and wider: the banner sits inside the brushed-metal menu
   bar, level with the logo, lined up with the home-page panels.
   Tablets and phones: it sits on a brushed-metal strip under the
   logo, because there is no room beside it. */
.topic-banner-slot--home .topic-banner {
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

@media (min-width: 992px) {
  .topic-banner-slot.topic-banner-slot--home {
    position: relative;
    margin-top: -70px;      /* lifts the banner up into the menu bar */
    height: 70px;
    padding: 11px 0 0;
    pointer-events: none;   /* keeps the logo clickable */
  }

  .topic-banner-slot--home .topic-banner {
    pointer-events: auto;
    max-width: 970px;
    margin-left: max(15px, calc((100% - 970px) / 2));
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .topic-banner-slot--home .topic-banner { max-width: 960px; }
}

/* Wider than 1400px the logo shows, so keep the banner clear of it */
@media (min-width: 1401px) {
  .topic-banner-slot--home .topic-banner {
    max-width: none;
    margin-left: max(240px, calc((100% - 970px) / 2));
    margin-right: calc((100% - 970px) / 2);
  }
}

@media (max-width: 991.98px) {
  .topic-banner-slot.topic-banner-slot--home {
    background: #e3e3e3 url(/static/images/home/footer-bg.gif);
    padding: 0 15px 1rem;
  }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .topic-banner-slot--home .topic-banner { max-width: 720px; }
}
@media (min-width: 576px) and (max-width: 767.98px) {
  .topic-banner-slot--home .topic-banner { max-width: 540px; }
}


/* ---------- Tablets and phones (text wraps here) ---------- */
@media (max-width: 991.98px) {
  .topic-banner-slot.container {
    margin-top: 1rem;
    min-height: 70px;
  }

  .topic-banner-slot.topic-banner-slot--home {
    min-height: 85px;
  }

  .topic-banner {
    padding: 0.75rem 1rem;
  }

  .topic-banner__text {
    font-size: 14px;
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .topic-banner-slot.container {
    min-height: 92px;
  }

  .topic-banner-slot.topic-banner-slot--home {
    min-height: 107px;
  }
}
