/* WhaleHeart header + account menu (templates/app/_header.html). 2026-10-17 WH-Web06.
   Shared by the new app screens (templates/app/base.html) and the pages still on the old theme (templates/base.html),
   so every rule is scoped to .wh-header and nothing here touches the rest of an old page. */
.wh-header {
	--h-text: #111827; --h-text-2: #374151; --h-muted: #6b7280; --h-faint: #9ca3af; --h-border: #ececef; --h-line: #f0f1f3;
	--h-accent: #1d4ed8;
	position: relative; z-index: 1001; background: #fff; border-bottom: 1px solid var(--h-border);
	font-family: Inter, "Noto Sans KR", system-ui, -apple-system, sans-serif; font-size: 12px; line-height: 1.45; color: var(--h-text);
}
.wh-header *, .wh-header *::before, .wh-header *::after { box-sizing: border-box; }
.wh-header a { text-decoration: none; }
.wh-header button { font: inherit; cursor: pointer; }
.wh-header .wh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wh-header__in { max-width: 1280px; height: 60px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.wh-header .wh-logo { display: inline-flex; align-items: center; gap: 8px; color: #0b0f17 !important; }
.wh-header .wh-logo img { height: 20px; width: auto; display: block; }
.wh-header .wh-logo span { font-family: Poppins, Inter, sans-serif; font-weight: 700; font-size: 15px; letter-spacing: -0.02em; line-height: 1; color: #0b0f17; }
.wh-header__space { flex: 1; }
/* main links: the current section is dark and bold with a bar on the header's bottom edge (no coloured box) */
.wh-header .wh-nav { display: flex; align-items: stretch; align-self: stretch; gap: 2px; margin: 0; }
.wh-header .wh-nav a { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; color: var(--h-muted) !important; white-space: nowrap; }
.wh-header .wh-nav a:hover { color: var(--h-text) !important; background: #f6f7f8; }
.wh-header .wh-nav a[aria-current="page"] { color: var(--h-text) !important; font-weight: 600; background: transparent; }
.wh-header .wh-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--h-accent); }
.wh-header .wh-nav__sep { width: 1px; height: 18px; background: var(--h-border); margin: 0 6px; align-self: center; }
.wh-header .wh-badge-new { font-size: 10px; padding: 1px 6px; border-radius: 9px; background: #ccfbf1; color: #0f766e; }
.wh-header .wh-btn { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 5px; border: 1px solid #e5e7eb; background: #fff; color: #4b5563 !important; font-size: 11px; }

.wh-header .wh-user { position: relative; }
.wh-header .wh-user__btn { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 6px; border: 1px solid var(--h-border); border-radius: 6px; background: #fff; color: var(--h-text-2); }
.wh-header .wh-user__btn:hover { border-color: #d9dbe0; }
.wh-header .wh-avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--h-text); color: #fff; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; text-transform: uppercase; }
.wh-header .wh-user__name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-header .wh-user__burger { display: none; }
.wh-header .wh-user__chev { display: inline-block; }

.wh-header .wh-menu { position: absolute; top: calc(100% + 6px); right: 0; width: 240px; background: #fff; border: 1px solid var(--h-border); border-radius: 10px; box-shadow: 0 10px 24px rgba(17, 24, 39, .12); padding: 6px; display: flex; flex-direction: column; text-align: left; }
.wh-header .wh-menu[hidden] { display: none; }
/* owner of the account at the top, set apart from the options below it */
.wh-header .wh-menu__owner { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--h-line); }
.wh-header .wh-menu__owner .wh-avatar { width: 32px; height: 32px; font-size: 11px; }
.wh-header .wh-menu__owner div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wh-header .wh-menu__owner strong { font-size: 13px; font-weight: 600; color: var(--h-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-header .wh-menu__owner small { font-size: 11px; color: var(--h-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-header .wh-menu__label { font-size: 10px; color: var(--h-faint); padding: 6px 10px 2px; }
.wh-header .wh-menu__item { padding: 8px 10px; border-radius: 6px; color: var(--h-text) !important; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wh-header .wh-menu__item:hover, .wh-header .wh-menu__item:focus-visible { background: #f6f7f8; }
.wh-header .wh-menu__item[aria-current="page"] { background: #f1f3f5; font-weight: 600; }
.wh-header .wh-menu__item small { font-size: 11px; color: var(--h-faint); white-space: nowrap; }
.wh-header .wh-menu__item--quiet { color: var(--h-muted) !important; }
.wh-header .wh-menu__langs { display: flex; gap: 4px; }
.wh-header .wh-menu__langs a { font-size: 11px; padding: 2px 6px; border-radius: 4px; color: var(--h-muted); border: 1px solid transparent; }
.wh-header .wh-menu__langs a[aria-current="true"] { border-color: #e5e7eb; color: var(--h-text); }
.wh-header .wh-menu__sep { height: 1px; background: var(--h-line); margin: 4px 6px; }
.wh-header .wh-menu__admin { display: none; }   /* wide screens: the admin links are in the header bar */
.wh-header :focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }

@media (max-width: 1100px) { .wh-header .wh-nav a { padding: 0 7px; } .wh-header .wh-nav .wh-badge-new { display: none; } .wh-header__in { gap: 14px; } }
@media (max-width: 900px) and (min-width: 768px) { .wh-header .wh-logo span { display: none; } }
@media (max-width: 767.98px) {
	.wh-header__in { height: 52px; padding: 0 12px; gap: 12px; }   /* 2026-10-18 Ricky: logo and menu line up with the cards (main padding 12px) */
	.wh-header .wh-nav { display: none; }
	.wh-header .wh-menu__admin { display: contents; }
	.wh-header .wh-user__btn { height: 36px; padding: 0 6px 0 4px; border-radius: 18px; }
	.wh-header .wh-user__name { display: none; }
	.wh-header .wh-user__btn .wh-avatar { width: 26px; height: 26px; }
	.wh-header .wh-user--admin .wh-user__btn { width: 44px; height: 44px; border: 0; padding: 0; justify-content: center; background: transparent; }
	.wh-header .wh-user--admin .wh-user__btn .wh-avatar, .wh-header .wh-user--admin .wh-user__chev { display: none; }
	.wh-header .wh-user--admin .wh-user__burger { display: inline-block; }
	.wh-header .wh-menu { position: fixed; top: 56px; right: 12px; width: min(260px, calc(100vw - 24px)); max-height: calc(100vh - 68px); overflow-y: auto; }
}
