/* Notifications on the header avatar (fragments/header-notifications.html).
   Theme tokens only; used by the public header and the modern course player. */
[data-hn-anchor] { position: relative; }
.hn-badge {
    position: absolute; inset-block-start: -4px; inset-inline-end: -4px; z-index: 2;
    min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px; border: 2px solid var(--bg2);
    background: var(--danger); color: #fff;
    font-size: .68rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 0;
    pointer-events: none;
}
.hn-badge[hidden] { display: none; }
.hn-panel { display: grid; gap: 6px; padding: 8px 10px; min-width: 0; }
.hn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hn-head b { color: var(--text); font-size: .86rem; }
.hn-panel .hn-link {
    padding: 0; border: 0; background: none; width: auto; display: inline-flex; min-height: 28px; align-items: center;
    color: var(--cyan); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; text-decoration: none;
}
.hn-panel .hn-link:hover { color: var(--accent-ink); background: none; }
.hn-panel .hn-link:focus-visible, .hn-panel .hn-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.hn-panel .hn-link[hidden] { display: none; }
.hn-panel .hn-link[aria-busy="true"] { opacity: .6; cursor: progress; }
.hn-panel .hn-all { justify-self: start; }
.hn-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; max-height: 300px; overflow-y: auto; }
.hn-item { margin: 0; }
.hn-panel .hn-open {
    display: grid; gap: 2px; width: 100%; padding: 8px 10px; text-align: start;
    border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; cursor: pointer;
}
.hn-panel .hn-open:hover { background: var(--card2); }
.hn-panel .hn-open.is-unread { background: var(--card); }
.hn-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: .84rem; font-weight: 700; overflow-wrap: anywhere; }
.hn-new {
    flex: none; padding: 1px 7px; border-radius: 999px;
    background: var(--danger-soft); border: 1px solid var(--danger-border); color: var(--danger);
    font-size: .66rem; font-weight: 700;
}
.hn-msg {
    color: var(--muted); font-size: .8rem; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.hn-when { color: var(--faint); font-size: .72rem; font-weight: 400; }
.hn-note { margin: 0; padding: 6px 10px; color: var(--muted); font-size: .82rem; }
.hn-note[hidden] { display: none; }
.hn-item--skeleton { display: grid; gap: 6px; padding: 8px 10px; }
.hn-shimmer {
    display: block; width: 70%; height: 12px; border-radius: 6px;
    background: linear-gradient(90deg, var(--card) 25%, var(--card2) 37%, var(--card) 63%);
    background-size: 400% 100%; animation: hn-shimmer 1.4s ease infinite;
}
.hn-shimmer--short { width: 40%; }
@keyframes hn-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
html[lang="ar"] .hn-msg { line-height: 1.7; }
@media (prefers-reduced-motion: reduce) { .hn-shimmer { animation: none; } }
@media (max-width: 639px) { .hn-panel .hn-link { min-height: 40px; } .hn-panel .hn-open { padding: 10px; } }
