/* ============================================
   Flash messages / notification banner
   ============================================ */

.notification-banner-wrap {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 999;
  display: flex;
  justify-content: center;
  padding: 1rem 1.5rem;
  padding-top: 1.5rem;
  /* Allow clicks to pass through to the page; only the banner itself captures events */
  pointer-events: none;
}

.notification-banner-wrap.is-hidden {
  display: none !important;
}

.notification-banner {
  width: 100%;
  max-width: 42rem;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  /* Re-enable pointer events so the banner and close button are clickable */
  pointer-events: auto;
}

.notification-banner--alert {
  background-color: rgba(229, 72, 72, 1);
}

.notification-banner--notice {
  background-color: rgba(74, 223, 125, 1);
}

.notification-banner__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: #fff;
}

.notification-banner__icon img,
.notification-banner__icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.notification-banner__body {
  flex: 1;
  min-width: 0;
}

.notification-banner__title {
  font-family: inherit;
  font-weight: 600;
  font-style: normal;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0;
  color: #ffffff;
  margin: 0;
}

.notification-banner__content {
  font-family: inherit;
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.95);
  margin: 0.25rem 0 0 0;
}

.notification-banner__close {
  flex-shrink: 0;
  padding: 0.25rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification-banner__close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.notification-banner__close:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.notification-banner__close svg {
  width: 20px;
  height: 20px;
}

/* Success banner: dark text and close button for contrast on green */
.notification-banner--notice .notification-banner__title,
.notification-banner--notice .notification-banner__content {
  color: rgba(18, 58, 45, 1);
}

.notification-banner--notice .notification-banner__close {
  color: #374151;
}

.notification-banner--notice .notification-banner__close:hover {
  background: rgba(0, 0, 0, 0.08);
}

.notification-banner--notice .notification-banner__close svg {
  fill: currentColor;
}
