/* Base: visible by default; JS adds .is-closed when dismissed. Position is set by modifier (--page, --region, --div-id, --block, --popup). */
.info-banner {
  display: block;
  width: 100%;
  border-bottom: 1px solid #e0e0e0;
  background: #fff;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.1);
}

.info-banner--info {
  border-color: #c9e2ff;
}

.info-banner--alert {
  border-color: #f3c46b;
}

.info-banner.is-closed {
  display: none;
}

.info-banner.is-pending-init {
  display: none;
}

.info-banner.is-pending-move {
  display: none;
}

/* Page-top: fixed at top of viewport */
.info-banner--page {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
}

/* Display in front theme region: flow at top of the region, not viewport */
.info-banner--region {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Insert in div ID: flow at top of the target element (JS moves banner into that div) */
.info-banner--div-id {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Block placement: relative so it flows in layout */
.info-banner--block {
  position: relative;
}

.info-banner__content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  max-width: 100%;
  padding: 1rem 3rem 1rem 1.5rem;
}

.info-banner__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid transparent;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 700;
}

.info-banner__icon::before {
  content: "i";
}

.info-banner__icon--info {
  color: #0b5cad;
  border-color: #c9e2ff;
  background: #e8f2ff;
}

.info-banner__icon--alert::before {
  content: "!";
}

.info-banner__icon--alert {
  color: #8a4b00;
  border-color: #f3c46b;
  background: #fff1d6;
}

.info-banner__body {
  flex: 1;
  line-height: 1.5;
}

.info-banner__body p {
  margin: 0;
}

.info-banner__body p:not(:last-child) {
  margin-bottom: 0.5rem;
}

.info-banner__close {
  position: absolute;
  top: 50%;
  right: 1rem;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  padding: 0.5rem;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
  color: #666;
  border: none;
  border-radius: 50%;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
}

.info-banner__close:hover {
  color: #000;
  background-color: #f0f0f0;
}

.info-banner__close::before {
  content: "×";
  font-size: 2rem;
  line-height: 1;
}

body.info-banner-active {
  padding-top: 0;
}

/* Popup (modal) display */
.info-banner--popup {
  position: fixed;
  z-index: 1002;
  top: 50%;
  left: 50%;
  overflow: auto;
  width: 90%;
  max-width: 32rem;
  max-height: 90vh;
  transform: translate(-50%, -50%);
  border-radius: 4px;
  box-shadow: 0 4px 20px rgb(0 0 0 / 0.2);
}

.info-banner-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: none;
  background: rgb(0 0 0 / 0.4);
}

.info-banner-overlay.is-active {
  display: block;
}
