/**
 * @file
 * Website notification banner in gi5 colours and type.
 *
 * Light values follow gi5 _colors-default.sass; .theme-dark-header (the
 * visitor's dark mode choice) follows _colors-dark.sass. The banner is not
 * modal: it never covers the article with a backdrop.
 */

.gi-web-push-banner {
  position: fixed;
  left: 15px;
  /* Clears the CookieYes revisit button on either side; the sticky video ad
     sits bottom-right. */
  bottom: 72px;
  z-index: 100001;
  display: flex;
  gap: 14px;
  width: 360px;
  max-width: calc(100% - 30px);
  padding: 18px 40px 18px 18px;
  box-sizing: border-box;
  background: #f6f6f6;
  color: #000;
  border-top: 4px solid #3c59e0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  animation: gi-web-push-in 0.2s ease-out;
}

.gi-web-push-banner__icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3c59e0;
  color: #fff;
}

.gi-web-push-banner__content {
  min-width: 0;
}

.gi-web-push-banner__title {
  margin: 0 0 6px;
  font-family: "Biennale", "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.gi-web-push-banner__text {
  margin: 0 0 14px;
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.gi-web-push-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gi-web-push-banner__button {
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: "Biennale", "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.gi-web-push-banner__button--primary {
  background: #3c59e0;
  color: #fff;
}

.gi-web-push-banner__button--primary:hover {
  background: #94a4ee;
}

.gi-web-push-banner__button--secondary {
  background: #bcbec0;
  color: #414042;
}

.gi-web-push-banner__button--secondary:hover {
  background: #888b90;
}

.gi-web-push-banner__close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: #717171;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.gi-web-push-banner__close:hover {
  color: #000;
}

.gi-web-push-banner__button:focus-visible,
.gi-web-push-banner__close:focus-visible {
  outline: 2px solid #3c59e0;
  outline-offset: 2px;
}

/* Same lift as the CookieYes button over the mobile share bar (_cookiepro.sass). */
@media (max-width: 1150px) {
  body:has(.gi5-social-share) .gi-web-push-banner {
    bottom: 115px;
  }
}

@media (max-width: 480px) {
  .gi-web-push-banner {
    left: 8px;
    right: 8px;
    bottom: 65px;
    width: auto;
    max-width: none;
  }

  body:has(.gi5-social-share) .gi-web-push-banner {
    bottom: 108px;
  }
}

/* Dark mode. */
.theme-dark-header .gi-web-push-banner {
  background: #272727;
  color: #dcdcdc;
}

.theme-dark-header .gi-web-push-banner__close {
  color: #9a9a9a;
}

.theme-dark-header .gi-web-push-banner__close:hover {
  color: #fff;
}

.theme-dark-header .gi-web-push-banner__button--secondary {
  border-color: #9a9a9a;
  background: #272727;
  color: #fff;
}

.theme-dark-header .gi-web-push-banner__button--secondary:hover {
  background: #393939;
}

.theme-dark-header .gi-web-push-banner__button:focus-visible,
.theme-dark-header .gi-web-push-banner__close:focus-visible {
  outline-color: #5a91f6;
}

@keyframes gi-web-push-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gi-web-push-banner {
    animation: none;
  }

  .gi-web-push-banner__button {
    transition: none;
  }
}
