/**
 * Bloque Tabs Feature Showcase
 * 
 * Bloque con tabs interactivos y wrapper estilo macOS para mostrar gráficas.
 * Diseño dark mode con badge, título, subtítulo centrados y tabs horizontales.
 * 
 * @package Vitruve_Custom_Theme
 */

@import '../styles/design-tokens.css';

/**
 * ANIMACIONES DE ENTRADA (estilo Apple)
 */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

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

:root {
	--ease-apple: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/**
 * ========================================
 * CONTENEDOR PRINCIPAL
 * ========================================
 */
.vitruve-tabs-feature-showcase {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: var(--space-20) 0;
	background: var(--bg-primary);
	position: relative;
	overflow: hidden;
}

/**
 * CONTAINER INTERNO
 */
.vitruve-tabs-feature-showcase__container {
	max-width: var(--container-max-width);
	margin: 0 auto;
	padding: 0 var(--container-padding);
	display: flex;
	flex-direction: column;
	gap: var(--space-8);
	position: relative;
	/* Animación de entrada */
	opacity: 0;
	transform: translateY(30px);
}

.vitruve-tabs-feature-showcase.is-visible .vitruve-tabs-feature-showcase__container {
	animation: fadeInUp 1s var(--ease-apple) forwards;
}

@media (min-width: 1024px) {
	.vitruve-tabs-feature-showcase__container {
		padding: 0 var(--container-padding-lg);
	}

	.vitruve-tabs-feature-showcase__metrics-grid {
		grid-template-columns: repeat(2, 140px) 1fr !important;
		grid-template-rows: 1fr 1fr !important;
		gap: var(--space-4) !important;
	}
}

/**
 * ========================================
 * HEADER (BADGE + TÍTULO + SUBTÍTULO)
 * ========================================
 */
.vitruve-tabs-feature-showcase__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: var(--space-4);
	margin-bottom: var(--space-6);
}

/**
 * BADGE TIPO ICONO + TEXTO
 * Estilo alternativo al badge chip clásico
 */
.vitruve-tabs-feature-showcase__badge-icon {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
}

.vitruve-tabs-feature-showcase__badge-icon-img {
	width: 20px;
	height: 20px;
	color: var(--text-secondary);
	opacity: 0.8;
	object-fit: contain;
	flex-shrink: 0;
	margin: 0 !important;
}

.vitruve-tabs-feature-showcase__badge-icon-text {
	font-family: var(--font-sans);
	font-size: var(--text-sm);
	font-weight: var(--font-medium);
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/**
 * TÍTULO PRINCIPAL
 */
.vitruve-tabs-feature-showcase__title {
	font-family: var(--font-heading);
	font-size: var(--text-4xl);
	font-weight: var(--font-bold);
	line-height: 1.2;
	color: var(--text-primary);
	margin: 0;
}

@media (min-width: 768px) {
	.vitruve-tabs-feature-showcase__title {
		font-size: var(--text-5xl);
	}
}

/**
 * SUBTÍTULO
 */
.vitruve-tabs-feature-showcase__subtitle {
	font-family: var(--font-sans);
	font-size: var(--text-base);
	line-height: 1.6;
	color: var(--text-muted);
	margin: 0;
	max-width: 700px;
}

@media (min-width: 768px) {
	.vitruve-tabs-feature-showcase__subtitle {
		font-size: var(--text-lg);
	}
}

/**
 * ========================================
 * CONTROLES DE TABS
 * ========================================
 */
.vitruve-tabs-feature-showcase__controls {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: var(--space-8);
	width: 100%;
}

/**
 * TABS - DESKTOP
 */
.vitruve-tabs-feature-showcase__tabs {
	display: flex;
	flex-direction: row;
	gap: var(--space-2);
	padding: var(--space-1);
	background: var(--bg-secondary);
	border-radius: var(--radius-xl);
	border: 1px solid var(--border-primary);
}

/**
 * TAB INDIVIDUAL (NO SELECCIONADO - GRIS CLARO)
 */
.vitruve-tabs-feature-showcase__tab {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	padding: var(--space-2) var(--space-4) !important;
	background: transparent;
	border: none;
	border-radius: var(--radius-lg);
	font-family: var(--font-sans);
	font-size: var(--text-sm) !important;
	font-weight: var(--font-medium);
	color: rgba(255, 255, 255, 0.4);
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
	min-height: auto !important;
	height: auto !important;
	line-height: 1.4;
}

.vitruve-tabs-feature-showcase__tab:hover {
	background: rgba(255, 255, 255, 0.05);
	color: rgba(255, 255, 255, 0.7);
}

/**
 * TAB ACTIVO
 */
.vitruve-tabs-feature-showcase__tab--active {
	background: var(--bg-elevated);
	color: var(--text-primary);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/**
 * ICONO DEL TAB (CON OPACIDAD PARA NO SELECCIONADOS)
 */
.vitruve-tabs-feature-showcase__tab-icon {
	width: 20px;
	height: 20px;
	object-fit: contain;
	flex-shrink: 0;
	margin: 0 !important;
	padding: 0 !important;
	display: block !important;
	opacity: 0.5;
	transition: opacity 0.2s ease;
}

.vitruve-tabs-feature-showcase__tab:hover .vitruve-tabs-feature-showcase__tab-icon {
	opacity: 0.8;
}

.vitruve-tabs-feature-showcase__tab--active .vitruve-tabs-feature-showcase__tab-icon {
	opacity: 1;
}

/**
 * SELECT - OCULTO EN DESKTOP
 */
.vitruve-tabs-feature-showcase__select-wrapper {
	display: none;
	width: 100%;
	max-width: 400px;
}

.vitruve-tabs-feature-showcase__select {
	width: 100%;
	padding: var(--space-3) var(--space-4);
	background: var(--bg-secondary);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-lg);
	font-family: var(--font-sans);
	font-size: var(--text-base);
	font-weight: var(--font-medium);
	color: var(--text-primary);
	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='%23FFFFFF' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right var(--space-3) center;
	background-size: 12px;
	padding-right: var(--space-10);
}

.vitruve-tabs-feature-showcase__select:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
	border-color: var(--color-primary);
}

/**
 * ========================================
 * WRAPPER PARA EFECTO FADE
 * Envuelve al macos-wrapper para aplicar el degradado por encima del borde
 * ========================================
 */
.vitruve-tabs-feature-showcase__fade-wrapper {
	position: relative;
	width: 100%;
}

/* Fade a negro charcoal desde abajo - por encima del borde del macos-wrapper */
.vitruve-tabs-feature-showcase__fade-wrapper::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 250px;
	background: linear-gradient(to top, 
		rgba(16, 15, 17, 1) 0%, 
		rgba(16, 15, 17, 0.95) 15%,
		rgba(16, 15, 17, 0.7) 40%,
		rgba(16, 15, 17, 0) 100%
	);
	pointer-events: none;
	z-index: 10;
	border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}

/**
 * ========================================
 * WRAPPER ESTILO macOS
 * ========================================
 */
.vitruve-tabs-feature-showcase__macos-wrapper {
	position: relative;
	width: 100%;
	border-radius: var(--radius-2xl);
	overflow: hidden;
	background: var(--bg-secondary);
	border: 1px solid var(--border-primary);
	/*box-shadow: 
		0 20px 60px rgba(0, 0, 0, 0.4),
		0 10px 30px rgba(0, 0, 0, 0.3);*/
}

/**
 * ========================================
 * BARRA DE NAVEGADOR (CON CÍRCULOS macOS)
 * ========================================
 */
.vitruve-tabs-feature-showcase__browser-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: rgba(255, 255, 255, 0.03);
	border-bottom: 1px solid var(--border-primary);
	gap: var(--space-4);
	position: relative;
}

/**
 * BOTONES DECORATIVOS ESTILO macOS (EN LA MISMA LÍNEA)
 */
.vitruve-tabs-feature-showcase__browser-bar::before {
	content: '';
	position: relative;
	width: 12px;
	height: 12px;
	background-color: #FF5F57;
	border-radius: 50%;
	box-shadow: 
		20px 0 0 0 #FFBD2E,
		40px 0 0 0 #28C840;
	margin-right: 60px;
	flex-shrink: 0;
}

/**
 * BARRA DE DIRECCIÓN (CENTRADA)
 */
.vitruve-tabs-feature-showcase__address-bar {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	flex: 1;
	max-width: 500px;
	margin: 0 auto;
	padding: var(--space-1) var(--space-2);
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-lg);
}

/**
 * URL TEXT
 */
.vitruve-tabs-feature-showcase__url {
	font-family: var(--font-sans);
	font-size: var(--text-xs);
	color: var(--text-secondary);
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/**
 * ICONOS DEL NAVEGADOR
 */
.vitruve-tabs-feature-showcase__browser-icon {
	color: var(--text-muted);
	flex-shrink: 0;
	transition: color 0.2s ease;
}

.vitruve-tabs-feature-showcase__browser-icon:hover {
	color: var(--text-primary);
}

/**
 * BOTONES DE ACCIÓN
 */
.vitruve-tabs-feature-showcase__browser-actions {
	display: flex;
	align-items: center;
	gap: var(--space-3);
}

/**
 * ========================================
 * PANELES DE CONTENIDO
 * ========================================
 */
.vitruve-tabs-feature-showcase__panel {
	display: none;
	width: 100%;
}

.vitruve-tabs-feature-showcase__panel--active {
	display: block;
	animation: fadeIn 0.3s ease;
}

/**
 * ========================================
 * LAYOUT DASHBOARD (2 COLUMNAS)
 * ========================================
 */
.vitruve-tabs-feature-showcase__dashboard-layout {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 0;
	min-height: 600px;
	overflow: hidden;
}

/* Layout sin sidebar - ancho completo para tabs 1 y 2 */
.vitruve-tabs-feature-showcase__dashboard-layout--no-sidebar {
	grid-template-columns: 1fr;
}

/**
 * ========================================
 * SIDEBAR IZQUIERDO
 * ========================================
 */
.vitruve-tabs-feature-showcase__sidebar {
	background: rgba(0, 0, 0, 0.3);
	padding: var(--space-5) 0;
	border-right: 1px solid var(--border-primary);
}

.vitruve-tabs-feature-showcase__sidebar-title {
	font-family: var(--font-heading);
	font-size: var(--text-lg);
	font-weight: var(--font-bold);
	color: var(--text-primary);
	padding: 0 var(--space-4);
	margin: 0 0 var(--space-5) 0;
}

.vitruve-tabs-feature-showcase__sidebar-nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.vitruve-tabs-feature-showcase__sidebar-item {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-2) var(--space-4);
	color: var(--text-secondary);
	cursor: default;
}

.vitruve-tabs-feature-showcase__sidebar-item:nth-child(3) {
	background: rgba(255, 255, 255, 0.05);
}

.vitruve-tabs-feature-showcase__sidebar-icon,
.vitruve-tabs-feature-showcase__sidebar-icon-placeholder {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	object-fit: contain;
	margin: 0 !important;
}

.vitruve-tabs-feature-showcase__sidebar-icon-placeholder {
	background: var(--bg-elevated);
	border-radius: var(--radius-sm);
}

.vitruve-tabs-feature-showcase__sidebar-label {
	flex: 1;
	font-family: var(--font-sans);
	font-size: var(--text-xs);
	font-weight: var(--font-medium);
	color: var(--text-secondary);
}

.vitruve-tabs-feature-showcase__sidebar-arrow {
	width: 14px;
	height: 14px;
	color: var(--text-muted);
	flex-shrink: 0;
}

/**
 * ========================================
 * DASHBOARD PRINCIPAL (DERECHA)
 * ========================================
 */
.vitruve-tabs-feature-showcase__dashboard {
	padding: var(--space-6) var(--space-8);
	display: flex;
	flex-direction: column;
	gap: var(--space-6);
	overflow: hidden;
	width: 100%;
	box-sizing: border-box;
}

/* Dashboard ancho completo cuando no hay sidebar */
.vitruve-tabs-feature-showcase__dashboard--full-width {
	max-width: 100%;
}

/**
 * AVATARES DE ATLETAS
 */
.vitruve-tabs-feature-showcase__athletes {
	display: flex;
	gap: var(--space-3);
	overflow-x: auto;
	padding-bottom: var(--space-2);
}

.vitruve-tabs-feature-showcase__athlete {
	flex-shrink: 0;
}

.vitruve-tabs-feature-showcase__athlete-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-500));
	background-size: 120%;
	background-position: center center;
	background-repeat: no-repeat;
	border: 2px solid var(--border-primary);
	position: relative;
	overflow: hidden;
}

.vitruve-tabs-feature-showcase__athlete-avatar::after {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), transparent);
}

/* Avatar seleccionado con borde turquesa */
.vitruve-tabs-feature-showcase__athlete-avatar--selected {
	border: 3px solid var(--color-secondary);
	box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

/**
 * ========================================
 * GRID DE MÉTRICAS Y GRÁFICA
 * Layout: Grid 2x2 de 4 métricas a la izquierda + gráfica grande a la derecha
 * ========================================
 */
.vitruve-tabs-feature-showcase__metrics-grid {
	display: grid;
	grid-template-columns: repeat(2, 140px) 1fr;
	grid-template-rows: 1fr 1fr;
	gap: var(--space-4);
	align-items: stretch;
	width: 100%;
	box-sizing: border-box;
}

.vitruve-tabs-feature-showcase__metrics-grid > * {
	box-sizing: border-box;
}

/**
 * MÉTRICA CARD (TARJETA CUADRADA)
 */
.vitruve-tabs-feature-showcase__metric-card {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-xl);
	padding: var(--space-4);
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
	justify-content: space-between;
}

/* Métrica 1 - Top Left */
.vitruve-tabs-feature-showcase__metric-card:nth-child(1) {
	grid-column: 1;
	grid-row: 1;
}

/* Métrica 2 - Top Right */
.vitruve-tabs-feature-showcase__metric-card:nth-child(2) {
	grid-column: 2;
	grid-row: 1;
}

/* Métrica 3 - Bottom Left */
.vitruve-tabs-feature-showcase__metric-card:nth-child(3) {
	grid-column: 1;
	grid-row: 2;
}

/* Métrica 4 - Bottom Right */
.vitruve-tabs-feature-showcase__metric-card:nth-child(4) {
	grid-column: 2;
	grid-row: 2;
}

.vitruve-tabs-feature-showcase__metric-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
}

.vitruve-tabs-feature-showcase__metric-header svg {
	width: 14px;
	height: 14px;
	color: var(--text-muted);
	flex-shrink: 0;
}

.vitruve-tabs-feature-showcase__metric-title {
	font-family: var(--font-sans);
	font-size: var(--text-xs);
	font-weight: var(--font-medium);
	color: var(--text-secondary);
	flex: 1;
}

.vitruve-tabs-feature-showcase__metric-team-average {
	font-family: var(--font-sans);
	font-size: var(--text-lg);
	font-weight: var(--font-medium);
	color: var(--text-muted);
	text-align: left;
	margin-bottom: 0;
}

.vitruve-tabs-feature-showcase__metric-value {
	font-family: var(--font-heading);
	font-size: var(--text-4xl);
	font-weight: var(--font-bold);
	color: var(--text-primary);
	line-height: 1;
}

.vitruve-tabs-feature-showcase__metric-unit {
	font-size: var(--text-xl);
	opacity: 0.8;
}

.vitruve-tabs-feature-showcase__metric-label {
	font-family: var(--font-sans);
	font-size: var(--text-xs);
	color: var(--text-muted);
}

/**
 * GRÁFICA GRANDE (OCUPA 2 FILAS EN LA TERCERA COLUMNA)
 */
.vitruve-tabs-feature-showcase__chart-large {
	grid-column: 3;
	grid-row: 1 / span 2;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-xl);
	padding: var(--space-5);
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.vitruve-tabs-feature-showcase__chart-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.vitruve-tabs-feature-showcase__chart-header svg {
	color: var(--text-muted);
}

.vitruve-tabs-feature-showcase__chart-title {
	font-family: var(--font-sans);
	font-size: var(--text-base);
	font-weight: var(--font-semibold);
	color: var(--text-primary);
}

.vitruve-tabs-feature-showcase__chart-placeholder {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-lg);
	min-height: 300px;
	max-width: 100%;
	width: 100%;
}

.vitruve-tabs-feature-showcase__chart,
#chart-tab-1,
#chart-tab-2-radar,
#chart-tab-2-line,
#chart-tab-3 {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	display: block !important;
}

/**
 * ========================================
 * TABLA TAB 4 - TEAM INSIGHTS
 * ========================================
 */
.vitruve-tabs-feature-showcase__table-wrapper {
	padding: var(--space-6) var(--space-8);
	width: 100%;
	box-sizing: border-box;
	min-height: 600px; /* Misma altura que dashboard-layout */
	max-height: 600px; /* Limitar altura máxima */
	overflow: hidden; /* Ocultar contenido que desborda */
}

.vitruve-tabs-feature-showcase__table-container {
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden; /* Ocultar filas que no caben verticalmente */
}

.vitruve-tabs-feature-showcase__table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--font-sans);
}

/* Table Header */
.vitruve-tabs-feature-showcase__table-header {
	padding: var(--space-3) var(--space-4);
	text-align: left;
	font-size: var(--text-xs);
	font-weight: var(--font-medium);
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-bottom: 1px solid var(--border-primary);
}

.vitruve-tabs-feature-showcase__table-header--athlete {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

.vitruve-tabs-feature-showcase__table-header svg {
	color: var(--text-muted);
	opacity: 0.5;
}

/* Table Row */
.vitruve-tabs-feature-showcase__table-row {
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	transition: background-color 0.2s ease;
}

.vitruve-tabs-feature-showcase__table-row:hover {
	background-color: rgba(255, 255, 255, 0.02);
}

/* Table Cell */
.vitruve-tabs-feature-showcase__table-cell {
	padding: var(--space-3) var(--space-4);
	font-size: var(--text-sm);
	color: var(--text-primary);
}

.vitruve-tabs-feature-showcase__table-cell--athlete {
	padding-left: var(--space-4);
}

/* Athlete Info */
.vitruve-tabs-feature-showcase__table-athlete {
	display: flex;
	align-items: center;
	gap: var(--space-3);
}

.vitruve-tabs-feature-showcase__table-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-500));
	background-size: 120%;
	background-position: center center;
	background-repeat: no-repeat;
	border: 2px solid var(--border-primary);
	flex-shrink: 0;
}

.vitruve-tabs-feature-showcase__table-athlete-name {
	font-size: var(--text-sm);
	font-weight: var(--font-medium);
	color: var(--text-primary);
}

/* Valores con background y colores */
.vitruve-tabs-feature-showcase__table-value {
	display: inline-block;
	padding: var(--space-1) var(--space-3);
	border-radius: var(--radius-md);
	font-size: var(--text-sm);
	font-weight: var(--font-semibold);
	min-width: 50px;
	text-align: center;
}

/* Verde - Valores buenos/altos */
.vitruve-tabs-feature-showcase__table-value--green {
	background-color: rgba(34, 197, 94, 0.15);
	color: #22C55E;
}

/* Amarillo - Valores medios/advertencia */
.vitruve-tabs-feature-showcase__table-value--yellow {
	background-color: rgba(234, 179, 8, 0.15);
	color: #EAB308;
}

/* Rojo - Valores bajos/alerta */
.vitruve-tabs-feature-showcase__table-value--red {
	background-color: rgba(239, 68, 68, 0.15);
	color: #EF4444;
}

/* Azul - Valores medios (para RPE) */
.vitruve-tabs-feature-showcase__table-value--blue {
	background-color: rgba(59, 130, 246, 0.15);
	color: #3B82F6;
}

/* Workouts - Azul */
.vitruve-tabs-feature-showcase__table-value--workouts {
	background-color: rgba(59, 130, 246, 0.15);
	color: #3B82F6;
}

/* Valores vacíos */
.vitruve-tabs-feature-showcase__table-value--empty {
	background-color: transparent;
	color: var(--text-muted);
	opacity: 0.5;
}

/**
 * ANIMACIÓN
 */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/**
 * ========================================
 * TAB 2 - LAYOUT ESPECÍFICO (2 GRÁFICAS)
 * ========================================
 */
/* Cambiar grid a 2 columnas con proporción 1:2 (1/3 y 2/3) */
.vitruve-tabs-feature-showcase__panel[data-panel="tab-2"] .vitruve-tabs-feature-showcase__metrics-grid {
	grid-template-columns: 1fr 2fr !important;
	grid-template-rows: 1fr !important;
}

/* Radar ocupa columna 1 completa */
.vitruve-tabs-feature-showcase__panel[data-panel="tab-2"] .vitruve-tabs-feature-showcase__chart-radar {
	grid-column: 1 !important;
	grid-row: 1 !important;
}

/* Línea ocupa columna 2 completa */
.vitruve-tabs-feature-showcase__panel[data-panel="tab-2"] .vitruve-tabs-feature-showcase__chart-large {
	grid-column: 2 !important;
	grid-row: 1 !important;
}

/* Contenedor gráfica radar */
.vitruve-tabs-feature-showcase__chart-radar {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-xl);
	padding: var(--space-5);
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
}

/* Header de gráfica radar con título y subtítulo */
.vitruve-tabs-feature-showcase__chart-radar .vitruve-tabs-feature-showcase__chart-header {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

.vitruve-tabs-feature-showcase__chart-radar .vitruve-tabs-feature-showcase__chart-header > div {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

/* Subtítulo para la gráfica radar */
.vitruve-tabs-feature-showcase__chart-subtitle {
	font-family: var(--font-sans);
	font-size: var(--text-xs);
	color: var(--text-muted);
	font-weight: var(--font-medium);
}

/**
 * ========================================
 * RESPONSIVE - MOBILE (max-width: 768px)
 * ========================================
 */
@media (max-width: 768px) {
	.vitruve-tabs-feature-showcase {
		padding: var(--space-12) 0;
	}


	.vitruve-tabs-feature-showcase__header {
		gap: var(--space-3);
		margin-bottom: var(--space-4);
	}

	.vitruve-tabs-feature-showcase__badge {
		font-size: 10px;
		padding: var(--space-1) var(--space-3);
	}

	.vitruve-tabs-feature-showcase__title {
		font-size: var(--text-3xl);
	}

	.vitruve-tabs-feature-showcase__subtitle {
		font-size: var(--text-sm);
	}

	.vitruve-tabs-feature-showcase__controls {
		margin-bottom: var(--space-4);
	}

	/* Ocultar tabs horizontales en mobile */
	.vitruve-tabs-feature-showcase__tabs {
		display: none;
	}

	/* Mostrar select en mobile */
	.vitruve-tabs-feature-showcase__select-wrapper {
		display: block;
	}

	.vitruve-tabs-feature-showcase__select {
		font-size: var(--text-sm);
		padding: var(--space-3) var(--space-4);
		padding-right: var(--space-10);
	}

	.vitruve-tabs-feature-showcase__macos-wrapper {
		border-radius: var(--radius-xl);
		min-height: 350px;
	}

	.vitruve-tabs-feature-showcase__browser-bar {
		padding: 8px 12px;
		gap: var(--space-2);
	}

	.vitruve-tabs-feature-showcase__browser-bar::before {
		width: 10px;
		height: 10px;
		box-shadow: 
			16px 0 0 0 #FFBD2E,
			32px 0 0 0 #28C840;
		margin-right: 48px;
	}

	.vitruve-tabs-feature-showcase__address-bar {
		padding: var(--space-1) var(--space-2);
		gap: var(--space-1);
	}

	.vitruve-tabs-feature-showcase__url {
		font-size: var(--text-xs);
	}

	.vitruve-tabs-feature-showcase__browser-icon {
		width: 14px;
		height: 14px;
	}

	.vitruve-tabs-feature-showcase__browser-actions {
		gap: var(--space-2);
	}

	/* Dashboard Layout Mobile */
	.vitruve-tabs-feature-showcase__dashboard-layout {
		grid-template-columns: 1fr;
		min-height: auto;
	}

	/* Ocultar sidebar en mobile */
	.vitruve-tabs-feature-showcase__sidebar {
		display: none;
	}

	.vitruve-tabs-feature-showcase__dashboard {
		padding: var(--space-5);
		gap: var(--space-5);
		overflow: hidden; /* Prevenir overflow que dispare resize */
		max-height: 100%;  /* Limitar altura */
	}

	.vitruve-tabs-feature-showcase__athlete-avatar {
		width: 40px;
		height: 40px;
	}

	.vitruve-tabs-feature-showcase__metrics-grid {
		grid-template-columns: repeat(2, 1fr); /* 2 columnas en mobile para metric cards */
		grid-template-rows: auto;
		gap: var(--space-3);
		max-height: none; /* Asegurar que no herede restricciones */
	}

	.vitruve-tabs-feature-showcase__metric-card {
		padding: var(--space-4);
		aspect-ratio: auto;
	}

	.vitruve-tabs-feature-showcase__metric-team-average {
		font-size: var(--text-sm);
	}

	.vitruve-tabs-feature-showcase__metric-value {
		font-size: var(--text-3xl);
	}

	.vitruve-tabs-feature-showcase__chart-large {
		grid-column: 1 / -1; /* Ocupar las 2 columnas completas */
		grid-row: auto;
		padding: var(--space-4);
	}

	.vitruve-tabs-feature-showcase__chart-placeholder {
		min-height: 250px;
		max-height: 250px; /* Prevenir crecimiento infinito */
		height: 250px;     /* Altura fija en mobile */
	}

	/* Tab 2 específico: apilar gráficas verticalmente en mobile */
	.vitruve-tabs-feature-showcase__panel[data-panel="tab-2"] .vitruve-tabs-feature-showcase__metrics-grid {
		grid-template-columns: 1fr !important;
		grid-template-rows: auto auto !important;
	}
	
	.vitruve-tabs-feature-showcase__panel[data-panel="tab-2"] .vitruve-tabs-feature-showcase__chart-radar {
		grid-column: 1 !important;
		grid-row: 1 !important;
		padding: var(--space-4);
	}
	
	.vitruve-tabs-feature-showcase__panel[data-panel="tab-2"] .vitruve-tabs-feature-showcase__chart-large {
		grid-column: 1 !important;
		grid-row: 2 !important;
		padding: var(--space-4);
	}

	/* Tabla responsive - en mobile mostrar todo el contenido */
	.vitruve-tabs-feature-showcase__table-wrapper {
		padding: var(--space-5);
		min-height: auto;
		max-height: none;
		overflow: visible;
	}

	.vitruve-tabs-feature-showcase__table-container {
		overflow-y: visible;
	}

	.vitruve-tabs-feature-showcase__table-container {
		overflow-x: scroll;
		-webkit-overflow-scrolling: touch;
	}

	.vitruve-tabs-feature-showcase__table {
		min-width: 600px;
	}

	.vitruve-tabs-feature-showcase__table-header {
		padding: var(--space-2) var(--space-3);
		font-size: 10px;
	}

	.vitruve-tabs-feature-showcase__table-cell {
		padding: var(--space-2) var(--space-3);
		font-size: var(--text-xs);
	}

	.vitruve-tabs-feature-showcase__table-avatar {
		width: 28px;
		height: 28px;
	}

	.vitruve-tabs-feature-showcase__table-athlete-name {
		font-size: var(--text-xs);
	}

	.vitruve-tabs-feature-showcase__table-value {
		padding: 4px var(--space-2);
		font-size: var(--text-xs);
		min-width: 40px;
	}

	/* CTAs Mobile - Estilo idéntico a cta-banner */
	.vitruve-tabs-feature-showcase__actions {
		flex-direction: column;
		width: 100%;
		gap: var(--space-3);
		margin-top: var(--space-6);
	}

	.vitruve-tabs-feature-showcase__cta {
		width: 100%;
		max-width: 300px;
		padding: var(--space-3) var(--space-5);
		font-size: var(--text-sm);
	}
}

/**
 * ========================================
 * RESPONSIVE - TABLETS (max-width: 1024px)
 * ========================================
 */
@media (max-width: 1024px) and (min-width: 769px) {
	.vitruve-tabs-feature-showcase {
		padding: var(--space-16) 0;
	}


	.vitruve-tabs-feature-showcase__header {
		gap: var(--space-3);
		margin-bottom: var(--space-4);
	}

	.vitruve-tabs-feature-showcase__title {
		font-size: var(--text-4xl);
	}

	.vitruve-tabs-feature-showcase__subtitle {
		font-size: var(--text-base);
	}

	.vitruve-tabs-feature-showcase__tab {
		padding: var(--space-2) var(--space-3) !important;
		font-size: var(--text-xs) !important;
	}

	.vitruve-tabs-feature-showcase__tab-icon {
		width: 18px !important;
		height: 18px !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	.vitruve-tabs-feature-showcase__macos-wrapper {
		min-height: 400px;
	}

	/* Dashboard Tablet */
	.vitruve-tabs-feature-showcase__dashboard-layout {
		grid-template-columns: 180px 1fr;
	}

	.vitruve-tabs-feature-showcase__sidebar {
		padding: var(--space-4) 0;
	}

	.vitruve-tabs-feature-showcase__sidebar-title {
		font-size: var(--text-base);
		padding: 0 var(--space-3);
	}

	.vitruve-tabs-feature-showcase__sidebar-item {
		padding: var(--space-2) var(--space-3);
		gap: var(--space-1);
	}

	.vitruve-tabs-feature-showcase__sidebar-icon,
	.vitruve-tabs-feature-showcase__sidebar-icon-placeholder {
		width: 16px;
		height: 16px;
	}

	.vitruve-tabs-feature-showcase__sidebar-label {
		font-size: 11px;
	}

	.vitruve-tabs-feature-showcase__sidebar-arrow {
		width: 12px;
		height: 12px;
	}

	.vitruve-tabs-feature-showcase__dashboard {
		padding: var(--space-5) var(--space-6);
		gap: var(--space-5);
	}

	.vitruve-tabs-feature-showcase__metrics-grid {
		grid-template-columns: repeat(2, 120px) 1fr;
		grid-template-rows: 1fr 1fr;
		gap: var(--space-3);
	}

	.vitruve-tabs-feature-showcase__metric-card {
		padding: var(--space-3);
	}

	.vitruve-tabs-feature-showcase__metric-value {
		font-size: var(--text-2xl);
	}

	.vitruve-tabs-feature-showcase__metric-unit {
		font-size: var(--text-lg);
	}

	.vitruve-tabs-feature-showcase__chart-placeholder {
		min-height: 280px;
	}

	/* CTAs Tablet - Estilo idéntico a cta-banner */
	.vitruve-tabs-feature-showcase__cta {
		padding: var(--space-3) var(--space-6);
		font-size: var(--text-sm);
	}
}

/**
 * ========================================
 * ACCESIBILIDAD
 * ========================================
 */
/**
 * ========================================
 * CTAs (CALL TO ACTION)
 * Estilo idéntico a cta-banner
 * ========================================
 */
.vitruve-tabs-feature-showcase__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
	justify-content: center;
	align-items: center;
	margin-top: var(--space-8);
}

.vitruve-tabs-feature-showcase__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-lg);
	padding: var(--space-2) var(--space-6);
	font-family: var(--font-sans);
	font-size: var(--text-base);
	font-weight: var(--font-semibold);
	text-decoration: none;
	transition:
		transform 0.2s ease,
		background 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease,
		box-shadow 0.2s ease;
	cursor: pointer;
	white-space: nowrap;
}

/**
 * CTA SECUNDARIO
 * Outline style
 */
.vitruve-tabs-feature-showcase__cta--secondary {
	background: transparent;
	border: 2px solid rgba(255, 255, 255, 0.3);
	color: var(--text-primary);
}

.vitruve-tabs-feature-showcase__cta--secondary:hover,
.vitruve-tabs-feature-showcase__cta--secondary:focus-visible {
	transform: translateY(-2px);
	border-color: rgba(255, 255, 255, 0.5);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/**
 * CTA PRIMARIO
 * Filled style con color primary
 */
.vitruve-tabs-feature-showcase__cta--primary {
	background: var(--color-primary);
	border: 2px solid var(--color-primary);
	color: var(--color-white);
}

.vitruve-tabs-feature-showcase__cta--primary:hover,
.vitruve-tabs-feature-showcase__cta--primary:focus-visible {
	transform: translateY(-2px);
	background: var(--color-primary-600);
	border-color: var(--color-primary-600);
	box-shadow: 0 4px 20px rgba(102, 68, 255, 0.4);
}

/**
 * FOCUS VISIBLE (ACCESIBILIDAD)
 */
.vitruve-tabs-feature-showcase__cta:focus-visible {
	outline: 3px solid rgba(102, 68, 255, 0.5);
	outline-offset: 3px;
}

/**
 * ========================================
 * ACCESIBILIDAD
 * ========================================
 */
@media (prefers-reduced-motion: reduce) {
	.vitruve-tabs-feature-showcase__tab,
	.vitruve-tabs-feature-showcase__cta {
		transition: none;
	}
	
	.vitruve-tabs-feature-showcase__panel--active {
		animation: none;
	}

	.vitruve-tabs-feature-showcase__container {
		opacity: 1;
		transform: none;
		animation: none;
	}
}
