/* O助手 v2.6.59 · UI-22 message attention parity.
 * One unread source already controls all three entry points in site.js.
 * Animate only the indicators: no envelope/bell/button transforms. */

:root {
  --ozs22-unread-amber: #ec9d45;
  --ozs22-unread-halo: rgba(236, 157, 69, .30);
  --ozs22-unread-halo-faint: rgba(236, 157, 69, .12);
  --ozs22-bell-outline: #fff;
}

/* Account panel: keep the existing 44px envelope, 10px dot and unread/hidden contract. */
#page .ozs2642-account-mail-dot:not([hidden]) {
  background: var(--ozs22-unread-amber);
  box-shadow: 0 0 0 0 var(--ozs22-unread-halo-faint);
  animation: ozs22InboxGlow 2.4s ease-in-out infinite;
}
#page .ozs2642-account-mail-dot:not([hidden])::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1.5px solid var(--ozs22-unread-amber);
  border-radius: 50%;
  pointer-events: none;
  transform-origin: center;
  animation: ozs22InboxRing 2.4s ease-out infinite;
}

/* Header bells: the dot itself stays visible while its outer light breathes.
 * Mobile previously lacked animation; desktop previously faded the full dot. */
#notificationButton.ozs-v18-has-unread::after,
#ozs2626MobileBell.ozs-v18-has-unread::after {
  background: var(--ozs22-unread-amber);
  animation: ozs22BellGlow 2.4s ease-in-out infinite;
}

@keyframes ozs22InboxGlow {
  0%, 100% { box-shadow: 0 0 0 0 var(--ozs22-unread-halo-faint); }
  48% { box-shadow: 0 0 0 4px var(--ozs22-unread-halo); }
}
@keyframes ozs22InboxRing {
  0% { opacity: .85; transform: scale(.65); }
  75%, 100% { opacity: 0; transform: scale(1.65); }
}
@keyframes ozs22BellGlow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 2px var(--ozs22-bell-outline),
      0 0 0 2px rgba(236, 157, 69, 0);
  }
  48% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 2px var(--ozs22-bell-outline),
      0 0 0 7px var(--ozs22-unread-halo);
  }
}

/* Dark mode: keep the warm hue, change only the ring/outline contrast. */
html[data-ozs-theme="dark"] {
  --ozs22-bell-outline: #253e32;
  --ozs22-unread-halo: rgba(236, 157, 69, .37);
}
html[data-ozs-theme="dark"] #ozs2626MobileBell.ozs-v18-has-unread::after {
  border-color: #253e32;
}
@media (prefers-color-scheme: dark) {
  html[data-ozs-theme="system"] {
    --ozs22-bell-outline: #253e32;
    --ozs22-unread-halo: rgba(236, 157, 69, .37);
  }
  html[data-ozs-theme="system"] #page .ozs2642-account-mail-dot {
    border-color: #253e32;
  }
  html[data-ozs-theme="system"] #ozs2626MobileBell.ozs-v18-has-unread::after {
    border-color: #253e32;
  }
}

/* There is no attention animation when all messages have been read. */
#page .ozs2642-account-mail-dot[hidden] { display: none !important; }

/* Reduce CPU work while the existing visibility watcher marks the page hidden. */
html.ozs-page-hidden #page .ozs2642-account-mail-dot,
html.ozs-page-hidden #page .ozs2642-account-mail-dot::after,
html.ozs-page-hidden #notificationButton::after,
html.ozs-page-hidden #ozs2626MobileBell::after {
  animation-play-state: paused !important;
}

/* Accessibility: retain a steady, readable dot when animation is disabled. */
@media (prefers-reduced-motion: reduce) {
  #page .ozs2642-account-mail-dot:not([hidden]),
  #page .ozs2642-account-mail-dot:not([hidden])::after,
  #notificationButton.ozs-v18-has-unread::after,
  #ozs2626MobileBell.ozs-v18-has-unread::after {
    animation: none !important;
    transform: none !important;
  }
  #page .ozs2642-account-mail-dot:not([hidden])::after {
    opacity: .45;
  }
  #notificationButton.ozs-v18-has-unread::after,
  #ozs2626MobileBell.ozs-v18-has-unread::after {
    opacity: 1;
    box-shadow: 0 0 0 2px var(--ozs22-bell-outline),
      0 0 0 4px var(--ozs22-unread-halo-faint);
  }
}
