/* team-hub.css page-specific styles after final shared hub extraction. */
/* Tổng quan / Trận đấu Tab：列表底部半圆（与 hcm-hub.css 共用 .team-overview-upcoming 对齐） */
.hcm-team-hub .md-match-date {
	width: 100px;
	color: var(--text-muted);
	flex-shrink: 0;
}

@media (max-width: 960px) {
	.hcm-team-hub .md-stats-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.hcm-team-hub .md-stats-grid {
		grid-template-columns: 1fr;
	}
}

/* --- Thống kê đội：与联赛页共用看板（template-parts/shared/league-team-stats） --- */
.hcm-team-hub .hcm-league-stat-badge {
	display: inline-block;
	border-radius: 12px;
	padding: 4px 10px;
	font-weight: 700;
	font-size: 13px;
	min-width: 44px;
	text-align: center;
	white-space: nowrap;
	flex-shrink: 0;
	background: var(--stat-pill-bg);
	color: var(--stat-pill-fg);
}

/* --- 首页总览：坚不可摧的包裹层架构 --- */
.hcm-team-hub .home-main-grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: var(--gap);
	align-items: start;
}

@media (max-width: 960px) {
	.hcm-team-hub .home-main-grid,
	.hcm-team-hub .home-top-row {
		grid-template-columns: 1fr;
	}
	.hcm-team-hub .home-top-row > .hcm-card {
		min-height: 0;
	}
}

/* --- Tổng quan: 赛程难度特调 --- */
.hcm-team-hub .md-fixture-diff {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin-top: 12px;
}

.hcm-team-hub .md-diff-item {
	flex: 1;
	padding: 8px 4px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 700;
	text-align: center;
	text-transform: uppercase;
}

.hcm-team-hub .md-diff--hard {
	background-color: #fca5a5;
	color: #111;
}

.hcm-team-hub .md-diff--medium {
	background-color: #fee2e2;
	color: #111;
}

.hcm-team-hub .md-diff--easy {
	background-color: #f3f4f6;
	color: #111;
}

.hcm-team-hub .md-fixture-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.hcm-team-hub .md-fixture-subtitle {
	font-size: 13px;
	color: var(--text-muted);
}

@media (max-width: 768px) {
	.team-next__body {
		display: grid !important;
		grid-template-columns: 1fr auto 1fr !important;
		align-items: center !important;
		gap: 8px !important;
	}

	.team-next__club {
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
		justify-content: center !important;
		min-width: 0 !important;
	}

	.team-next__club--away {
		grid-column: 3 !important;
	}

	.team-next__club .team-next__club-name {
		white-space: normal !important;
		word-break: break-word !important;
		text-align: center !important;
		margin-top: 6px !important;
		font-size: 13px !important;
		line-height: 1.2 !important;
	}

	.team-next__club img {
		width: 40px !important;
		height: 40px !important;
	}

	.team-next__center .team-next__time {
		font-size: 1.25rem !important;
	}

	.team-next__center .team-next__date {
		font-size: 0.75rem !important;
	}
}

/* Thống kê mùa — 标题行 + 绿茵场 */
.team-pitch-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.team-pitch-card__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
}

.team-pitch-card__title img { width: 26px; height: 26px; object-fit: contain; }

.team-pitch-card__sub {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text-muted);
	white-space: nowrap;
}

/* 半场：中线在上、球门在下（单队 XI，对齐联赛 TOTW） */
.team-pitch,
.team-pitch--half {
	position: relative;
	width: 100%;
	aspect-ratio: 2 / 2.55;
	min-height: 380px;
	border-radius: 10px;
	background: linear-gradient(180deg, #0f9d4d 0%, #0e8739 46%, #0c7530 100%);
	border: 2px solid #0a5c3a;
	overflow: visible;
	isolation: isolate;
	box-sizing: border-box;
}

.team-pitch__markings {
	position: absolute;
	inset: 8px;
	pointer-events: none;
	z-index: 1;
}

.team-pitch__outline {
	position: absolute;
	inset: 0;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-radius: 4px;
}

.team-pitch__midline {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: rgba(255, 255, 255, 0.35);
}

.team-pitch__arc {
	position: absolute;
	top: 0;
	left: 50%;
	width: 28%;
	height: 14%;
	transform: translateX(-50%);
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top: none;
	border-radius: 0 0 50% 50% / 0 0 100% 100%;
	box-sizing: border-box;
}

.team-pitch__penalty {
	position: absolute;
	bottom: 0;
	left: 16%;
	right: 16%;
	height: 24%;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-bottom: none;
	box-sizing: border-box;
}

.team-pitch__goal-area {
	position: absolute;
	bottom: 0;
	left: 32%;
	right: 32%;
	height: 10%;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-bottom: none;
	box-sizing: border-box;
}

.team-pitch-player {
	position: absolute;
	z-index: 2;
	width: 64px;
	transform: translate(-50%, 50%);
	text-align: center;
	color: #fff;
	font-size: 0.5625rem;
	font-weight: 700;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
	line-height: 1.15;
}

.team-pitch-player:hover {
	z-index: 8;
}

.team-pitch-player--r {
	transform: translate(50%, 50%);
}

.team-pitch-player__wrap { position: relative; display: inline-block; }

.team-pitch-player__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #fff;
	display: block;
	margin: 0 auto 4px;
	background: rgba(255, 255, 255, 0.25);
}

.team-pitch-player__badge {
	position: absolute;
	top: -2px;
	right: -8px;
	min-width: 30px;
	padding: 2px 5px;
	border-radius: 999px;
	font-size: 0.5625rem;
	font-weight: 800;
	color: #fff;
	background: #f97316;
	line-height: 1.2;
}

.team-pitch-player__badge--g { background: var(--form-win); }

.team-pitch-player__icons {
	display: flex;
	justify-content: center;
	gap: 3px;
	margin-bottom: 2px;
	font-size: 0.625rem;
}

html.dark-mode .hcm-team-hub .team-tabs {
	border-color: var(--border) !important;
}

/* 移动端头部：Full Bleed + Tab 间距/字号（对齐联赛详情页） */
@media (max-width: 992px) {
	body:has(.hcm-team-hub) .site-content,
	body:has(.hcm-team-hub) #content,
	body:has(.hcm-team-hub) #primary,
	body:has(.hcm-team-hub) main.site-main,
	body:has(.hcm-team-hub) .site-main {
		padding-top: 0 !important;
		margin-top: 0 !important;
	}

	.hcm-team-hub {
		padding-top: 0;
		overflow-x: visible !important;
	}

	.hcm-team-hub .team-header-card {
		border-radius: 0 !important;
		box-shadow: none !important;
		margin-left: -16px;
		margin-right: -16px;
		width: calc(100% + 32px);
		margin-bottom: var(--gap);
	}

	.hcm-team-hub .team-header-card__row {
		padding: 20px 15px;
	}

	.hcm-team-hub .team-tabs {
		gap: 0;
		padding: 4px 15px 0;
		border-top: none;
		border-bottom: 1px solid var(--hcm-divider, #f0f0f0);
	}

	.hcm-team-hub .team-tabs__item {
		font-size: 13px;
		font-weight: 500;
		padding: 10px 14px;
	}

	.hcm-team-hub .team-pitch--half {
		min-height: min(360px, 88vw);
	}
}

/* Giới thiệu — 与赛程/国家队/联赛详情同款折叠 */
.hcm-team-hub #pane-tong-quan .hcm-team-about-seo {
	position: relative;
	padding-bottom: 10px;
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-seo .md-about-match-content {
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--text, var(--hcm-text-main));
	max-height: 200px;
	overflow: hidden;
	position: relative;
	transition: max-height 0.4s ease-in-out;
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-seo .md-about-match-content.expanded {
	max-height: 2000px;
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-seo .md-about-match-content p {
	margin-bottom: 12px;
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-seo .md-about-match-content ul {
	margin-left: 20px;
	margin-bottom: 12px;
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-seo .md-about-match-content li {
	margin-bottom: 8px;
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-seo .fade-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 60px;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--hcm-bg-card, var(--card-bg, #fff)));
	pointer-events: none;
	transition: opacity 0.3s;
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-seo .md-about-match-content.expanded .fade-overlay {
	opacity: 0;
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-seo .md-read-more-btn {
	display: block;
	width: 100%;
	text-align: center;
	background: transparent !important;
	border: none;
	color: #10b981;
	font-size: 14px;
	font-weight: 600;
	padding: 12px 0;
	margin-top: 4px;
	cursor: pointer;
	transition: opacity 0.2s;
	-webkit-appearance: none;
	appearance: none;
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-seo .md-read-more-btn:hover {
	opacity: 0.7;
}

.hcm-team-hub #pane-tong-quan .hcm-seo-highlight {
	color: #10b981;
	font-weight: 500;
}

.hcm-team-hub #pane-tong-quan a.hcm-seo-link.hcm-seo-highlight {
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: border-color 0.15s ease;
}

.hcm-team-hub #pane-tong-quan a.hcm-seo-link.hcm-seo-highlight:hover,
.hcm-team-hub #pane-tong-quan a.hcm-seo-link.hcm-seo-highlight:focus-visible {
	border-bottom-color: #10b981;
	outline: none;
}

.hcm-team-hub #pane-tong-quan .hcm-seo-paragraph--last {
	margin-bottom: 0;
}

.hcm-team-hub #pane-tong-quan .hcm-form-result--win {
	color: var(--form-win, #10b981);
}

.hcm-team-hub #pane-tong-quan .hcm-form-result--loss {
	color: var(--form-loss, #ef4444);
}

.hcm-team-hub #pane-tong-quan .hcm-form-result--draw {
	color: var(--form-draw, #9ca3af);
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-table-wrap {
	overflow-x: auto;
	margin: 8px 0 12px;
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-table caption {
	caption-side: top;
	text-align: left;
	font-weight: 700;
	margin-bottom: 8px;
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-table th,
.hcm-team-hub #pane-tong-quan .hcm-team-about-table td {
	padding: 6px 8px;
	border-bottom: 1px solid var(--hcm-divider, #e5e7eb);
	text-align: center;
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-table th.t-left,
.hcm-team-hub #pane-tong-quan .hcm-team-about-table td.t-left {
	text-align: left;
}

.hcm-team-hub #pane-tong-quan .hcm-team-about-table__highlight {
	background: rgba(16, 185, 129, 0.08);
}
