/**
 * Biến + utility để CSS mirror 1gom (iframe 6in1) khớp trong #odds_exchange.
 */
#odds_exchange {
	--rgb-primary: 35, 44, 43;
	--color-primary: #232c2b;
	--color-link: #005030;
	--color-red: #e51b00;
	--color-gradient-start: #aafdd5;
	--color-gradient-end: #3fe1ff;
	--bg-odds-down-light: #f7c8c8;
	--dneil-main: #005030;
}

/* Tab plugin (không có trong iframe gốc) */
#odds_exchange .lmht-fapi-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 10px 8px 8px;
}

#odds_exchange .lmht-fapi-tab {
	line-height: 30px;
	padding: 0 14px;
	border-radius: 4px;
	border: 1px solid #fff;
	background: #fff;
	color: #414141;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: 0.175s linear;
	font-family: Inter, Montserrat, sans-serif;
}

#odds_exchange .lmht-fapi-tab:hover,
#odds_exchange .lmht-fapi-tab:focus {
	border-color: var(--color-link);
	color: var(--color-link);
	outline: none;
}

#odds_exchange .lmht-fapi-tab.is-active {
	background: var(--color-link);
	border-color: var(--color-link);
	color: #fff;
}

/* Alias flex (iframe_6in1 kỳ vọng trong .sixmix-container) */
#odds_exchange #scrollIframe .d-flex {
	display: flex;
	align-items: center;
}

#odds_exchange #scrollIframe .flex-column {
	display: flex;
	flex-direction: column;
}

#odds_exchange #scrollIframe .jc-c {
	justify-content: center;
}

#odds_exchange #scrollIframe .j-sb {
	justify-content: space-between;
}

#odds_exchange #scrollIframe .ai-c {
	align-items: center;
}

#odds_exchange #scrollIframe .gap-4 {
	gap: 4px;
}

#odds_exchange #scrollIframe .gap-10 {
	gap: 10px;
}

#odds_exchange #scrollIframe .h-30 {
	height: 30px;
}

#odds_exchange #scrollIframe .text-center {
	text-align: center;
}

/* Upcoming table fallback */
#odds_exchange #scrollIframe .lmht-fapi-upcoming-wrap {
	padding: 8px;
	background: #e6e6e6;
}

#odds_exchange #scrollIframe table.lmht-fapi-upcoming {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
	color: #070f03;
	background: #fff;
	border: 1px solid rgba(var(--rgb-primary), 0.5);
	font-family: Montserrat, Inter, sans-serif;
}

#odds_exchange #scrollIframe table.lmht-fapi-upcoming th,
#odds_exchange #scrollIframe table.lmht-fapi-upcoming td {
	padding: 8px 6px;
	border-bottom: 1px solid rgba(var(--rgb-primary), 0.2);
}

#odds_exchange #scrollIframe table.lmht-fapi-upcoming th {
	font-weight: 600;
	color: #414141;
	background: #f9f9f9;
}

/* Desktop: meta (Thời gian / Tỷ số / KT) nền xám + card trắng Đội + kèo — giống 1gom */
@media (min-width: 1024px) {
	#odds_exchange #scrollIframe .lmht-live-desktop {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		background: #e6e6e6;
		padding-bottom: 4px;
	}

	#odds_exchange #scrollIframe .lmht-live-mobile {
		display: none !important;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-head-wrap.d-flex,
	#odds_exchange #scrollIframe .lmht-fapi-pc-match.d-flex,
	#odds_exchange #scrollIframe .lmht-fapi-pc-meta.d-flex,
	#odds_exchange #scrollIframe .lmht-fapi-pc-head-meta.d-flex {
		align-items: stretch !important;
	}

	#odds_exchange #scrollIframe .match-list-head.lmht-fapi-pc-head-wrap {
		height: auto !important;
		min-height: 40px;
		align-items: stretch !important;
		background: #f0f0f0 !important;
		border-top: 1px solid rgba(var(--rgb-primary), 0.45);
		border-bottom: 1px solid rgba(var(--rgb-primary), 0.35);
		font-size: 11px;
		font-weight: 600;
		color: #414141;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-head-meta {
		flex: 0 0 auto;
		width: 172px;
		min-width: 172px;
		border-right: 1px solid rgba(var(--rgb-primary), 0.35);
		align-self: stretch;
		background: #f0f0f0;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-head-meta .lmht-fapi-pc-meta-col {
		display: flex;
		align-items: center;
		justify-content: center;
		text-align: center;
		border-right: 1px solid rgba(var(--rgb-primary), 0.25);
		padding: 8px 4px;
		box-sizing: border-box;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-head-meta .lmht-fapi-pc-meta-col:last-child {
		border-right: none;
	}

	/*
	 * Vendor 6in1-shortcode: `.match-list-head>div:nth-child(2){ width:50px }` nhắm cột tỷ số
	 * gốc — con (2) của LMHT là cả lưới kèo → bị ép 50px, HDP/Nhà/Khách chồng nhau.
	 */
	#odds_exchange #scrollIframe .match-list-head.lmht-fapi-pc-head-wrap > .lmht-fapi-pc-grid.lmht-fapi-pc-card-head {
		display: grid !important;
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		flex: 1 1 auto !important;
		align-items: stretch !important;
		justify-content: initial !important;
		justify-items: stretch !important;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-match > .lmht-fapi-pc-grid.lmht-fapi-pc-card-body {
		display: grid !important;
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		flex: 1 1 auto !important;
		align-items: stretch !important;
		justify-content: initial !important;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-grid {
		display: grid;
		grid-template-columns: minmax(160px, 1.35fr) repeat(9, minmax(44px, 1fr));
		flex: 1 1 auto;
		min-width: 0;
		align-items: stretch;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-card-head {
		background: #f0f0f0;
		align-self: stretch;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-card-head > div {
		border-right: 1px solid rgba(var(--rgb-primary), 0.25);
		padding: 8px 4px;
		display: flex;
		align-items: center;
		justify-content: center;
		text-align: center;
		box-sizing: border-box;
		font-size: 11px;
		font-weight: 600;
		color: #414141;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-card-head > div:last-child {
		border-right: none;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-h-team {
		justify-content: flex-start !important;
		padding-left: 10px !important;
		font-weight: 700;
		color: #070f03;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-match {
		align-items: stretch !important;
		background: #e6e6e6 !important;
		border-top: 1px solid rgba(var(--rgb-primary), 0.35);
		min-height: 96px;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-meta {
		flex: 0 0 auto;
		width: 172px;
		min-width: 172px;
		align-self: stretch;
		background: #e6e6e6;
		border-right: 1px solid rgba(var(--rgb-primary), 0.35);
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-meta-col {
		box-sizing: border-box;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-meta-time {
		width: 76px;
		min-width: 76px;
		max-width: 76px;
		flex: 0 0 76px;
		border-right: 1px solid rgba(var(--rgb-primary), 0.2);
		padding: 6px 4px;
		gap: 2px;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-meta-score {
		width: 52px;
		min-width: 52px;
		max-width: 52px;
		flex: 0 0 52px;
		border-right: 1px solid rgba(var(--rgb-primary), 0.2);
		padding: 6px 4px;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-meta-kt {
		width: 44px;
		min-width: 44px;
		max-width: 44px;
		flex: 0 0 44px;
		padding: 6px 4px;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-meta .live-status {
		color: #f75000 !important;
		font-size: 12px;
		font-weight: 600;
		line-height: 1.2;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-meta .match-during-time {
		color: #232c2b !important;
		font-size: 12px;
		font-weight: 600;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-meta .home-score {
		color: #e51b00 !important;
		font-size: 18px;
		font-weight: 600;
		line-height: 1.2;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-card-body {
		background: #fff;
		margin: 5px 8px 5px 0;
		border-radius: 4px;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
		border: 1px solid rgba(var(--rgb-primary), 0.15);
		align-self: stretch;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-card-body > div:not(.lmht-fapi-pc-team) {
		display: flex;
		align-items: center;
		justify-content: center;
		border-right: 1px solid #eee;
		padding: 4px 2px;
		min-height: 44px;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-card-body > div:last-child {
		border-right: none;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-card-body .odds {
		width: 100%;
		max-width: 52px;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-team {
		flex-direction: column;
		align-items: flex-start !important;
		justify-content: center !important;
		gap: 6px;
		padding: 8px 10px !important;
		border-right: 1px solid #eee;
	}

	#odds_exchange #scrollIframe .lmht-fapi-pc-team .team-name {
		display: flex;
		align-items: center;
		gap: 6px;
		font-size: 13px;
		font-weight: 500;
		color: #070f03;
	}

	#odds_exchange #scrollIframe .bet-match-item {
		height: auto !important;
		min-height: 96px;
	}

	#odds_exchange #scrollIframe .bet-match-item-repeated:nth-child(2n) .lmht-fapi-pc-card-body {
		background: #fafafa;
	}
}

@media (max-width: 1023px) {
	#odds_exchange #scrollIframe .lmht-live-desktop {
		display: none !important;
	}

	/*
	 * Mobile: header trận một hàng (đội — tỷ số — đội | phút).
	 * Vendor iframe ép .mt-center 54×18px và .mt-center>div>div 13px (tách digit);
	 * shortcode ẩn .mt-center>div:last-child (corner) — nếu chỉ 1 div thì tỷ số bị ẩn.
	 */
	#odds_exchange #scrollIframe .lmht-live-mobile .match-list-top-main-sm.lmht-fapi-mobile-top {
		display: flex !important;
		flex-flow: row nowrap !important;
		align-items: center !important;
		justify-content: space-between !important;
		gap: 6px !important;
		width: 100%;
		box-sizing: border-box;
	}

	#odds_exchange #scrollIframe .lmht-live-mobile .match-list-top-main-sm.lmht-fapi-mobile-top .match-list-top-main-two-sm {
		flex: 1 1 auto !important;
		min-width: 0 !important;
		align-items: center !important;
	}

	#odds_exchange #scrollIframe .lmht-live-mobile .match-list-top-main-sm.lmht-fapi-mobile-top .match-list-top-main-time-sm {
		flex: 0 0 auto !important;
		padding: 0 !important;
		align-self: center !important;
		display: flex !important;
		flex-flow: row nowrap !important;
		align-items: center !important;
		justify-content: flex-end !important;
	}

	#odds_exchange #scrollIframe .lmht-live-mobile .match-list-sm > .match-list-box-repeated-sm > .match-list-top-sm > .match-list-top-main-sm > .match-list-top-main-time-sm {
		flex-flow: row nowrap !important;
	}

	#odds_exchange #scrollIframe .lmht-live-mobile .match-list-top-main-two-sm .mt-left,
	#odds_exchange #scrollIframe .lmht-live-mobile .match-list-top-main-two-sm .mt-right {
		width: auto !important;
		flex: 1 1 0 !important;
		min-width: 0 !important;
		max-width: 40% !important;
	}

	#odds_exchange #scrollIframe .lmht-live-mobile .match-list-top-main-two-sm .mt-center {
		flex: 0 0 auto !important;
		width: auto !important;
		min-width: 56px !important;
		max-width: 92px !important;
		height: auto !important;
		min-height: 32px !important;
		align-self: center !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
	}

	#odds_exchange #scrollIframe .lmht-live-mobile .match-list-top-main-two-sm .mt-center .lmht-fapi-mt-score-inner {
		width: 100% !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		box-sizing: border-box;
	}

	#odds_exchange #scrollIframe .lmht-live-mobile .match-list-top-main-two-sm .mt-center .score-lst,
	#odds_exchange #scrollIframe .lmht-live-mobile .match-list-top-main-two-sm .mt-center .score {
		width: auto !important;
		min-width: 0 !important;
		flex: 0 0 auto !important;
		max-width: 100% !important;
	}

	#odds_exchange #scrollIframe .lmht-live-mobile .match-list-top-main-two-sm .mt-center .score {
		white-space: nowrap !important;
		font-size: 15px !important;
		font-weight: 600 !important;
		line-height: 1.15 !important;
		color: var(--color-red, #e51b00) !important;
	}

	#odds_exchange #scrollIframe .lmht-live-mobile .match-list-top-main-time-sm .match-during-time {
		font-size: 12px !important;
		line-height: 1.25 !important;
		font-weight: 600 !important;
		color: #232c2b !important;
	}

	#odds_exchange #scrollIframe .lmht-live-mobile .match-list-top-main-two-sm .home-team .t-name,
	#odds_exchange #scrollIframe .lmht-live-mobile .match-list-top-main-two-sm .guest-team .t-name {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
		word-break: break-word;
	}
}

#odds_exchange #scrollIframe .lmht-fapi-subtit {
	font-size: 10px;
	font-weight: 700;
	color: #717171;
	text-transform: uppercase;
	padding: 6px 8px 2px;
	background: #fafafa;
	border-top: 1px solid #eee;
}

/* Thanh lọc kiểu 1gom (thay tab cũ) */
#odds_exchange #scrollIframe .lmht-fapi-filter-box {
	margin-bottom: 0;
}

#odds_exchange #scrollIframe .lmht-fapi-date-row {
	flex-wrap: wrap;
	gap: 8px;
	width: 100%;
	align-items: center;
}

#odds_exchange #scrollIframe .lmht-fapi-date-wrap {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 0 8px;
}

#odds_exchange #scrollIframe .lmht-fapi-date-native {
	border: 0;
	background: transparent;
	font: inherit;
	color: inherit;
	max-width: 10rem;
	min-height: 28px;
	cursor: pointer;
}

#odds_exchange #scrollIframe .lmht-fapi-league-select {
	width: 100%;
	color: #414141;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}

#odds_exchange #scrollIframe .lmht-fapi-filter-second-inner {
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	width: 100%;
}

#odds_exchange #scrollIframe .lmht-fapi-select-static {
	pointer-events: none;
	opacity: 0.92;
}

#odds_exchange #scrollIframe #lmht-fapi-btn-hot.is-active,
#odds_exchange #scrollIframe #lmht-fapi-btn-hot.active {
	border-color: var(--color-link, #005030) !important;
	color: var(--color-link, #005030) !important;
}

#odds_exchange .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

@media (max-width: 1023px) {
	#odds_exchange #scrollIframe .lmht-fapi-league-wrap {
		flex: 1 1 100%;
		max-width: 100%;
	}
}
