/**
 * FT Tabs Firm Widget Styles
 *
 * @package fundedtrading-core
 * @since 1.1.51
 */

/* Main Wrapper */
.ft-tabs-wrapper {
	display: flex;
	width: 100%;
	position: relative;
	flex-direction: column;
}

/* Mobile Select Wrapper */
.ft-tabs-select-wrapper {
	display: none; /* Hidden by default, shown on mobile */
	width: 100%;
	z-index: 100;
}

.ft-tabs-select-wrapper.sticky {
	position: sticky;
	top: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	padding: 10px 0;
}

/* Mobile Select Dropdown */
.ft-tabs-select {
	width: 100%;
	padding: 12px 15px;
	font-size: 16px;
	border-radius: 4px;
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px;
	padding-right: 35px;
}
/* Horizontal Layout */
.ft-tabs-wrapper.ft-tabs-horizontal {
	flex-direction: column;
}

.ft-tabs-wrapper.ft-tabs-horizontal .ft-tabs-content-wrapper {
	width: 100%;
}

/* Vertical Layout */
.ft-tabs-wrapper.ft-tabs-vertical {
	flex-direction: row;
	align-items: flex-start;
}

.ft-tabs-wrapper.ft-tabs-vertical .ft-tabs-content-wrapper {
	width: 100%;
}

/* Tabs Navigation Container */
.ft-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
	z-index: 100;
}

/* Sticky Tabs Navigation */
.ft-tabs-nav.sticky {
	position: sticky;
	top: 0;
}

/* Horizontal Tabs Navigation */
.ft-tabs-nav.horizontal {
	flex-direction: row;
	margin-bottom: 20px;
}

/* Horizontal Sticky Tabs */
.ft-tabs-nav.horizontal.sticky {
	top: 0;
	padding: 10px 0;
}

/* Vertical Tabs Navigation */
.ft-tabs-nav.vertical {
	flex-direction: column;
	margin-right: 20px;
	flex-shrink: 0;
}

/* Vertical Sticky Tabs */
.ft-tabs-nav.vertical.sticky {
	position: sticky;
	top: 60px;
	align-self: flex-start;
}

/* Tab Title (Individual Tab Button) */
.ft-tab-title {
	text-wrap: auto;
	cursor: pointer;
	transition: all 0.3s ease;
	user-select: none;
	outline: none;
	position: relative;
	white-space: nowrap;
}

/* Horizontal Tab Title */
.ft-tabs-nav.horizontal .ft-tab-title {
	flex: 1 1 auto;
	text-align: center;
}

/* Vertical Tab Title */
.ft-tabs-nav.vertical .ft-tab-title {
	width: 100%;
	text-align: left;
}

/* Content Wrapper */
.ft-tabs-content-wrapper {
	flex: 1;
	width: 100%;
	position: relative;
}

/* Horizontal Content Wrapper */
.ft-tabs-horizontal .ft-tabs-content-wrapper {
	width: 100%;
}

/* Vertical Content Wrapper */
.ft-tabs-vertical .ft-tabs-content-wrapper {
	flex: 1;
	min-width: 0; /* Prevents content overflow */
}

/* Tab Content */
.ft-tab-content {
	display: none;
	animation: fadeIn 0.3s ease-in;
}

/* Active Tab Content */
.ft-tab-content.active {
	display: block;
}

/* Scroll Mode: All content visible for scrolling */
.ft-tabs-wrapper.scroll-mode .ft-tab-content {
	display: block;
}

/* Fade In Animation */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Responsive Styles */
@media (max-width: 768px) {
	/* Show mobile select dropdown */
	.ft-tabs-select-wrapper {
		display: block;
		margin-bottom: 15px;
	}

	/* Hide desktop tabs navigation on mobile */
	.ft-tabs-nav {
		display: none !important;
	}

	/* Force column layout on mobile */
	.ft-tabs-wrapper {
		flex-direction: column;
	}

	.ft-tabs-wrapper.ft-tabs-vertical {
		flex-direction: column;
	}

	/* Content full width on mobile */
	.ft-tabs-content-wrapper {
		width: 100%;
		max-width: 100%;
	}

	/* Adjust scroll mode content spacing on mobile */
	.ft-tabs-wrapper.scroll-mode .ft-tab-content {
		padding-top: 15px;
		padding-bottom: 15px;
	}

	/* Reduce scroll margin on mobile */
	.ft-tabs-wrapper.scroll-mode .ft-tab-content {
		scroll-margin-top: 80px;
	}
}

/* Content Typography Defaults */
.ft-tab-content p {
	margin-bottom: 1em;
	line-height: 1.6;
}

.ft-tab-content p:last-child {
	margin-bottom: 0;
}

.ft-tab-content h1,
.ft-tab-content h2,
.ft-tab-content h3,
.ft-tab-content h4,
.ft-tab-content h5,
.ft-tab-content h6 {
	margin-top: 0;
	margin-bottom: 0.5em;
	line-height: 1.3;
}

.ft-tab-content ul,
.ft-tab-content ol {
	margin-bottom: 1em;
	padding-left: 1.5em;
}

.ft-tab-content li {
	margin-bottom: 0.5em;
}

/* RTL Support */
[dir="rtl"] .ft-tabs-nav.vertical {
	margin-right: 0;
	margin-left: 20px;
}

[dir="rtl"] .ft-tabs-nav.vertical .ft-tab-title {
	text-align: right;
}

/* Print Styles */
@media print {
	.ft-tabs-nav {
		display: none;
	}

	.ft-tab-content {
		display: block !important;
		page-break-inside: avoid;
	}

	.ft-tab-content:not(:last-child) {
		margin-bottom: 2em;
		padding-bottom: 1em;
		border-bottom: 1px solid #ccc;
	}
}

/* Accessibility: High Contrast Mode */
@media (prefers-contrast: high) {
	.ft-tab-title {
		border-width: 2px;
	}

	.ft-tab-title.active {
		border-width: 3px;
	}
}

/* Loading State (Optional) */
.ft-tabs-wrapper.loading .ft-tabs-content-wrapper {
	opacity: 0.5;
	pointer-events: none;
}

/* Empty State */
.ft-tabs-wrapper.empty {
	text-align: center;
}
