/**
 * Feature Section With Tabs block
 * Shadcn-style marketing feature section with horizontal tabs.
 */

.feature-section-with-tabs {
	padding: 3rem 0;
	margin-top: 3rem;
	margin-bottom: 3rem;
}

/* Extra margin between consecutive Feature Section With Tabs blocks */
.feature-section-with-tabs + .feature-section-with-tabs {
	margin-top: 4rem;
}

.feature-section-with-tabs__container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* Wider row for tab buttons only (breaks out of content width on large screens) */
.feature-section-with-tabs__list-wrapper {
	margin-bottom: 3rem;
}

@media (min-width: 1648px) {
	.feature-section-with-tabs__list-wrapper {
		width: 1400px;
		max-width: min(1400px, calc(100% + 200px));
		margin-left: -100px;
		margin-right: -100px;
	}
}

.feature-section-with-tabs__list-wrapper .feature-section-with-tabs__list {
	margin-bottom: 0;
}

/* Scoped with parent so we beat utility classes (e.g. .push-double-*-bottom) that add margin-bottom: 40px */
.feature-section-with-tabs .feature-section-with-tabs__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-bottom: 0 !important;
}
.feature-section-with-tabs .feature-section-with-tabs__header .feature-section-with-tabs__title {
	margin-bottom: 0;
}

/* Category badge (pill above content title in each panel) */
.feature-section-with-tabs__panel-left .feature-section-with-tabs__category {
	order: -1;
	flex-shrink: 0;
	align-self: flex-start;
	width: fit-content;
	max-width: 100%;
}

.feature-section-with-tabs__category {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.875rem;
	min-height: 1.75rem;
	box-sizing: border-box;
	border-radius: 9999px;
	background: var(--fswt-category-bg, #1b3838);
	color: var(--fswt-category-color, #60e6a0);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.3;
	margin-bottom: 0.75rem;
	border: 1px solid rgba(96, 230, 160, 0.35);
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.feature-section-with-tabs__category-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.125em;
	line-height: 1;
}

.feature-section-with-tabs__category-icon.dashicons {
	width: 1em;
	height: 1em;
	font-size: 1em;
}

.feature-section-with-tabs__category-text--default {
	display: inline;
}

.feature-section-with-tabs__category-text--hover,
.feature-section-with-tabs__category-text--active {
	display: none;
}

.feature-section-with-tabs__category:hover {
	background: var(--fswt-category-hover-bg) !important;
	color: var(--fswt-category-hover-color) !important;
}

.feature-section-with-tabs__category.has-hover-text:hover .feature-section-with-tabs__category-text--default {
	display: none;
}

.feature-section-with-tabs__category.has-hover-text:hover .feature-section-with-tabs__category-text--hover {
	display: inline;
}

.feature-section-with-tabs__category:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.feature-section-with-tabs__category:focus {
	background: var(--fswt-category-active-bg) !important;
	color: var(--fswt-category-active-color) !important;
}

.feature-section-with-tabs__category.has-active-text:focus .feature-section-with-tabs__category-text--default {
	display: none;
}

.feature-section-with-tabs__category.has-active-text:focus .feature-section-with-tabs__category-text--hover {
	display: none;
}

.feature-section-with-tabs__category.has-active-text:focus .feature-section-with-tabs__category-text--active {
	display: inline;
}

.feature-section-with-tabs__title {
	order: 1;
	font-size: var(--fswt-section-title-size, 2rem);
	font-weight: 900 !important;
	line-height: 1.25;
	color: var(--fswt-title-color, #111);
	margin: 0;
}

@media (min-width: 768px) {
	.feature-section-with-tabs__title {
		font-size: var(--fswt-section-title-size, 2.5rem);
	}
}

.feature-section-with-tabs__subtitle {
	order: 2;
	font-size: 1rem;
	color: #6b7280;
	max-width: 42rem;
	margin: 0.5rem 0 0;
	line-height: 1.6;
}
/* When subtitle is empty, take no space (e.g. empty field or whitespace-only) */
.feature-section-with-tabs .feature-section-with-tabs__header .feature-section-with-tabs__subtitle:empty {
	display: none;
	margin: 0;
	padding: 0;
	min-height: 0;
}

/* Tab list – pill/button style (no underline) */
.feature-section-with-tabs {
	--fswt-tab-bg: #f3f4f6;
	--fswt-tab-color: #374151;
	--fswt-tab-hover-bg: #e5e7eb;
	--fswt-tab-hover-color: #111;
	--fswt-tab-active-bg: #111;
	--fswt-tab-active-color: #ffffff;
}

.feature-section-with-tabs__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	row-gap: 0.375rem;
	border-bottom: none !important;
}

/* Force tab spacing – override any other styles */
.feature-section-with-tabs__list-wrapper .feature-section-with-tabs__list {
	gap: 0.5rem !important;
}

/* Space between tab buttons (survives overrides of flex gap) */
.feature-section-with-tabs__list .feature-section-with-tabs__trigger + .feature-section-with-tabs__trigger {
	margin-left: 0.5rem !important;
}

/* Pill/button style – explicitly remove any underline */
.feature-section-with-tabs .feature-section-with-tabs__trigger,
.feature-section-with-tabs__list .feature-section-with-tabs__trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	position: relative;
	margin: 0 0 0.5rem 0 !important;
	padding: 0.5rem 0.625rem;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--fswt-tab-color);
	background: var(--fswt-tab-bg) !important;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
	border-radius: 0.5rem;
	cursor: pointer;
	font-family: inherit;
	text-decoration: none !important;
	box-shadow: none !important;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

/* Tab button text only – size from block setting (--fswt-trigger-label-size) or inherit from button */
.feature-section-with-tabs__trigger-label {
	font-size: var(--fswt-trigger-label-size, inherit);
}

.feature-section-with-tabs__trigger-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.feature-section-with-tabs__trigger-icon img,
.feature-section-with-tabs__trigger-icon .feature-section-with-tabs-trigger-icon {
	display: block;
	width: auto;
	height: 1.25rem;
	max-width: 1.5rem;
	object-fit: contain;
}

.feature-section-with-tabs .feature-section-with-tabs__trigger:hover,
.feature-section-with-tabs__list .feature-section-with-tabs__trigger:hover {
	background: var(--fswt-tab-hover-bg) !important;
	color: var(--fswt-tab-hover-color);
}

.feature-section-with-tabs .feature-section-with-tabs__trigger.is-active,
.feature-section-with-tabs__list .feature-section-with-tabs__trigger.is-active {
	background: var(--fswt-tab-active-bg) !important;
	color: var(--fswt-tab-active-color) !important;
	border-color: var(--fswt-tab-active-bg) !important;
}

/* Remove any underline pseudo-element */
.feature-section-with-tabs .feature-section-with-tabs__trigger::after,
.feature-section-with-tabs .feature-section-with-tabs__trigger::before,
.feature-section-with-tabs__list .feature-section-with-tabs__trigger::after,
.feature-section-with-tabs__list .feature-section-with-tabs__trigger::before {
	display: none !important;
	content: none !important;
	height: 0 !important;
	background: none !important;
	border: none !important;
}

.feature-section-with-tabs__trigger:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

/* Panels */
.feature-section-with-tabs__panels {
	min-height: 1px;
}

.feature-section-with-tabs__panel {
	display: none;
}

.feature-section-with-tabs__panel.is-active {
	display: block;
}

.feature-section-with-tabs__panel[hidden] {
	display: none !important;
}

.feature-section-with-tabs__panel-inner {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 768px) {
	.feature-section-with-tabs__panel-inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: start;
		gap: 3rem 4rem;
	}

	.feature-section-with-tabs__panel-left {
		grid-column: 1;
		display: flex;
		flex-direction: column;
		gap: 1.5rem;
	}

	.feature-section-with-tabs__panel-right {
		grid-column: 2;
	}

	.feature-section-with-tabs__panel-left:only-child {
		grid-column: 1 / -1;
	}
}

/* Left column: image on top, then title + description */
.feature-section-with-tabs__panel-left {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.feature-section-with-tabs__panel-image {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1%;
	border-radius: 0.5rem;
	overflow: hidden;
	background: #f3f4f6;
	min-height: 12rem;
}

.feature-section-with-tabs__panel-image img,
.feature-section-with-tabs__panel-image .feature-section-with-tabs-img {
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 100%;
	display: block;
	object-fit: contain;
}

.feature-section-with-tabs__panel-content {
	display: flex;
	flex-direction: column;
}

.feature-section-with-tabs__panel-icon {
	order: 0;
	margin-bottom: 1rem;
	line-height: 0;
}

.feature-section-with-tabs__panel-icon img,
.feature-section-with-tabs__panel-icon .feature-section-with-tabs-icon {
	display: block;
	width: auto;
	height: 3rem;
	max-width: 4rem;
	object-fit: contain;
}

.feature-section-with-tabs__panel-title {
	order: 1;
	font-size: var(--fswt-heading-size, 1.25rem);
	font-weight: 900;
	color: #111;
	margin: 0 0 0.5rem;
}

.feature-section-with-tabs__panel-desc {
	order: 2;
	font-size: 0.9375rem;
	color: #4b5563;
	line-height: 1.6;
	margin: 0 0 1rem;
}

.feature-section-with-tabs__panel-desc p:first-child {
	margin-top: 0;
}

.feature-section-with-tabs__panel-desc p:last-child {
	margin-bottom: 0;
}

.feature-section-with-tabs__panel-desc code {
	font-family: ui-monospace, monospace;
	font-size: 0.875em;
	background: #f1f5f9;
	padding: 0.15em 0.35em;
	border-radius: 0.25rem;
}

.feature-section-with-tabs__panel-desc pre {
	margin: 0.5rem 0 1rem;
	padding: 0.75rem 1rem;
	background: #f1f5f9;
	border-radius: 0.375rem;
	overflow-x: auto;
	font-size: 0.875rem;
	line-height: 1.5;
}

.feature-section-with-tabs__panel-desc pre code {
	background: none;
	padding: 0;
}

.feature-section-with-tabs__list-title {
	font-size: var(--fswt-heading-size, 1.25rem);
	font-weight: 600;
	color: #111;
	margin: 0 0 1rem;
	line-height: 1.3;
}

.feature-section-with-tabs__panel-list {
	order: 3;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	font-size: var(--fswt-heading-size, inherit);
}

.feature-section-with-tabs__panel-list li {
	margin: 0;
	font-size: var(--fswt-heading-size, 0.9375rem);
	font-weight: 500;
	color: var(--fswt-list-color, #111);
	line-height: 1.4;
	display: block;
}

/* Style each list item as a button – colors from block settings */
.feature-section-with-tabs__panel-list li {
	background: var(--fswt-list-bg, #f3f4f6);
	border: 1px solid var(--fswt-list-border, #e5e7eb);
	border-radius: 0.375rem;
	padding: 0.625rem 1rem;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.feature-section-with-tabs__panel-list li:hover {
	background: var(--fswt-list-hover-bg, #e5e7eb);
	border-color: var(--fswt-list-hover-border, #d1d5db);
	color: var(--fswt-list-hover-color, #111);
}

.feature-section-with-tabs__panel-list li:first-child {
	margin-top: 0;
}

.feature-section-with-tabs__panel-cta {
	order: 4;
	margin: 0;
}

.feature-section-with-tabs__cta-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.9375rem;
	font-weight: 500;
	color: #111;
	text-decoration: none;
}

.feature-section-with-tabs__cta-link:hover {
	text-decoration: underline;
}

.feature-section-with-tabs__cta-link::after {
	content: '';
	width: 1em;
	height: 1em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5l7 7-7 7'/%3E%3C/svg%3E") no-repeat center;
	background-size: contain;
}

.feature-section-with-tabs__empty {
	color: #6b7280;
	font-size: 0.875rem;
	margin: 0;
	padding: 1rem;
}
