/**
 * TO Vertical Image Tabs — scoped styles (.toaew-vit / --toaew-vit-*)
 */

.toaew-vit {
	--toaew-vit-gap: 48px;
	--toaew-vit-tabs-w: 340px;
	--toaew-vit-avatar: 52px;
	--toaew-vit-active-radius: 28px;
	--toaew-vit-panel-radius: 40px;
	--toaew-vit-panel-h: 480px;
	--toaew-vit-title: #1a1a1a;
	--toaew-vit-subtitle: #8a8a8a;
	--toaew-vit-avatar-bg: #ffffff;
	--toaew-vit-icon: #2a2a2a;
	--toaew-vit-active-bg: #ffffff;
	--toaew-vit-panel-bg: #ffffff;
	--toaew-vit-shadow: 0 8px 28px rgba( 15, 15, 15, 0.08 );
	--toaew-vit-avatar-shadow: 0 4px 14px rgba( 15, 15, 15, 0.08 );

	width: 100%;
}

.toaew-vit__layout {
	display: grid;
	grid-template-columns: minmax( 220px, var( --toaew-vit-tabs-w ) ) minmax( 0, 1fr );
	gap: var( --toaew-vit-gap );
	align-items: center;
}

.toaew-vit--tabs-right .toaew-vit__layout {
	grid-template-columns: minmax( 0, 1fr ) minmax( 220px, var( --toaew-vit-tabs-w ) );
}

.toaew-vit--tabs-right .toaew-vit__nav {
	order: 2;
}

.toaew-vit--tabs-right .toaew-vit__stage {
	order: 1;
}

.toaew-vit__nav {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	border: 0;
}

.toaew-vit__tab {
	display: flex;
	align-items: center;
	gap: 16px;
	width: 100%;
	margin: 0;
	padding: 14px 18px 14px 14px;
	border: 0;
	border-radius: var( --toaew-vit-active-radius );
	background: transparent;
	box-shadow: none;
	text-align: left;
	cursor: pointer;
	appearance: none;
	font: inherit;
	color: inherit;
	transition:
		background-color 0.22s ease,
		box-shadow 0.22s ease,
		transform 0.22s ease;
}

.toaew-vit__tab:hover {
	background: rgba( 255, 255, 255, 0.55 );
}

.toaew-vit__tab.is-active {
	background: var( --toaew-vit-active-bg );
	box-shadow: var( --toaew-vit-shadow );
}

.toaew-vit__tab:focus {
	outline: none;
}

.toaew-vit__tab:focus-visible {
	outline: 2px solid #1a1a1a;
	outline-offset: 3px;
}

.toaew-vit__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: var( --toaew-vit-avatar );
	height: var( --toaew-vit-avatar );
	border-radius: 50%;
	background: var( --toaew-vit-avatar-bg );
	box-shadow: var( --toaew-vit-avatar-shadow );
	color: var( --toaew-vit-icon );
}

.toaew-vit__avatar i,
.toaew-vit__avatar svg {
	width: 1.15em;
	height: 1.15em;
	font-size: calc( var( --toaew-vit-avatar ) * 0.34 );
	line-height: 1;
}

.toaew-vit__avatar svg {
	fill: currentColor;
}

.toaew-vit__copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.toaew-vit__title {
	display: block;
	color: var( --toaew-vit-title );
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.toaew-vit__subtitle {
	display: block;
	color: var( --toaew-vit-subtitle );
	font-size: 0.9rem;
	font-weight: 400;
	line-height: 1.35;
}

.toaew-vit__stage {
	position: relative;
	min-height: var( --toaew-vit-panel-h );
	border-radius: var( --toaew-vit-panel-radius );
	background: var( --toaew-vit-panel-bg );
	box-shadow: var( --toaew-vit-shadow );
	overflow: hidden;
}

.toaew-vit__panel {
	position: absolute;
	inset: 0;
	display: none;
	opacity: 0;
}

.toaew-vit__panel.is-active {
	display: block;
	opacity: 1;
	animation: toaew-vit-fade 0.28s ease;
}

.toaew-vit__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.toaew-vit__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	height: 100%;
	min-height: var( --toaew-vit-panel-h );
	padding: 24px;
	color: #b0b0b0;
	font-size: 0.9rem;
	text-align: center;
	background:
		linear-gradient( 135deg, rgba( 0, 0, 0, 0.02 ) 25%, transparent 25% ) -12px 0 / 24px 24px,
		linear-gradient( 225deg, rgba( 0, 0, 0, 0.02 ) 25%, transparent 25% ) -12px 0 / 24px 24px,
		linear-gradient( 315deg, rgba( 0, 0, 0, 0.02 ) 25%, transparent 25% ) 0 0 / 24px 24px,
		linear-gradient( 45deg, rgba( 0, 0, 0, 0.02 ) 25%, transparent 25% ) 0 0 / 24px 24px,
		#f7f7f7;
}

@keyframes toaew-vit-fade {
	from {
		opacity: 0;
		transform: translateY( 6px );
	}
	to {
		opacity: 1;
		transform: translateY( 0 );
	}
}

@media ( max-width: 1024px ) {
	.toaew-vit__layout,
	.toaew-vit--tabs-right .toaew-vit__layout {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.toaew-vit--tabs-right .toaew-vit__nav,
	.toaew-vit--tabs-right .toaew-vit__stage {
		order: initial;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.toaew-vit__tab,
	.toaew-vit__panel.is-active {
		transition: none;
		animation: none;
	}
}
