/* WS48 Typical Library
 * Brand palette: Deep Blue #26526E, Warm Cream #EDE8DE, Terracotta #C1694A,
 * Greige #A8A296, Soft Black #1A1A1A, Brick Red #9C3A2B.
 * Fonts inherit from the theme so the page matches the rest of the site.
 */

.ws48-tl {
	--tl-blue: #26526E;
	--tl-cream: #EDE8DE;
	--tl-terracotta: #C1694A;
	--tl-terracotta-tint: #F6E3DA;
	--tl-greige: #A8A296;
	--tl-black: #1A1A1A;
	--tl-brick: #9C3A2B;
	--tl-white: #FFFFFF;
	--tl-muted: #5C574E;
	--tl-body: #3D3A35;
	--tl-line: #D9D4C9;
	--tl-line-soft: #E6E1D6;
	--tl-radius: 6px;

	background: var(--tl-cream);
	color: var(--tl-black);
	font-family: inherit;
	line-height: 1.5;
}

.ws48-tl *,
.ws48-tl *::before,
.ws48-tl *::after {
	box-sizing: border-box;
}

.ws48-tl [hidden] {
	display: none !important;
}

.ws48-tl__wrap {
	max-width: 1280px;
	margin: 0 auto;
	padding-left: 40px;
	padding-right: 40px;
}

.ws48-tl :focus-visible {
	outline: 3px solid var(--tl-blue);
	outline-offset: 2px;
}

/* Header ---------------------------------------------------------------- */
.ws48-tl__header {
	background: var(--tl-white);
	border-bottom: 1px solid var(--tl-line);
}

.ws48-tl__header-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	align-items: flex-end;
	justify-content: space-between;
	padding-top: 40px;
	padding-bottom: 44px;
}

.ws48-tl__intro {
	flex: 1 1 520px;
	max-width: 720px;
}

.ws48-tl .ws48-tl__title {
	margin: 0 0 14px;
	font-size: clamp(34px, 4vw, 48px);
	line-height: 1.05;
	font-weight: 700;
	color: var(--tl-black);
}

.ws48-tl__lede {
	margin: 0;
	font-size: 18px;
	line-height: 1.55;
	color: var(--tl-body);
}

.ws48-tl__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
}

.ws48-tl__fact {
	border: 1px solid var(--tl-line);
	border-radius: var(--tl-radius);
	padding: 14px 18px;
	min-width: 120px;
}

.ws48-tl__fact dt {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--tl-terracotta);
}

.ws48-tl__fact dd {
	margin: 0;
	font-size: 13px;
	color: var(--tl-muted);
}

/* Layout ---------------------------------------------------------------- */
.ws48-tl__body {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	align-items: flex-start;
	padding-top: 32px;
	padding-bottom: 64px;
}

.ws48-tl__filters {
	flex: 1 1 240px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.ws48-tl__results {
	flex: 999 1 560px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Filters --------------------------------------------------------------- */
.ws48-tl__filters-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	min-height: 44px;
}

.ws48-tl .ws48-tl__h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
}

.ws48-tl__clear {
	font: inherit;
	font-size: 14px;
	background: none;
	border: 0;
	color: var(--tl-brick);
	text-decoration: underline;
	cursor: pointer;
	min-height: 44px;
	padding: 0 4px;
}

.ws48-tl__group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ws48-tl .ws48-tl__group-title {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--tl-muted);
}

.ws48-tl__stack {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ws48-tl__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ws48-tl__segments {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 6px;
}

.ws48-tl__opt {
	font: inherit;
	font-size: 15px;
	min-height: 44px;
	cursor: pointer;
	color: var(--tl-black);
	background: var(--tl-white);
	border: 1px solid var(--tl-greige);
	border-radius: var(--tl-radius);
	/* keep size stable when the 2px selected border appears */
	box-shadow: inset 0 0 0 1px transparent;
}

.ws48-tl__opt:hover {
	border-color: var(--tl-terracotta);
}

.ws48-tl__opt[aria-pressed="true"] {
	background: var(--tl-terracotta-tint);
	border-color: var(--tl-terracotta);
	box-shadow: inset 0 0 0 1px var(--tl-terracotta);
	font-weight: 600;
}

.ws48-tl__opt--row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	padding: 0 14px;
	text-align: left;
}

.ws48-tl__opt--pill {
	padding: 0 16px;
	border-radius: 999px;
	font-size: 14px;
}

.ws48-tl__opt--seg {
	padding: 0 4px;
	font-size: 14px;
	font-weight: 600;
}

.ws48-tl__count {
	font-size: 13px;
	color: var(--tl-muted);
	font-weight: 400;
}

.ws48-tl__knob {
	width: 36px;
	height: 20px;
	flex-shrink: 0;
	border-radius: 999px;
	border: 2px solid var(--tl-muted);
	position: relative;
}

.ws48-tl__knob::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--tl-muted);
	transition: transform 0.15s ease;
}

.ws48-tl__switch[aria-pressed="true"] .ws48-tl__knob {
	border-color: var(--tl-terracotta);
	background: var(--tl-terracotta);
}

.ws48-tl__switch[aria-pressed="true"] .ws48-tl__knob::after {
	background: var(--tl-white);
	transform: translateX(16px);
}

.ws48-tl__glossary {
	background: var(--tl-white);
	border: 1px solid var(--tl-line);
	border-radius: var(--tl-radius);
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ws48-tl__glossary dl {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	row-gap: 6px;
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
}

.ws48-tl__glossary dt {
	font-weight: 700;
}

.ws48-tl__glossary dd {
	margin: 0;
}

/* Toolbar --------------------------------------------------------------- */
.ws48-tl__toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
	justify-content: space-between;
}

.ws48-tl__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ws48-tl__field--search {
	flex: 1 1 280px;
}

.ws48-tl__field label,
.ws48-tl__label {
	font-size: 13px;
	font-weight: 600;
	color: var(--tl-muted);
}

.ws48-tl__field input,
.ws48-tl__field select {
	font: inherit;
	font-size: 15px;
	height: 46px;
	padding: 0 12px;
	border: 1px solid var(--tl-greige);
	border-radius: var(--tl-radius);
	background: var(--tl-white);
	color: var(--tl-black);
	width: 100%;
	margin: 0;
}

.ws48-tl__currency {
	display: flex;
	border: 1px solid var(--tl-greige);
	border-radius: var(--tl-radius);
	overflow: hidden;
	background: var(--tl-white);
}

.ws48-tl__currency button {
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	min-height: 44px;
	padding: 0 18px;
	border: 0;
	cursor: pointer;
	background: var(--tl-white);
	color: var(--tl-black);
}

.ws48-tl__currency button[aria-pressed="true"] {
	background: var(--tl-blue);
	color: var(--tl-white);
}

.ws48-tl__status {
	margin: 0;
	font-size: 14px;
	color: var(--tl-muted);
}

/* Empty state ----------------------------------------------------------- */
.ws48-tl__empty {
	background: var(--tl-white);
	border: 1px dashed var(--tl-greige);
	border-radius: var(--tl-radius);
	padding: 48px 32px;
	text-align: center;
}

.ws48-tl__empty h3 {
	margin: 0 0 8px;
	font-size: 22px;
}

.ws48-tl__empty p {
	margin: 0 0 16px;
	color: var(--tl-body);
}

/* Grid + cards ---------------------------------------------------------- */
.ws48-tl__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 20px;
}

.ws48-tl__card {
	margin: 0;
	padding: 0;
}

.ws48-tl__card article {
	height: 100%;
	display: flex;
	flex-direction: column;
	background: var(--tl-white);
	border: 1px solid var(--tl-line);
	border-radius: 8px;
	overflow: hidden;
}

.ws48-tl__media {
	position: relative;
	display: block;
	aspect-ratio: 3 / 2;
	background: var(--tl-cream);
	overflow: hidden;
}

.ws48-tl__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ws48-tl__media-empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: 12px;
	font-size: 13px;
	color: var(--tl-muted);
}

.ws48-tl__badges {
	position: absolute;
	top: 12px;
	left: 12px;
	right: 12px;
	display: flex;
	gap: 8px;
	justify-content: space-between;
	pointer-events: none;
}

.ws48-tl__badge {
	font-size: 12px;
	font-weight: 600;
	padding: 4px 8px;
	border-radius: 4px;
	line-height: 1.3;
}

.ws48-tl__badge--code {
	background: var(--tl-black);
	color: var(--tl-white);
}

.ws48-tl__badge--ha {
	background: var(--tl-white);
	color: var(--tl-black);
	margin-left: auto;
}

.ws48-tl__card-body {
	padding: 16px 18px 18px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex-grow: 1;
}

.ws48-tl__eyebrow {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--tl-brick);
}

.ws48-tl .ws48-tl__card-title {
	margin: -8px 0 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.25;
}

.ws48-tl__card-title a {
	color: var(--tl-black);
	text-decoration: none;
}

.ws48-tl__card-title a:hover {
	color: var(--tl-blue);
	text-decoration: underline;
}

.ws48-tl__size {
	margin: -8px 0 0;
	font-size: 14px;
	color: var(--tl-muted);
}

.ws48-tl__specs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding-top: 12px;
	border-top: 1px solid var(--tl-line-soft);
}

.ws48-tl__specs dt {
	font-size: 12px;
	color: var(--tl-muted);
}

.ws48-tl__specs dd {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	overflow-wrap: anywhere;
}

/* Currency switching */
.ws48-tl[data-currency="CAD"] .ws48-tl__usd,
.ws48-tl[data-currency="USD"] .ws48-tl__cad {
	display: none !important;
}

.ws48-tl__actions {
	display: flex;
	gap: 8px;
	margin-top: auto;
	padding-top: 4px;
}

/* Buttons --------------------------------------------------------------- */
.ws48-tl__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 16px;
	border-radius: var(--tl-radius);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	line-height: 1.2;
}

.ws48-tl__actions .ws48-tl__btn--outline {
	flex: 1 1 auto;
}

.ws48-tl__btn--outline {
	border: 1px solid var(--tl-black);
	background: var(--tl-white);
	color: var(--tl-black);
}

.ws48-tl__btn--outline:hover {
	background: var(--tl-cream);
	color: var(--tl-black);
}

.ws48-tl__btn--primary {
	border: 1px solid var(--tl-blue);
	background: var(--tl-blue);
	color: var(--tl-white);
}

.ws48-tl__btn--primary:hover {
	background: #1D4058;
	color: var(--tl-white);
}

/* CTA band -------------------------------------------------------------- */
.ws48-tl__cta {
	background: var(--tl-blue);
	color: var(--tl-white);
}

.ws48-tl__cta-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: center;
	justify-content: space-between;
	padding-top: 56px;
	padding-bottom: 56px;
}

.ws48-tl__cta-inner > div:first-child {
	flex: 1 1 420px;
}

.ws48-tl__cta h2 {
	margin: 0 0 10px;
	font-size: clamp(26px, 3vw, 32px);
	font-weight: 700;
	color: var(--tl-white);
}

.ws48-tl__cta p {
	margin: 0;
	font-size: 17px;
	color: var(--tl-cream);
}

.ws48-tl__cta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.ws48-tl__btn--cream {
	min-height: 48px;
	padding: 0 22px;
	background: var(--tl-cream);
	color: var(--tl-black);
	border: 1px solid var(--tl-cream);
}

.ws48-tl__btn--cream:hover {
	background: var(--tl-white);
	color: var(--tl-black);
}

.ws48-tl__btn--ghost {
	min-height: 48px;
	padding: 0 22px;
	border: 1px solid var(--tl-white);
	color: var(--tl-white);
	background: transparent;
}

.ws48-tl__btn--ghost:hover {
	background: rgba(255, 255, 255, 0.12);
	color: var(--tl-white);
}

.ws48-tl__cta :focus-visible {
	outline-color: var(--tl-white);
}

/* Small screens --------------------------------------------------------- */
@media (max-width: 640px) {
	.ws48-tl__wrap {
		padding-left: 20px;
		padding-right: 20px;
	}

	.ws48-tl__header-inner {
		padding-top: 28px;
		padding-bottom: 32px;
	}

	.ws48-tl__body {
		gap: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ws48-tl__knob::after {
		transition: none;
	}
}
