/* Плагин - Статистика игрока и Статистика игроков в команде */

/* Заголовок таблицы */
.sporto-stats-table h3.competition-header {
	margin: 16px 0 !important;
	font-family: "Roboto Condensed", sans-serif;
	color: var(--black);
	text-transform: uppercase;
	font-weight: 900;
	line-height: 1;
	letter-spacing: 1px;
	font-size: var(--h3);
	text-align: left;

}

/* Таблица */
.sporto-stats-table {
	margin: 20px 0;
	position: relative;
	font-family: "Roboto Condensed", sans-serif;
}

.responsive-table {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.sporto-stats {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	font-size: 14px;
	text-transform: uppercase;
	min-width: 800px;
}

/* Шапка Таблицы */
.sporto-stats th {
	border: 1px solid #e0e0e0;
	font-family: 'Roboto Condensed', sans-serif;
	position: relative;
	cursor: pointer;
	white-space: nowrap;
	background-color: var(--bricks-color-ltxxmb);
	color: var(--white);
	font-size: 16px;
	text-transform: uppercase;
	font-weight: 700;
	padding-top: 14px;
	padding-right: 5px;
	padding-bottom: 14px;
	padding-left: 5px;
}

.sporto-stats td {
	border: 1px solid #e0e0e0;
	white-space: nowrap;
	text-align: center;
	overflow: hidden;
	background-color: var(--white);
	color: var(--secondary);
	padding-top: 3px;
	padding-right: 5px;
	padding-bottom: 3px;
	padding-left: 5px;
	font-size: 16px;
	text-transform: uppercase;
	text-wrap: nowrap;


}

.sporto-stats td.text-left {
	text-align: left !important;
}

/* Логотипы команд */
.team-logo {
	width: 40px;
	height: 40px;
	object-fit: contain;
	vertical-align: middle;
}

/* Чередование строк */
.sporto-stats tr:nth-child(even) td {
	background-color: var(--secondary-ultra-light);
}

/* Стили при наведении */
.sporto-stats tbody tr:hover td {
	background-color: var(--secondary-light) !important;
}

/* Управление шириной столбцов в разных типах таблиц */

/* Подробная Таблица статистики игрока */
.sporto-stats.player-stats-table th:first-child,
.sporto-stats.player-stats-table td:first-child {
	width: 90px !important;
	min-width: 90px !important;
	max-width: 90px !important;
}

.sporto-stats.player-stats-table th:nth-child(2),
.sporto-stats.player-stats-table td:nth-child(2) {
	width: 260px !important;
	min-width: 260px !important;
	max-width: 260px !important;
}

.sporto-stats.player-stats-table th:nth-child(3),
.sporto-stats.player-stats-table td:nth-child(3),
.sporto-stats.player-stats-table th:nth-child(4),
.sporto-stats.player-stats-table td:nth-child(4),
.sporto-stats.player-stats-table th:nth-child(5),
.sporto-stats.player-stats-table td:nth-child(5),
.sporto-stats.player-stats-table th:nth-child(6),
.sporto-stats.player-stats-table td:nth-child(6),
.sporto-stats.player-stats-table th:nth-child(7),
.sporto-stats.player-stats-table td:nth-child(7) {
	width: 68px !important;
	min-width: 68px !important;
	max-width: 68px !important;
}

.sporto-stats.player-stats-table th:nth-child(n+8),
.sporto-stats.player-stats-table td:nth-child(n+8) {
	width: 56px !important;
	min-width: 56px !important;
	max-width: 56px !important;
}

/* Сводная Таблица статистики игроков в отдельной команде */

/* Обёртка для горизонтального скролла */
.table-scroll-wrapper {
	position: relative;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* Колонка с фото (фиксированная) */
.sporto-stats.team-stats-table th.photo-column,
.sporto-stats.team-stats-table td.photo-column {
	width: 70px !important;
	min-width: 70px !important;
	max-width: 70px !important;
	text-align: center !important;
	overflow: hidden;
	background-color: var(--white);
	padding-top: 3px !important;
	padding-right: 5px !important;
	padding-bottom: 3px !important;
	padding-left: 5px !important;


}

/* Фиксация первой колонки при скролле */
.sporto-stats.team-stats-table .sticky-column {
	position: sticky;
	left: 0;
	z-index: 2;
	background-color: #fff;
}

.sporto-stats.team-stats-table thead .sticky-column {
	z-index: 3;
	background-color: #2c3e50 !important;
}

.sporto-stats.team-stats-table tr:nth-child(even) .sticky-column {
	background-color: var(--secondary-ultra-light);
}

.sporto-stats.team-stats-table tbody tr:hover .sticky-column {
	background-color: var(--secondary-light) !important;
}

.sporto-stats.team-stats-table .team-total-row .sticky-column {
	background-color: var(--secondary-light) !important;
}

/* Фото игрока */
.player-photo {
	width: 60px !important;
	height: 60px !important;
	object-fit: cover;
	display: block;
	margin: 0 auto;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Номер игрока */
.sporto-stats.team-stats-table th:nth-child(2),
.sporto-stats.team-stats-table td:nth-child(2) {
	width: 48px !important;
	min-width: 48px !important;
	max-width: 48px !important;
}

/* Имя игрока */
.sporto-stats.team-stats-table th:nth-child(3),
.sporto-stats.team-stats-table td:nth-child(3) {
	width: 220px !important;
	min-width: 220px !important;
	max-width: 220px !important;
}

/* Позиция, И, СТ и статы */
.sporto-stats.team-stats-table th:nth-child(4),
.sporto-stats.team-stats-table td:nth-child(4),
.sporto-stats.team-stats-table th:nth-child(5),
.sporto-stats.team-stats-table td:nth-child(5),
.sporto-stats.team-stats-table th:nth-child(6),
.sporto-stats.team-stats-table td:nth-child(6),
.sporto-stats.team-stats-table th:nth-child(11),
.sporto-stats.team-stats-table td:nth-child(11),
.sporto-stats.team-stats-table th:nth-child(12),
.sporto-stats.team-stats-table td:nth-child(12),
.sporto-stats.team-stats-table th:nth-child(13),
.sporto-stats.team-stats-table td:nth-child(13),
.sporto-stats.team-stats-table th:nth-child(14),
.sporto-stats.team-stats-table td:nth-child(14),
.sporto-stats.team-stats-table th:nth-child(15),
.sporto-stats.team-stats-table td:nth-child(15),
.sporto-stats.team-stats-table th:nth-child(16),
.sporto-stats.team-stats-table td:nth-child(16),
.sporto-stats.team-stats-table th:nth-child(17),
.sporto-stats.team-stats-table td:nth-child(17),
.sporto-stats.team-stats-table th:nth-child(18),
.sporto-stats.team-stats-table td:nth-child(18),
.sporto-stats.team-stats-table th:nth-child(19),
.sporto-stats.team-stats-table td:nth-child(19) {
	width: 58px !important;
	min-width: 58px !important;
	max-width: 58px !important;
	box-sizing: border-box;
}

/* ОЧКИ, 2-х, 3-х, ШТ */
.sporto-stats.team-stats-table th:nth-child(7),
.sporto-stats.team-stats-table td:nth-child(7),
.sporto-stats.team-stats-table th:nth-child(8),
.sporto-stats.team-stats-table td:nth-child(8),
.sporto-stats.team-stats-table th:nth-child(9),
.sporto-stats.team-stats-table td:nth-child(9),
.sporto-stats.team-stats-table th:nth-child(10),
.sporto-stats.team-stats-table td:nth-child(10) {
	width: 68px !important;
	min-width: 68px !important;
	max-width: 68px !important;
	box-sizing: border-box;
}

.sporto-error {
	text-align: center;
	padding: 20px;
	font-size: 14px;
	color: #e74c3c;
}

/* Стили для tooltip'ов */
.tooltip-container {
	position: relative;
	display: inline-block;
	width: 100%;
	overflow: visible;

}

.tooltiptext {
	visibility: hidden;
	width: 200px;
	background-color: #555;
	color: #fff;
	text-align: center;
	border-radius: 6px;
	padding: 5px;
	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;
}

.tooltip-container:hover .tooltiptext {
	visibility: visible;
	opacity: 1;
	cursor: help;
}

/* Стили для пустых ячеек */
.sporto-stats td.empty-cell {
	background-color: transparent;
}

/* Выделение итоговых строк */
.sporto-stats .avg-row td {
	background-color: var(--secondary-light) !important;
	font-weight: bold;
	padding-top: 14px;
	padding-right: 5px;
	padding-bottom: 14px;
	padding-left: 5px;

}

.sporto-stats .total-row td,
.sporto-stats .team-total-row td {
	background-color: var(--secondary-light) !important;
	font-weight: bold;
	padding-top: 14px;
	padding-right: 5px;
	padding-bottom: 14px;
	padding-left: 5px;
}

@media (max-width: 767px) {
	.sporto-stats {
		min-width: 100%;
	}

	.responsive-table {
		overflow-x: scroll;
	}
}