/**
 * Redesign 2026 — header (mockups NOWORR_1 / NOWORR_2).
 *
 * Restyles the existing header markup: ticker strip, dark nav bar with the
 * indigo rule underneath, and the round search affordance.
 */

header.header {
	background: var(--nw-deep);
	border-bottom: 2px solid var(--nw-indigo);
}

header.header .container {
	background: transparent;
}

/* --- Ticker strip ------------------------------------------------------- */

.nw-ticker {
	background: var(--nw-deeper);
	color: var(--nw-on-dark-dim);
	min-height: var(--nw-ticker-h);
}

.nw-ticker--empty {
	display: none;
	min-height: 0;
}

/* The legacy sheet sets `margin-bottom: 20px !important` on this block. */
.nw-ticker .new-home-page-courses {
	max-width: var(--nw-shell);
	margin: 0 auto !important;
	padding: 0 var(--nw-gutter);
	background: transparent;
}

/* `flex-direction: column` below 992px would stack the strip vertically. */
.nw-ticker .nh-courses,
.nw-ticker .nh-courses.nh-courses {
	height: var(--nw-ticker-h);
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 24px;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	overflow: hidden;
}

.nw-ticker .nh-courses-left,
.nw-ticker .nh-courses-left.nh-courses-left {
	display: flex;
	align-items: center;
	gap: 28px;
	flex: 1;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	white-space: nowrap;
	scrollbar-width: none;
	-webkit-mask-image: linear-gradient(90deg, #000 90%, transparent);
	mask-image: linear-gradient(90deg, #000 90%, transparent);
}

.nw-ticker .nh-courses-left::-webkit-scrollbar {
	display: none;
}

.nw-ticker .nh-courses-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	flex: none;
}

.nw-ticker .nh-courses-item-icon {
	width: 18px;
	min-width: 18px;
	height: 18px;
	margin-right: 0;
	flex: none;
}

.nw-ticker .nh-courses-item-data {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
}

/* Unwraps the symbol/change pair so all three can be ordered as one row:
   symbol, price, change — the reading order used in the mockups. */
.nw-ticker .nh-courses-item-top {
	display: contents;
}

.nw-ticker .nh-courses-item-short-name {
	color: #9a97bf;
	font-size: 13px;
	font-weight: 600;
	order: 1;
}

.nw-ticker .nh-courses-item-value {
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	order: 2;
	margin: 0;
}

.nw-ticker .nh-courses-item-short-changes {
	color: #3bd07f;
	font-size: 13px;
	font-weight: 700;
	order: 3;
	background: none;
	margin: 0;
	padding: 0;
}

.nw-ticker .nh-courses-item-short-changes.red {
	color: #ff6a8a;
}

/* Legacy rules make this a 40px dark circle with `font-size: 0` and an
   !important colour; it becomes a plain text link here. */
.nw-ticker .nh-courses-all-btn,
.nw-ticker .nh-courses-all-btn.nh-courses-all-btn {
	flex: none;
	width: auto;
	min-width: 0;
	height: auto;
	border-radius: 0;
	color: var(--nw-on-dark-dim) !important;
	font-size: 13px;
	font-weight: 600;
	margin: 0 0 0 auto;
	padding: 0;
	background: none;
	border: 0;
}

.nw-ticker .nh-courses-all-btn:hover {
	color: #fff !important;
	background: none;
}

.nw-ticker .nh-courses-all-btn::after {
	margin-left: 8px;
	opacity: 0.7;
}

/* --- Nav bar ------------------------------------------------------------ */

.header .header-inner {
	height: calc(var(--nw-bar-h) - 2px);
	align-items: center;
	justify-content: space-between;
	gap: var(--nw-gutter);
	padding: 0;
}

.header .header-logo {
	flex: none;
}

.header .header-logo-link {
	display: inline-flex;
	/* child.css sets `top: 7px` on this link, calibrated for the old static
	   logo image; it just misaligns the animated text logo now. */
	top: 0;
	transition: opacity 0.18s ease;
}

.header .header-logo-link:hover {
	opacity: 0.8;
}

.header .header-logo .nw-logo {
	font-size: 24px;
}

.header .header-nav-list {
	display: flex;
	align-items: center;
	gap: 28px;
}

.header .header-nav-list li a {
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	color: var(--nw-on-dark);
	transition: color 0.18s ease;
}

.header .header-nav-list li a:hover {
	color: #fff;
	text-decoration: none;
}

.header .header-actions {
	max-width: none;
	flex: none;
}

.header .header-actions-search {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid var(--nw-outline-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--nw-on-dark-dim);
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.header .header-actions-search:hover {
	background: #e3defc;
	border-color: var(--nw-accent);
	transform: translateY(-2px);
}

.header .header-actions-search svg {
	width: 17px;
	height: 17px;
}

.header .header-actions-search:hover svg path {
	fill: var(--nw-accent);
}

/* --- Mobile bar --------------------------------------------------------- */

@media (max-width: 992px) {
	.header .header-inner-mobile {
		height: calc(var(--nw-bar-h) - 2px);
		padding: 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.header .header-inner-mobile-logo .nw-logo {
		font-size: 20px;
	}

	.header .header-inner-mobile-nav {
		background: var(--nw-deep);
	}
}

/* Keep the slide-out menu flush under the taller (ticker + bar) header. */
@media screen and (max-width: 576px) {
	body.nw-has-ticker .header-inner-mobile-nav {
		top: calc(var(--nw-bar-h) + var(--nw-ticker-h)) !important;
		height: calc(100vh - var(--nw-bar-h) - var(--nw-ticker-h));
	}
}
