/* Плагин - Турнирная таблица и плей-офф */

/* Контейнер */
.sporto-combined-container {
	margin: 20px 0;
	position: relative;
	font-family: Arial, sans-serif;
}

/* Заголовки */
.competition-header {
	margin: 20px 0;
	font-family: "Roboto Condensed", sans-serif;
	color: #2c3e50;
	font-size: 18px;
	text-transform: uppercase;
	font-weight: 900;
	line-height: 1.2;
	letter-spacing: 1px;
	text-align: center;
}

/* Таблица */
.responsive-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	width: 100%;
	margin: 20px 0;
	border: 1px solid #e0e0e0;
	background: white;
}

.sporto-standings {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	font-size: 14px;
	text-transform: uppercase;
	min-width: 800px;
}

.sporto-standings th {
	background-color: #2c3e50;
	color: #ffffff;
	font-weight: 500;
	padding: 14px 10px;
	border: 1px solid #e0e0e0;
	font-family: 'Roboto Condensed', sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	position: relative;
	cursor: pointer;
	white-space: nowrap;
}

.sporto-standings th:hover {
	background-color: #34495e;
}

.sporto-standings td {
	padding: 12px 10px;
	border: 1px solid #e0e0e0;
	color: #2c3e50;
	white-space: nowrap;
	text-align: center;
	background: #fff;
	overflow: visible;
}

/* Фиксированная ширина столбцов */
.sporto-standings th:first-child,
.sporto-standings td:first-child {
	width: 80px;
	min-width: 80px;
	max-width: 80px;
	padding: 0 5px;
}

.sporto-standings th:nth-child(2),
.sporto-standings td:nth-child(2) {
	width: 230px;
	min-width: 230px;
	max-width: 230px;
	box-sizing: border-box;
	text-align: left !important;
	padding-left: 15px;
}

.sporto-standings th:nth-child(n+3),
.sporto-standings td:nth-child(n+3) {
	width: 105px;
	min-width: 105px;
	max-width: 105px;
}

/* Логотипы команд */
.team-logo {
	width: 40px;
	height: 40px;
	object-fit: contain;
	vertical-align: middle;
}

/* Чередование строк */
.sporto-standings tr:nth-child(even) td {
	background-color: #f8f9fa;
}

/* Стили при наведении */
.sporto-standings tbody tr:hover td {
	background-color: #e8f4f8 !important;
}

/* Плей-офф */

/* Этапы плей-офф */
.playoff-stage {
	margin-bottom: 30px;
}

.playoff-stage-header {
	font-family: "Roboto Condensed", sans-serif;
	color: #2c3e50;
	font-size: 16px;
	text-transform: uppercase;
	font-weight: 700;
	margin: 20px 0 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid #e0e0e0;
}

/* Сетка матчей плей-офф */
.playoff-round {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
	margin: 0;
}

.playoff-match {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 15px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	margin-bottom: 20px;
}

.playoff-round-label {
	font-family: "Roboto Condensed", sans-serif;
	font-size: 12px;
	font-weight: 700;
	color: #2c3e50;
	text-transform: uppercase;
	text-align: center;
	padding: 4px 8px;
	margin-bottom: 10px;
	background: #f8f9fa;
	border-radius: 4px;
	letter-spacing: 0.5px;
}

.match-pair {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.team {
	display: flex;
	align-items: center;
	padding: 10px;
	background: #f8f9fa;
	border-radius: 4px;
	margin-bottom: 5px;
	font-family: 'Roboto Condensed', sans-serif;
	text-transform: uppercase;
}

.team.winner {
	background: #e8f4f8;
}

.team-logo {
	width: 40px;
	height: 40px;
	object-fit: contain;
	margin-right: 10px;
}

.team-name {
	flex: 1;
	font-size: 14px;
	padding-left: 15px;
	color: #2c3e50;
}

.team-score {
	font-weight: 600;
	color: #2c3e50;
	min-width: 30px;
	text-align: right;
	padding-left: 10px;
}

/* Сообщения об ошибках */
.sporto-error {
	text-align: center;
	padding: 20px;
	font-size: 14px;
	color: #e74c3c;
}

/* Отладочная информация */
.debug-info {
	background: #f8f9fa;
	padding: 15px;
	margin: 20px 0;
	border: 1px solid #e0e0e0;
	overflow-x: auto;
	font-family: monospace;
	font-size: 12px;
}

/* Медиа-запросы */
@media (max-width: 767px) {
	.sporto-combined-container {
		margin: 10px 0;
	}

	.responsive-table {
		overflow-x: auto;
		width: 100%;
	}

	.playoff-round {
		grid-template-columns: 1fr;
	}

	.team-name {
		font-size: 13px;
	}

	.playoff-stage-header {
		font-size: 14px;
		margin: 15px 0 10px;
	}

	.playoff-round-label {
		font-size: 11px;
	}
}

/* --- Стили для селектора сезонов --- */

/* Контейнер для селектора */
.season-selector-container {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Располагает селектор справа */
    margin-bottom: 25px;
    font-family: 'Roboto Condensed', sans-serif; /* Шрифт как у заголовков */
}

/* Текст "Сезон:" */
.season-selector-container label {
    margin-right: 12px;
    font-weight: 700;
    font-size: 16px;
    color: #2c3e50; /* Цвет как у заголовков */
    text-transform: uppercase;
}

/* Сам выпадающий список */
#season-select {
    /* Сбрасываем стандартное оформление */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Свои стили */
    padding: 10px 35px 10px 15px; /* Отступы: справа больше места для стрелки */
    border-radius: 4px;
    border: 1px solid #e0e0e0; /* Рамка в стиле таблицы */
    background-color: #ffffff;
    font-size: 16px;
    font-family: 'Roboto Condensed', sans-serif;
    color: #2c3e50;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;

    /* Добавляем свою стрелку (встроенный SVG) */
    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;
}

/* Стиль при наведении курсора */
#season-select:hover {
    border-color: #34495e; /* Более темная рамка */
}

/* Стиль при фокусе (когда кликнули на список) */
#season-select:focus {
    outline: none;
    border-color: #34495e;
    box-shadow: 0 0 0 2px rgba(52, 73, 94, 0.2);
}

/*
 * Стили для таблицы итоговой классификации (3 колонки)
 */
.sporto-standings-final th.name,
.sporto-standings-final td.name {
    width: auto; /* Убираем фиксированную ширину для названия команды */
}

.sporto-standings-final th.place,
.sporto-standings-final td.place {
    width: 120px; /* Задаем фиксированную ширину для колонки "Место" */
}