/**
 * Tabs Widget Styles
 *
 * @package VivaElementorKit
 */

/* =====================
   Tabs Container - Horizontal (default)
   ===================== */
.vek-tabs {
	width: 100%;
}

.vek-tabs-horizontal {
	display: flex;
	flex-direction: column;
}

/* =====================
   Tabs Container - Vertical
   ===================== */
.vek-tabs-vertical {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
}

/* =====================
   Tab Navigation
   ===================== */
.vek-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	background-color: #f5f5f5;
}

/* Horizontal nav */
.vek-tabs-horizontal .vek-tabs-nav {
	flex-direction: row;
	border-bottom: 2px solid #e0e0e0;
}

/* Vertical nav */
.vek-tabs-vertical .vek-tabs-nav {
	flex-direction: column;
	flex-shrink: 0;
	width: 200px;
	border-right: 2px solid #e0e0e0;
	border-bottom: none;
}

/* =====================
   Tab Nav Item (button)
   ===================== */
.vek-tab-nav-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	background-color: transparent;
	color: #666666;
	border: none;
	border-bottom: 3px solid transparent;
	cursor: pointer;
	font-size: inherit;
	font-family: inherit;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	white-space: nowrap;
	outline: none;
	position: relative;
}

.vek-tab-nav-item:focus-visible {
	box-shadow: 0 0 0 2px #0073aa inset;
	z-index: 1;
}

/* Active state indicator for horizontal tabs */
.vek-tabs-horizontal .vek-tab-nav-item.vek-active {
	background-color: #ffffff;
	color: #0073aa;
	border-bottom-color: transparent;
}

.vek-tabs-horizontal .vek-tab-nav-item.vek-active::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	right: 0;
	height: 2px;
	background-color: #0073aa;
}

/* Active state indicator for vertical tabs */
.vek-tabs-vertical .vek-tab-nav-item {
	border-bottom: none;
	border-right: 3px solid transparent;
	width: 100%;
	text-align: left;
	justify-content: flex-start;
}

.vek-tabs-vertical .vek-tab-nav-item.vek-active {
	background-color: #ffffff;
	color: #0073aa;
	border-right-color: transparent;
}

.vek-tabs-vertical .vek-tab-nav-item.vek-active::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	right: -2px;
	width: 2px;
	background-color: #0073aa;
}

/* Hover state */
.vek-tab-nav-item:hover {
	color: #0073aa;
}

/* =====================
   Tab Nav Image
   ===================== */
.vek-tab-nav-image {
	width: 24px;
	height: 24px;
	object-fit: cover;
	border-radius: 2px;
	flex-shrink: 0;
}

/* =====================
   Tab Nav Icon
   ===================== */
.vek-tab-nav-icon {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

/* =====================
   Tab Badge
   ===================== */
.vek-tab-badge {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 10px;
	font-size: 10px;
	font-weight: 700;
	color: #ffffff;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	flex-shrink: 0;
}

/* =====================
   Tabs Content Area
   ===================== */
.vek-tabs-horizontal .vek-tabs-content {
	flex: 1;
}

.vek-tabs-vertical .vek-tabs-content {
	flex: 1;
	min-width: 0; /* Prevent overflow */
}

/* =====================
   Tab Panel
   Each panel is an Elementor Container — styling is set via container settings.
   Only display/animation state is managed here.
   ===================== */

/* Fade animation */
.vek-tab-panel.vek-anim-fade {
	animation: vekTabFadeIn 0.3s ease forwards;
}

/* Slide animation */
.vek-tab-panel.vek-anim-slide {
	animation: vekTabSlideIn 0.3s ease forwards;
}

/* =====================
   Animation Keyframes
   ===================== */
@keyframes vekTabFadeIn {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes vekTabSlideIn {
	from {
		opacity: 0;
		transform: translateX(-10px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* =====================
   Mobile Accordion Mode
   ===================== */
.vek-tabs-mobile-accordion .vek-tabs-nav {
	display: none;
}

.vek-tabs-mobile-accordion .vek-tabs-content {
	display: block;
}

.vek-tabs-mobile-accordion .vek-tab-panel {
	display: none;
}

.vek-tabs-mobile-accordion .vek-tab-panel.vek-active {
	display: block;
}

/* Mobile accordion trigger button (hidden by default, only shown in accordion mode) */
.vek-mobile-tab-trigger {
	display: none;
	width: 100%;
	padding: 14px 16px;
	background-color: #f8f8f8;
	color: #333333;
	border: none;
	border-bottom: 1px solid #e0e0e0;
	cursor: pointer;
	font-size: inherit;
	font-family: inherit;
	font-weight: 600;
	text-align: left;
	align-items: center;
	justify-content: space-between;
	transition: background-color 0.2s ease, color 0.2s ease;
	outline: none;
}

/* Show mobile triggers only in accordion mode */
.vek-tabs-mobile-accordion .vek-mobile-tab-trigger {
	display: flex;
}

.vek-mobile-tab-trigger:focus-visible {
	box-shadow: 0 0 0 2px #0073aa inset;
	z-index: 1;
}

.vek-mobile-tab-trigger.vek-active {
	background-color: #0073aa;
	color: #ffffff;
}

/* Chevron icon (CSS-only, no font dependency) */
.vek-mobile-tab-trigger-icon {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.3s ease;
	margin-bottom: 4px;
	flex-shrink: 0;
}

.vek-mobile-tab-trigger.vek-active .vek-mobile-tab-trigger-icon {
	transform: rotate(-135deg);
	margin-top: 4px;
	margin-bottom: 0;
}

/* =====================
   Editor: show one panel at a time
   ===================== */
.elementor-editor-active .vek-tabs .vek-tabs-content > .vek-tab-panel {
	display: none !important;
}
.elementor-editor-active .vek-tabs .vek-tabs-content > .vek-tab-panel.vek-editor-active {
	display: block !important;
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 767px) {
	.vek-tabs-vertical {
		flex-direction: column;
	}

	.vek-tabs-vertical .vek-tabs-nav {
		flex-direction: row;
		width: 100%;
		border-right: none;
		border-bottom: 2px solid #e0e0e0;
		flex-wrap: wrap;
	}

	.vek-tabs-vertical .vek-tab-nav-item {
		border-right: none;
		border-bottom: 3px solid transparent;
		width: auto;
	}

	.vek-tabs-vertical .vek-tab-nav-item.vek-active::after {
		top: auto;
		bottom: -2px;
		left: 0;
		right: 0;
		width: auto;
		height: 2px;
	}

	.vek-tab-panel {
		padding: 20px 16px;
	}
}
