/*
 * Tyson Vape: warning bar, promo ticker, header, menus, header search (WPC AJAX Search), off-canvas menu.
 * Depends on tokens.css and base.css. Values follow tyson-vape-redesign-mockup.html.
 *
 * Stacking order (z-index), keep in sync when the age gate is added:
 *   2147483000  .tv-warning           nicotine warning: always visible, above everything (incl. age gate)
 *   2147482000  (reserved)            age gate overlay: above every other layer, below the warning only
 *   99999948-9  WPC AJAX Search       search overlay + panel (plugin defaults)
 *   ~9999       Woostify overlays     off-canvas menu + overlay (Woostify defaults)
 *   40          #masthead             sticky header (mockup value)
 */

/* =========================================================================
 * 1. Nicotine warning bar: never hidden, no JS.
 * ====================================================================== */
html body .tv-warning {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	position: relative;
	z-index: 2147483000;
	margin: 0;
	padding: 12px 16px;
	background: #ffffff;
	color: #000000;
	border-bottom: 3px solid #000000;
	font-family: var(--body);
	font-size: 15px;
	font-weight: var(--fw-black);
	line-height: 1.35;
	letter-spacing: 0.02em;
	text-align: center;
	text-transform: none;
}

@media (max-width: 560px) {
	html body .tv-warning {
		font-size: 13px;
		padding: 10px 12px;
	}
}

/* =========================================================================
 * 2. Promo ticker (pure CSS marquee).
 * ====================================================================== */
.tv-ticker {
	position: relative;
	background: var(--red);
	color: var(--on-red);
	overflow: hidden;
	white-space: nowrap;
	padding: 9px 0;
	font-family: var(--font-display);
	font-size: 15px;
	letter-spacing: 0.14em;
	line-height: 1.2;
}

.tv-ticker__viewport {
	overflow: hidden;
}

.tv-ticker__track {
	display: inline-block;
	animation: tv-ticker-slide 28s linear infinite;
	will-change: transform;
}

.tv-ticker:hover .tv-ticker__track {
	animation-play-state: paused;
}

.tv-ticker__item {
	margin: 0 26px;
}

.tv-ticker__sep {
	font-style: normal;
	color: var(--ink);
}

@keyframes tv-ticker-slide {
	to {
		transform: translateX(-50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tv-ticker__track {
		animation-play-state: paused;
		animation: none;
	}
}

/* Pause / play button (shown by header.js). */
.tv-ticker {
	padding-right: 44px;
}

.tv-ticker.is-paused .tv-ticker__track {
	animation-play-state: paused;
}

html body .tv-ticker__toggle {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	min-height: 0;
	padding: 0;
	margin: 0;
	background: var(--red);
	color: var(--white);
	border: 0;
	border-left: 2px solid var(--ink);
	border-radius: 0;
	clip-path: none;
	box-shadow: none;
	cursor: pointer;
	transform: none;
}

html body .tv-ticker__toggle[hidden] {
	display: none;
}

html body .tv-ticker__toggle:hover {
	background: var(--red-hover);
	color: var(--white);
	transform: none;
}

html body .tv-ticker__toggle:focus-visible {
	outline: 3px solid var(--white);
	outline-offset: -5px;
}

/* Icon: two bars (pause) or a triangle (play). */
.tv-ticker__icon {
	display: block;
	width: 12px;
	height: 14px;
	border-left: 4px solid currentColor;
	border-right: 4px solid currentColor;
}

.tv-ticker.is-paused .tv-ticker__icon {
	width: 0;
	height: 0;
	border-left: 12px solid currentColor;
	border-right: 0;
	border-top: 7px solid transparent;
	border-bottom: 7px solid transparent;
}

@media (prefers-reduced-motion: reduce) {
	html body .tv-ticker__toggle {
		display: none;
	}
}

/* =========================================================================
 * 3. Header shell: sticky, translucent ink, blur, bottom line.
 * ====================================================================== */
body #masthead.site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 40;
	background: rgba(7, 7, 7, 0.88);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
	box-shadow: none;
}

/* The admin bar is not fixed below 600px, so the header sticks to the very top there. */
@media (max-width: 600px) {
	body #masthead.site-header {
		top: 0;
	}
}

body #masthead .site-header-inner {
	background: transparent;
	border: 0;
}

body #masthead .site-header-inner > .woostify-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 74px;
	padding-top: 0;
	padding-bottom: 0;
}

/* Logo left. */
body #masthead .site-branding {
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
}

body #masthead .site-branding img.custom-logo {
	display: block;
	height: auto;
	max-height: 48px;
	width: auto;
	max-width: 200px;
}

/* =========================================================================
 * 4. Primary menu (desktop), centred.
 * ====================================================================== */
body #masthead .site-navigation {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	min-width: 0;
}

body #masthead .main-navigation .primary-navigation {
	display: flex;
	align-items: center;
	gap: 34px;
	margin: 0;
	padding: 0;
}

body #masthead .main-navigation .primary-navigation > li {
	margin: 0;
	padding: 0;
}

body #masthead .main-navigation .primary-navigation > li > a {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 0;
	color: var(--nav-text);
	font-family: var(--body);
	font-size: var(--fs-small);
	font-weight: var(--fw-bold);
	letter-spacing: var(--ls-nav);
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
}

body #masthead .main-navigation .primary-navigation > li > a .menu-item-arrow,
body #masthead .main-navigation .primary-navigation > li > a .woostify-svg-icon {
	color: inherit;
}

/* Red underline that grows on hover / focus (mockup .menu a::after). */
body #masthead .main-navigation .primary-navigation > li > a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	height: 2px;
	width: 0;
	background: var(--red);
	transition: width var(--t-base);
}

body #masthead .main-navigation .primary-navigation > li > a:hover,
body #masthead .main-navigation .primary-navigation > li > a:focus-visible,
body #masthead .main-navigation .primary-navigation > li:hover > a,
body #masthead .main-navigation .primary-navigation > li:focus-within > a {
	color: var(--white);
}

body #masthead .main-navigation .primary-navigation > li > a:hover::after,
body #masthead .main-navigation .primary-navigation > li > a:focus-visible::after,
body #masthead .main-navigation .primary-navigation > li:hover > a::after,
body #masthead .main-navigation .primary-navigation > li:focus-within > a::after {
	width: 100%;
}

/* Current page: bone text, full underline (not red text: red is for large type and fills only). */
body #masthead .main-navigation .primary-navigation > li.current-menu-item > a,
body #masthead .main-navigation .primary-navigation > li.current-menu-ancestor > a,
body #masthead .main-navigation .primary-navigation > li.current-menu-parent > a,
body #masthead .main-navigation .primary-navigation > li.current_page_parent > a,
body #masthead .main-navigation .primary-navigation > li.current_page_ancestor > a {
	color: var(--bone);
}

body #masthead .main-navigation .primary-navigation > li.current-menu-item > a::after,
body #masthead .main-navigation .primary-navigation > li.current-menu-ancestor > a::after,
body #masthead .main-navigation .primary-navigation > li.current_page_parent > a::after {
	width: 100%;
}

/* =========================================================================
 * 5. Dropdown sub-menus: dark panel, clear hover + focus.
 * ====================================================================== */
body #masthead .main-navigation .primary-navigation .sub-menu {
	background: var(--panel);
	border: 1px solid var(--line);
	border-top: 2px solid var(--red);
	border-radius: 0;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
	padding: 6px 0;
}

/* Keyboard: open the dropdown while focus is inside it. */
body #masthead .main-navigation .primary-navigation li.menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
}

/* Additional CSS (post 3155) draws 2px black dividers with !important; recolour them for dark. */
body #masthead .main-navigation ul li.menu-item-has-children ul.sub-menu li {
	border-bottom-color: var(--line) !important;
}

body #masthead .main-navigation .primary-navigation .sub-menu a {
	display: block;
	padding: 11px 18px;
	color: var(--bone);
	background: transparent;
	border-left: 3px solid transparent;
	font-family: var(--body);
	font-size: 14px;
	font-weight: var(--fw-semibold);
	letter-spacing: 0.02em;
	line-height: 1.35;
	text-transform: none;
	text-decoration: none;
}

body #masthead .main-navigation .primary-navigation .sub-menu a:hover,
body #masthead .main-navigation .primary-navigation .sub-menu a:focus-visible,
body #masthead .main-navigation .primary-navigation .sub-menu li.current-menu-item > a {
	background: var(--line);
	color: var(--white);
	border-left-color: var(--red);
}

body #masthead .main-navigation .primary-navigation .sub-menu a:focus-visible {
	outline-offset: -3px;
}

/* =========================================================================
 * 6. Tools: search button, account link, gold cart button.
 * ====================================================================== */
body #masthead .tv-tools {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 0;
	font-family: var(--body);
	font-size: var(--fs-small);
	font-weight: var(--fw-semibold);
}

body #masthead .tv-tool-search {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	background: transparent;
	color: var(--bone);
	border: 0;
	border-radius: 0;
	clip-path: none;
	box-shadow: none;
	cursor: pointer;
}

body #masthead .tv-tool-search .woostify-svg-icon,
body #masthead .tv-tool-search svg {
	color: inherit;
	fill: currentColor;
	width: 20px;
	height: 20px;
}

body #masthead .tv-tool-search:hover {
	color: var(--gold);
	background: transparent;
	transform: none;
}

body #masthead .tv-account {
	color: var(--bone);
	text-decoration: none;
	white-space: nowrap;
}

body #masthead .tv-account:hover,
body #masthead .tv-account:focus-visible {
	color: var(--gold-soft);
}

body #masthead .tv-cart {
	display: inline-flex;
	align-items: center;
	padding: 10px 16px;
	background: var(--gold);
	color: var(--ink);
	clip-path: var(--clip-btn-sm);
	font-family: var(--body);
	font-size: var(--fs-eyebrow);
	font-weight: var(--fw-black);
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s;
}

body #masthead .tv-cart:hover {
	background: var(--gold-soft);
	color: var(--ink);
}

body #masthead .tv-cart:focus-visible {
	clip-path: none;
	color: var(--ink);
}

/* The count is plain text inside the button (Woostify's badge styles reset). */
body #masthead .tv-cart .shop-cart-count {
	position: static;
	display: inline;
	min-width: 0;
	width: auto;
	height: auto;
	padding: 0;
	margin: 0;
	background: transparent;
	color: inherit;
	border-radius: 0;
	font: inherit;
	line-height: inherit;
	transform: none;
}

/* =========================================================================
 * 7. Mobile: 1000px and below, menu button + off-canvas.
 * ====================================================================== */
body #masthead .wrap-toggle-sidebar-menu {
	display: none;
}

body #masthead .tv-menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	background: transparent;
	border: 1.5px solid var(--line);
	border-radius: 0;
	clip-path: none;
	cursor: pointer;
	transform: none;
}

/* Woostify draws the burger with span + ::before/::after using its accent colour. */
body #masthead .tv-menu-toggle span,
body #masthead .tv-menu-toggle span::before,
body #masthead .tv-menu-toggle span::after {
	background-color: var(--bone);
}

@media (max-width: 1000px) {
	body #masthead .wrap-toggle-sidebar-menu {
		display: flex;
		align-items: center;
		order: 0;
	}

	body #masthead .site-branding {
		order: 1;
		flex: 1 1 auto;
		display: flex;
		justify-content: flex-start;
		text-align: left;
	}

	body #masthead .site-navigation {
		display: none;
	}

	body #masthead .tv-tools {
		order: 2;
		gap: 12px;
	}

	body #masthead .site-header-inner > .woostify-container {
		gap: 12px;
		min-height: 64px;
	}

	body #masthead .site-branding img.custom-logo {
		max-height: 40px;
		max-width: 150px;
	}
}

@media (max-width: 560px) {
	/* Mockup hides the account link here; it stays reachable in the off-canvas menu. */
	body #masthead .tv-account {
		display: none;
	}

	body #masthead .site-branding img.custom-logo {
		max-width: 120px;
	}

	body #masthead .tv-cart {
		padding: 9px 12px;
	}

	body #masthead .tv-tool-search {
		width: 36px;
		height: 36px;
	}
}

/* Off-canvas menu (Woostify .sidebar-menu), dark. */
html body #tv-mobile-menu {
	overflow-x: hidden;
	background-color: var(--ink);
	color: var(--bone);
	border-right: 1px solid var(--line);
}

/* Closed: keep it out of the tab order and away from screen readers. */
html:not(.sidebar-menu-open) body #tv-mobile-menu {
	visibility: hidden;
}

html.sidebar-menu-open body #tv-mobile-menu {
	visibility: visible;
}

html body #tv-mobile-menu a,
html body #tv-mobile-menu .primary-navigation > li > a,
html body #tv-mobile-menu .primary-navigation .sub-menu a {
	color: var(--bone);
	font-family: var(--body);
	text-decoration: none;
}

html body #tv-mobile-menu .primary-navigation > li > a {
	font-size: 14px;
	font-weight: var(--fw-bold);
	letter-spacing: var(--ls-nav);
	text-transform: uppercase;
}

html body #tv-mobile-menu .primary-navigation .sub-menu a {
	font-size: 14px;
	font-weight: var(--fw-medium);
	letter-spacing: 0.02em;
	text-transform: none;
}

html body #tv-mobile-menu a:hover,
html body #tv-mobile-menu a:focus-visible,
html body #tv-mobile-menu .current-menu-item > a {
	color: var(--white);
}

html body #tv-mobile-menu li,
html body #tv-mobile-menu .primary-navigation li,
html body #tv-mobile-menu .sidebar-menu-bottom,
html body #tv-mobile-menu .site-search {
	border-color: var(--line);
}

html body #tv-mobile-menu .arrow-icon,
html body #tv-mobile-menu .woostify-svg-icon {
	color: var(--bone);
}

html body #tv-mobile-menu .tv-menu-close {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: 100%;
	margin: 0 0 8px;
	padding: 12px 16px;
	background: transparent;
	color: var(--bone);
	border: 0;
	border-bottom: 1px solid var(--line);
	border-radius: 0;
	clip-path: none;
	font-family: var(--body);
	font-size: var(--fs-eyebrow);
	font-weight: var(--fw-bold);
	letter-spacing: var(--ls-nav);
	text-transform: uppercase;
	cursor: pointer;
	transform: none;
}

html body #tv-mobile-menu .tv-menu-close::after {
	content: "\00d7";
	margin-left: 10px;
	font-size: 20px;
	line-height: 1;
}

html body #tv-mobile-menu .tv-menu-close:hover {
	color: var(--white);
	background: transparent;
}

/* Woostify hides the off-canvas menu from 992px up; our mobile breakpoint is 1000px. */
@media (min-width: 992px) and (max-width: 1000px) {
	html body.has-header-layout-1 #tv-mobile-menu {
		display: block;
	}

	html.sidebar-menu-open body #tv-mobile-menu .site-navigation {
		left: auto;
		right: auto;
	}

	/* Woostify's desktop nav rules (>=992px) also hit the panel's menu; reset to a stacked list. */
	html body #tv-mobile-menu .primary-navigation {
		display: block;
		text-align: left;
	}

	html body #tv-mobile-menu .primary-navigation > li {
		display: block;
		width: 100%;
	}

	html body #tv-mobile-menu .primary-navigation > li > a {
		display: flex;
		justify-content: space-between;
		width: 100%;
	}
}

/* Woostify divider lines (#ececec) -> dark line. */
html body #tv-mobile-menu .site-navigation nav > ul > li:first-child > a,
html body #tv-mobile-menu .site-navigation nav .menu-item a,
html body #tv-mobile-menu .site-navigation nav .menu-item a > .arrow-icon,
html body #tv-mobile-menu .sidebar-menu-bottom ul li a {
	border-color: var(--line);
}

html body #tv-mobile-menu .site-navigation nav .menu-item a:hover {
	background-color: var(--panel);
}

/* Search form inside the off-canvas menu (WPC AJAX Search opens on click). */
html body #tv-mobile-menu input[type="search"],
html body #tv-mobile-menu .search-field {
	background-color: var(--panel);
	color: var(--bone);
	border: var(--border-w) solid var(--line);
	border-radius: 0;
}

html body #tv-mobile-menu input[type="search"]::placeholder {
	color: var(--mute);
	opacity: 1;
}

html body #tv-mobile-menu .woocommerce-product-search button,
html body #tv-mobile-menu .search-form button {
	clip-path: none;
	padding: 0 14px;
}

/* Woostify overlay behind the off-canvas menu. */
html body #woostify-overlay {
	background-color: rgba(0, 0, 0, 0.75);
	color: var(--bone);
}

/* =========================================================================
 * 8. Header search: WPC AJAX Search panel (#wpcas-area), dark.
 *    The plugin's own CSS is white; these rules only recolour it.
 * ====================================================================== */
html body .wpcas-overlay {
	background: rgba(0, 0, 0, 0.85);
}

html body .wpcas-area,
html body .wpcas-area a,
html body .wpcas-area input,
html body .wpcas-area p {
	font-family: var(--body);
}

html body .wpcas-area {
	background-color: var(--panel);
	color: var(--bone);
	border-left: 1px solid var(--line);
	border-top: 5px solid var(--red);
}

html body .wpcas-area .wpcas-area-top {
	background-color: var(--ink);
	color: var(--bone);
	border-bottom: 1px solid var(--line);
	font-family: var(--font-display);
	font-weight: var(--fw-regular);
	font-size: 22px;
	letter-spacing: var(--ls-display);
}

html body .wpcas-area .wpcas-close {
	color: var(--bone);
	cursor: pointer;
}

html body .wpcas-area .wpcas-close:hover,
html body .wpcas-area .wpcas-close:focus-visible {
	color: var(--gold);
}

html body .wpcas-area .wpcas-area-mid .wpcas-search-input-inner {
	background: var(--canvas);
	border: var(--border-w) solid var(--line);
	border-radius: 0;
}

html body .wpcas-area .wpcas-area-mid .wpcas-search-input-inner:focus-within {
	border-color: var(--gold);
}

html body .wpcas-area #wpcas_search_keyword {
	background: transparent;
	color: var(--bone);
	border: 0;
	outline: none;
	box-shadow: none;
}

html body .wpcas-area #wpcas_search_keyword::placeholder {
	color: var(--mute);
	opacity: 1;
}

html body .wpcas-area .wpcas-search-input-icon,
html body .wpcas-area select {
	color: var(--bone);
}

html body .wpcas-area .wpcas-area-mid .wpcas-product,
html body .wpcas-area .wpcas-post {
	background-color: var(--panel);
	border-bottom: 1px solid var(--line);
}

html body .wpcas-area .wpcas-area-mid .wpcas-product:hover,
html body .wpcas-area .wpcas-post:hover {
	background-color: var(--line);
}

html body .wpcas-area .wpcas-product-name,
html body .wpcas-area .wpcas-product-name a,
html body .wpcas-area .wpcas-post-name,
html body .wpcas-area .wpcas-post-name a {
	color: var(--bone);
}

html body .wpcas-area .wpcas-product-price,
html body .wpcas-area .wpcas-post-date,
html body .wpcas-area .wpcas-not-found,
html body .wpcas-area .wpcas-popular-keywords {
	color: var(--bone);
}

html body .wpcas-area .wpcas-more-results a,
html body .wpcas-area .wpcas-popular-keywords a {
	color: var(--gold);
}

html body .wpcas-area .wpcas-area-mid .wpcas-search-result.wpcas-loading::after {
	background-color: rgba(21, 21, 23, 0.7);
}

/* WPC sets result colours with long selectors; use the panel id to win without !important. */
html body #wpcas-area .wpcas-product-name,
html body #wpcas-area .wpcas-product-name a,
html body #wpcas-area .wpcas-product-info a,
html body #wpcas-area .wpcas-post-name,
html body #wpcas-area .wpcas-post-name a,
html body #wpcas-area .wpcas-product-data a:not(.button) {
	color: var(--bone);
}

html body #wpcas-area .wpcas-product-name a:hover,
html body #wpcas-area .wpcas-post-name a:hover {
	color: var(--gold-soft);
}

/* Small icon actions in results (add to cart, quick view): not the big clipped primary button. */
html body #wpcas-area .wpcas-product-actions .button,
html body #wpcas-area .wpcas-product-actions a,
html body #wpcas-area .wpcas-product-actions button {
	padding: 6px;
	background: transparent;
	color: var(--bone);
	border: 0;
	clip-path: none;
	transform: none;
	letter-spacing: 0;
}

html body #wpcas-area .wpcas-product-actions .button:hover,
html body #wpcas-area .wpcas-product-actions a:hover,
html body #wpcas-area .wpcas-product-actions button:hover {
	background: var(--line);
	color: var(--gold);
}

html body #wpcas-area .wpcas-product-actions svg {
	fill: currentColor;
	color: inherit;
}
