.portal-notification-bar {
  position: relative;
  border-radius: 1.2rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.5rem;
  background: radial-gradient(circle at top, rgba(34, 211, 238, 0.12), transparent 55%),
    linear-gradient(135deg, rgba(8, 47, 73, 0.95), rgba(2, 6, 23, 0.98));
  border: 1px solid rgba(14, 165, 233, 0.45);
  box-shadow:
    0 0 30px rgba(14, 165, 233, 0.2),
    inset 0 0 35px rgba(8, 47, 73, 0.35);
  overflow: hidden;
}

.portal-notification-bar::before,
.portal-notification-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

.portal-notification-bar::before {
  background: linear-gradient(120deg, rgba(6, 182, 212, 0.25), transparent 45%);
  mix-blend-mode: screen;
}

.portal-notification-bar::after {
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.portal-notification {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.35rem;
  width: 100%;
  min-height: 3.25rem;
}

.portal-notification-body {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.portal-notification-body p {
  margin: 0;
}

.portal-notification-indicator {
  --indicator-color: #0ea5e9;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  border: 2px solid rgba(14, 165, 233, 0.65);
  background: radial-gradient(circle, rgba(34, 211, 238, 0.9), rgba(15, 23, 42, 0.8));
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.65);
  flex-shrink: 0;
}

.portal-notification[data-level="warning"] .portal-notification-indicator {
  --indicator-color: #f59e0b;
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.55);
}

.portal-notification[data-level="urgent"] .portal-notification-indicator {
  --indicator-color: #fb7185;
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.7);
}

.portal-notification-dismiss {
  border: none;
  background: rgba(15, 23, 42, 0.75);
  color: #e2e8f0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 10px rgba(148, 163, 184, 0.35);
}

.portal-notification-dismiss:hover {
  background: rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.portal-notification[data-style="banner"] {
  text-align: center;
  justify-content: center;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  font-family: var(--portal-banner-font, 'Space Grotesk', 'Inter', system-ui);
  padding-block: 0.75rem;
  background: linear-gradient(120deg, rgba(14, 165, 233, 0.15), rgba(15, 23, 42, 0.75));
  border-radius: 0.9rem;
}

.portal-notification[data-style="banner"] .portal-notification-indicator {
  height: 1.6rem;
  width: 0.35rem;
  border-radius: 999px;
}

.portal-notification[data-style="pill"] {
  max-width: 460px;
  margin-inline: auto;
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(94, 234, 212, 0.35);
  box-shadow: 0 5px 25px rgba(15, 118, 110, 0.25);
}

.portal-notification[data-style="pill"] .portal-notification-indicator {
  display: none;
}

.portal-notification[data-style="ticker"] {
  padding: 0;
}

.portal-notification[data-style="ticker"] .portal-notification-indicator {
  display: none;
}

.portal-notification[data-style="ticker"] .portal-notification-body {
  position: relative;
  overflow: hidden;
  padding: 0.9rem 1.5rem;
  border-top: 2px solid rgba(34, 211, 238, 0.45);
  border-bottom: 2px solid rgba(34, 211, 238, 0.45);
  background: rgba(2, 6, 23, 0.85);
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  gap: 0;
  font-family: var(--portal-ticker-font, 'Space Grotesk', 'Inter', system-ui);
  -webkit-mask-image: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.6) 6%,
    rgba(0, 0, 0, 1) 15%,
    rgba(0, 0, 0, 1) 85%,
    rgba(0, 0, 0, 0.6) 94%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.6) 6%,
    rgba(0, 0, 0, 1) 15%,
    rgba(0, 0, 0, 1) 85%,
    rgba(0, 0, 0, 0.6) 94%,
    rgba(0, 0, 0, 0) 100%
  );
}

.portal-notification[data-style="ticker"] .portal-notification-body::before,
.portal-notification[data-style="ticker"] .portal-notification-body::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.5rem;
  pointer-events: none;
}

.portal-notification[data-style="ticker"] .portal-notification-body::before {
  left: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0));
}

.portal-notification[data-style="ticker"] .portal-notification-body::after {
  right: 0;
  background: linear-gradient(-90deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0));
}

.portal-notification[data-style="ticker"] .portal-ticker-text {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  letter-spacing: 0.2em;
  font-weight: 700;
  text-transform: uppercase;
  color: #67e8f9;
  text-shadow: 0 0 15px rgba(103, 232, 249, 0.5);
  will-change: transform;
  animation: portal-ticker var(--portal-ticker-speed, 24s) linear infinite;
}

.portal-notification[data-style="ticker"][data-level="warning"] .portal-notification-body {
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: inset 0 -6px 25px rgba(251, 191, 36, 0.15);
}

.portal-notification[data-style="ticker"][data-level="urgent"] .portal-notification-body {
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: inset 0 -6px 30px rgba(248, 113, 113, 0.2);
}

@media (max-width: 640px) {
  .portal-notification-bar {
    padding-inline: 0.5rem;
  }

  .portal-notification {
    flex-direction: column;
    gap: 0.35rem;
    align-items: stretch;
  }

  .portal-notification-dismiss {
    align-self: flex-end;
  }

  .portal-notification[data-style="ticker"] .portal-notification-body {
    padding-inline: 1rem;
    letter-spacing: 0.12em;
  }
}

/* Legacy keyframe kept for compatibility; ticker motion is JS-driven but this
   provides a graceful fallback if JS fails. */
@keyframes portal-ticker {
  0% { transform: translateX(calc(100vw + 10%)); }
  100% { transform: translateX(calc(-100% - 20vw)); }
}
