/* Плагин - Карьера игрока */

/* Базовые шрифты и цвета для всех блоков */
.sporto-career-table,
.sporto-ranking-table,
.sporto-shots-charts {
	font-family: 'Roboto Condensed', Arial, sans-serif;
	color: #2c3e50;
}

/* Заголовки */
.sporto-career-table h3.competition-header,
.sporto-shots-charts h4,
.sporto-ranking-table th {
	margin: 20px 0 10px 0;
	font-family: 'Roboto Condensed', Arial, sans-serif;
	color: #2c3e50;
	font-size: 18px;
	text-transform: uppercase;
	font-weight: 900;
	line-height: 1;
	letter-spacing: 1px;
}

/* Основная таблица */
.sporto-career-table {
	margin-bottom: 30px;
	position: relative;
}

.sporto-career-table .responsive-table {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.sporto-career-table table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	font-size: 14px;
	text-transform: uppercase;
	min-width: 800px;
	background: #fff;
}

.sporto-career-table th {
	background-color: #2c3e50 !important;
	color: #fff;
	font-weight: 700;
	padding: 14px 10px;
	border: 1px solid #e0e0e0;
	font-family: 'Roboto Condensed', Arial, sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	position: relative;
	cursor: pointer;
	white-space: nowrap;
}

.sporto-career-table td {
	padding: 12px 10px;
	border: 1px solid #e0e0e0;
	color: #2c3e50;
	white-space: nowrap;
	text-align: center;
	background: #fff;
	overflow: visible;
}

.sporto-career-table th:nth-child(1),
.sporto-career-table td:nth-child(1) {
	width: 70px;
	min-width: 70px;
	max-width: 70px;
}

.sporto-career-table th:nth-child(2),
.sporto-career-table td:nth-child(2),
.sporto-career-table th:nth-child(3),
.sporto-career-table td:nth-child(3) {
	width: 190px;
	min-width: 190px;
	max-width: 190px;
}

.sporto-career-table th:nth-child(4),
.sporto-career-table td:nth-child(4) {
	width: 50px;
	min-width: 50px;
	max-width: 50px;
}

.sporto-career-table th:nth-child(5),
.sporto-career-table td:nth-child(5),
.sporto-career-table th:nth-child(6),
.sporto-career-table td:nth-child(6) {
	width: 68px;
	min-width: 68px;
	max-width: 68px;
}

.sporto-career-table th:nth-child(7),
.sporto-career-table td:nth-child(7),
.sporto-career-table th:nth-child(8),
.sporto-career-table td:nth-child(8),
.sporto-career-table th:nth-child(9),
.sporto-career-table td:nth-child(9) {
	width: 70px;
	min-width: 70px;
	max-width: 70px;
}

.sporto-career-table th:nth-child(n+10),
.sporto-career-table td:nth-child(n+10) {
	width: 57px;
	min-width: 57px;
	max-width: 57px;
}

.sporto-career-table tr:nth-child(even) td {
	background-color: #f8f9fa;
}

.sporto-career-table tbody tr:hover td {
	background-color: #e8f4f8 !important;
}

.sporto-career-table .total-row td {
	background-color: #ecf0f1 !important;
	font-weight: 600;
}

/* Выравнивание столбцов Турнир и Команда по левому краю */
.sporto-career-table td:nth-child(2),
.sporto-career-table td:nth-child(3) {
	text-align: left;
}

/* Выравнивание "Всего:" по правому краю */
.sporto-career-table .total-row .total-label {
	text-align: right;
}

/* Выравнивание всех данных в итоговой строке по центру */
.sporto-career-table .total-row td:not(.total-label) {
	text-align: center !important;
}

.sporto-all-career-table .total-row td:first-child {
	text-align: left;
}

/* Корректировка ширины столбцов для таблицы [sporto_all_career] */
.sporto-all-career-table th:nth-child(1),
.sporto-all-career-table td:nth-child(1) {
	width: 190px;
	min-width: 190px;
	max-width: 190px;
	text-align: left;
}

.sporto-all-career-table th:nth-child(2),
.sporto-all-career-table td:nth-child(2) {
	width: 50px;
	min-width: 50px;
	max-width: 50px;
}

.sporto-all-career-table th:nth-child(3),
.sporto-all-career-table td:nth-child(3),
.sporto-all-career-table th:nth-child(4),
.sporto-all-career-table td:nth-child(4) {
	width: 68px;
	min-width: 68px;
	max-width: 68px;
}

.sporto-all-career-table th:nth-child(5),
.sporto-all-career-table td:nth-child(5),
.sporto-all-career-table th:nth-child(6),
.sporto-all-career-table td:nth-child(6),
.sporto-all-career-table th:nth-child(7),
.sporto-all-career-table td:nth-child(7) {
	width: 70px;
	min-width: 70px;
	max-width: 70px;
}

.sporto-all-career-table th:nth-child(n+8),
.sporto-all-career-table td:nth-child(n+8) {
	width: 57px;
	min-width: 57px;
	max-width: 57px;
}

.sporto-career-table .sporto-error {
	text-align: center;
	padding: 20px;
	font-size: 14px;
	color: #e74c3c;
	background: #f8f9fa;
	border-radius: 4px;
	margin: 10px 0;
}

/* Tooltip */
.tooltip-container {
	position: relative;
	display: inline-block;
	width: 100%;
	overflow: visible;
}

.tooltiptext {
	visibility: hidden;
	width: 200px;
	background-color: #2c3e50;
	color: #fff;
	text-align: center;
	border-radius: 6px;
	padding: 8px;
	position: absolute;
	z-index: 9999;
	bottom: 125%;
	left: 50%;
	transform: translateX(-50%);
	opacity: 0;
	transition: opacity 0.3s;
	white-space: normal;
	word-wrap: break-word;
	font-family: 'Roboto Condensed', Arial, sans-serif;
	font-size: 13px;
}

.tooltip-container:hover .tooltiptext {
	visibility: visible;
	opacity: 1;
}

.tooltiptext em {
	font-style: italic;
}

/* Названия турниров и команд */
.sporto-career-table td.tournament-name,
.sporto-career-table td.team-name {
	text-align: left;
	white-space: nowrap;
	overflow: visible;
	position: relative;
	max-width: 190px;
}

.sporto-career-table td.tournament-name .tooltip-container,
.sporto-career-table td.team-name .tooltip-container {
	display: inline-block;
	width: 100%;
	overflow: visible;
}

/* Компактная таблица рейтинга игрока */
.sporto-ranking-table {
	margin: 20px 0;
}

.sporto-ranking-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	min-width: 240px;
	background: #fff;
}

.sporto-ranking-table th,
.sporto-ranking-table td {
	padding: 10px 8px;
	border: 1px solid #e0e0e0;
	text-align: center;
	white-space: nowrap;
}

.sporto-ranking-table th {
	background-color: #2c3e50;
	color: #fff;
	font-weight: 900;
	font-family: 'Roboto Condensed', Arial, sans-serif;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.sporto-ranking-table td {
	color: #2c3e50;
	font-family: 'Roboto Condensed', Arial, sans-serif;
	font-size: 16px;
	background: #f8f9fa;
}

.sporto-ranking-table tr:nth-child(even) td {
	background-color: #ecf0f1;
}

.sporto-ranking-table .sporto-error {
	text-align: center;
	padding: 20px;
	font-size: 14px;
	color: #e74c3c;
	background: #f8f9fa;
	border-radius: 4px;
	margin: 10px 0;
}

/* Стили для круговых диаграмм */
.sporto-shots-charts {
	margin: 16px 0;
	padding: 16px;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 2px 4px rgba(44, 62, 80, 0.08);
}

.sporto-shots-charts .charts-container {
	display: flex;
	justify-content: space-around;
	flex-wrap: wrap;
	gap: 16px;
}

.sporto-shots-charts .chart-wrapper {
	flex: 1;
	min-width: 84px;
	max-width: 240px;
	text-align: center;
	padding: 16px;
	background: #f8f9fa;
	border-radius: 3px;
}

.sporto-shots-charts h4 {
	margin: 0 0 16px 0;
	color: #2c3e50;
	font-size: 16px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.sporto-shots-charts .shot-chart {
	width: 100%;
	height: auto;
	margin-bottom: 10px;
	display: block;
	margin: 0 auto;
}

.sporto-shots-charts .shot-stats {
	font-size: 14px;
	color: #2c3e50;
	margin-top: 10px;
}

/* Сообщения об ошибках */
.sporto-error {
	text-align: center;
	padding: 20px;
	font-size: 14px;
	color: #e74c3c;
	background: #f8f9fa;
	border-radius: 4px;
	margin: 10px 0;
}

/* Уведомление об устаревших данных */
.sporto-stale-notice {
	text-align: center;
	padding: 12px 20px;
	font-size: 14px;
	color: #856404;
	background: #fff3cd;
	border: 1px solid #ffeeba;
	border-radius: 4px;
	margin: 10px 0 20px 0;
	font-family: 'Roboto Condensed', Arial, sans-serif;
}

/* Сноска об устаревших данных (под таблицей) */
.sporto-stale-footnote {
	text-align: right;
	margin: 10px 0;
	font-size: 11px;
	font-style: italic;
	color: #6c757d;
	font-family: 'Roboto Condensed', Arial, sans-serif;
}

/* Адаптивность */
@media (max-width: 767px) {
	.sporto-career-table table {
		min-width: 100%;
	}

	.sporto-career-table .responsive-table {
		overflow-x: scroll;
	}

	.sporto-shots-charts .charts-container {
		gap: 10px;
	}

	.sporto-shots-charts .chart-wrapper {
		padding: 8px;
	}
}

@media (max-width: 480px) {
	.sporto-career-table {
		font-size: 12px;
	}

	.sporto-career-table td,
	.sporto-career-table th {
		padding: 6px 4px;
	}

	.tooltip-container .tooltiptext {
		width: 160px;
		font-size: 11px;
	}

	.sporto-ranking-table table {
		font-size: 13px;
	}

	.sporto-ranking-table th,
	.sporto-ranking-table td {
		padding: 8px 4px;
	}

	.sporto-shots-charts .charts-container {
		align-items: center;
		gap: 6px;
	}

	.sporto-shots-charts h4 {
		font-size: 13px;
		font-weight: 600;
	}

	.sporto-shots-charts .chart-wrapper {
		width: 100%;
		max-width: none;
		padding: 2px;
	}

	.sporto-shots-charts {
		margin: 12px 0;
		padding: 8px;
		border-radius: 3px;
		box-shadow: 0 2px 4px rgb(44 62 80 / .08);
	}
}

@media (max-width: 480px) {
	.sporto-shots-charts h4[data-short] {
		font-size: 0 !important;
		/* Скрыть основной текст */
		position: relative;
	}

	.sporto-shots-charts h4[data-short]::before {
		content: attr(data-short);
		font-size: 20px;
		font-weight: 900;
		color: #2c3e50;
		text-transform: uppercase;
		letter-spacing: 1px;
		font-family: 'Roboto Condensed', Arial, sans-serif;
		position: static;
	}
}

.shot-chart {
	min-height: 100px;
	/* Минимальная высота для предотвращения схлопывания */
	opacity: 0;
	transition: opacity 0.3s ease;
}

.shot-chart.initialized {
	opacity: 1;
}

/* Стили для фильтров */
.sporto-career-filters {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 24px;
	background: var(--secondary-light);
	padding: 16px;
	gap: 12px;
	border-radius: 3px;
}

.sporto-filter-item {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	flex-basis: 200px;
}

.sporto-filter-item label {
	font-family: 'Roboto Condensed', Arial, sans-serif;
	font-size: 14px;
	color: #2c3e50;
	text-transform: uppercase;
	text-align: left;
	margin-bottom: 1px;
	font-weight: 400;
}

.sporto-filter-item select {
	width: 100%;
	border: 1px solid #e0e0e0;
	background-color: #fff;
	font-family: 'Roboto Condensed', Arial, sans-serif;
	color: #2c3e50;
	border-radius: 3px;
	font-size: 16px;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding: 10px 35px 10px 15px;
	border: 1px solid #2c3e50 !important;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%232c3e50' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 16px;
}

.sporto-filter-item select option {
	width: 200px;
	font-family: 'Roboto Condensed', sans-serif;
	font-size: 16px;
	font-weight: 400;
	text-transform: uppercase;
	color: #2c3e50;
	letter-spacing: 0.5px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}


@media (max-width: 767px) {
	.sporto-career-filters {
		flex-direction: column;
		gap: 15px;
	}
}