/*
 * Authenticated header menus (notifications / messages dropdowns, search and magazine modals),
 * requested by templates/partials/header.php. Album tokens/components come from site.css.
 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.header__icon.link-button { width: 40px; height: 40px; border-radius: 999px; color: var(--muted); }
.header__icon.link-button:hover { color: var(--text); background: rgb(255 255 255 / 0.08); }

.header-menu { width: min(380px, calc(100vw - 32px)); padding: 0; overflow: hidden; }
.header-menu__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.header-menu__filter { min-height: 32px; width: auto; max-width: 150px; padding: 4px 32px 4px 10px; font-size: 13px; }
.header-menu__list { max-height: min(60vh, 460px); overflow-y: auto; }
.header-menu__list .list__item { padding: 10px 16px; gap: 10px; }
.header-menu__list .list__text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13px; }
.header-menu__empty { padding: 18px 16px; margin: 0; text-align: center; font-size: 14px; }
.header-menu__all { display: block; width: 100%; padding: 10px 16px; border-top: 1px solid var(--line); text-align: center; font-size: 14px; font-weight: 700; }
.header-menu__all:hover { color: var(--yellow); }
.header-menu .notification { cursor: pointer; }
.header-menu .notification__meta { display: flex; align-items: center; gap: 8px; flex: none; }
.header-menu .notification__dot { width: 10px; height: 10px; border-radius: 50%; background: #6c6b70; }
.header-menu .notification__dot.is-unread { background: var(--yellow); }
.header-menu .notification__online { width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.header-menu .notification__online.is-online { background: var(--green); }

.search-modal__field { position: relative; display: block; }
.search-modal__field > .icon { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-modal__field .input { padding-left: 40px; }
.search-modal__results { margin-top: 12px; max-height: 50vh; overflow-y: auto; }
.search-modal__list { list-style: none; margin: 0; padding: 0; }
.search-modal__list .list__item { padding: 10px 6px; gap: 10px; }
.search-modal__empty { margin: 8px 0; text-align: center; font-size: 14px; }

.magazine-switch { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.magazine-switch__item { display: block; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); transition: border-color var(--trans), color var(--trans); }
.magazine-switch__item:hover { border-color: var(--yellow); color: var(--yellow); }
.magazine-switch__create { color: var(--muted); border-style: dashed; }

@media (max-width: 1199px) {
    .header-menu { width: 100%; }
}
/* Content pages in the header search results (kind "page"). */
.search-modal__page-icon { display: inline-grid; place-items: center; flex: none; background: var(--surface-3); color: var(--green); }
.search-modal__page-icon .icon { width: 14px; height: 14px; }

/* Header search pill: css/header.css. */

/* Results: start right at the bottom edge of the header, under the field (header-menus.js places them). */
.header-search__results {
    position: fixed; z-index: 60; max-height: min(65vh, 520px); margin: 0; padding: 6px 8px 8px; overflow-y: auto;
    border: 1px solid var(--line-strong); border-top: 0; border-radius: 0 0 14px 14px;
    background: rgb(24 23 26 / 0.98); box-shadow: 0 16px 32px rgb(0 0 0 / 0.45); backdrop-filter: blur(10px);
    animation: header-search-drop .22s ease both;
}
.header-search__results[hidden] { display: none; }
.header-search__results .list__item { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; }
.header-search__results .list__item:hover, .header-search__results .list__item:focus-visible { background: rgb(255 255 255 / 0.06); }
.header-search__results .list__item .avatar { width: 32px; height: 32px; flex: none; }
.header-search__results .list__body { display: flex; flex-direction: column; min-width: 0; }
.header-search__results .list__title { font-size: 14px; font-weight: 600; line-height: 1.25; }
.header-search__results .list__text { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
@keyframes header-search-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .header-search__results { animation: none; }
}
