/* Top-notification bar (driven by Settings, one row per active slot).
   Standalone stylesheet so the bar is styled on every layout — both the
   regular `application` layout and the SPA `application_spa` layout (checkout,
   order, …) which does not load the Tailwind build. */
.top-notification {
  display: block;
  color: #fff;
  text-align: center;
  font-weight: 300;
  padding: 0.5em;
}

/* Store-online status bar (SUCCESS type): smaller font, tighter padding and a
   centered flex row with the blinking dot — matches the design mockup. */
.top-notification[data-notification-type="SUCCESS"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 400;
  padding: 9px 20px;
}

/* Blinking "online" indicator shown before the SUCCESS top-notification text.
   Light lime dot with a soft glow that pulses. Only opacity and transform are
   animated (the glow is a pre-drawn shadow on ::after), so the pulse runs on the
   compositor instead of repainting the bar on every frame. */
.top-notification__dot {
  position: relative;
  flex: none;
  display: inline-block;
  vertical-align: middle;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #cdee4f;
  animation: top-notification-dot-blink 1.6s ease-out infinite;
}

.top-notification__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(205, 238, 79, 0.55);
  opacity: 0;
  animation: top-notification-dot-glow 1.6s ease-out infinite;
}

@keyframes top-notification-dot-blink {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes top-notification-dot-glow {
  0% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.3); }
}

@media (prefers-reduced-motion: reduce) {
  .top-notification__dot {
    animation: none;
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(205, 238, 79, 0.2);
  }
  .top-notification__dot::after {
    display: none;
  }
}
