/* ─────────────────────────────────────────────
   BAI ACF Tabs Widget — Front-end Styles
   All colour / typography values come from
   Elementor controls; these rules handle
   structure, layout, and behaviour only.
───────────────────────────────────────────── */

/* Wrapper */
.bai-acf-tabs {
	width: 100%;
}

/* ── Tab Nav ── */
.bai-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}

.bai-tab-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: none;
	background: none;
	font-family: inherit;
	line-height: 1.4;
	white-space: nowrap;
	text-decoration: none;
	-webkit-appearance: none;
	appearance: none;
}

.bai-tab-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ── Panels ── */
.bai-tabs-panels {
	position: relative;
}

.bai-tab-panel {
	display: none;
}

.bai-tab-panel.is-active {
	display: block;
}

/* ── Two-column content inner ── */
.bai-tab-content-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
}

.bai-tab-description-col,
.bai-tab-items-col {
	min-width: 0; /* prevent flex blowout */
}

/* ── Description ── */
.bai-tab-description {
	word-break: break-word;
}

/* ── List / Grid ── */
.bai-tab-items-grid {
	display: grid;
	grid-template-columns: 1fr; /* overridden by Elementor responsive control */
	width: 100%;
}

/* ── Carousel track ── */
.bai-carousel {
	position: relative;
	width: 100%;
}

.bai-carousel-track-wrapper {
	overflow: hidden;
	width: 100%;
}

.bai-tab-items-carousel {
	display: flex;
	will-change: transform;
	transition: transform 0.35s ease;
}

.bai-carousel-slide {
	flex: 0 0 100%;
	min-width: 0;
}

/* ── Carousel controls ── */
.bai-carousel-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 16px;
}

.bai-carousel-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	cursor: pointer;
	border-radius: 50%;
	background: none;
	font-family: inherit;
	line-height: 1;
	-webkit-appearance: none;
	appearance: none;
	transition: opacity 0.2s ease;
}

.bai-carousel-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.bai-carousel-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.bai-carousel-dots {
	display: flex;
	gap: 8px;
	align-items: center;
}

.bai-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	padding: 0;
	cursor: pointer;
	opacity: 0.4;
	background-color: currentColor;
	transition: opacity 0.2s ease, transform 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.bai-dot.is-active {
	opacity: 1;
	transform: scale(1.3);
}

/* ── Editor placeholder ── */
.bai-acf-tabs-placeholder {
	background: #f0f3f7;
	border: 2px dashed #b0bac5;
	border-radius: 6px;
	padding: 24px;
	text-align: center;
	color: #556068;
}

.bai-acf-tabs-placeholder code {
	background: #dde3ea;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 0.9em;
}

/* ── Responsive: stack columns below 768px ── */
@media (max-width: 767px) {
	.bai-tab-content-inner {
		flex-direction: column;
	}

	.bai-tab-description-col,
	.bai-tab-items-col {
		flex: 0 0 100% !important;
	}

	.bai-tabs-nav {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		flex-wrap: nowrap;
		scrollbar-width: none;
	}

	.bai-tabs-nav::-webkit-scrollbar {
		display: none;
	}
}
