/* TXKtoday header cleanup (2026-11-10, per Field). One-row desktop header, sticky and slimmer on scroll,
   phone section strip, orange rule, orange active underline, KTXK weather. Markup: inc/header-nav.php.
   Loaded after brand.css; dark-mode colors come from the --txk-n-* tokens. */

/* ---- Orange rule under the header, both devices, normal and sticky ---- */
#header [data-row="middle"] { border-bottom: 2px solid var(--brand-orange, #ff9000); }

/* ---- Desktop: one row ---- */
#header [data-row="middle"] > .ct-container { padding-top: 0; padding-bottom: 0; }
[data-device="desktop"] .site-logo-container img,
[data-device="desktop"] [data-id="logo"] img { height: 50px !important; transition: height .2s ease; }
#header [data-device="desktop"] [data-sticky*="yes"] .site-logo-container img,
#header [data-device="desktop"] [data-sticky*="yes"] [data-id="logo"] img { height: 40px !important; }

/* Menu: 15px, readable weight, tighter caps tracking */
#header [data-device="desktop"] [data-id="menu"] > ul > li > .ct-menu-link {
	font-family: var(--txk-font-ui, inherit); font-size: 14px; font-weight: 700; letter-spacing: .03em;
	padding-inline: 9px; position: relative;
}
/* Active section: text keeps the normal menu color, orange bar marks it (was blue text) */
#header .ct-menu-link[aria-current="page"],
#header .current-menu-item > .ct-menu-link,
#header .current-menu-ancestor > .ct-menu-link { color: var(--theme-link-initial-color, inherit); }
#header [data-device="desktop"] [data-id="menu"] > ul > li > .ct-menu-link::after {
	content: ""; position: absolute; left: 9px; right: 9px; top: auto; bottom: calc(50% - 17px); width: auto; height: 3px; border-radius: 2px; opacity: 1; visibility: visible;
	background: var(--brand-orange, #ff9000); transform: scaleX(0); transform-origin: left center; transition: transform .18s ease;
}
#header [data-device="desktop"] [data-id="menu"] > ul > li > .ct-menu-link:hover::after,
#header [data-device="desktop"] [data-id="menu"] > ul > li.current-menu-item > .ct-menu-link::after,
#header [data-device="desktop"] [data-id="menu"] > ul > li.current-menu-ancestor > .ct-menu-link::after,
#header [data-device="desktop"] [data-id="menu"] > ul > li > .ct-menu-link[aria-current="page"]::after { transform: scaleX(1); }

/* Menu sits beside the logo (left-aligned). "Home" is dropped on desktop: the logo is the home link. */
#header [data-device="desktop"] [data-column="start"] [data-id="menu"] { margin-left: 12px; }
#header [data-device="desktop"] [data-id="menu"] > ul > li.menu-item-home { display: none; }

/* Right group: weather, search, color switch, then the Morning Edition pill last */
#header [data-device="desktop"] [data-column="end"] [data-items] { align-items: center; }
[data-device="desktop"] .txk-hdr-sub { order: 9; margin-right: 0; margin-left: 8px; }
.txk-hdr-wx {
	display: inline-flex; align-items: baseline; gap: 6px; margin-right: 12px; white-space: nowrap; text-decoration: none !important;
	font-family: var(--txk-font-ui, inherit); font-size: 13px; font-weight: 600; letter-spacing: .02em;
	color: var(--txk-n-muted, #5f6b76);
}
.txk-hdr-wx[hidden] { display: none; }
.txk-hdr-wx__temp { font-size: 15px; font-weight: 700; color: var(--txk-n-text, var(--brand-ink, #32373c)); }
.txk-hdr-wx__text { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }   /* long readings like "Thunderstorms and Rain" never push into the menu */
.txk-hdr-wx:hover .txk-hdr-wx__text { text-decoration: underline; }
/* Narrower desktops: temperature only, then nothing once the menu needs the room. Breakpoints re-cut
   2026-11-11 for live's 8-item menu (staging had 7): 14px menu from 1215 up (15px never fits beside weather + pill), 13px to 1100, 12px below. Weather:
   temperature + conditions from 1400, temperature only 1260 to 1399, hidden below. Sized for the worst
   case ("100°" and a 130px conditions string). */
@media (max-width: 1399px) { #header .txk-hdr-wx__text { display: none; } }
@media (max-width: 1259px) { #header .txk-hdr-wx { display: none; } }
@media (max-width: 1214px) {
	#header [data-device="desktop"] [data-id="menu"] > ul > li > .ct-menu-link { font-size: 13px; padding-inline: 7px; letter-spacing: .02em; }
	#header [data-device="desktop"] [data-id="menu"] > ul > li > .ct-menu-link::after { left: 7px; right: 7px; }
	[data-device="desktop"] .txk-hdr-sub .txk-hdr-sub__icon { display: none; }
	[data-device="desktop"] .site-logo-container img, [data-device="desktop"] [data-id="logo"] img { height: 42px !important; }
}

/* Narrowest desktops (1000 to 1099px, e.g. a tablet in landscape): live's menu has 8 items (History was added
   2026-11-01), and the last one ran under the search icon. Tighten the menu, logo and pill. (2026-11-11) */
@media (max-width: 1099px) {
	#header [data-device="desktop"] [data-id="menu"] > ul > li > .ct-menu-link { font-size: 12px; padding-inline: 5px; letter-spacing: .01em; }
	#header [data-device="desktop"] [data-id="menu"] > ul > li > .ct-menu-link::after { left: 5px; right: 5px; }
	#header [data-device="desktop"] [data-column="start"] [data-id="menu"] { margin-left: 8px; }
	[data-device="desktop"] .site-logo-container img, [data-device="desktop"] [data-id="logo"] img { height: 36px !important; }
	[data-device="desktop"] .txk-hdr-sub { font-size: .72rem; padding: .6em .8em; margin-left: 6px; }
}

/* ---- Phone/tablet section strip (under the header; scrolls away with the page) ---- */
.txk-secnav { display: none; }
@media (max-width: 999.98px) {
	.txk-secnav {
		display: block; position: relative;
		background: var(--theme-palette-color-8, #fff); border-bottom: 1px solid var(--txk-n-line, #e3e7eb);
	}
	.txk-secnav__scroll {
		display: flex; gap: 2px; overflow-x: auto; padding: 0 8px;
		scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
	}
	.txk-secnav__scroll::-webkit-scrollbar { display: none; }
	.txk-secnav__link {
		flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 11px; position: relative;
		font-family: var(--txk-font-ui, inherit); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
		color: var(--txk-n-text, var(--brand-ink, #32373c)); text-decoration: none; white-space: nowrap;
	}
	.txk-secnav__link.is-current::after {
		content: ""; position: absolute; left: 11px; right: 11px; bottom: 6px; height: 3px; border-radius: 2px;
		background: var(--brand-orange, #ff9000);
	}
	/* Fade on the right edge hints that the row swipes */
	.txk-secnav::after {
		content: ""; position: absolute; top: 0; right: 0; bottom: 1px; width: 28px; pointer-events: none;
		background: linear-gradient(to right, transparent, var(--theme-palette-color-8, #fff));
	}
}
@media print { .txk-secnav { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
	[data-device="desktop"] .site-logo-container img, #header .ct-menu-link::after { transition: none !important; }
}
