/**
 * Executive Education — top of page: the audience switch (professionals /
 * organisations), the sub-nav's lens control and the lens-swap animation.
 *
 * The lens control's markup comes from template-parts/programme/subnav.php
 * (`.cc-lens`), whose styles live in cc-top.css, which this page does not
 * load; they are repeated here. From the export's index.css (.lens,
 * .lens-swap), figma_make/LSB - Exed/src/index.css, 2026-09-17.
 *
 * @package lsb
 */

/* ---------------------------------------------------------------------------
   Audience visibility — every `.for-pro` / `.for-org` pair on the page
   ------------------------------------------------------------------------ */

body:not([data-lens="org"]) .for-org,
body[data-lens="org"] .for-pro {
	display: none !important;
}

/* ---------------------------------------------------------------------------
   Lens-swap — replayed on [data-exed-swap] whenever the lens changes
   ------------------------------------------------------------------------ */

.exed-lens-swap {
	animation: exed-lens-in 0.45s var(--bib-ease);
}

@keyframes exed-lens-in {
	from {
		opacity: 0;
		transform: translateY(0.5rem);
	}
}

@media (prefers-reduced-motion: reduce) {
	.exed-lens-swap {
		animation: none;
	}
}

/* ---------------------------------------------------------------------------
      Sub-nav lens control — SubNav.tsx's `.lens` segmented switch
   ------------------------------------------------------------------------ */

.cc-lens {
	position: relative;
	flex: none;
	display: grid;
	grid-template-columns: 1fr 1fr;
	padding: 3px;
	border: 1px solid var(--bib-line);
	border-radius: var(--radius-full);
	background-color: var(--bib-paper);
}

.bib-subnav.is-stuck .cc-lens {
	background-color: var(--color-white);
}

.cc-lens__opt {
	position: relative;
	z-index: 1;
	height: 2.125rem;
	padding-inline: var(--space-4);
	border: 0;
	border-radius: var(--radius-full);
	background: none;
	font-family: var(--font-body);
	font-size: var(--fs-ui-sm);
	font-weight: var(--fw-medium);
	color: var(--bib-ink-2);
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.25s;
}

.cc-lens__opt[aria-checked="true"] {
	color: var(--color-white);
}

.cc-lens__thumb {
	position: absolute;
	inset-block: 3px;
	inset-inline-start: 3px;
	width: calc(50% - 3px);
	border-radius: var(--radius-full);
	background-color: var(--color-navy);
	transition: transform 0.35s var(--bib-ease);
}

body[data-lens="org"] .cc-lens__thumb {
	transform: translateX(100%);
}

@media (max-width: 26.24em) {
	.cc-lens__opt {
		padding-inline: var(--space-3);
	}
}
