/**
 * TTpixel Addons - TT Pixel Tab Widget Styles
 * Version: 1.0.0
 * Author: TTpixel
 */

:root {
	--ttpixel-green: #03402A;
	--ttpixel-green-dark: #022a1b;
	--ttpixel-gold: #D8A644;
	--ttpixel-gold-dark: #b88628;
	--ttpixel-text: #1a2a22;
	--ttpixel-muted: #53645b;
	--ttpixel-border: #e2e8e5;
	--ttpixel-soft: #f4f7f5;
	--ttpixel-radius: 18px;
}

/* Main Widget Container */
.ttpixel-tab-widget {
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
	position: relative;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ttpixel-tab-widget *,
.ttpixel-tab-widget *::before,
.ttpixel-tab-widget *::after {
	box-sizing: border-box;
}

/* Navigation Wrapper */
.ttpixel-tab__nav-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

/* Tab Header / Bar */
.ttpixel-tab__header {
	display: flex;
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE / Edge */
	border-radius: 16px 16px 0 0;
	background: #ffffff;
	border: 1px solid var(--ttpixel-border);
	box-shadow: 0 8px 28px rgba(2, 47, 32, 0.08);
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
}

.ttpixel-tab__header::-webkit-scrollbar {
	display: none; /* Chrome, Safari */
}

/* Individual Tab Button */
.ttpixel-tab__btn {
	flex: 1 0 145px;
	min-height: 82px;
	padding: 16px 14px;
	background: #ffffff;
	color: var(--ttpixel-green);
	border: 0;
	border-right: 1px solid var(--ttpixel-border);
	font-family: inherit;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.25;
	text-align: center;
	cursor: pointer;
	scroll-snap-align: start;
	transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	outline: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.ttpixel-tab__btn:first-child {
	border-radius: 15px 0 0 0;
}

.ttpixel-tab__btn:last-child {
	border-right: 0;
	border-radius: 0 15px 0 0;
}

.ttpixel-tab__btn:hover:not(.is-active) {
	background: var(--ttpixel-soft);
	color: var(--ttpixel-green-dark);
}

/* Active Tab Button */
.ttpixel-tab__btn.is-active {
	background: linear-gradient(135deg, #094d30, var(--ttpixel-green));
	color: #ffffff;
	box-shadow: inset 0 -4px 0 var(--ttpixel-gold);
}

.ttpixel-tab__btn-text {
	display: block;
	max-width: 100%;
	word-break: break-word;
}

/* Navigation Slider Arrows */
.ttpixel-tab__nav-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #ffffff;
	color: var(--ttpixel-green);
	border: 1px solid var(--ttpixel-border);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 0;
}

.ttpixel-tab__nav-arrow:hover {
	background: var(--ttpixel-green);
	color: #ffffff;
	box-shadow: 0 6px 18px rgba(3, 64, 42, 0.3);
}

.ttpixel-tab__nav-prev {
	left: -14px;
}

.ttpixel-tab__nav-next {
	right: -14px;
}

.ttpixel-tab__nav-arrow.hide-desktop {
	display: none;
}

/* Autoplay Progress Bar */
.ttpixel-tab__progress {
	width: 100%;
	height: 3px;
	background: rgba(2, 47, 32, 0.06);
	position: relative;
	overflow: hidden;
	z-index: 3;
}

.ttpixel-tab__progress-fill {
	height: 100%;
	width: 0%;
	background-color: var(--ttpixel-gold);
	transition: width 0.1s linear;
}

/* Panels Container (Card) */
.ttpixel-tab__panels {
	background: #ffffff;
	border: 1px solid var(--ttpixel-border);
	border-top: 0;
	border-radius: 0 0 20px 20px;
	box-shadow: 0 18px 50px rgba(2, 47, 32, 0.08);
	overflow: hidden;
	position: relative;
}

/* Individual Panel */
.ttpixel-tab__panel {
	display: none;
	padding: 40px 44px;
	gap: 48px;
	align-items: center;
	min-height: 500px;
}

.ttpixel-tab__panel.is-active {
	display: grid;
	grid-template-columns: 1fr 1.15fr;
	animation: ttpixelPanelFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Effects */
.ttpixel-tab-effect-slide-up .ttpixel-tab__panel.is-active {
	animation: ttpixelPanelSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ttpixel-tab-effect-slide-horizontal .ttpixel-tab__panel.is-active {
	animation: ttpixelPanelSlideHorizontal 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ttpixelPanelFade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes ttpixelPanelSlideUp {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes ttpixelPanelSlideHorizontal {
	from {
		opacity: 0;
		transform: translateX(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Media Column */
.ttpixel-tab__media-col {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: stretch;
}

.ttpixel-tab__img-wrap {
	position: relative;
	width: 100%;
	min-height: 440px;
	height: 100%;
	border-radius: var(--ttpixel-radius);
	overflow: hidden;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
	background: #03402A;
}

.ttpixel-tab__img-wrap img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: var(--ttpixel-radius);
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ttpixel-tab__panel:hover .ttpixel-tab__img-wrap img {
	transform: scale(1.03);
}

/* Overlay Pill Badge */
.ttpixel-tab__badge {
	position: absolute;
	bottom: 24px;
	left: 24px;
	z-index: 2;
	background: rgba(3, 64, 42, 0.94);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #ffffff;
	padding: 11px 20px;
	border-radius: 30px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.2px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
	border: 1px solid rgba(255, 255, 255, 0.18);
	max-width: calc(100% - 48px);
}

.ttpixel-tab__badge-icon {
	color: var(--ttpixel-gold);
	display: inline-flex;
	font-size: 15px;
	line-height: 1;
}

.ttpixel-tab__badge-text {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Content Column */
.ttpixel-tab__content-col {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Eyebrow / Subtitle */
.ttpixel-tab__eyebrow {
	display: inline-block;
	color: var(--ttpixel-gold-dark);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1.8px;
	font-weight: 900;
	margin-bottom: 8px;
}

/* Main Heading */
.ttpixel-tab__heading {
	font-size: 40px;
	line-height: 1.1;
	color: var(--ttpixel-green);
	margin: 0 0 14px 0;
	font-weight: 800;
}

/* Lead Description */
.ttpixel-tab__desc {
	font-size: 16px;
	line-height: 1.6;
	color: var(--ttpixel-muted);
	margin: 0 0 22px 0;
	max-width: 650px;
}

/* Features Title */
.ttpixel-tab__features-title {
	font-size: 16px;
	font-weight: 800;
	color: var(--ttpixel-green);
	margin: 0 0 14px 0;
}

/* Features Checklist */
.ttpixel-tab__features-list {
	list-style: none;
	margin: 0 0 26px 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 24px;
}

.ttpixel-tab__feature-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--ttpixel-muted);
}

.ttpixel-tab__feature-icon {
	color: var(--ttpixel-gold-dark);
	font-weight: 900;
	font-size: 14px;
	flex-shrink: 0;
	margin-top: 1px;
}

.ttpixel-tab__feature-text {
	flex: 1;
}

/* Action Buttons */
.ttpixel-tab__actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.ttpixel-tab__btn-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 28px;
	border-radius: 50px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	border: 0;
}

.ttpixel-tab__btn-primary {
	background-color: var(--ttpixel-green);
	color: #ffffff;
}

.ttpixel-tab__btn-primary:hover {
	background-color: var(--ttpixel-green-dark);
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(3, 64, 42, 0.28);
	color: #ffffff;
}

.ttpixel-tab__btn-secondary {
	background-color: var(--ttpixel-gold);
	color: var(--ttpixel-green);
}

.ttpixel-tab__btn-secondary:hover {
	background-color: #c59535;
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(216, 166, 68, 0.32);
	color: var(--ttpixel-green);
}

.ttpixel-tab__btn-arrow {
	transition: transform 0.2s ease;
}

.ttpixel-tab__btn-primary:hover .ttpixel-tab__btn-arrow {
	transform: translateX(4px);
}

/* ========================================================
   RESPONSIVE DESIGN (Container-Aware & Breakpoint-Aware)
   ======================================================== */

/* Media queries for real mobile & tablet viewports */
@media (max-width: 1024px) {
	.ttpixel-tab__panel {
		padding: 30px;
		gap: 32px;
	}
	.ttpixel-tab__heading {
		font-size: 34px;
	}
	.ttpixel-tab__img-wrap {
		min-height: 340px;
	}
}

@media (max-width: 840px) {
	/* Tab Header Mobile Sliding Mode */
	.ttpixel-tab__nav-arrow.hide-desktop {
		display: flex;
	}

	.ttpixel-tab__header {
		scroll-snap-type: x mandatory;
	}

	/* Show ~3 tabs visible on mobile with slide/scroll */
	.ttpixel-tab__btn {
		flex: 0 0 calc(100% / 3);
		min-width: calc(100% / 3);
		min-height: 68px;
		padding: 10px 8px;
		font-size: 13px;
	}

	.ttpixel-tab__btn:first-child {
		border-radius: 14px 0 0 0;
	}

	.ttpixel-tab__btn:last-child {
		border-radius: 0 14px 0 0;
	}

	/* Card Stack: Image on TOP, Content on BOTTOM */
	.ttpixel-tab__panel.is-active {
		grid-template-columns: 1fr;
		gap: 24px;
		padding: 20px 20px 32px 20px;
	}

	.ttpixel-tab__media-col {
		height: 270px;
	}

	.ttpixel-tab__img-wrap {
		min-height: 270px;
		height: 270px;
	}

	.ttpixel-tab__heading {
		font-size: 28px;
	}

	.ttpixel-tab__desc {
		font-size: 15px;
		margin-bottom: 18px;
	}

	.ttpixel-tab__features-list {
		grid-template-columns: 1fr;
		gap: 8px;
		margin-bottom: 22px;
	}

	.ttpixel-tab__actions {
		width: 100%;
		flex-direction: column;
		gap: 10px;
	}

	.ttpixel-tab__btn-action {
		width: 100%;
		text-align: center;
		padding: 13px 20px;
	}

	.ttpixel-tab__badge {
		bottom: 16px;
		left: 16px;
		font-size: 12px;
		padding: 8px 14px;
	}
}

@media (max-width: 480px) {
	.ttpixel-tab__btn {
		font-size: 12px;
		min-height: 62px;
		padding: 8px 6px;
		line-height: 1.2;
	}

	.ttpixel-tab__heading {
		font-size: 24px;
	}

	.ttpixel-tab__media-col {
		height: 230px;
	}

	.ttpixel-tab__img-wrap {
		height: 230px;
		min-height: 230px;
	}

	.ttpixel-tab__panel {
		padding: 16px 16px 26px 16px;
	}
}

/* Also support container mode for preview / small width wrapper */
.device-mobile .ttpixel-tab-widget .ttpixel-tab__nav-arrow.hide-desktop,
.device-tablet .ttpixel-tab-widget .ttpixel-tab__nav-arrow.hide-desktop {
	display: flex;
}

.device-mobile .ttpixel-tab-widget .ttpixel-tab__btn {
	flex: 0 0 calc(100% / 3);
	min-width: calc(100% / 3);
	min-height: 68px;
	padding: 10px 8px;
	font-size: 13px;
}

.device-mobile .ttpixel-tab-widget .ttpixel-tab__panel.is-active {
	grid-template-columns: 1fr;
	gap: 24px;
	padding: 20px 20px 32px 20px;
}

.device-mobile .ttpixel-tab-widget .ttpixel-tab__media-col {
	height: 250px;
}

.device-mobile .ttpixel-tab-widget .ttpixel-tab__img-wrap {
	min-height: 250px;
	height: 250px;
}

.device-mobile .ttpixel-tab-widget .ttpixel-tab__heading {
	font-size: 26px;
}

.device-mobile .ttpixel-tab-widget .ttpixel-tab__features-list {
	grid-template-columns: 1fr;
	gap: 8px;
}

.device-mobile .ttpixel-tab-widget .ttpixel-tab__actions {
	width: 100%;
	flex-direction: column;
	gap: 10px;
}

.device-mobile .ttpixel-tab-widget .ttpixel-tab__btn-action {
	width: 100%;
	text-align: center;
	padding: 13px 20px;
}

.device-mobile .ttpixel-tab-widget .ttpixel-tab__badge {
	bottom: 14px;
	left: 14px;
	font-size: 12px;
	padding: 8px 14px;
}
