/* Koora City — جدول المباريات الجديد (1.5.2) */

.kcfx {
	--kc-panel: #ffffff;
	--kc-border: #dde1e8;
	--kc-line: #e6e9ef;
	--kc-text: #1d2140;
	--kc-muted: #5f6678;
	--kc-gborder: #e1e4ea;
	--kc-ghead: #eceef2;
	--kc-row-line: #eceef2;
	--kc-ctl-border: #d6dae2;
	--kc-ctl-bg: #ffffff;
	--kc-box-bg: #f4f5f8;
	--kc-box-border: #e1e4ea;
	--kc-live: #d00000;
	--kc-live-text: #b00000;
	--kc-live-bg: #fde8e8;
	--kc-ht: #e8a317;
	--kc-ht-text: #ffffff;
	--kc-soon-bg: #e3f3ea;
	--kc-soon: #0f6f37;
	--kc-ft-bg: #474747;
	--kc-ft: #ffffff;
	--kc-known: #2b3245;
	--kc-unknown: #6b7180;
	--kc-lose: #7b8194;
	--kc-acc: var(--kc-accent, #1b2142);
	--kc-acc-text: #ffffff;
	--kc-head-bg: linear-gradient(180deg, #f6f7f9 0%, #eceef2 100%);
	--kc-head-text: #1d2140;
	--kc-head-line: #dde1e8;
	--kc-hctl-bg: #ffffff;
	--kc-hctl-border: #d9dde5;
	--kc-hctl-hover: #f4f5f8;
	--kc-tab-idle: #5f6678;
	--kc-tab-active-bg: var(--kc-accent, #1b2142);
	--kc-tab-active-text: #ffffff;
	--kc-tab-mark: rgba(255, 255, 255, 0.55);
	--kc-head-accent: var(--kc-accent, #1b2142);
	--kc-seg-track: #f1f3f7;
	--kc-mark-bg: #ffffff;
	--kc-mark-fg: var(--kc-accent, #1b2142);
	--kc-badge-ring: #e6e9ef;
	--kc-overlay: rgba(17, 20, 40, 0.55);
	--kc-cta-other: var(--kc-acc);
	--kc-pop-shadow: 0 10px 28px rgba(17, 20, 40, 0.16);
	--kc-ctl-h: 36px;
	--kc-ctl-r: 10px;

	position: relative;
	margin: 0 0 20px;
	background: var(--kc-panel);
	border: 1px solid var(--kc-border);
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(29, 33, 64, 0.05);
	color: var(--kc-text);
	font-family: var(--kc-font, inherit);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
	direction: rtl;
	text-align: right;
}

.Night .kcfx {
	--kc-panel: #131727;
	--kc-border: #22273b;
	--kc-line: #22273b;
	--kc-text: #eef1f8;
	--kc-muted: #9298b0;
	--kc-gborder: #22273b;
	--kc-ghead: #1c2236;
	--kc-row-line: #22273b;
	--kc-ctl-border: #2a3047;
	--kc-ctl-bg: #0f1220;
	--kc-box-bg: #0f1220;
	--kc-box-border: #2a3047;
	--kc-live: #e5383b;
	--kc-live-text: #ff8a96;
	--kc-live-bg: rgba(255, 90, 106, 0.14);
	--kc-ht: #e8a317;
	--kc-ht-text: #15110a;
	--kc-soon-bg: rgba(79, 209, 165, 0.14);
	--kc-soon: #4fd1a5;
	--kc-ft-bg: #2a3047;
	--kc-ft: #c3c8dc;
	--kc-known: #c3c8dc;
	--kc-unknown: #8a90a8;
	--kc-lose: #8a90a8;
	--kc-acc: var(--kc-accent-night, #ffb547);
	--kc-acc-text: #15110a;
	--kc-head-bg: linear-gradient(180deg, #20263b 0%, #1c2236 100%);
	--kc-head-text: #eef1f8;
	--kc-head-line: #22273b;
	--kc-hctl-bg: #131727;
	--kc-hctl-border: #2a3047;
	--kc-hctl-hover: #171c2e;
	--kc-tab-idle: #9298b0;
	--kc-tab-active-bg: var(--kc-accent-night, #ffb547);
	--kc-tab-active-text: #15110a;
	--kc-tab-mark: rgba(21, 17, 10, 0.5);
	--kc-head-accent: var(--kc-accent-night, #ffb547);
	--kc-seg-track: #0f1220;
	--kc-mark-bg: #262c44;
	--kc-mark-fg: var(--kc-accent-night, #ffb547);
	--kc-badge-ring: #2e3550;
	--kc-overlay: rgba(5, 7, 15, 0.62);
	--kc-cta-other: #131727;
	--kc-pop-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
	box-shadow: none;
}

.kcfx *,
.kcfx *::before,
.kcfx *::after {
	box-sizing: border-box;
}

.kcfx button {
	font-family: inherit;
	-webkit-tap-highlight-color: transparent;
}

.kcfx svg {
	display: block;
	flex: none;
}

/* ---------- الهيدر: بنفس ألوان الجدول وشريط البطولات (كمبيوتر وموبايل) ---------- */

.kcfx-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px 14px;
	margin: 0;
	padding: 10px 14px;
	border-bottom: 1px solid var(--kc-head-line);
	border-radius: 11px 11px 0 0;
	background: var(--kc-head-bg);
	color: var(--kc-head-text);
}

/* العنوان: أيقونة الكورة + "جدول المباريات" وتحته خط صغير بلون الهوية */
.kcfx-titles {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.kcfx-mark {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--kc-mark-bg);
	box-shadow: inset 0 0 0 1px var(--kc-hctl-border), 0 1px 2px rgba(29, 33, 64, 0.06);
	color: var(--kc-mark-fg);
}

.Night .kcfx-mark {
	box-shadow: none;
}

.kcfx-mark svg {
	width: 19px;
	height: 19px;
}

.kcfx .kcfx-title {
	position: relative;
	display: block;
	margin: 0;
	padding: 0 0 5px;
	background: none;
	border: 0;
	border-radius: 0;
	color: var(--kc-head-text);
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.3;
	text-align: right;
	white-space: nowrap;
}

.kcfx .kcfx-title::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: 26px;
	height: 3px;
	border-radius: 3px;
	background: var(--kc-head-accent);
}

.kcfx-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

/* كل أزرار الهيدر نفس الارتفاع ونفس الإطار */
.kcfx .kcfx-live-btn,
.kcfx-days,
.kcfx .kcfx-icon-btn {
	height: var(--kc-ctl-h);
	border-radius: var(--kc-ctl-r);
	background: var(--kc-hctl-bg);
	box-shadow: inset 0 0 0 1px var(--kc-hctl-border), 0 1px 2px rgba(29, 33, 64, 0.05);
}

.Night .kcfx .kcfx-live-btn,
.Night .kcfx-days,
.Night .kcfx .kcfx-icon-btn {
	box-shadow: inset 0 0 0 1px var(--kc-hctl-border);
}

.kcfx .kcfx-live-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	padding: 0 11px;
	border: 0;
	color: var(--kc-head-text);
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.kcfx .kcfx-live-btn:hover {
	background: var(--kc-hctl-hover);
}

.kcfx .kcfx-live-btn[aria-pressed="true"] {
	background: var(--kc-live);
	box-shadow: 0 2px 8px rgba(208, 0, 0, 0.3);
	color: #ffffff;
}

.kcfx-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #e5383b;
	box-shadow: 0 0 0 3px rgba(229, 56, 59, 0.18);
}

.kcfx .kcfx-live-btn[aria-pressed="true"] .kcfx-dot {
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.kcfx-live-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: 999px;
	background: #e01e1e;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.kcfx-live-count[data-zero] {
	background: var(--kc-ghead);
	color: var(--kc-muted);
}

.Night .kcfx-live-count[data-zero] {
	background: #262c44;
}

.kcfx .kcfx-live-btn[aria-pressed="true"] .kcfx-live-count {
	background: #ffffff;
	color: var(--kc-live);
}

/* الأيام التلاتة في نفس الجدول */
.kcfx-pane[hidden] {
	display: none;
}

.kcfx button.kcfx-day {
	margin: 0;
	border: 0;
	background: transparent;
	font-family: inherit;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

/* أزرار الأيام: شريط واحد، والمختار بلون الهوية وتحته خط صغير */
.kcfx-days {
	display: flex;
	align-items: stretch;
	gap: 2px;
	padding: 3px;
}

.kcfx .kcfx-day {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 16px 3px;
	border-radius: 7px;
	color: var(--kc-tab-idle);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.Night .kcfx .kcfx-day {
	color: var(--kc-tab-idle) !important;
}

.kcfx .kcfx-day:hover,
.kcfx .kcfx-day:focus {
	background: var(--kc-hctl-hover);
	color: var(--kc-head-text);
}

.Night .kcfx .kcfx-day:hover {
	color: var(--kc-head-text) !important;
}

.kcfx .kcfx-day.is-active,
.kcfx .kcfx-day.is-active:hover {
	background: var(--kc-tab-active-bg);
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.22);
	color: var(--kc-tab-active-text) !important;
	font-weight: 700;
}

.kcfx .kcfx-day.is-active::after {
	content: "";
	position: absolute;
	bottom: 4px;
	left: 50%;
	width: 16px;
	height: 2px;
	margin-left: -8px;
	border-radius: 2px;
	background: var(--kc-tab-mark);
}

.kcfx-filter {
	position: relative;
}

.kcfx .kcfx-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--kc-ctl-h);
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--kc-head-text);
	cursor: pointer;
}

.kcfx .kcfx-icon-btn svg {
	width: 16px;
	height: 16px;
}

.kcfx .kcfx-icon-btn:hover {
	background: var(--kc-hctl-hover);
}

.kcfx .kcfx-icon-btn.is-on,
.kcfx .kcfx-icon-btn[aria-expanded="true"] {
	background: var(--kc-tab-active-bg);
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.22);
	color: var(--kc-tab-active-text);
}

.kcfx .kcfx-live-btn:focus-visible,
.kcfx .kcfx-day:focus-visible,
.kcfx .kcfx-icon-btn:focus-visible {
	outline: 2px solid var(--kc-head-accent);
	outline-offset: 2px;
}

.kcfx-filter-pop {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 40;
	width: 210px;
	padding: 10px;
	border: 1px solid var(--kc-border);
	border-radius: 10px;
	background: var(--kc-panel);
	box-shadow: var(--kc-pop-shadow);
	color: var(--kc-text);
}

.kcfx-filter-pop[hidden] {
	display: none;
}

.kcfx .kcfx-pop-title {
	margin: 0 0 6px;
	padding: 0;
	color: var(--kc-muted);
	font-size: 11px;
	font-weight: 600;
}

.kcfx-fopts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 5px;
}

.kcfx .kcfx-fopt {
	height: 32px;
	margin: 0;
	padding: 0 6px;
	border: 1px solid var(--kc-ctl-border);
	border-radius: 7px;
	background: var(--kc-ctl-bg);
	color: var(--kc-text);
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
}

.kcfx .kcfx-fopt[aria-pressed="true"] {
	background: var(--kc-acc);
	border-color: var(--kc-acc);
	color: var(--kc-acc-text);
}

/* ---------- البطولات ---------- */

.kcfx-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
}

.kcfx .kcfx-empty,
.kcfx .kcfx-none {
	margin: 0;
	padding: 32px 14px;
	color: var(--kc-muted);
	font-size: 13px;
	text-align: center;
}

.kcfx .kcfx-empty {
	padding-bottom: 6px;
}

.kcfx-empty[hidden] {
	display: none;
}

.kcfx-group {
	overflow: hidden;
	border: 1px solid var(--kc-gborder);
	border-radius: 10px;
	background: var(--kc-panel);
}

.kcfx-group.is-hidden {
	display: none;
}

/* ماتش عدّى نص الليل: في "اليوم" وهو جاري بس، وفي "الأمس" بعد ما يخلص بس */
.kcfx .kcfx-row[data-carry="in"]:not(.is-live):not(.is-soon),
.kcfx .kcfx-row[data-carry="out"].is-live,
.kcfx .kcfx-row[data-carry="out"].is-soon {
	display: none;
}

.kcfx-ghead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 42px;
	padding: 0 12px 0 4px;
	background: var(--kc-ghead);
	cursor: pointer;
}

.kcfx-gtitle {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.kcfx-glogo {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 24px;
	height: 24px;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.05);
	background: color-mix(in srgb, var(--t, #1d2140) 14%, transparent);
	color: var(--t, #1d2140);
}

.kcfx-glogo svg {
	width: 13px;
	height: 13px;
}

.Night .kcfx-glogo {
	background: rgba(255, 255, 255, 0.06);
	background: color-mix(in srgb, var(--t, #8fb0ff) 22%, transparent);
	color: color-mix(in srgb, var(--t, #8fb0ff) 45%, #ffffff);
}

/* شعار البطولة الحقيقي: مربع أبيض ناعم، والشعار الأبيض على كحلي عشان يبان */
.kcfx .kcfx-glogo.has-img {
	width: 28px;
	height: 28px;
	border-radius: 7px;
	background: #ffffff;
	box-shadow: inset 0 0 0 1px rgba(29, 33, 64, 0.1);
}

.kcfx .kcfx-glogo.has-img.is-light {
	background: var(--kc-accent, #1b2142);
	box-shadow: none;
}

.Night .kcfx .kcfx-glogo.has-img {
	background: rgba(255, 255, 255, 0.07);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.Night .kcfx .kcfx-glogo.has-img.is-dark,
.Night .kcfx .kcfx-glogo.has-img.is-solid {
	background: #ffffff;
	box-shadow: none;
}

.kcfx .kcfx-glogo img {
	display: block;
	width: 20px;
	height: 20px;
	max-width: none;
	margin: 0;
	border-radius: 0;
	object-fit: contain;
}

.kcfx .kcfx-gname {
	display: block;
	overflow: hidden;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	color: var(--kc-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kcfx-glive {
	display: inline-flex;
	align-items: center;
	flex: none;
	gap: 4px;
	height: 20px;
	padding: 0 7px;
	border-radius: 999px;
	background: var(--kc-live-bg);
	color: var(--kc-live-text);
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.kcfx-glive[hidden] {
	display: none;
}

.kcfx-glive i {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--kc-live);
}

.kcfx-gtools {
	display: flex;
	align-items: center;
	flex: none;
	gap: 0;
}

.kcfx-gcount {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 21px;
	height: 21px;
	padding: 0 6px;
	border: 1px solid var(--kc-ctl-border);
	border-radius: 999px;
	background: var(--kc-ctl-bg);
	color: var(--kc-text);
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
}

.Night .kcfx-gcount {
	border-color: #262c44;
	background: #262c44;
}

.kcfx .kcfx-gtoggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--kc-muted);
	cursor: pointer;
}

.kcfx-gtoggle svg {
	width: 15px;
	height: 15px;
	transform: rotate(180deg);
	transition: transform 0.2s ease;
}

.kcfx-group.is-collapsed .kcfx-gtoggle svg {
	transform: none;
}

.kcfx[data-filter="all"] .kcfx-group.is-collapsed .kcfx-rows {
	display: none;
}

/* ---------- صف المباراة ---------- */

.kcfx .kcfx-row {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 140px minmax(0, 1fr) 148px;
	grid-template-areas: "home center away meta";
	align-items: center;
	gap: 13px;
	min-height: 66px;
	padding: 7px 17px;
	border-top: 1px solid var(--kc-row-line);
	color: var(--kc-text);
	text-decoration: none;
	transition: none;
}

.kcfx--no-meta .kcfx-row {
	grid-template-columns: minmax(0, 1fr) 140px minmax(0, 1fr);
	grid-template-areas: "home center away";
}

.kcfx--no-meta .kcfx-meta {
	display: none;
}

.kcfx a.kcfx-row:hover,
.kcfx a.kcfx-row:focus {
	color: var(--kc-text);
	text-decoration: none;
}

.kcfx[data-filter="live"] .kcfx-row:not(.is-live),
.kcfx[data-filter="up"] .kcfx-row:not(.is-ns):not(.is-soon),
.kcfx[data-filter="ft"] .kcfx-row:not(.is-ft) {
	display: none;
}

.kcfx-team {
	display: flex;
	align-items: center;
	gap: 11px;
	min-width: 0;
}

.kcfx-home {
	grid-area: home;
	justify-content: flex-end;
}

.kcfx-away {
	grid-area: away;
	justify-content: flex-start;
}

/* اسم الفريق والشعار — أوضح من قبل ومن غير ما يكبروا زيادة */
.kcfx-tname {
	min-width: 0;
	overflow: hidden;
	font-size: 15.75px;
	font-weight: 600;
	line-height: 1.4;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kcfx-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 36px;
	height: 36px;
}

.kcfx .kcfx-logo img {
	display: block;
	width: 36px;
	height: 36px;
	max-width: none;
	margin: 0;
	border-radius: 0;
	object-fit: contain;
}

.kcfx-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 35px;
	height: 35px;
	border-radius: 50%;
	box-shadow: 0 0 0 2px var(--kc-badge-ring);
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
}

.kcfx-center {
	grid-area: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.kcfx-c-up,
.kcfx-c-live,
.kcfx-c-ft {
	display: none;
}

.kcfx-row.is-ns .kcfx-c-up,
.kcfx-row.is-soon .kcfx-c-up {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.kcfx-row.is-live .kcfx-c-live,
.kcfx-row.is-ft .kcfx-c-ft {
	display: grid;
	grid-template-columns: auto auto auto;
	align-items: center;
	justify-items: center;
	column-gap: 11px;
	row-gap: 2px;
}

/* مربع الوقت */
.kcfx-timebox {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	padding: 3px 11px;
	border: 1px solid var(--kc-box-border);
	border-radius: 8px;
	background: var(--kc-box-bg);
	line-height: 1.4;
}

.kcfx .kcfx-time {
	direction: ltr;
	unicode-bidi: isolate;
	color: var(--kc-text);
	font-size: 14.5px;
	font-weight: 700;
}

.kcfx .kcfx-mer {
	color: var(--kc-muted);
	font-size: 10.5px;
	font-style: normal;
}

.kcfx-soon {
	display: none;
	align-items: center;
	height: 18px;
	padding: 0 7px;
	border-radius: 999px;
	background: var(--kc-soon-bg);
	color: var(--kc-soon);
	font-size: 10.5px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.kcfx-row.is-soon .kcfx-soon {
	display: inline-flex;
}

/* النتيجة */
.kcfx-score {
	color: var(--kc-text);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.2;
}

.kcfx-score.is-lose {
	color: var(--kc-lose);
}

/* "مباشر" / "استراحة" / "انتهت" */
.kcfx-livepill,
.kcfx-ftpill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 23px;
	padding: 0 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

.kcfx-livepill {
	background: var(--kc-live);
	color: #ffffff;
}

.kcfx-livepill i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #ffffff;
	animation: kcfx-blink 1.4s ease-in-out infinite;
}

@keyframes kcfx-blink {
	50% {
		opacity: 0.25;
	}
}

.kcfx .kcfx-min {
	font-weight: 700;
}

.kcfx-row.is-ht .kcfx-livepill {
	background: var(--kc-ht);
	color: var(--kc-ht-text);
}

.kcfx-row.is-ht .kcfx-livepill i {
	display: none;
}

/* هدف جديد من المصدر: الصف بيلمع، والرقم بيكبر، و"مباشر" بتبقى "هدف!" بالأخضر لثواني */
.kcfx .kcfx-row.is-goal {
	animation: kcfx-goal-bg 1.8s ease-in-out 3;
}

@keyframes kcfx-goal-bg {
	0%,
	100% {
		background-color: transparent;
	}

	35% {
		background-color: rgba(16, 163, 74, 0.12);
	}
}

.kcfx-row.is-goal .kcfx-livepill {
	background: #16a34a;
	color: #ffffff;
}

.kcfx .kcfx-score.is-new {
	color: #16a34a;
	animation: kcfx-goal-pop 0.6s ease-in-out 5;
}

.Night .kcfx .kcfx-score.is-new {
	color: #4ade80;
}

@keyframes kcfx-goal-pop {
	50% {
		transform: scale(1.35);
	}
}

.kcfx-ftpill {
	background: var(--kc-ft-bg);
	color: var(--kc-ft);
	font-weight: 600;
}

.kcfx-half,
.kcfx-pen {
	grid-column: 1 / -1;
	color: var(--kc-muted);
	font-size: 11px;
	line-height: 1.4;
	white-space: nowrap;
}

.kcfx-half:empty {
	display: none;
}

/* القناة والمعلق */
.kcfx-meta {
	grid-area: meta;
	align-self: stretch;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 3px;
	min-width: 0;
	padding-right: 13px;
	border-right: 1px solid var(--kc-row-line);
	font-size: 12px;
	line-height: 1.5;
}

.kcfx-mi {
	display: flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
	color: var(--kc-known);
}

.kcfx-mi svg {
	width: 12px;
	height: 12px;
	opacity: 0.8;
}

.kcfx-mi > span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kcfx-mi.is-unknown {
	color: var(--kc-unknown);
}

/* ---------- طبقة الضغط على الماتش ---------- */

.kcfx-hover {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--kc-overlay);
	-webkit-backdrop-filter: blur(1.5px);
	backdrop-filter: blur(1.5px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease;
}

.kcfx-hbtn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 32px;
	padding: 0 4px 0 13px;
	border-radius: 999px;
	background: #ffffff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
	color: #1d2140;
	font-size: 12.5px;
	font-weight: 700;
	white-space: nowrap;
	transform: translateY(3px);
	transition: transform 0.18s ease;
}

.Night .kcfx-hbtn {
	color: #131727;
}

.kcfx-hbtn i {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--kc-cta-other);
	color: #ffffff;
}

.kcfx-hbtn i svg {
	width: 10px;
	height: 10px;
}

.kcfx-row.is-live .kcfx-hbtn i {
	background: var(--kc-live);
}

.kcfx-hbtn b {
	font-weight: 700;
}

.kcfx-h-live,
.kcfx-row.is-live .kcfx-h-other,
.kcfx-row.is-soon .kcfx-h-other {
	display: none;
}

.kcfx-row.is-live .kcfx-h-live,
.kcfx-row.is-soon .kcfx-h-live {
	display: inline;
}

/* الماتش اللي لسه مجاش وقته أو خلص: من غير رابط ولا شريط ضغط */
.kcfx a.kcfx-row:not([href]) {
	cursor: default;
}

.kcfx a.kcfx-row:not([href]) .kcfx-hover {
	display: none;
}

@media (hover: hover) {
	.kcfx a.kcfx-row[href]:hover .kcfx-hover {
		opacity: 1;
	}

	.kcfx a.kcfx-row[href]:hover .kcfx-hbtn {
		transform: none;
	}
}

.kcfx a.kcfx-row[href]:focus-visible {
	outline: 2px solid var(--kc-acc);
	outline-offset: -2px;
}

.kcfx a.kcfx-row[href]:focus-visible .kcfx-hover {
	opacity: 1;
}

/* ---------- موبايل ---------- */

@media (max-width: 700px) {
	/* نفس الهيدر: العنوان والأزرار فوق، والأيام في شريط بعرض الجدول تحت */
	.kcfx-head {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto auto;
		grid-template-areas:
			"titles live filter"
			"days days days";
		gap: 12px 8px;
		padding: 12px;
	}

	.kcfx-actions {
		display: contents;
	}

	.kcfx-titles {
		grid-area: titles;
		gap: 9px;
	}

	.kcfx-mark {
		width: 34px;
		height: 34px;
	}

	.kcfx .kcfx-title {
		overflow: hidden;
		font-size: 16.5px;
		text-overflow: ellipsis;
	}

	.kcfx .kcfx-live-btn {
		grid-area: live;
		gap: 6px;
		padding: 0 10px;
		font-size: 12.5px;
	}

	.kcfx-filter {
		grid-area: filter;
	}

	.kcfx-days {
		grid-area: days;
		height: 42px;
		min-width: 0;
		border-radius: 11px;
	}

	.kcfx .kcfx-day {
		flex: 1;
		min-width: 0;
		padding: 0 6px 3px;
		border-radius: 8px;
		font-size: 14px;
	}

	.kcfx-body {
		gap: 10px;
		padding: 10px;
	}

	.kcfx-ghead {
		padding: 0 10px 0 2px;
	}

	.kcfx .kcfx-gname {
		font-size: 13px;
	}

	.kcfx .kcfx-row,
	.kcfx--no-meta .kcfx-row {
		grid-template-columns: minmax(0, 1fr) 115px minmax(0, 1fr);
		grid-template-areas:
			"home center away"
			"meta meta meta";
		gap: 8px 6px;
		min-height: 0;
		padding: 12px 10px 10px;
	}

	.kcfx-team {
		flex-direction: column;
		justify-content: center;
		gap: 6px;
		text-align: center;
	}

	.kcfx-logo,
	.kcfx .kcfx-logo img {
		width: 37px;
		height: 37px;
	}

	.kcfx-badge {
		width: 36px;
		height: 36px;
		font-size: 14px;
	}

	.kcfx-home {
		flex-direction: column-reverse;
	}

	.kcfx-tname {
		font-size: 14.25px;
		line-height: 1.35;
		white-space: normal;
		overflow-wrap: anywhere;
	}

	.kcfx-score {
		font-size: 20px;
	}

	.kcfx-row.is-live .kcfx-c-live,
	.kcfx-row.is-ft .kcfx-c-ft {
		column-gap: 7px;
	}

	.kcfx-livepill,
	.kcfx-ftpill {
		gap: 5px;
		height: 22px;
		padding: 0 9px;
		font-size: 11.5px;
	}

	.kcfx-livepill i {
		width: 5px;
		height: 5px;
	}

	.kcfx-half,
	.kcfx-pen {
		font-size: 10.5px;
	}

	.kcfx .kcfx-time {
		font-size: 15px;
	}

	.kcfx-meta {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		gap: 3px 12px;
		padding: 6px 0 0;
		border-right: 0;
		border-top: 1px dashed var(--kc-line);
		font-size: 11.5px;
	}

	.kcfx-hbtn {
		height: 30px;
		font-size: 12px;
	}
}

@media (max-width: 360px) {
	.kcfx .kcfx-row,
	.kcfx--no-meta .kcfx-row {
		grid-template-columns: minmax(0, 1fr) 105px minmax(0, 1fr);
		padding-right: 8px;
		padding-left: 8px;
	}

	.kcfx-row.is-live .kcfx-c-live,
	.kcfx-row.is-ft .kcfx-c-ft {
		column-gap: 5px;
	}

	.kcfx-livepill,
	.kcfx-ftpill {
		padding: 0 8px;
		font-size: 11px;
	}

	.kcfx-tname {
		font-size: 13.5px;
	}

	.kcfx .kcfx-live-btn {
		padding: 0 7px;
	}

	.kcfx .kcfx-day {
		font-size: 13px;
	}

	.kcfx-mark {
		width: 30px;
		height: 30px;
	}

	.kcfx .kcfx-title {
		font-size: 15.5px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kcfx *,
	.kcfx *::before,
	.kcfx *::after {
		animation: none !important;
		transition: none !important;
	}
}
