/**
 * hub-nav.css — the HUB top menu (menu.php, templates/partials/avatar_menu.php,
 * assets/js/hub-nav.js; DMD Ops #1271, John 2026-10-27: mock A "Cards").
 * Desktop (lg+): a 68 px bar, entries that open card panels, a 3-column About
 * panel and the account menu. Below lg: a 56 px bar and a right-hand drawer
 * (the Bootstrap offcanvas #navbarNav) whose groups fold out in place.
 * Everything is scoped to .hn-*; the theme's own .dropdown rules are not used.
 */

.hn-bar {
  --hn-accent: #27aff5;
  background: #0b0f1a !important;
  border-bottom: 1px solid #1b2334;
  padding-top: 0 !important; padding-bottom: 0 !important;
  z-index: 13000;
  font-family: 'Saira Semi Condensed', sans-serif;
}
.hn-bar.navbar-stuck { background: #0b0f1a !important; }
/* The mock is set in Saira Semi Condensed; custom-fonts.css puts every
   header.navbar descendant in Apotek, so this needs the extra class. Icons keep
   boxicons (its own !important). */
header.navbar.hn-bar, header.navbar.hn-bar * { font-family: 'Saira Semi Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.hn-wrap { height: 56px; flex-wrap: nowrap !important; }
@media (min-width: 992px) { .hn-wrap { height: 68px; max-width: 1320px; } }

/* ── logo + wordmark ────────────────────────────────────────────────────── */
.hn-brand { display: inline-flex; align-items: center; gap: 10px; padding: 0 !important; margin-right: 22px; text-decoration: none; }
.hn-brand img { width: 40px; height: auto; display: block; }
.hn-word { font-weight: 700; font-size: 21px; letter-spacing: .01em; color: #fff; line-height: 1; white-space: nowrap; }
.hn-word b { color: var(--hn-accent); font-weight: 700; }
@media (max-width: 991.98px) { .hn-brand img { width: 34px; } .hn-word { font-size: 19px; } }

/* ── the entries ────────────────────────────────────────────────────────── */
.hn-nav { list-style: none; margin: 0; padding: 0; display: flex; }
.hn-link {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 17px/1 'Saira Semi Condensed', sans-serif; color: #cfd6e2;
  background: transparent; border: 0; border-radius: 10px;
  padding: 0 12px; height: 40px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.hn-link:hover, .hn-item.is-open > .hn-link { color: #fff; background: #161d2c; }
.hn-link:focus-visible { outline: 2px solid #8fb4ff; outline-offset: 2px; }
.hn-chev { font-size: 18px; opacity: .7; transition: transform .18s ease; }
.hn-item.is-open > .hn-link .hn-chev { transform: rotate(180deg); }
.hn-item.is-current > .hn-link { color: #fff; }

@media (min-width: 992px) {
  .hn-nav { height: 68px; gap: 2px; }
  .hn-item { position: relative; display: flex; align-items: center; height: 100%; }
  /* current page: a 2 px accent bar along the bar's bottom edge */
  .hn-item.is-current::after {
    content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px;
    background: var(--hn-accent); border-radius: 2px 2px 0 0;
  }
}

/* ── card panels (desktop) ──────────────────────────────────────────────── */
.hn-panel { display: none; }
.hn-item.is-open > .hn-panel { display: block; }
@media (min-width: 992px) {
  .hn-panel {
    position: absolute; top: calc(100% - 6px); left: 0; z-index: 13010;
    width: 320px; padding: 8px;
    background: #121826; border: 1px solid #273145; border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    animation: hnIn .14s ease-out;
  }
  .hn-panel.hn-wide { width: 720px; padding: 14px 14px 0; }
  @keyframes hnIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { .hn-panel { animation: none !important; } }

.hn-card {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px;
  color: #e6ebf3; text-decoration: none;
}
.hn-card:hover, .hn-card:focus-visible { background: #1a2233; color: #fff; outline: none; }
.hn-tile {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--c, #8fb4ff); font-size: 20px;
  background: rgba(143, 180, 255, .14);
  background: color-mix(in srgb, var(--c, #8fb4ff) 16%, transparent);
}
.hn-txt { display: flex; flex-direction: column; min-width: 0; }
.hn-t { font-family: 'Saira Semi Condensed', sans-serif; font-size: 15.5px; font-weight: 600; line-height: 1.2; }
.hn-d { font-size: 12.5px; color: #9aa4b5; line-height: 1.3; margin-top: 2px; }
.hn-ext { font-size: 13px; opacity: .55; margin-left: 4px; vertical-align: -1px; }
.hn-foot {
  display: flex; align-items: center; gap: 6px; margin: 6px -8px -8px; padding: 11px 18px;
  border-top: 1px solid #222b3d; font-size: 13px; color: #8fb4ff; text-decoration: none;
}
.hn-foot b { font-weight: 600; }
.hn-foot:hover { color: #b9d0ff; background: rgba(255, 255, 255, .02); border-radius: 0 0 14px 14px; }

/* About: three columns with small-caps headers, the legal links in a strip */
.hn-cols { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 6px; }
.hn-col + .hn-col { border-left: 1px solid #1f2738; padding-left: 6px; }
.hn-sec {
  font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: #7d889b; padding: 4px 10px 6px;
}
.hn-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px;
  color: #dbe1ea; text-decoration: none; font-size: 14.5px; line-height: 1.25;
}
.hn-row:hover, .hn-row:focus-visible { background: #1a2233; color: #fff; outline: none; }
.hn-row > .bx:first-child { font-size: 18px; width: 20px; text-align: center; flex: 0 0 auto; color: var(--c, #9aa4b5); }
.hn-row .hn-d { display: block; }
.hn-strip {
  display: flex; gap: 18px; margin: 10px -14px 0; padding: 11px 24px;
  border-top: 1px solid #222b3d; font-size: 13px;
}
.hn-strip a { color: #9aa4b5; text-decoration: none; }
.hn-strip a:hover { color: #fff; }

/* ── right side: bell, avatar, menu button ──────────────────────────────── */
.hn-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hn-right .hub-bell { margin: 0 !important; }
.hn-menu-btn.navbar-toggler {
  width: 40px; height: 40px; padding: 0; border: 0 !important; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; background: transparent; box-shadow: none !important;
}
.hn-menu-btn.navbar-toggler:hover { background: #161d2c; }
@media (min-width: 992px) { .hn-menu-btn.navbar-toggler { display: none; } }
.hn-signin {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 18px;
  border-radius: 999px; background: var(--hn-accent, #27aff5); color: #06121c !important;
  font: 600 15px/1 'Saira Semi Condensed', sans-serif; text-decoration: none; white-space: nowrap;
}
.hn-signin:hover { background: #4fc0f8; }

/* account menu (desktop) */
.hn-acct { position: relative; }
.hn-avatar-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; height: 40px;
  background: #161d2c; border: 1px solid #222b3d; border-radius: 999px; color: #cfd6e2; cursor: pointer;
}
.hn-avatar-btn:hover, .hn-acct.is-open > .hn-avatar-btn { background: #1c2536; color: #fff; }
.hn-avatar-btn:focus-visible { outline: 2px solid #8fb4ff; outline-offset: 2px; }
.hn-avatar-btn img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; }
.hn-acct.is-open > .hn-avatar-btn .hn-chev { transform: rotate(180deg); }
.hn-acct > .hn-panel { left: auto; right: 0; top: calc(100% + 10px); width: 340px; }
.hn-acct-head {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 12px; margin-bottom: 4px;
  border-bottom: 1px solid #222b3d; text-decoration: none; color: #fff;
}
.hn-acct-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.hn-acct-head .hn-t { display: block; font-size: 16px; }
.hn-acct-head .hn-d { display: block; color: #8fb4ff; }
.hn-acct-head:hover .hn-d { color: #b9d0ff; }
.hn-acct .hn-sec { padding-top: 8px; }
.hn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.hn-grid .hn-card { padding: 7px 8px; gap: 9px; }
.hn-grid .hn-tile { width: 30px; height: 30px; font-size: 17px; border-radius: 8px; }
.hn-grid .hn-t { font-size: 14px; }
.hn-out { color: #ff6b6b !important; }
.hn-out > .bx:first-child { color: #ff6b6b !important; }
.hn-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: #dc3545; color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}

/* the chat count on the avatar (avatar_menu.php fills it) */
.avatar-container { position: relative; display: inline-block; }
.chat-notification-badge {
  position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px;
  font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; color: #fff;
  background: #dc3545; border-radius: 50px; display: none; z-index: 10;
}
.chat-notification-badge.active { display: block; animation: hnPulse 2s ease-in-out infinite; }
@keyframes hnPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* LIVE: its accent dot; reduced motion gets a plain dot */
.hub-live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #ff4136; display: inline-block; flex: 0 0 auto;
  box-shadow: 0 0 0 0 rgba(255, 65, 54, .55); animation: hubLiveDot 2s ease-out infinite;
}
@keyframes hubLiveDot { 0% { box-shadow: 0 0 0 0 rgba(255,65,54,.55); } 70% { box-shadow: 0 0 0 6px rgba(255,65,54,0); } 100% { box-shadow: 0 0 0 0 rgba(255,65,54,0); } }
@media (prefers-reduced-motion: reduce) { .hub-live-dot { animation: none; } }

/* ── desktop: the offcanvas sits inline in the bar ──────────────────────── */
@media (min-width: 992px) {
  .hn-drawer.offcanvas { background: transparent !important; height: 100%; }
  .hn-drawer .offcanvas-body { padding: 0; overflow: visible; height: 100%; display: flex; align-items: center; }
  .hn-drawer-head, .hn-drawer-foot { display: none !important; }
}

/* ── phone: the right-hand drawer ───────────────────────────────────────── */
@media (max-width: 991.98px) {
  .hn-drawer.offcanvas { width: 320px !important; max-width: 88vw; background: #0f1522 !important; border-left: 1px solid #1b2334; }
  .hn-drawer-head { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 12px 0 18px; border-bottom: 1px solid #1b2334; }
  .hn-drawer-head .hn-brand { margin: 0; }
  .hn-drawer-close {
    width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: #cfd6e2;
    font-size: 26px; display: inline-flex; align-items: center; justify-content: center;
  }
  .hn-drawer-close:hover { background: #161d2c; color: #fff; }
  .hn-drawer .offcanvas-body { display: flex; flex-direction: column; padding: 10px 0 0; }
  .hn-nav { flex-direction: column; }
  .hn-item { position: relative; }
  .hn-link { width: 100%; height: 48px; padding: 0 20px; border-radius: 0; justify-content: flex-start; font-size: 17.5px; }
  .hn-link:hover, .hn-item.is-open > .hn-link { background: #141b2a; }
  .hn-link .hn-chev { margin-left: auto; }
  .hn-item.is-current > .hn-link { color: var(--hn-accent); }
  .hn-item.is-current::before { content: ""; position: absolute; left: 0; top: 10px; height: 28px; width: 3px; background: var(--hn-accent); border-radius: 0 3px 3px 0; }
  .hn-panel { padding: 2px 10px 8px 20px; }
  .hn-card { padding: 7px 10px; gap: 11px; }
  .hn-tile { width: 28px; height: 28px; font-size: 16px; border-radius: 8px; }
  .hn-t { font-size: 15px; }
  .hn-panel .hn-d { display: none; }
  .hn-foot { margin: 2px 0 0; padding: 8px 10px; border-top: 0; }
  .hn-cols { display: block; }
  .hn-col + .hn-col { border-left: 0; padding-left: 0; margin-top: 4px; }
  .hn-sec { padding: 8px 10px 4px; }
  .hn-strip { margin: 6px 0 0; padding: 8px 10px; border-top: 0; }

  .hn-drawer-foot { margin-top: auto; border-top: 1px solid #1b2334; padding: 12px 14px 16px; }
  .hn-me {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: 12px;
    background: transparent; border: 0; color: #fff; text-align: left; cursor: pointer;
  }
  .hn-me:hover, .hn-item.is-open > .hn-me { background: #141b2a; }
  .hn-me img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
  .hn-me .hn-t { display: block; }
  .hn-me .hn-d { display: block; }
  .hn-me .hn-chev { margin-left: auto; }
  .hn-me-panel { padding: 4px 0 4px; }
  .hn-me-panel .hn-grid { grid-template-columns: 1fr; }
  .hn-me-panel .hn-sec { padding-left: 8px; }
  .hn-drawer-foot .hn-signin { width: 100%; justify-content: center; height: 44px; }
  .hn-drawer-foot > .hn-out { margin-top: 4px; }
}
