/* Scoped: AFIWAI Flash Info never changes theme layout or other plugins. */
#afi-flash-widget[hidden], #afi-flash-widget [hidden] { display: none !important; }
#afi-flash-widget {
  --afi-bg: #11243c;
  --afi-color: #ffffff;
  --afi-accent: #62ab0f;
  --afi-offset: 20px;
  position: fixed;
  bottom: calc(var(--afi-offset) + env(safe-area-inset-bottom, 0px));
  right: 22px;
  z-index: 9998;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: min(90vw, 580px);
  box-sizing: border-box;
  background: var(--afi-bg);
  color: var(--afi-color);
  border-radius: 15px;
  padding: 8px 9px;
  box-shadow: 0 8px 30px rgba(11, 24, 43, .20);
  font: 500 12px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#afi-flash-widget.afi-position-left { right: auto; left: 22px; }
#afi-flash-widget.afi-position-center { right: auto; left: 50%; transform: translateX(-50%); }
#afi-flash-widget .afi-flash-item { display: inline-flex; align-items: center; gap: 7px; padding: 4px 8px; min-height: 20px; box-sizing: border-box; }
#afi-flash-widget .afi-flash-counter:not([hidden]) + .afi-flash-stock:not([hidden]) { border-left: 1px solid rgba(255,255,255,.23); }
#afi-flash-widget .afi-flash-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--afi-accent); box-shadow: 0 0 0 3px rgba(255,255,255,.1); }
#afi-flash-widget .afi-flash-stock-icon { font-size: 14px; line-height: 1; color: var(--afi-accent); }
#afi-flash-widget .afi-flash-close { background: transparent; border: 0; box-shadow: none; outline-offset: 2px; cursor: pointer; font: 400 21px/1 Arial,sans-serif; color: var(--afi-color); opacity: .75; padding: 2px 5px; margin: 0; }
#afi-flash-widget .afi-flash-close:hover, #afi-flash-widget .afi-flash-close:focus-visible { opacity: 1; }
@media (max-width: 600px) {
  #afi-flash-widget, #afi-flash-widget.afi-position-left, #afi-flash-widget.afi-position-center {
    right: 10px; left: 10px; width: auto; max-width: none; transform: none;
    justify-content: center; bottom: calc(var(--afi-offset) + env(safe-area-inset-bottom, 0px));
    padding: 7px 6px; gap: 3px; font-size: 11px;
  }
  #afi-flash-widget .afi-flash-item { padding: 3px 6px; }
}
@media (prefers-reduced-motion: no-preference) {
  #afi-flash-widget:not([hidden]) { animation: afi-flash-appear .22s ease-out both; }
  @keyframes afi-flash-appear { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
}

/* Additional period counters share the existing compact bandeau style. */
#afi-flash-widget .afi-flash-history:not([hidden]){border-left:1px solid rgba(255,255,255,.23)}
