/**
 * Page Sections: Tabs.
 *
 * Tab strip at the top, panel below. Two styles: pills and underline.
 * Mobile: tab strip becomes horizontally scrollable (no wrap), scrollbar hidden.
 */

.ps-tabs__head {
	max-width: 800px;
	margin: 0 0 28px;
}

.ps-tabs__heading {
	margin: 0 0 .35em;
}

.ps-tabs__intro {
	color: var(--grey-700);
	margin: 0;
	font-size: 1.02rem;
	line-height: 1.55;
}

.ps-tabs__wrap {
	width: 100%;
}

/* ---- Tab strip ---- */

.ps-tabs__strip-wrap {
	border-bottom: 1px solid transparent;
	margin-bottom: 20px;
}

.ps-tabs__strip {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.ps-tabs__tab {
	font: inherit;
	font-family: var(--font);
	font-weight: 600;
	cursor: pointer;
	background: transparent;
	border: 1px solid transparent;
	color: var(--teal);
	padding: 10px 18px;
	border-radius: 999px;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease;
	white-space: nowrap;
	line-height: 1.2;
}

.ps-tabs__tab:focus-visible {
	outline: 2px solid var(--red);
	outline-offset: 2px;
}

/* Pills style — inactive: outlined; active: filled teal. */
.ps-tabs--pills .ps-tabs__tab {
	border-color: var(--grey-300);
	color: var(--teal);
	background: transparent;
}

.ps-tabs--pills .ps-tabs__tab:hover {
	border-color: var(--teal);
	background: rgba(24, 60, 66, .04);
}

.ps-tabs--pills .ps-tabs__tab[aria-selected="true"] {
	background: var(--teal);
	color: #fff;
	border-color: var(--teal);
}

/* Underline style — flat label, no border; active gets a red underline. */
.ps-tabs--underline .ps-tabs__strip {
	gap: 4px 24px;
	border-bottom: 1px solid var(--grey-200);
}

.ps-tabs--underline .ps-tabs__tab {
	border-radius: 0;
	border: 0;
	padding: 14px 4px;
	color: var(--grey-700);
	background: transparent;
	position: relative;
	margin-bottom: -1px;
}

.ps-tabs--underline .ps-tabs__tab:hover {
	color: var(--teal);
}

.ps-tabs--underline .ps-tabs__tab[aria-selected="true"] {
	color: var(--teal);
}

.ps-tabs--underline .ps-tabs__tab[aria-selected="true"]::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 3px;
	background: var(--red);
	border-radius: 2px 2px 0 0;
}

/* ---- Panels ---- */

.ps-tabs__panels {
	width: 100%;
}

.ps-tabs__panel {
	max-width: 800px;
	padding: clamp(20px, 3vw, 32px) 0;
	line-height: 1.65;
	color: var(--teal);
}

.ps-tabs__panel:focus-visible {
	outline: 2px solid var(--red);
	outline-offset: 4px;
}

.ps-tabs__panel[hidden] {
	display: none;
}

/* Typography inside the wysiwyg panel content. */
.ps-tabs__panel p {
	margin: 0 0 1em;
}

.ps-tabs__panel p:last-child {
	margin-bottom: 0;
}

.ps-tabs__panel a {
	color: var(--teal);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.ps-tabs__panel a:hover {
	color: var(--red);
}

.ps-tabs__panel ul,
.ps-tabs__panel ol {
	margin: 0 0 1em 1.4em;
	padding: 0;
}

.ps-tabs__panel li {
	margin: 0 0 .4em;
}

.ps-tabs__panel h3,
.ps-tabs__panel h4 {
	margin: 1.2em 0 .4em;
	color: var(--teal);
}

.ps-tabs__panel h3:first-child,
.ps-tabs__panel h4:first-child {
	margin-top: 0;
}

.ps-tabs__panel strong { font-weight: 700; }
.ps-tabs__panel em     { font-style: italic; }

/* Desktop — more comfortable spacing for the strip and panel */
@media (min-width: 1024px) {
	.ps-tabs__head { margin-bottom: 32px; max-width: 820px; }
	.ps-tabs__strip-wrap { margin-bottom: 24px; }
	.ps-tabs__strip { gap: 12px; }
	.ps-tabs__tab { padding: 11px 20px; font-size: .98rem; }
	.ps-tabs--underline .ps-tabs__strip { gap: 4px 28px; }
	.ps-tabs--underline .ps-tabs__tab { padding: 14px 4px; font-size: .98rem; }
	.ps-tabs__panel { font-size: 1rem; max-width: 760px; }
}

@media (min-width: 1280px) {
	.ps-tabs__panel { max-width: 800px; }
}

/* ---- Responsive: scrollable strip ---- */

@media (max-width: 600px) {
	.ps-tabs__strip-wrap {
		margin-left: -20px;
		margin-right: -20px;
		padding-left: 20px;
		padding-right: 20px;
		/* Room for the 2px focus ring (+2px offset) inside the overflow clip. */
		padding-top: 4px;
		padding-bottom: 4px;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.ps-tabs__strip-wrap::-webkit-scrollbar {
		display: none;
	}
	.ps-tabs__strip {
		flex-wrap: nowrap;
		width: max-content;
	}
	.ps-tabs--underline .ps-tabs__strip {
		gap: 4px 18px;
	}
}

@media (max-width: 479px) {
	.ps-tabs__tab {
		padding: 10px 14px; /* keeps the pill ≥40px tall for touch */
		font-size: .96rem;
	}
	.ps-tabs--underline .ps-tabs__tab {
		padding: 12px 2px;
	}
}
