/* ============================================================================
   Shared ops nav-cluster styles (#2024)

   Top-right cluster: language · waffle apps launcher · avatar account menu.
   Linked by both base.html and settings/base.html so the headers can't drift.
   Originated as duplicated blocks in #1995 (base.html) and #2023 (settings).
   ============================================================================ */
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.apps-waffle, .profile-wrap { position: relative; }
.icon-btn, .avatar-btn {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid transparent;
    background: transparent; cursor: pointer; display: flex; align-items: center;
    justify-content: center; padding: 0; transition: background .15s;
}
.icon-btn:hover, .avatar-btn:hover { background: #eef1f5; }
.icon-btn[aria-expanded="true"], .avatar-btn[aria-expanded="true"] { background: #e7eef7; }
.waffle-glyph { display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; width: 20px; height: 20px; }
.waffle-glyph i { background: #1a4480; border-radius: 1.5px; opacity: .85; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg,#1a4480,#005ea2); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem; border: 2px solid #fff; box-shadow: 0 0 0 1px #dfe1e2;
}
.avatar-lg { width: 56px; height: 56px; font-size: 1.3rem; margin: 0 auto 10px; }
.apps-pop, .profile-pop {
    position: absolute; top: 52px; right: 0; z-index: 1000; background: #fff;
    border: 1px solid #dfe1e2; border-radius: 14px; box-shadow: 0 12px 40px rgba(20,40,80,.18);
    display: none;
}
.apps-pop.open, .profile-pop.open { display: block; }
.apps-pop { width: 300px; padding: 14px; }
.apps-pop-h { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7280; padding: 2px 6px 10px; }
.apps-pop-h-note { font-weight: 500; color: #9aa3af; letter-spacing: 0; text-transform: none; }
.apps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; }
/* Four-section waffle (#2038): Government Transparency / Public Actions / UnGovr
   Published Sites (all public), then the gated Internal UnGovr section. */
.apps-pop-sep { border-top: 1px solid #dfe1e2; margin: 8px 6px 12px; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px; border-radius: 10px; text-align: center; text-decoration: none; position: relative; }
.app-tile:hover { background: #f5f7fa; }
.app-tile .ic { width: 30px; height: 30px; color: #1a4480; display: flex; align-items: center; justify-content: center; }
.app-tile .ic svg { width: 26px; height: 26px; }
.app-tile .lbl { font-size: .74rem; color: #3d4551; font-weight: 500; line-height: 1.15; }
.app-tile .crawl-activity-dot { position: absolute; top: 8px; right: 14px; margin: 0; }
.profile-pop { width: 282px; overflow: hidden; }
.profile-head { padding: 18px 16px 14px; text-align: center; border-bottom: 1px solid #dfe1e2; }
.profile-name { font-weight: 700; color: #1a4480; }
.profile-name a { color: inherit; text-decoration: none; }
.profile-name a:hover { text-decoration: underline; }
.profile-role { font-size: .78rem; color: #6b7280; margin-top: 1px; }
.profile-row {
    display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-size: .88rem;
    color: #3d4551; cursor: pointer; text-decoration: none; width: 100%;
    background: none; border: none; text-align: left; font-family: inherit;
}
.profile-row:hover { background: #f5f7fa; }
.profile-row svg { width: 18px; height: 18px; color: #6b7280; flex-shrink: 0; }
.profile-row.sep { border-top: 1px solid #dfe1e2; }
.profile-row .chev { margin-left: auto; color: #6b7280; font-size: .8rem; }
.profile-row.console { background: #f3f7fc; border-top: 1px solid #dfe1e2; border-bottom: 1px solid #dfe1e2; color: #1a4480; font-weight: 600; }
.profile-row.console svg, .profile-row.console .chev { color: #005ea2; }
.profile-pop .entity-selector-wrap { padding: 6px 12px; margin: 0; }
.profile-pop .entity-selector input { width: 100%; }
/* Flow the "act as" results inline so they aren't clipped by the popover's
   overflow:hidden (the popover grows; on mobile it scrolls). */
.profile-pop .entity-dropdown { position: static; box-shadow: none; max-height: 220px; }
@media (max-width: 640px) {
    .apps-pop, .profile-pop { position: fixed; top: 64px; left: 8px; right: 8px; width: auto; max-height: 75vh; overflow-y: auto; }
}
