/*
 * Wallex Tabs – frontend styles
 *
 * RTL tabbed panel. Vertical orientation places the tab list beside the content
 * (tabs on the right, content on the left — matching the reference design);
 * horizontal places the tab bar above the content. Colors resolve from the
 * Wallex theme CSS variables where present, with self-contained fallbacks.
 */

.wallex-tabs-wrap {
	box-sizing: border-box;
	width: 100%;
	direction: rtl;
}

.wallex-tabs-wrap *,
.wallex-tabs-wrap *::before,
.wallex-tabs-wrap *::after {
	box-sizing: border-box;
}

/* ------------------------------ Orientation ------------------------------- */
.wallex-tabs {
	display: flex;
	gap: 18px;
	width: 100%;
}

/*
 * Vertical: a flex row. The tab list is first in the DOM, so in RTL it sits on
 * the right and the content pane on the left (matching the reference design).
 * The list keeps a fixed-ish width; the content pane takes the remaining space.
 */
.wallex-tabs--vertical {
	flex-direction: row;
	align-items: flex-start;
}

.wallex-tabs--vertical .wallex-tabs__panels {
	flex: 1 1 auto;
}

.wallex-tabs--vertical .wallex-tabs__list {
	flex: 0 0 320px;
}

/* Horizontal: tab bar stacked above the content pane. */
.wallex-tabs--horizontal {
	flex-direction: column;
}

/* --------------------------------- List ----------------------------------- */
.wallex-tabs__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.wallex-tabs--horizontal .wallex-tabs__list {
	flex-direction: row;
	flex-wrap: wrap;
}

/* --------------------------------- Tab ------------------------------------ */
.wallex-tabs__tab {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
	margin: 0;
	padding: 16px 18px;
	background: var(--color-bg-2, #ffffff);
	border: 1.5px solid var(--color-stroke-2, rgba(20, 20, 43, 0.10));
	border-radius: 14px;
	font: inherit;
	text-align: right;
	cursor: pointer;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.wallex-tabs--horizontal .wallex-tabs__tab {
	width: auto;
	flex: 1 1 auto;
}

.wallex-tabs__tab:hover:not(.is-disabled):not(.is-active) {
	border-color: var(--color-stroke-3, rgba(20, 20, 43, 0.24));
}

.wallex-tabs__tab.is-active {
	border-color: var(--color-primary, #2f6bff);
	box-shadow: 0 4px 16px rgba(47, 107, 255, 0.12);
	background: var(--color-bg, #2f6bff);
}

.wallex-tabs__tab:focus-visible {
	outline: 2px solid var(--color-primary, #2f6bff);
	outline-offset: 2px;
}

/* Empty-content tabs: visibly inert and unclickable. */
.wallex-tabs__tab.is-disabled {
	opacity: 0.55;
	cursor: not-allowed;
	box-shadow: none;
}

.wallex-tabs__tab-title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.6;
	color: var(--color-text-1, #1f2430);
	overflow-wrap: anywhere;
}

.wallex-tabs__tab-subtitle {
	font-size: 0.85rem;
	font-weight: 400;
	line-height: 1.9;
	color: var(--color-text-2, #6b7280);
	overflow-wrap: anywhere;
}

/* -------------------------------- Panels ---------------------------------- */
.wallex-tabs__panels {
	min-width: 0;
	background: var(--color-negativeGlassBg, #ffffff);
	border: 1px solid var(--color-stroke-2, rgba(20, 20, 43, 0.10));
	border-radius: 16px;
	overflow: hidden;
}

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

/* Media embeds inside a panel fill the available width. */
.wallex-tabs__panel img,
.wallex-tabs__panel iframe,
.wallex-tabs__panel video {
	max-width: 100%;
}

.wallex-tabs__panel iframe {
	width: 100%;
	border: 0;
	display: flex;
}

/* ------------------------------- Responsive ------------------------------- */
@media (max-width: 782px) {

	/* Stack: tab list above the content pane on narrow screens. */
	.wallex-tabs--vertical {
		flex-direction: column;
	}

	.wallex-tabs--vertical .wallex-tabs__list {
		flex-wrap: wrap;
		flex-direction: row;
	}

	.wallex-tabs--vertical .wallex-tabs__panels {
		width: 100%;
	}
}