/* Bright Addons: Advanced Tabs */
.bafe-tabs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.bafe-tabs__tab {
	display: inline-flex;
	flex-grow: var(--bafe-tab-grow, 0);
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 12px 20px;
	border: 0;
	border-radius: 10px;
	background-color: #f3f3f7;
	color: #3a3a52;
	font: inherit;
	font-weight: 600;
	line-height: 1.3;
	text-align: left;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.bafe-tabs__tab:hover {
	background-color: #e9e7ff;
}

.bafe-tabs__tab[aria-selected="true"] {
	background-color: #5b4bff;
	color: #fff;
}

.bafe-tabs__tab:focus-visible {
	outline: 2px solid #5b4bff;
	outline-offset: 2px;
}

.bafe-tabs__icon {
	display: inline-flex;
	line-height: 0;
}

.bafe-tabs__icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.bafe-tabs__panel {
	padding: 24px;
	border-radius: 12px;
	background-color: #fff;
	line-height: 1.65;
}

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

.bafe-tabs__panel > :first-child {
	margin-top: 0;
}

.bafe-tabs__panel > :last-child {
	margin-bottom: 0;
}

.bafe-tabs__panel:focus-visible {
	outline: 2px solid #5b4bff;
	outline-offset: 2px;
}

/* Vertical layout */
.bafe-tabs--vertical .bafe-tabs {
	display: flex;
	gap: 24px;
	align-items: flex-start;
}

.bafe-tabs--vertical .bafe-tabs__list {
	flex: 0 0 240px;
	flex-direction: column;
	margin-bottom: 0;
}

.bafe-tabs--vertical .bafe-tabs__tab {
	justify-content: flex-start;
	width: 100%;
}

.bafe-tabs--vertical .bafe-tabs__panels {
	flex: 1;
	min-width: 0;
}

@media (max-width: 767px) {
	.bafe-tabs--vertical .bafe-tabs {
		flex-direction: column;
	}

	.bafe-tabs--vertical .bafe-tabs__list {
		flex-basis: auto;
		width: 100%;
	}

	/* Scrollable row of tabs: start aligned, so the first tab is never cut off. */
	.bafe-tabs__list {
		flex-wrap: nowrap;
		justify-content: flex-start !important;
		overflow-x: auto;
		scrollbar-width: thin;
	}

	.bafe-tabs--vertical .bafe-tabs__list {
		overflow-x: visible;
	}

	.bafe-tabs__tab {
		flex-shrink: 0;
	}
}
