/* ==========================================================================
   I Already Won Fitness: site header (Prompt 05)
   Desktop bar ([iawf_header] in the Avada Header Layout, Large Screen only)
   and the left "Menu" drawer (#iawf-menu, printed in wp_footer, shared with
   the tablet/mobile header from Prompt 07).

   Tokens: IAWF-DSM-20261019 (AWB colors and typography sets).
   Components: IAWF-RCM-20261019 (iawf-btn classes, --iawf-icon-arrow,
   --iawf-ease-out). Nothing from the component layer is copied here.
   Translucent values are AWB colors mixed with transparency, never new colors.
   ========================================================================== */

/* Text Block host: a wrapping paragraph around the shortcode reserves no space. */
.iawf-hdr-host > p:empty {
	display: none;
}

/* --------------------------------------------------------------------------
   1. Desktop bar
   -------------------------------------------------------------------------- */

.iawf-hdr {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 60;
	color: var(--awb-color8);
	font-family: var(--awb-typography4-font-family);
}

.admin-bar .iawf-hdr {
	top: 32px;
}

.iawf-hdr__bar {
	background-color: transparent;
	border-bottom: 1px solid transparent;
	transition: background-color .35s, border-color .35s;
}

/* Scrolled: once the hero headline reaches the header (iawf-header.js). */
.iawf-hdr.is-solid .iawf-hdr__bar {
	background-color: var(--awb-color1);
	border-bottom-color: color-mix(in srgb, var(--awb-color4) 70%, transparent);
	-webkit-backdrop-filter: saturate(180%) blur(18px);
	backdrop-filter: saturate(180%) blur(18px);
}

.iawf-hdr__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(max-content, 1fr);
	align-items: center;
	gap: 16px;
	max-width: 1760px;
	height: 100px;
	margin: 0 auto;
	padding: 0 clamp(16px, 5vw, 72px);
}

/* Menu toggle: 48px translucent circle with two lines, then "Menu". */
.iawf-hdr .iawf-hdr__toggle {
	justify-self: start;
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--awb-color8);
	cursor: pointer;
	font-family: var(--awb-typography3-font-family);
	font-size: var(--awb-typography3-font-size);
	font-weight: var(--awb-typography3-font-weight);
	line-height: 1;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.iawf-hdr__burger {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background-color: color-mix(in srgb, var(--awb-color8) 14%, transparent);
	transition: background-color .25s;
}

.iawf-hdr__burger > span {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background-color: var(--awb-color8);
}

.iawf-hdr__burger > span + span {
	width: 12px;
	margin: 5px 6px 0 0; /* 5px gap; short line keeps the long line's left edge */
}

@media (hover: hover) and (pointer: fine) {
	.iawf-hdr .iawf-hdr__toggle:hover .iawf-hdr__burger {
		background-color: color-mix(in srgb, var(--awb-color8) 26%, transparent);
	}
}

.iawf-hdr .iawf-hdr__toggle:focus-visible {
	outline: none;
}

.iawf-hdr .iawf-hdr__toggle:focus-visible .iawf-hdr__burger {
	background-color: color-mix(in srgb, var(--awb-color8) 26%, transparent);
	outline: 2px solid var(--awb-color8);
	outline-offset: 3px;
}

/* Logo: 64px tall (source 600 x 160, so 240px wide). */
.iawf-hdr__logo {
	display: flex;
	align-items: center;
	color: var(--awb-color8);
	text-decoration: none;
}

.iawf-hdr__logo .iawf-hdr__logo-img {
	display: block;
	width: auto;
	max-width: none;
	height: 64px;
}

.iawf-hdr__logo:focus-visible {
	outline: 2px solid var(--awb-color8);
	outline-offset: 4px;
}

/* CTAs: Free class (outline) and Join now (red). 34px apart so the hover
   grow (22px) never touches the neighbor. */
.iawf-hdr__ctas {
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 34px;
}

.iawf-hdr__ctas .fusion-button {
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   2. Drawer (all widths; opened by any [data-iawf-menu-toggle])
   -------------------------------------------------------------------------- */

.iawf-scrim {
	position: fixed;
	inset: 0;
	z-index: 65;
	background-color: color-mix(in srgb, var(--awb-color1) 55%, transparent);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.iawf-drawer {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 70;
	width: 480px;
	overflow-y: auto;
	overscroll-behavior: contain;
	background-color: var(--awb-color1);
	border-right: 1px solid var(--awb-color3);
	box-shadow: 40px 0 80px -20px color-mix(in srgb, var(--awb-color1) 70%, transparent);
	color: var(--awb-color8);
	font-family: var(--awb-typography4-font-family);
}

.admin-bar .iawf-drawer,
.admin-bar .iawf-scrim {
	top: 32px;
}

.iawf-scrim[hidden],
.iawf-drawer[hidden],
.iawf-drawer .iawf-drawer__sub[hidden] {
	display: none;
}

.iawf-drawer__inner {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 32px;
	min-height: 100%;
	padding: 22px 40px 32px;
}

.iawf-drawer__top {
	display: flex;
	flex-direction: column;
}

/* Close: red 48px circle with x, then "Close". */
.iawf-drawer .iawf-drawer__close {
	align-self: flex-start;
	display: flex;
	align-items: center;
	gap: 14px;
	height: 48px;
	margin: 0 0 28px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--awb-color8);
	cursor: pointer;
	font-family: var(--awb-typography3-font-family);
	font-size: var(--awb-typography3-font-size);
	font-weight: var(--awb-typography3-font-weight);
	line-height: 1;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.iawf-drawer__close-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background-color: var(--awb-color5);
	font-family: var(--awb-typography4-font-family);
	font-size: 22px; /* local: approved header drawer */
	font-weight: var(--awb-typography4-font-weight);
	letter-spacing: 0;
	line-height: 1;
}

.iawf-drawer .iawf-drawer__close:focus-visible {
	outline: none;
}

.iawf-drawer .iawf-drawer__close:focus-visible .iawf-drawer__close-icon {
	outline: 2px solid var(--awb-color8);
	outline-offset: 3px;
}

/* Main rows (Training toggle and top-level links): Subheadings set at 34px. */
.iawf-drawer__nav {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--awb-color3);
}

.iawf-drawer__group {
	border-bottom: 1px solid var(--awb-color3);
}

.iawf-drawer .iawf-drawer__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	width: 100%;
	margin: 0;
	padding: 18px 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--awb-color8);
	cursor: pointer;
	font-family: var(--awb-typography2-font-family);
	font-size: 34px; /* local: approved header drawer row */
	font-weight: var(--awb-typography2-font-weight);
	line-height: 1;
	letter-spacing: -.01em;
	text-align: left;
	text-decoration: none;
	text-transform: uppercase;
}

.iawf-drawer .iawf-drawer__link {
	border-bottom: 1px solid var(--awb-color3);
	transition: color .2s;
}

.iawf-drawer .iawf-drawer__row.is-current,
.iawf-drawer .iawf-drawer__row.is-current:hover,
.iawf-drawer .iawf-drawer__row.is-current:focus-visible {
	color: var(--awb-color5);
}

@media (hover: hover) and (pointer: fine) {
	.iawf-drawer .iawf-drawer__link:hover {
		color: var(--awb-color5);
	}
}

.iawf-drawer .iawf-drawer__link:focus-visible {
	color: var(--awb-color5);
	outline: none;
}

.iawf-drawer .iawf-drawer__toggle:hover {
	color: var(--awb-color8);
}

.iawf-drawer .iawf-drawer__toggle.is-current:hover {
	color: var(--awb-color5);
}

.iawf-drawer .iawf-drawer__toggle:focus-visible {
	outline: none;
}

/* Accordion sign: 34px ring, minus when open, plus when closed. */
.iawf-drawer__sign {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border: 1px solid var(--awb-color4);
	border-radius: 50%;
	color: var(--awb-color8);
	font-family: var(--awb-typography4-font-family);
	font-size: 18px; /* local: approved header drawer */
	font-weight: var(--awb-typography4-font-weight);
	letter-spacing: 0;
	line-height: 1;
}

.iawf-drawer__sign::before {
	content: "+";
}

.iawf-drawer__toggle[aria-expanded="true"] .iawf-drawer__sign::before {
	content: "\2212";
}

.iawf-drawer .iawf-drawer__toggle:focus-visible .iawf-drawer__sign {
	outline: 2px solid var(--awb-color8);
	outline-offset: 3px;
}

/* Row arrow: shared arrow icon, Text Subtle. */
.iawf-drawer__arrow {
	flex-shrink: 0;
	width: 20px;
	height: 15px;
	background-color: var(--awb-color6);
	-webkit-mask: var(--iawf-icon-arrow) center / contain no-repeat;
	mask: var(--iawf-icon-arrow) center / contain no-repeat;
}

/* Training children: thumbnail, title and description. */
.iawf-drawer__sub {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 0 0 16px;
}

.iawf-drawer .iawf-drawer__sublink {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 6px;
	border-radius: 14px;
	color: var(--awb-color8);
	text-decoration: none;
	transition: background-color .25s;
}

@media (hover: hover) and (pointer: fine) {
	.iawf-drawer .iawf-drawer__sublink:hover {
		background-color: #141414; /* DSM 1: hover surface (approved local value) */
		color: var(--awb-color8);
	}
}

.iawf-drawer .iawf-drawer__sublink:focus-visible {
	background-color: #141414; /* DSM 1: hover surface (approved local value) */
	color: var(--awb-color8);
	outline: none;
}

.iawf-drawer .iawf-drawer__sublink[aria-current="page"] .iawf-drawer__subtitle {
	color: var(--awb-color5);
}

.iawf-drawer__thumb {
	display: block;
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	border-radius: 10px;
	object-fit: cover;
}

.iawf-drawer__subtext {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.iawf-drawer__subtitle {
	font-size: 15px; /* local: approved header drawer */
	font-weight: var(--awb-typography3-font-weight);
	line-height: 1.3;
}

.iawf-drawer__desc {
	color: var(--awb-color7);
	font-size: var(--awb-typography5-font-size);
	line-height: 1.35;
}

/* Foot: two buttons, then address and phone. */
.iawf-drawer__foot {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.iawf-drawer__ctas {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 34px;
}

.iawf-drawer__ctas > * {
	min-width: 0;
}

.iawf-drawer__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 20px;
	color: var(--awb-color7);
	font-size: var(--awb-typography5-font-size);
	line-height: 1.6;
}

.iawf-drawer .iawf-drawer__addr a,
.iawf-drawer .iawf-drawer__addr a:hover,
.iawf-drawer .iawf-drawer__addr a:focus-visible {
	color: var(--awb-color7);
	text-decoration: none;
}

.iawf-drawer .iawf-drawer__phone a,
.iawf-drawer .iawf-drawer__phone a:hover,
.iawf-drawer .iawf-drawer__phone a:focus-visible {
	color: var(--awb-color8);
	font-weight: 600;
	text-decoration: none;
}

.iawf-drawer .iawf-drawer__meta a:focus-visible {
	outline: 2px solid var(--awb-color8);
	outline-offset: 3px;
}

/* Drawer on tablet and phone (approved design widths). */
@media (max-width: 1023.98px) {
	.iawf-drawer {
		width: min(520px, 72vw);
	}
}

@media (max-width: 639.98px) {
	.iawf-drawer {
		width: 100%;
		border-right: 0;
	}
	.iawf-drawer__inner {
		padding: 16px 20px 28px;
	}
	.iawf-drawer .iawf-drawer__close {
		height: 44px;
		margin-bottom: 24px;
	}
	.iawf-drawer__close-icon {
		width: 44px;
		height: 44px;
	}
	.iawf-drawer .iawf-drawer__row {
		font-size: 30px; /* local: approved header drawer row (phone) */
	}
}

@media (max-width: 782px) {
	.admin-bar .iawf-drawer,
	.admin-bar .iawf-scrim {
		top: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.iawf-hdr__bar,
	.iawf-hdr__burger,
	.iawf-drawer .iawf-drawer__link,
	.iawf-drawer .iawf-drawer__sublink {
		transition: none;
	}
}
