/* Site banners (concepts/Site Banners.svg): orange = announcements from the site, red = errors and
   things that need attention, such as removed content. */
.alert-banner {
  --ab-top: #ff7700;
  --ab-bottom: #994000;
  --ab-icon-y: 0px;
  min-height: 51px;
  margin-bottom: 10px;
  background: linear-gradient(to bottom, var(--ab-top) 0, var(--ab-bottom) 51px, var(--ab-bottom) 100%);
  border: 0;
  border-radius: 3px;
  box-shadow: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
  overflow: hidden;
  position: relative;
}

.alert-banner--danger {
  --ab-top: #ff0000;
  --ab-bottom: #990000;
  --ab-icon-y: -69px;
}

.alert-banner::before,
.alert-banner::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
}

/* The icon strip comes from the SVG: the top banner is the announcement icon, the bottom one the alert icon */
.alert-banner::before {
  left: 0;
  width: 100%;
  height: 51px;
  background: url("../concepts/Site%20Banners.svg") 0 var(--ab-icon-y) / 967px 120px no-repeat;
  z-index: 1;
}

/* Announcements swap the SVG's megaphone for assets/banner-megaphone.svg, painted over a patch of the banner gradient */
.alert-banner:not(.alert-banner--danger)::before {
  background:
    url("../assets/banner-megaphone.svg") 7px 4.5px / 46px 42px no-repeat,
    linear-gradient(to bottom, var(--ab-top) 0, var(--ab-bottom) 100%) 0 0 / 59px 51px no-repeat,
    url("../concepts/Site%20Banners.svg") 0 0 / 967px 120px no-repeat;
}

.alert-banner::after {
  left: 64px;
  right: 0;
  background: linear-gradient(to bottom, var(--ab-top) 0, var(--ab-bottom) 51px, var(--ab-bottom) 100%);
  z-index: 2;
}

.alert-inner {
  justify-content: center;
  flex-direction: column;
  align-items: flex-start;
  min-height: 51px;
  padding: 5px 44px 5px 77px;
  gap: 0;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.85);
  z-index: 3;
  box-sizing: border-box;
}

.alert-message,
.alert-detail {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.alert-dismiss {
  position: absolute;
  top: 13px;
  right: 12px;
  z-index: 4;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 20px;
  line-height: 24px;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.alert-dismiss:hover { color: #fff; }