/*
Theme Name: TdedScore
Theme URI: https://tdedscore.com
Author: TdedScore
Author URI: https://tdedscore.com
Description: ธีม WordPress เว็บผลบอล ราคาบอล ผลบอลสด Livescore ภาษาไทย ดึงข้อมูลจาก API พร้อมโครงสร้าง SEO รองรับ Rank Math SEO และ sitemap.xml
Version: 1.1.6
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tdedscore
Tags: news, blog, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* =====================================================
   TdedScore — Light mode CSS
   ===================================================== */

:root {
	--ts-primary: #0a7f4f;
	--ts-primary-dark: #086a41;
	--ts-accent: #1e88e5;
	--ts-live: #e53935;
	--ts-bg: #f5f7fa;
	--ts-surface: #ffffff;
	--ts-border: #e3e8ef;
	--ts-text: #1f2933;
	--ts-text-muted: #64748b;
	--ts-win: #0a7f4f;
	--ts-lose: #d32f2f;
	--ts-radius: 10px;
	--ts-shadow: 0 1px 3px rgba(15, 23, 42, .08);
	--ts-shadow-lg: 0 8px 24px rgba(15, 23, 42, .10);
	--ts-max: 1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: 'Noto Sans Thai', 'Prompt', 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
	font-size: 15px;
	line-height: 1.65;
	color: var(--ts-text);
	background: var(--ts-bg);
}

img { max-width: 100%; height: auto; }

a { color: var(--ts-primary); text-decoration: none; }
a:hover { color: var(--ts-primary-dark); }

/* ---------- Layout ---------- */

.ts-container {
	max-width: var(--ts-max);
	margin: 0 auto;
	padding: 0 16px;
}

.ts-site { display: flex; flex-direction: column; min-height: 100vh; }
.ts-main { flex: 1; padding: 24px 0 48px; }

.ts-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 24px;
	align-items: start;
}

@media (max-width: 992px) {
	.ts-layout { grid-template-columns: 1fr; }
}

/* ---------- Header ---------- */

.ts-header {
	background: var(--ts-surface);
	border-bottom: 1px solid var(--ts-border);
	position: sticky;
	top: 0;
	z-index: 999;
	box-shadow: var(--ts-shadow);
}

.ts-header-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 0;
}

.ts-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -.5px;
	color: var(--ts-text);
}
.ts-brand:hover { color: var(--ts-text); }
.ts-brand .ts-brand-ball {
	width: 38px; height: 38px;
	border-radius: 50%;
	background: var(--ts-primary);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	flex: none;
}
.ts-brand b { color: var(--ts-primary); }

.ts-custom-logo { max-height: 44px; width: auto; }

.ts-header-cta { display: flex; gap: 8px; align-items: center; }

.ts-nav {
	background: var(--ts-primary);
}
.ts-nav ul {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0;
}
.ts-nav li { position: relative; }
.ts-nav a {
	display: block;
	padding: 11px 18px;
	color: rgba(255, 255, 255, .92);
	font-weight: 600;
	font-size: 15px;
}
.ts-nav a:hover,
.ts-nav .current-menu-item > a,
.ts-nav .current_page_item > a {
	background: rgba(255, 255, 255, .14);
	color: #fff;
}

@media (max-width: 768px) {
	.ts-nav ul { flex-direction: column; display: none; }
	.ts-nav.ts-open ul { display: flex; }
	.ts-nav-toggle {
		display: inline-flex !important;
		background: none;
		border: 1px solid var(--ts-border);
		border-radius: 8px;
		font-size: 20px;
		padding: 6px 12px;
		cursor: pointer;
		color: var(--ts-text);
	}
}
.ts-nav-toggle { display: none; }

.ts-cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--ts-primary);
	color: #fff;
	border-radius: 8px;
	padding: 9px 16px;
	font-weight: 700;
	font-size: 14.5px;
	white-space: nowrap;
}
.ts-cta:hover { background: var(--ts-primary-dark); color: #fff; }

/* ---------- Ticker ---------- */

.ts-ticker {
	background: var(--ts-text);
	color: #fff;
	font-size: 13px;
	overflow: hidden;
	white-space: nowrap;
}
.ts-ticker-inner {
	display: inline-flex;
	gap: 32px;
	padding: 7px 0;
	animation: ts-ticker-scroll 45s linear infinite;
}
.ts-ticker:hover .ts-ticker-inner { animation-play-state: paused; }
.ts-ticker-item b { color: #7ee2b0; font-weight: 700; }
.ts-ticker-item.ts-tick-live { color: #ffb4ae; }
@keyframes ts-ticker-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

/* ---------- Cards / Sections ---------- */

.ts-card {
	background: var(--ts-surface);
	border: 1px solid var(--ts-border);
	border-radius: var(--ts-radius);
	box-shadow: var(--ts-shadow);
	overflow: hidden;
	margin-bottom: 24px;
}

.ts-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 2px solid var(--ts-primary);
	background: linear-gradient(180deg, #f7fbf9, #f2f7f4);
}
.ts-card-head h2,
.ts-card-head h3 {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--ts-text);
	display: flex;
	align-items: center;
	gap: 8px;
}
.ts-card-head .ts-more { font-size: 13px; font-weight: 600; white-space: nowrap; }

.ts-card-body { padding: 0; }
.ts-card-body.ts-pad { padding: 18px; }

/* ---------- Section heading (SEO) ---------- */

.ts-page-title {
	font-size: clamp(22px, 3.5vw, 30px);
	font-weight: 800;
	line-height: 1.3;
	margin: 0 0 6px;
	color: var(--ts-text);
}
.ts-page-sub {
	color: var(--ts-text-muted);
	margin: 0 0 20px;
	font-size: 15px;
}

.ts-section-title {
	font-size: 20px;
	font-weight: 700;
	margin: 32px 0 14px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.ts-section-title::before {
	content: "";
	width: 5px;
	height: 22px;
	border-radius: 3px;
	background: var(--ts-primary);
	flex: none;
}

/* ---------- Breadcrumb ---------- */

.ts-breadcrumb {
	font-size: 13px;
	color: var(--ts-text-muted);
	margin-bottom: 14px;
}
.ts-breadcrumb a { color: var(--ts-text-muted); }
.ts-breadcrumb a:hover { color: var(--ts-primary); }

/* ---------- Date navigation ---------- */

.ts-date-nav {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	align-items: center;
	margin-bottom: 16px;
}
.ts-date-nav a,
.ts-date-nav button {
	border: 1px solid var(--ts-border);
	background: var(--ts-surface);
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ts-text);
	cursor: pointer;
}
.ts-date-nav a:hover { border-color: var(--ts-primary); color: var(--ts-primary); }
.ts-date-nav .ts-date-active {
	background: var(--ts-primary);
	border-color: var(--ts-primary);
	color: #fff;
}

/* ---------- Livescore table ---------- */

.ts-league-block { margin-bottom: 22px; }

.ts-league-head {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--ts-surface);
	border: 1px solid var(--ts-border);
	border-bottom: none;
	border-radius: var(--ts-radius) var(--ts-radius) 0 0;
	padding: 10px 14px;
}
.ts-league-head img,
.ts-league-head .ts-league-logo {
	width: 22px; height: 22px;
	object-fit: contain;
	flex: none;
	background: #eef1f5;
	border-radius: 4px;
	padding: 2px;
}
.ts-league-head h3 {
	margin: 0;
	font-size: 14.5px;
	font-weight: 700;
	color: var(--ts-text);
}

.ts-match-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--ts-surface);
	border: 1px solid var(--ts-border);
	border-radius: 0 0 var(--ts-radius) var(--ts-radius);
	overflow: hidden;
	font-size: 14px;
}
.ts-match-table tr { border-bottom: 1px solid var(--ts-border); transition: background .15s; }
.ts-match-table tr:last-child { border-bottom: none; }
.ts-match-table tbody tr:hover { background: #f6faf8; }

.ts-match-table td,
.ts-match-table th {
	padding: 10px 10px;
	vertical-align: middle;
	text-align: center;
	white-space: nowrap;
}
.ts-match-table th {
	background: #f2f7f4;
	font-size: 12px;
	color: var(--ts-text-muted);
	text-transform: uppercase;
	letter-spacing: .4px;
}
.ts-match-table .ts-col-time { width: 88px; color: var(--ts-text-muted); font-variant-numeric: tabular-nums; }
.ts-match-table .ts-col-home,
.ts-match-table .ts-col-away { text-align: left; }
.ts-match-table .ts-col-score { width: 90px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ts-match-table .ts-col-odds { width: 90px; color: var(--ts-accent); font-weight: 600; }
.ts-match-table .ts-col-status { width: 92px; }

.ts-team-name { display: block; overflow: hidden; text-overflow: ellipsis; }
.ts-match-table .ts-col-home .ts-team-name { text-align: left; }

.ts-score-wrap { display: inline-flex; gap: 6px; align-items: center; }
.ts-score-win { color: var(--ts-win); }
.ts-score-lose { color: var(--ts-lose); }

.ts-badge {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 700;
	padding: 2px 9px;
	border-radius: 99px;
	line-height: 1.5;
}
.ts-badge-live { background: var(--ts-live); color: #fff; animation: ts-blink 1.2s infinite; }
.ts-badge-ft { background: #eef1f5; color: var(--ts-text-muted); }
.ts-badge-ns { background: #fff4df; color: #b45309; }
@keyframes ts-blink {
	0%, 100% { opacity: 1; }
	50% { opacity: .45; }
}

/* ---------- Mobile: ตารางผลบอลแบบ 2 บรรทัด แสดงราคาครบ (สไตล์แอป Livescore) ---------- */
@media (max-width: 640px) {
	.ts-match-table thead { display: none; }

	.ts-match-table tbody tr {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		grid-template-areas:
			"time  odds  status"
			"home  score away";
		gap: 3px 8px;
		padding: 10px 12px;
		border-bottom: 1px solid var(--ts-border);
	}
	.ts-match-table td {
		display: block;
		border: none;
		padding: 0;
		white-space: normal;
	}

	.ts-match-table .ts-col-time { grid-area: time; text-align: left; font-size: 12.5px; }
	.ts-match-table .ts-col-odds {
		grid-area: odds;
		text-align: center;
		font-size: 12.5px;
	}
	.ts-match-table .ts-col-odds::before {
		content: "ราคา";
		color: var(--ts-text-muted);
		font-size: 11px;
		font-weight: 500;
		margin-right: 5px;
	}
	.ts-match-table .ts-col-status { grid-area: status; text-align: right; }
	.ts-match-table .ts-col-home { grid-area: home; text-align: right; font-weight: 600; font-size: 13.5px; }
	.ts-match-table .ts-col-away { grid-area: away; text-align: left; font-weight: 600; font-size: 13.5px; }
	.ts-match-table .ts-col-score { grid-area: score; text-align: center; font-size: 14px; }

	.ts-match-table .ts-badge { font-size: 10.5px; padding: 1px 7px; }
	.ts-match-table .ts-team-name { overflow: visible; text-overflow: clip; }
	.ts-match-table .ts-col-home .ts-team-name { text-align: right; }

	/* ตารางราคาบอล: ซ่อนคอลัมน์เวลา+เสมอ (มักว่าง) เหลือ แมตช์/ราคา/เจ้าบ้าน/เยือน */
	.ts-odds-table .ts-col-time,
	.ts-odds-table th:nth-child(1),
	.ts-odds-table td:nth-child(1),
	.ts-odds-table th:nth-child(5),
	.ts-odds-table td:nth-child(5) { display: none; }
	.ts-odds-table td, .ts-odds-table th { padding: 8px 7px; font-size: 12.5px; }
	.ts-odds-table .ts-odds-team { white-space: normal; }
}

/* ---------- Odds table ---------- */

.ts-odds-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--ts-surface);
	font-size: 14px;
}
.ts-odds-table th {
	background: #f2f7f4;
	border-bottom: 1px solid var(--ts-border);
	font-size: 12px;
	color: var(--ts-text-muted);
	padding: 10px;
	text-align: center;
}
.ts-odds-table td {
	border-bottom: 1px solid var(--ts-border);
	padding: 10px;
	text-align: center;
	white-space: nowrap;
}
.ts-odds-table .ts-odds-team { text-align: left; font-weight: 600; }
.ts-odds-handicap { color: var(--ts-accent); font-weight: 700; }
.ts-odds-price { font-variant-numeric: tabular-nums; }
.ts-odds-price.ts-down { color: var(--ts-lose); }
.ts-odds-price.ts-up { color: var(--ts-win); }
.ts-odds-none { color: var(--ts-text-muted); }

/* ---------- Article cards ---------- */

.ts-articles-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}
@media (max-width: 992px) { .ts-articles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ts-articles-grid { grid-template-columns: 1fr; } }

.ts-article-card {
	background: var(--ts-surface);
	border: 1px solid var(--ts-border);
	border-radius: var(--ts-radius);
	overflow: hidden;
	box-shadow: var(--ts-shadow);
	transition: transform .15s, box-shadow .15s;
	display: flex;
	flex-direction: column;
}
.ts-article-card:hover { transform: translateY(-3px); box-shadow: var(--ts-shadow-lg); }
.ts-article-thumb {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #eef1f5;
}
.ts-article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ts-article-body { padding: 14px 16px 16px; }
.ts-article-cat {
	font-size: 11.5px;
	font-weight: 700;
	color: var(--ts-primary);
	text-transform: uppercase;
	letter-spacing: .4px;
}
.ts-article-body h2 {
	margin: 6px 0 8px;
	font-size: 15.5px;
	line-height: 1.45;
}
.ts-article-body h2 a { color: var(--ts-text); }
.ts-article-body h2 a:hover { color: var(--ts-primary); }
.ts-article-meta { font-size: 12.5px; color: var(--ts-text-muted); display: flex; gap: 12px; }
.ts-article-excerpt {
	font-size: 13.5px;
	color: var(--ts-text-muted);
	margin: 8px 0 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- Sidebar ---------- */

.ts-sidebar .ts-widget {
	background: var(--ts-surface);
	border: 1px solid var(--ts-border);
	border-radius: var(--ts-radius);
	box-shadow: var(--ts-shadow);
	margin-bottom: 20px;
	padding: 18px;
}
.ts-sidebar .ts-widget-title {
	margin: 0 0 12px;
	font-size: 16px;
	font-weight: 700;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--ts-primary);
}
.ts-sidebar ul { list-style: none; margin: 0; padding: 0; }
.ts-sidebar li { padding: 7px 0; border-bottom: 1px dashed var(--ts-border); font-size: 14px; }
.ts-sidebar li:last-child { border-bottom: none; }
.ts-sidebar a { color: var(--ts-text); }
.ts-sidebar a:hover { color: var(--ts-primary); }

.ts-side-match {
	padding: 9px 0;
	border-bottom: 1px dashed var(--ts-border);
	font-size: 13.5px;
}
.ts-side-match:last-child { border-bottom: none; }
.ts-side-match .ts-side-league {
	font-size: 11.5px;
	color: var(--ts-text-muted);
	margin-bottom: 3px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.ts-side-match .ts-side-league img { width: 14px; height: 14px; object-fit: contain; }
.ts-side-match .ts-side-row { display: flex; justify-content: space-between; gap: 8px; }
.ts-side-match .ts-side-score { font-weight: 800; color: var(--ts-primary); white-space: nowrap; }

/* ---------- Single post / Page ---------- */

.ts-single-card {
	background: var(--ts-surface);
	border: 1px solid var(--ts-border);
	border-radius: var(--ts-radius);
	box-shadow: var(--ts-shadow);
	padding: 28px;
}
@media (max-width: 640px) { .ts-single-card { padding: 18px; } }

.ts-single-title {
	font-size: clamp(20px, 3vw, 27px);
	font-weight: 800;
	line-height: 1.35;
	margin: 0 0 12px;
}
.ts-single-meta {
	font-size: 13px;
	color: var(--ts-text-muted);
	margin-bottom: 18px;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}
.ts-content { font-size: 16px; line-height: 1.85; }
.ts-content h2 { font-size: 22px; margin: 30px 0 12px; line-height: 1.4; }
.ts-content h3 { font-size: 18px; margin: 24px 0 10px; }
.ts-content h4 { font-size: 16px; margin: 20px 0 8px; }
.ts-content img { border-radius: 8px; }
.ts-content table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.ts-content table td, .ts-content table th { border: 1px solid var(--ts-border); padding: 8px 10px; }
.ts-content blockquote {
	margin: 18px 0;
	padding: 12px 18px;
	border-left: 4px solid var(--ts-primary);
	background: #f6faf8;
	border-radius: 0 8px 8px 0;
}
.ts-content code { background: #eef1f5; padding: 2px 6px; border-radius: 4px; font-size: 14px; }

.ts-post-tags { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.ts-post-tags a {
	font-size: 12.5px;
	font-weight: 600;
	background: #f0f7f4;
	border: 1px solid var(--ts-border);
	border-radius: 99px;
	padding: 4px 12px;
	color: var(--ts-primary);
}
.ts-post-nav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid var(--ts-border);
	font-size: 14px;
}

/* ---------- Pagination ---------- */

.ts-pagination { display: flex; gap: 6px; flex-wrap: wrap; margin: 26px 0; }
.ts-pagination .page-numbers {
	display: inline-block;
	border: 1px solid var(--ts-border);
	background: var(--ts-surface);
	border-radius: 8px;
	padding: 7px 13px;
	font-size: 14px;
	font-weight: 600;
	color: var(--ts-text);
}
.ts-pagination .current,
.ts-pagination .page-numbers:hover { background: var(--ts-primary); border-color: var(--ts-primary); color: #fff; }

/* ---------- Forms ---------- */

input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], textarea, select {
	width: 100%;
	border: 1px solid var(--ts-border);
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 14.5px;
	font-family: inherit;
	background: #fff;
	color: var(--ts-text);
}
input[type="submit"], button[type="submit"] {
	background: var(--ts-primary);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px 20px;
	font-size: 14.5px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
}
input[type="submit"]:hover, button[type="submit"]:hover { background: var(--ts-primary-dark); }
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; }

/* ---------- Footer ---------- */

.ts-footer {
	background: #10231b;
	color: rgba(255, 255, 255, .82);
	margin-top: 40px;
	font-size: 14px;
}
.ts-footer-widgets {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	padding: 38px 0 26px;
}
@media (max-width: 768px) { .ts-footer-widgets { grid-template-columns: 1fr; } }
.ts-footer h4 {
	color: #fff;
	font-size: 16px;
	margin: 0 0 14px;
}
.ts-footer a { color: rgba(255, 255, 255, .82); }
.ts-footer a:hover { color: #fff; }
.ts-footer ul { list-style: none; margin: 0; padding: 0; }
.ts-footer li { padding: 5px 0; }
.ts-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, .12);
	padding: 16px 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 13px;
}
.ts-footer-brand { font-weight: 800; color: #fff; }
.ts-footer-brand b { color: #7ee2b0; }
.ts-social-links { display: flex; gap: 10px; }
.ts-social-links a {
	width: 34px; height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .1);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 700;
}
.ts-social-links a:hover { background: var(--ts-primary); }

/* ---------- Misc ---------- */

.ts-notice {
	background: #fff8e6;
	border: 1px solid #f2dfae;
	border-radius: 8px;
	padding: 12px 16px;
	color: #8a6d1a;
	font-size: 14px;
	margin: 16px 0;
}

.ts-back-top {
	position: fixed;
	right: 18px;
	bottom: 18px;
	width: 42px; height: 42px;
	border-radius: 50%;
	background: var(--ts-primary);
	color: #fff;
	border: none;
	font-size: 18px;
	cursor: pointer;
	box-shadow: var(--ts-shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: all .2s;
	z-index: 900;
}
.ts-back-top.ts-show { opacity: 1; visibility: visible; transform: none; }

.ts-update-note {
	font-size: 12.5px;
	color: var(--ts-text-muted);
	margin: 8px 0 0;
	display: flex;
	align-items: center;
	gap: 6px;
}
.ts-dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--ts-win);
	display: inline-block;
	animation: ts-blink 1.6s infinite;
}

/* WordPress alignment classes */
.alignleft { float: left; margin: 0 20px 12px 0; }
.alignright { float: right; margin: 0 0 12px 20px; }
.aligncenter { display: block; margin: 0 auto 12px; }
.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; width: 1px; overflow: hidden; position: absolute !important;
	white-space: nowrap;
}

/* ---------- Icons (inline SVG แทนอีโมจิ) ---------- */

.ts-icon {
	display: inline-block;
	vertical-align: -0.2em;
	flex: none;
}
.ts-brand-ball .ts-icon { vertical-align: middle; }
.ts-cta .ts-icon { vertical-align: -3px; }
.ts-card-head .ts-icon,
.ts-section-title .ts-icon { color: var(--ts-primary); vertical-align: -3px; }
.ts-widget-title .ts-icon { color: var(--ts-primary); vertical-align: -3px; }
.ts-article-meta .ts-icon { color: var(--ts-text-muted); vertical-align: -2px; }
.ts-single-meta .ts-icon { color: var(--ts-text-muted); vertical-align: -2px; }
.ts-update-note .ts-icon { color: var(--ts-win); vertical-align: -2px; }
.ts-404-icon {
	color: var(--ts-primary);
	opacity: .9;
	margin-bottom: 6px;
}

/* ---------- Article thumb fallback (พรีเมียม ไม่มีรูปก็สวย) ---------- */

.ts-thumb-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	gap: 10px;
	background:
		radial-gradient(circle at 20% 20%, rgba(10, 127, 79, .16), transparent 55%),
		radial-gradient(circle at 85% 80%, rgba(30, 136, 229, .12), transparent 50%),
		linear-gradient(135deg, #eef4f1 0%, #e4edf5 100%);
	color: rgba(10, 127, 79, .45);
}
.ts-thumb-fallback::after {
	content: attr(data-letter);
	font-size: 44px;
	font-weight: 800;
	color: rgba(10, 127, 79, .22);
	margin-left: -6px;
}

/* =====================================================
   Motion — เนียน ไม่ฉูดฉาด
   ===================================================== */

/* 1) Reveal ตอน scroll (JS เพิ่ม class ให้เอง — ไม่มี JS ก็เห็นเนื้อหาครบ) */
.ts-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .55s cubic-bezier(.22, .61, .36, 1), transform .55s cubic-bezier(.22, .61, .36, 1);
	will-change: opacity, transform;
}
.ts-reveal.ts-in {
	opacity: 1;
	transform: none;
}

/* 2) เข้าหน้าแรกทีละบล็อกแบบ stagger */
.ts-reveal[data-delay="1"] { transition-delay: .06s; }
.ts-reveal[data-delay="2"] { transition-delay: .12s; }
.ts-reveal[data-delay="3"] { transition-delay: .18s; }
.ts-reveal[data-delay="4"] { transition-delay: .24s; }
.ts-reveal[data-delay="5"] { transition-delay: .30s; }
.ts-reveal[data-delay="6"] { transition-delay: .36s; }

/* 3) Hover ลืมนุ่มขึ้นทั้งเว็บ */
.ts-article-card,
.ts-card,
.ts-widget,
.ts-cta,
.ts-date-nav a,
.ts-date-nav button,
.ts-pagination .page-numbers {
	transition: transform .25s cubic-bezier(.22, .61, .36, 1),
		box-shadow .25s cubic-bezier(.22, .61, .36, 1),
		background-color .2s ease,
		border-color .2s ease,
		color .2s ease;
}
.ts-article-card:hover { transform: translateY(-4px); }
.ts-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10, 127, 79, .28); }
.ts-cta:active { transform: translateY(0); }
.ts-back-top { transition: all .25s cubic-bezier(.22, .61, .36, 1); }
.ts-back-top:hover { transform: translateY(-3px); }

/* 4) แถวตารางไหลเนียน + ไฮไลต์ซ้ายตอน hover */
.ts-match-table tbody tr,
.ts-odds-table tbody tr {
	transition: background-color .18s ease, box-shadow .18s ease;
}
.ts-odds-table tbody tr:hover {
	background: #f6faf8;
	box-shadow: inset 3px 0 0 var(--ts-primary);
}

/* 5) ลิงก์หัวข้อการ์ด — ขีดเส้นไหลเวลา hover */
.ts-article-body h2 a {
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0% 2px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size .3s cubic-bezier(.22, .61, .36, 1), color .2s ease;
}
.ts-article-card:hover .ts-article-body h2 a {
	background-size: 100% 2px;
}

/* 6) ภาพปก zoom เบาๆ เวลา hover */
.ts-article-thumb img {
	transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}
.ts-article-card:hover .ts-article-thumb img {
	transform: scale(1.05);
}

/* 7) LIVE badge มี pulse ring รอบตัว ดูมีชีวิต */
.ts-badge-live {
	position: relative;
}
.ts-badge-live::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 99px;
	box-shadow: 0 0 0 0 rgba(229, 57, 53, .55);
	animation: ts-pulse-ring 1.8s cubic-bezier(.4, 0, .6, 1) infinite;
}
@keyframes ts-pulse-ring {
	0%   { box-shadow: 0 0 0 0 rgba(229, 57, 53, .5); }
	70%  { box-shadow: 0 0 0 7px rgba(229, 57, 53, 0); }
	100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); }
}

/* 8) score เพิ่งเปลี่ยน — กะพริบเขียวนุ่มๆ (JS ใส่ class ts-flash) */
.ts-score-flash { animation: ts-score-flash 1s ease; border-radius: 4px; }
@keyframes ts-score-flash {
	0%   { background: rgba(10, 127, 79, .25); }
	100% { background: transparent; }
}

/* 9) ลด motion เมื่อผู้ใช้ตั้งค่า reduce motion */
@media (prefers-reduced-motion: reduce) {
	.ts-ticker-inner { animation: none; }
	.ts-badge-live { animation: none; }
	.ts-badge-live::after { animation: none; }
	.ts-reveal { opacity: 1; transform: none; transition: none; }
	.ts-article-card:hover, .ts-cta:hover, .ts-back-top:hover { transform: none; }
	.ts-article-thumb img, .ts-article-thumb img:hover { transform: none; }
}

/* --- WordPress core classes (comment form, caption, gallery) --- */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--ts-text-muted); text-align: center; }
.sticky { display: block; }
.bypostauthor { display: block; }

.tsb-ad{text-align:center;margin:12px auto;max-width:100%;position:relative}.tsb-ad img{display:block;max-width:100%;height:auto;margin:auto}.tsb-label{display:block;font-size:10px;color:#666}.tsb-slot-header,.tsb-slot-footer{max-width:1083px}.tsb-mobile{display:none}.tsb-ad[hidden]{display:none!important}@media(max-width:767px){.tsb-mobile{display:block}.tsb-desktop{display:none}.tsb-slot-floating{position:fixed;bottom:0;left:0;right:0;z-index:9999;background:#fff;margin:0;padding:2px 28px env(safe-area-inset-bottom);box-shadow:0 -2px 8px #0002}.tsb-slot-floating img{max-height:60px;width:auto}.tsb-close{position:absolute;right:4px;top:0;border:0;background:#fff;font-size:24px;cursor:pointer}.tsb-float-active{padding-bottom:90px}.tsb-float-active .ts-back-top{bottom:90px}}
