/* ==========================================================================
   ФАЙЛ 2: sportoteka-calendar.css
   Стили классического календаря и AJAX-календаря (карточки игр).
   ========================================================================== */

/* --- 1. КОНТЕЙНЕРЫ И ФИЛЬТРЫ --- */
.sporto-calendar-container {
	margin: 20px 0;
	position: relative;
	font-family: Arial, sans-serif;
}

.sportoteka-ajax-calendar-container {
	font-family: 'Oswald', sans-serif;
	margin: 20px 0;
	max-width: 900px;
	margin: 0 auto;
}

/* КОНФЛИКТ ФИЛЬТРОВ: Обычный календарь vs AJAX Календарь */
.sporto-calendar-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-bottom: 20px;
	align-items: center;
}

.sportoteka-ajax-calendar-container .sporto-calendar-filters {
	display: flex;
	flex-direction: row;
	gap: 16px;
	margin-bottom: 16px;
	align-items: stretch;
	width: 100%;
}

.sporto-calendar-filters .filter-group {
	display: flex;
	align-items: center;
	gap: 8px;
}

.sportoteka-ajax-calendar-container .sporto-calendar-filters .filter-group {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}

.sporto-calendar-filters label {
	font-weight: 500;
	color: #2c3e50;
	white-space: nowrap;
}

.sportoteka-ajax-calendar-container .sporto-calendar-filters label {
	font-family: 'Oswald', sans-serif;
	font-size: 12px;
	font-weight: 400;
	color: #777;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding-left: 8px;
	margin-bottom: 5px;
}

.sporto-calendar-filters select {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background-color: #fff;
	color: #2c3e50;
	font-size: 14px;
	cursor: pointer;
	min-width: 150px;
}

.sporto-calendar-filters select:hover {
	border-color: #3498db;
}

.sporto-calendar-filters select:focus {
	outline: none;
	border-color: #3498db;
	box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.sportoteka-ajax-calendar-container .sporto-filter-status,
.sportoteka-ajax-calendar-container .sporto-filter-team {
	font-family: 'Oswald', sans-serif;
	padding: 8px 14px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	background: #fff;
	cursor: pointer;
	width: 100%;
	box-sizing: border-box;
	appearance: none;
	-webkit-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='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
}

/* Адаптивность фильтров */
@media (max-width: 768px) {

	.sporto-calendar-filters,
	.sportoteka-ajax-calendar-container .sporto-calendar-filters {
		flex-direction: column;
		gap: 10px;
	}

	.sporto-calendar-filters .filter-group,
	.sportoteka-ajax-calendar-container .sporto-calendar-filters .filter-group {
		width: 100%;
		flex-direction: column;
		align-items: flex-start;
	}

	.sporto-calendar-filters select {
		width: 100%;
		min-width: 100%;
	}
}

/* --- 2. ТАБЛИЦА КАЛЕНДАРЯ --- */
.sporto-calendar-table {
	width: 100%;
	overflow-x: auto;
}

.responsive-table {
	overflow-x: auto;
	width: 100%;
	-webkit-overflow-scrolling: touch;
}

.sporto-calendar {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	text-transform: uppercase;
	min-width: 800px;
}

.sporto-calendar-table h3.competition-header {
	margin: 20px 0 !important;
	font-family: "Roboto Condensed", sans-serif;
	color: var(--black);
	font-size: 18px;
	text-transform: uppercase;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 1px;
}

.sporto-calendar th {
	background-color: #2c3e50 !important;
	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-calendar td {
	padding: 12px 10px;
	border: 1px solid #e0e0e0;
	color: #2c3e50;
	white-space: nowrap;
	text-align: center;
	background: #fff;
	overflow: visible;
}

.sporto-calendar tr:nth-child(even) td {
	background-color: #f8f9fa;
}

.sporto-calendar tbody tr:hover td {
	background-color: #e8f4f8 !important;
}

/* Геометрия таблицы календаря */
.sporto-calendar th:first-child,
.sporto-calendar td:first-child {
	width: 90px;
	min-width: 90px;
	max-width: 90px;
	box-sizing: border-box;
}

.sporto-calendar th:nth-child(2),
.sporto-calendar td:nth-child(2) {
	width: 80px;
	min-width: 80px;
	max-width: 80px;
}

.sporto-calendar th:nth-child(3),
.sporto-calendar td:nth-child(3) {
	width: 250px;
	min-width: 250px;
	max-width: 250px;
}

.sporto-calendar th:nth-child(4),
.sporto-calendar td:nth-child(4) {
	width: 80px;
	min-width: 80px;
	max-width: 80px;
}

.sporto-calendar th:nth-child(5),
.sporto-calendar td:nth-child(5) {
	width: 250px;
	min-width: 250px;
	max-width: 250px;
}

/* Команды и счет в календаре */
.score {
	text-align: center !important;
}

.score a {
	color: #2c3e50;
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s ease;
}

.score a:hover {
	color: #3498db;
	text-decoration: underline;
}

.team-a {
	text-align: right !important;
}

.team-b {
	text-align: left !important;
}

.team-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
}

.team-a .team-wrapper {
	justify-content: flex-end;
}

.team-b .team-wrapper {
	justify-content: flex-start;
}

/* Адаптивность таблицы календаря */
@media (max-width: 991px) {

	.sporto-calendar .team-a .sporto-team-logo,
	.sporto-calendar .team-b .sporto-team-logo {
		display: none;
	}

	.sporto-calendar .team-a .team-name,
	.sporto-calendar .team-b .team-name {
		display: inline-block;
	}

	.sporto-calendar th:nth-child(3),
	.sporto-calendar td:nth-child(3),
	.sporto-calendar th:nth-child(5),
	.sporto-calendar td:nth-child(5) {
		width: 220px;
		min-width: 220px;
		max-width: 220px;
	}
}

@media (max-width: 767px) {

	.sporto-calendar .team-a .team-name,
	.sporto-calendar .team-b .team-name {
		display: none;
	}

	.sporto-calendar .team-a .sporto-team-logo,
	.sporto-calendar .team-b .sporto-team-logo {
		display: inline-block;
	}

	.sporto-calendar th:nth-child(3),
	.sporto-calendar th:nth-child(5) {
		display: table-cell !important;
		background-color: #2c3e50 !important;
		position: relative;
		font-size: 0;
	}

	.sporto-calendar th:nth-child(3)::before {
		content: "А";
		font-size: 14px;
		font-weight: 500;
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}

	.sporto-calendar th:nth-child(5)::before {
		content: "Б";
		font-size: 14px;
		font-weight: 500;
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}

	.team-a .team-wrapper,
	.team-b .team-wrapper {
		justify-content: center;
	}

	.sporto-calendar th:nth-child(3),
	.sporto-calendar td:nth-child(3),
	.sporto-calendar th:nth-child(5),
	.sporto-calendar td:nth-child(5) {
		width: 80px;
		min-width: 80px;
		max-width: 80px;
	}
}

/* --- 3. AJAX КАРТОЧКИ ИГР --- */
.sporto-game-card {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 10px;
	margin-bottom: 10px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.15s ease;
	font-family: 'Oswald', sans-serif;
}

.sporto-game-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	transform: translateY(-1px);
}

.sporto-game-card.sporto-game-live {
	border-left: 3px solid #e74c3c;
}

.sporto-game-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 14px;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	color: #ccc;
	font-size: 12px;
	font-weight: 300;
	gap: 8px;
}

.sporto-game-date {
	color: #fff;
	font-weight: 500;
	font-size: 13px;
	letter-spacing: 0.5px;
}

.sporto-game-arena {
	color: #8a9bb5;
	font-size: 11px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 200px;
}

.sporto-game-status {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 500;
}

.sporto-game-status.live-pulse {
	color: #e74c3c;
	animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {

	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.4;
	}
}

.sporto-game-body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	text-decoration: none !important;
	color: inherit !important;
}

.sporto-team {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
}

.sporto-team-1 {
	justify-content: flex-start;
}

.sporto-team-2 {
	justify-content: flex-end;
}

.sporto-team-1 .sporto-team-score {
	margin-left: auto;
}

.sporto-team-2 .sporto-team-score {
	margin-right: auto;
}

.sporto-team-name {
	font-family: 'Oswald', sans-serif;
	font-size: 15px;
	font-weight: 500;
	color: #1a1a2e;
	line-height: 1.2;
	letter-spacing: 0.3px;
}

.sporto-team-score {
	font-family: 'Oswald', sans-serif;
	font-size: 26px;
	font-weight: 700;
	color: #1a1a2e;
	min-width: 35px;
	text-align: center;
}

.sporto-team-score.winner {
	color: #e74c3c;
}

.sporto-vs {
	font-family: 'Oswald', sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: #999;
	padding: 0 8px;
	flex-shrink: 0;
}

.sporto-game-quarters {
	padding: 6px 14px;
	background: #f8f9fa;
	border-top: 1px solid #eee;
	font-family: 'Oswald', sans-serif;
	font-size: 12px;
	font-weight: 300;
	color: #666;
	text-align: center;
	letter-spacing: 0.5px;
}

.sporto-loading-spinner {
	font-family: 'Oswald', sans-serif;
	color: #666;
	font-size: 14px;
}

.sporto-loading-spinner .spinner-icon {
	display: inline-block;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}

.sportoteka-load-more-btn {
	font-family: 'Oswald', sans-serif;
	display: block;
	width: 100%;
	padding: 12px 0;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.sportoteka-load-more-btn:hover {
	opacity: 0.85;
}

.sportoteka-load-more-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Адаптивность AJAX карточек */
@media (max-width: 768px) {
	.sporto-game-header {
		flex-wrap: wrap;
		gap: 4px;
	}

	.sporto-game-arena,
	.sporto-team-name,
	.sporto-vs {
		display: none;
	}

	.sporto-game-body {
		flex-direction: column;
		gap: 4px;
		padding: 10px;
	}

	.sporto-team {
		width: 100%;
		justify-content: flex-start !important;
		flex-direction: row !important;
	}

	.sporto-team-2 .sporto-team-logo {
		order: -1;
	}

	.sporto-team-2 .sporto-team-score {
		order: 1;
		margin-left: auto;
		margin-right: 0;
	}

	.sporto-team-1 .sporto-team-score {
		margin-left: auto;
	}

	.sporto-team-logo {
		width: 32px;
		height: 32px;
	}

	.sporto-team-score {
		font-size: 22px;
	}
}

@media (max-width: 480px) {
	.sporto-team-logo {
		width: 28px;
		height: 28px;
	}

	.sporto-team-score {
		font-size: 20px;
	}

	.sporto-game-date {
		font-size: 12px;
	}

	.sporto-game-quarters {
		font-size: 11px;
	}
}