/*
 * Liga Pari Core — стили фронтенда.
 * Базовое оформление карточек матчей, прогнозов и таблицы.
 * Переопределяется стилями темы.
 */

/* Локальные переменные модуля (изолированы префиксом --lpc-, чтобы не
   конфликтовать с дизайном темы --lp-*). */
:root {
	--lpc-bg: #ffffff;
	--lpc-bg-alt: #f5f6f8;
	--lpc-border: #e6eaf0;
	--lpc-text: #0f172a;
	--lpc-muted: #64748b;
	--lpc-accent: #2563eb;
	--lpc-live: #e11d48;
	--lpc-green: #16a34a;
	--lpc-red: #dc2626;
	--lpc-radius: 12px;
}

/* ---------- Общий блок матчей ---------- */
.lp-matches-list,
.lp-live-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.lp-empty {
	color: 	var(--lpc-muted);
	font-style: italic;
}

/* ---------- Карточка матча ---------- */
.lp-match-card {
	background: var(--lpc-bg);
	border: 1px solid 	var(--lpc-border);
	border-radius: 	var(--lpc-radius);
	padding: 12px 16px;
	font-size: 15px;
}

.lp-match-card--live {
	border-color: 	var(--lpc-live);
	box-shadow: 0 0 0 1px rgba(225, 29, 72, 0.15);
}

.lp-match-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	color: 	var(--lpc-muted);
	margin-bottom: 8px;
}

.lp-match-status {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.lp-status-live {
	color: 	var(--lpc-live);
}

.lp-status-finished {
	color: 	var(--lpc-muted);
}

.lp-live-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: 	var(--lpc-live);
	animation: lp-pulse 1.2s infinite ease-in-out;
}

@keyframes lp-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.4; transform: scale(0.8); }
}

.lp-match-row {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 10px;
}

.lp-match-team {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.lp-match-team--home {
	justify-content: flex-end;
	text-align: right;
}

.lp-match-team--away {
	justify-content: flex-start;
	text-align: left;
}

.lp-team-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lp-team-logo {
	width: 32px;
	height: 32px;
	object-fit: contain;
	flex-shrink: 0;
}

.lp-match-score {
	font-weight: 700;
	font-size: 18px;
	white-space: nowrap;
	padding: 0 6px;
}

.lp-score-vs {
	color: 	var(--lpc-muted);
}

.lp-match-stadium {
	margin-top: 6px;
	font-size: 12px;
	color: 	var(--lpc-muted);
}

.lp-match-link {
	margin-top: 10px;
	font-size: 13px;
}

.lp-match-link a {
	color: 	var(--lpc-accent);
	text-decoration: none;
}

/* ---------- Статистика матча ---------- */
.lp-match-stats {
	margin-top: 12px;
	border-top: 1px solid 	var(--lpc-border);
	padding-top: 10px;
}

.lp-stat-row {
	display: grid;
	grid-template-columns: 40px 1fr 40px;
	align-items: center;
	position: relative;
	margin-bottom: 8px;
	font-size: 13px;
}

.lp-stat-label {
	text-align: center;
	color: 	var(--lpc-muted);
}

.lp-stat-val--left { text-align: left; font-weight: 600; }
.lp-stat-val--right { text-align: right; font-weight: 600; }

.lp-stat-bar {
	grid-column: 1 / -1;
	display: flex;
	height: 4px;
	border-radius: 2px;
	overflow: hidden;
	margin-top: 4px;
	background: 	var(--lpc-bg-alt);
}

.lp-stat-bar-left { background: var(--lpc-accent); }
.lp-stat-bar-right { background: var(--lpc-border); }

/* ---------- Live-блок ---------- */
.lp-live-block {
	border: 1px solid 	var(--lpc-border);
	border-radius: 	var(--lpc-radius);
	overflow: hidden;
}

.lp-live-head {
	display: flex;
	align-items: center;
	gap: 6px;
	background: 	var(--lpc-bg-alt);
	padding: 8px 16px;
	font-weight: 700;
	font-size: 13px;
	color: 	var(--lpc-live);
	text-transform: uppercase;
}

.lp-live-updated {
	font-weight: 400;
	font-size: 11px;
	color: 	var(--lpc-muted);
	margin-left: auto;
	text-transform: none;
}

.lp-live-list .lp-match-card {
	border: 0;
	border-top: 1px solid 	var(--lpc-border);
	border-radius: 0;
}

/* ---------- Карточка прогноза ---------- */
.lp-prediction-card {
	background: var(--lpc-bg);
	border: 1px solid 	var(--lpc-border);
	border-radius: 	var(--lpc-radius);
	padding: 16px;
	font-size: 15px;
}

.lp-prediction-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 8px;
}

.lp-prediction-title {
	font-weight: 700;
	font-size: 17px;
}

.lp-prediction-odds {
	background: 	var(--lpc-accent);
	color: #fff;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 6px;
	white-space: nowrap;
}

.lp-prediction-match {
	font-size: 14px;
	color: 	var(--lpc-muted);
	margin-bottom: 8px;
}

.lp-prediction-match a {
	color: 	var(--lpc-text);
	text-decoration: none;
	border-bottom: 1px dotted 	var(--lpc-border);
}

.lp-prediction-confidence {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 8px;
}

.lp-conf-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: 	var(--lpc-border);
}

.lp-conf-dot.is-on {
	background: 	var(--lpc-green);
}

.lp-conf-text {
	font-size: 12px;
	color: 	var(--lpc-muted);
	margin-left: 6px;
}

.lp-prediction-author {
	font-size: 13px;
	color: 	var(--lpc-muted);
	margin-bottom: 10px;
}

.lp-bk-block {
	border-top: 1px solid 	var(--lpc-border);
	padding-top: 10px;
}

.lp-bk-warning {
	font-size: 11px;
	color: 	var(--lpc-muted);
	margin: 0 0 8px;
	line-height: 1.4;
}

.lp-bk-warning strong {
	color: 	var(--lpc-red);
}

.lp-bk-button {
	display: inline-block;
	background: 	var(--lpc-green);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	padding: 10px 18px;
	border-radius: 8px;
	transition: background 0.15s ease;
}

.lp-bk-button:hover {
	background: #128a3e;
	color: #fff;
}

/* ---------- Турнирная таблица ---------- */
.lp-table-wrap {
	overflow-x: auto;
	border: 1px solid 	var(--lpc-border);
	border-radius: 	var(--lpc-radius);
}

.lp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	background: var(--lpc-bg);
}

.lp-table th,
.lp-table td {
	padding: 8px 10px;
	text-align: left;
	border-bottom: 1px solid 	var(--lpc-border);
}

.lp-table thead th {
	background: 	var(--lpc-bg-alt);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: 	var(--lpc-muted);
}

.lp-col-num {
	text-align: center !important;
	width: 42px;
}

.lp-col-rank {
	text-align: center !important;
	width: 36px;
	color: 	var(--lpc-muted);
}

.lp-col-team {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 160px;
}

.lp-table-logo {
	width: 20px;
	height: 20px;
	object-fit: contain;
}

.lp-col-points {
	font-weight: 700;
}

.lp-table-row.lp-zone-up {
	box-shadow: inset 3px 0 0 	var(--lpc-green);
}

.lp-table-row.lp-zone-down {
	box-shadow: inset 3px 0 0 	var(--lpc-red);
}

.lp-table-row.is-highlight {
	background: rgba(31, 111, 235, 0.08);
}

.lp-table tbody tr:last-child td {
	border-bottom: 0;
}

/* ---------- Адаптив ---------- */
@media (max-width: 560px) {
	.lp-match-row {
		grid-template-columns: 1fr auto 1fr;
		gap: 6px;
		font-size: 14px;
	}

	.lp-team-logo {
		width: 24px;
		height: 24px;
	}

	.lp-col-team {
		min-width: 120px;
	}
}
