/* ==========================================================================
   لوحة المباريات — تصميم قائمة المباريات الجانبية
   ==========================================================================

   يُحمَّل بعد team-matches.css ويعيد بناء صف المباراة ورأس البطولة واللوحة.

   قاعدتان تحكمان هذا الملف:

   1) كل الألوان والمقاسات تأتي من متغيرات معرّفة على #match_list_conf.
      الوضع الفاتح يعيد تعريف المتغيرات فقط، ولا يكرّر أي قاعدة تخطيط.

   2) الصف شبكة ثابتة الأعمدة: [الفريق] [المركز] [الفريق]، والمركز بعرض
      وارتفاع ثابتين مهما كانت حالة المباراة. أي عنصر إضافي (ركلات ترجيح،
      أيقونة بث، وقت إضافي، شارة حالة) يوضع في خلية خاصة به أو خارج مجرى
      الشبكة، فلا يحرّك ما حوله. هذا ما يجعل كل الصفوف تتراصف عمودياً بدقة
      ويجعل إضافة حالة جديدة لاحقاً لا تُخلّ بالتصميم.

   المعرفات وأسماء الأصناف المشتقة من JS (percent، number، data-minutes،
   extratime، stopped، stopped_ex، live-match…) مستعملة كما هي؛
   انظر public/app-js/today_matches.js و public/js/script.js.
   ========================================================================== */

/* المتغيرات معرّفة على html لأن عمود المحتوى الملاصق يستعملها أيضاً،
   وهو ليس داخل #match_list_conf. */
html {
    /* أسطح */
    --mb-panel-bg: #151825;
    --mb-panel-border: #1e2235;
    --mb-row-bg: #191d2d;
    --mb-row-bg-hover: #1d2233;
    --mb-row-line: rgba(255, 255, 255, 0.05);
    --mb-center-bg: #12151f;
    --mb-center-line: #252a3d;

    /* نصوص */
    --mb-text: #d8dbe8;
    --mb-text-strong: #ffffff;
    --mb-text-muted: #8b90a5;
    --mb-text-dim: #707488;

    /* دلالات */
    --mb-accent: #39dbbf;
    --mb-live: #fc4d4d;
    --mb-pause: #ffc420;
    --mb-track: rgba(255, 255, 255, 0.1);
    --mb-loser: rgba(255, 255, 255, 0.38);

    /* مقاسات */
    --mb-row-h: 68px;
    --mb-center-w: 76px;
    --mb-ring: 42px;
    --mb-ring-w: 3.5px;
    --mb-logo: 26px;
    --mb-radius: 12px;
    --mb-gutter: 12px;
}

html.light {
    --mb-panel-bg: #ffffff;
    --mb-panel-border: #e6eaf3;
    --mb-row-bg: #ffffff;
    --mb-row-bg-hover: #f5f7fc;
    --mb-row-line: #eef1f8;
    --mb-center-bg: #f4f6fb;
    --mb-center-line: #e4e8f2;

    --mb-text: #2a3142;
    --mb-text-strong: #131521;
    --mb-text-muted: #6f7488;
    --mb-text-dim: #8b90a5;

    --mb-accent: #12a58c;
    --mb-live: #e33b3b;
    --mb-pause: #c78a00;
    --mb-track: rgba(19, 21, 33, 0.1);
    --mb-loser: rgba(19, 21, 33, 0.42);
}

/* --------------------------------------------------------------------------
   اللوحة والتمرير
   -------------------------------------------------------------------------- */

.championships-section #match_list_conf.home-matches-panel {
    background: transparent;
    padding: 0;
}

#match_list_conf > .championship-wrap.important-matches {
    background: var(--mb-panel-bg);
    border: 1px solid var(--mb-panel-border);
    border-radius: 16px;
    padding: 6px;
    box-shadow: none;
}

#match_list_conf > .championship-wrap.important-matches > .section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 10px 10px 12px;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--mb-row-line);
}

#match_list_conf > .championship-wrap.important-matches > .section-title h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--mb-text-strong);
    line-height: 1.3;
}

#match_list_conf > .championship-wrap.important-matches > .section-title .section-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

#match_list_conf .scrollable-matches {
    padding: 6px 4px 4px;
    scrollbar-width: thin;
}

/* --------------------------------------------------------------------------
   مجموعة بطولة
   -------------------------------------------------------------------------- */

#match_list_conf .matches-wrapper {
    background: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0 0 10px;
    box-shadow: none;
}

#match_list_conf .matches-wrapper:last-child {
    margin-bottom: 0;
}

#match_list_conf .matches-wrapper > .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 36px;
    margin: 0 0 4px;
    padding: 0 10px;
    background: none;
    border: 0;
    border-radius: 0;
}

#match_list_conf .matches-wrapper > .header .champ-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--mb-text-muted);
    text-decoration: none;
}

#match_list_conf .matches-wrapper > .header .champ-title .img {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    padding: 0;
    border-radius: 0;
}

#match_list_conf .matches-wrapper > .header .champ-title .img img,
#match_list_conf .matches-wrapper > .header .champ-title .img svg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#match_list_conf .matches-wrapper > .header .champ-title b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mb-text-muted);
    transition: color 0.15s ease;
}

#match_list_conf .matches-wrapper > .header .champ-title:hover b {
    color: var(--mb-accent);
}

#match_list_conf .matches-wrapper > .header .matches-top-title {
    margin: 0;
    padding: 0;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--mb-text-muted);
    text-align: start;
    background: none;
    border: 0;
}

#match_list_conf .matches-wrapper > .header .champ-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

#match_list_conf .matches-wrapper > .header .champ-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

#match_list_conf .matches-wrapper > .header .champ-links a {
    font-size: 11px;
    font-weight: 600;
    color: var(--mb-text-dim);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

#match_list_conf .matches-wrapper > .header .champ-links a:hover {
    color: var(--mb-accent);
}

#match_list_conf .champ-settings-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    color: var(--mb-text-dim);
    transition: background-color 0.15s ease, color 0.15s ease;
}

#match_list_conf .champ-settings-toggle:hover {
    background: var(--mb-row-bg-hover);
    color: var(--mb-text);
}

/* --------------------------------------------------------------------------
   صف المباراة — الشبكة المشتركة بين كل الحالات
   -------------------------------------------------------------------------- */

#match_list_conf .mb-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--mb-center-w) minmax(0, 1fr);
    grid-auto-rows: min-content;
    align-content: center;
    align-items: center;
    column-gap: var(--mb-gutter);
    row-gap: 0;
    width: 100%;
    min-height: var(--mb-row-h);
    margin: 0 0 4px;
    /* فراغ الحافة الأمامية محفوظ لأيقونة البث/التشكيلة حتى تتراصف
       الصفوف التي تحملها مع التي لا تحملها. */
    padding: 8px 12px 8px 40px;
    background: var(--mb-row-bg);
    border: 1px solid transparent;
    border-radius: var(--mb-radius);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

html[dir="ltr"] #match_list_conf .mb-row {
    padding: 8px 40px 8px 12px;
}

#match_list_conf .mb-row:last-child {
    margin-bottom: 0;
}

#match_list_conf .mb-row:hover {
    background: var(--mb-row-bg-hover);
    border-color: var(--mb-panel-border);
}

/* لا إطار ملوّن ولا تدرّج ولا ارتفاع مختلف للمباريات الجارية: الحالة
   يقولها المؤقت داخل الدائرة، لا حدود الصف. */
#match_list_conf .mb-row.active-match,
#match_list_conf .mb-row.active-match.live-match,
#match_list_conf .mb-row.active-match.stopped-match {
    min-height: var(--mb-row-h);
    padding: 8px 12px 8px 40px;
    background: var(--mb-row-bg);
    border-color: transparent;
    box-shadow: none;
}

html[dir="ltr"] #match_list_conf .mb-row.active-match,
html[dir="ltr"] #match_list_conf .mb-row.active-match.live-match,
html[dir="ltr"] #match_list_conf .mb-row.active-match.stopped-match {
    padding: 8px 40px 8px 12px;
}

#match_list_conf .mb-row.active-match:hover,
#match_list_conf .mb-row.active-match.live-match:hover,
#match_list_conf .mb-row.active-match.stopped-match:hover {
    background: var(--mb-row-bg-hover);
    border-color: var(--mb-panel-border);
}

/* --------------------------------------------------------------------------
   خليتا الفريقين
   -------------------------------------------------------------------------- */

#match_list_conf .mb-row .first-team,
#match_list_conf .mb-row .second-team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 0;
}

#match_list_conf .mb-row .first-team {
    grid-column: 1;
    justify-content: flex-end;
}

#match_list_conf .mb-row .second-team {
    grid-column: 3;
    justify-content: flex-start;
}

#match_list_conf .mb-row .team---item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 0;
}

#match_list_conf .mb-row .first-team .team---item {
    justify-content: flex-end;
}

#match_list_conf .mb-row .second-team .team---item {
    justify-content: flex-start;
}

#match_list_conf .mb-row .team---item b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--mb-text);
    transition: color 0.15s ease;
}

#match_list_conf .mb-row:hover .team---item b {
    color: var(--mb-text-strong);
}

#match_list_conf .mb-row .team---item .img {
    flex: 0 0 var(--mb-logo);
    width: var(--mb-logo);
    height: var(--mb-logo);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
}

#match_list_conf .mb-row .team---item .img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* نتيجة المباريات الجارية: بعرض ثابت بجانب المركز حتى لا يتزحزح
   اسم الفريق عند تغيّر عدد الأهداف. */
#match_list_conf .mb-row .team-result {
    flex: 0 0 18px;
    width: 18px;
    margin: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    color: var(--mb-text-strong);
    background: none;
    border: 0;
}

#match_list_conf .mb-row .team-result.loser {
    color: var(--mb-loser);
}

/* --------------------------------------------------------------------------
   المركز — المباريات المجدولة والمنتهية والمؤجلة
   -------------------------------------------------------------------------- */

#match_list_conf .mb-row .result-wrap {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 42px;
    min-height: 42px;
    margin: 0 !important;
    padding: 0 6px;
    background: var(--mb-center-bg);
    border: 1px solid var(--mb-center-line);
    border-radius: 10px;
}

#match_list_conf .mb-row .result-wrap .match-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--mb-text-strong);
    font-variant-numeric: tabular-nums;
}

#match_list_conf .mb-row .result-wrap .match-date i {
    margin: 0;
    font-style: normal;
    font-weight: 400;
    color: var(--mb-text-dim);
}

#match_list_conf .mb-row .result-wrap .first-team-result,
#match_list_conf .mb-row .result-wrap .second-team-result {
    min-width: 12px;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    color: var(--mb-text-strong);
}

#match_list_conf .mb-row .result-wrap .first-team-result.winner,
#match_list_conf .mb-row .result-wrap .second-team-result.winner {
    color: var(--mb-accent);
}

#match_list_conf .mb-row .result-wrap .first-team-result.loser,
#match_list_conf .mb-row .result-wrap .second-team-result.loser {
    color: var(--mb-loser);
}

#match_list_conf .mb-row .result-wrap .result-status-text {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    display: block;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 8.5px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: var(--mb-text-dim);
    background: none;
    border: 0;
}

#match_list_conf .mb-row .result-wrap .result-status-text.match-status-cancelled {
    color: var(--mb-live);
}

/* --------------------------------------------------------------------------
   المركز — دائرة الوقت للمباريات الجارية والمتوقفة

   نفس الشكل المستخدم في رأس صفحة المباراة: قوس مرسوم بـ conic-gradient
   ونص الوقت في مركزه. الـ SVG القديم يبقى في الترميز لأن JS يحدّثه،
   لكنه مخفي بصرياً.
   -------------------------------------------------------------------------- */

#match_list_conf .mb-row .active-match-progress {
    grid-column: 2;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--mb-ring);
    min-height: var(--mb-ring);
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
}

#match_list_conf .mb-row .match-inner-progress-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--mb-ring);
    height: var(--mb-ring);
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
}

#match_list_conf .mb-row .match-inner-progress-wrap::before,
#match_list_conf .mb-row .match-inner-progress-wrap::after {
    content: none;
}

#match_list_conf .mb-row .match-inner-progress-wrap svg {
    display: none !important;
}

#match_list_conf .mb-row .match-inner-progress-wrap .percent {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--mb-ring);
    height: var(--mb-ring);
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 50%;
}

#match_list_conf .mb-row .match-inner-progress-wrap .percent::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
        var(--mb-ring-color, var(--mb-accent)) 0,
        var(--mb-ring-color, var(--mb-accent)) calc(var(--num, 0) * 1%),
        var(--mb-track) calc(var(--num, 0) * 1%),
        var(--mb-track) 100%);
    -webkit-mask: radial-gradient(circle,
        transparent calc(var(--mb-ring) / 2 - var(--mb-ring-w)),
        #000 calc(var(--mb-ring) / 2 - var(--mb-ring-w) + 0.5px));
    mask: radial-gradient(circle,
        transparent calc(var(--mb-ring) / 2 - var(--mb-ring-w)),
        #000 calc(var(--mb-ring) / 2 - var(--mb-ring-w) + 0.5px));
}

#match_list_conf .mb-row .match-inner-progress-wrap .number {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    color: var(--mb-ring-color, var(--mb-accent));
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* المباراة الجارية: قوس فيروزي ونبضة خفيفة على الرقم وحده. */
#match_list_conf .mb-row.live-match .match-inner-progress-wrap {
    --mb-ring-color: var(--mb-accent);
}

#match_list_conf .mb-row.live-match .match-inner-progress-wrap .number {
    animation: mbLivePulse 2s ease-in-out infinite;
}

/* الاستراحة ونهايات الأشواط وركلات الترجيح: قوس أصفر بلا نبض. */
#match_list_conf .mb-row .match-inner-progress-wrap.stopped,
#match_list_conf .mb-row .match-inner-progress-wrap.stopped_ex {
    --mb-ring-color: var(--mb-pause);
}

#match_list_conf .mb-row .match-inner-progress-wrap.stopped .number,
#match_list_conf .mb-row .match-inner-progress-wrap.stopped_ex .number {
    animation: none;
}

@keyframes mbLivePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
    #match_list_conf .mb-row .match-inner-progress-wrap .number {
        animation: none !important;
    }
}

/*
   نصوص الحالة حول الدائرة: خارج مجرى الشبكة تماماً، فلا تُزحزح الدائرة
   ولا تغيّر ارتفاع الصف عند ظهورها أو اختفائها.
*/
#match_list_conf .mb-row .active-match-progress > .result-status-text,
#match_list_conf .mb-row .match-inner-progress-wrap > .result-status-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(var(--mb-center-w) + 18px);
    margin: 0;
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 8.5px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    background: none;
    border: 0;
}

#match_list_conf .mb-row .active-match-progress > .result-status-text {
    top: -11px;
    color: var(--mb-text-dim);
}

#match_list_conf .mb-row .match-inner-progress-wrap > .result-status-text {
    bottom: -11px;
    color: var(--mb-pause);
}

#match_list_conf .mb-row .match-inner-progress-wrap > .result-status-text[hidden] {
    display: none;
}

/* الوقت بدل الضائع */
#match_list_conf .mb-row .extra-time {
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    margin: 0;
    padding: 0;
    font-size: 8.5px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--mb-live);
    background: none;
    font-variant-numeric: tabular-nums;
}

#match_list_conf .mb-row .extra-time .extra-count {
    font-style: normal;
    font-weight: 800;
}

#match_list_conf .mb-row .extra-time[hidden] {
    display: none;
}

/* --------------------------------------------------------------------------
   ركلات الترجيح — صف كامل أسفل الشبكة
   -------------------------------------------------------------------------- */

#match_list_conf .mb-row .penalties-wrapper {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 8px 0 0;
    padding: 7px 0 0;
    background: none;
    border: 0;
    border-top: 1px solid var(--mb-row-line);
}

#match_list_conf .mb-row .penalties-shots {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1 1 0;
    min-width: 0;
    flex-wrap: wrap;
}

#match_list_conf .mb-row .first-team-shots {
    justify-content: flex-end;
}

#match_list_conf .mb-row .second-team-shots {
    justify-content: flex-start;
}

#match_list_conf .mb-row .penalties-shots .p-shot-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    margin: 0;
    padding: 0;
    color: var(--mb-text-dim);
    opacity: 0.45;
}

#match_list_conf .mb-row .penalties-shots .p-shot-item svg {
    width: 100%;
    height: 100%;
}

#match_list_conf .mb-row .penalties-shots .p-shot-item.success {
    color: var(--mb-accent);
    opacity: 1;
}

#match_list_conf .mb-row .penalties-shots .p-shot-item.failed {
    color: var(--mb-live);
    opacity: 1;
}

#match_list_conf .mb-row .penalties-wrapper .result-wrap {
    grid-column: auto;
    flex: 0 0 var(--mb-center-w);
    width: var(--mb-center-w);
    height: auto;
    min-height: 0;
    padding: 0;
    background: none;
    border: 0;
}

#match_list_conf .mb-row .penalties-wrapper .result-wrap .match-date {
    font-size: 12px;
}

#match_list_conf .mb-row .penalties-wrapper .result-wrap .result-status-text {
    color: var(--mb-text-dim);
}

/* --------------------------------------------------------------------------
   أيقونات الصف (بث مباشر / تشكيلة / فيديو)
   -------------------------------------------------------------------------- */

#match_list_conf .mb-row .active-match-quick-links {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    z-index: 2;
}

html[dir="ltr"] #match_list_conf .mb-row .active-match-quick-links {
    left: auto;
    right: 10px;
}

#match_list_conf .mb-row .active-match-quick-links object {
    display: inline-flex;
    width: auto;
    height: auto;
}

#match_list_conf .mb-row .active-match-quick-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 6px;
    color: var(--mb-text-dim);
    transition: color 0.15s ease, background-color 0.15s ease;
}

#match_list_conf .mb-row .active-match-quick-link svg {
    width: 15px;
    height: 15px;
}

#match_list_conf .mb-row .active-match-quick-link:hover {
    background: var(--mb-center-bg);
    color: var(--mb-text);
}

#match_list_conf .mb-row .active-match-quick-link.match-live-tab-link {
    color: var(--mb-live);
}

#match_list_conf .mb-row .active-match-quick-link.match-live-tab-link svg path {
    fill: currentColor;
}

#match_list_conf .mb-row .active-match-quick-link.match-live-tab-link:hover {
    background: color-mix(in srgb, var(--mb-live) 14%, transparent);
    color: var(--mb-live);
}

#match_list_conf .mb-row .active-match-quick-link.lineup {
    color: var(--mb-text-muted);
}

#match_list_conf .mb-row .active-match-quick-link.videos {
    color: var(--mb-accent);
}

/* --------------------------------------------------------------------------
   لا مباريات
   -------------------------------------------------------------------------- */

#match_list_conf .no-matches-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 44px 16px;
    background: none;
    border: 0;
    color: var(--mb-text-dim);
}

#match_list_conf .no-matches-wrapper svg {
    width: 44px;
    height: 44px;
    opacity: 0.5;
}

#match_list_conf .no-matches-wrapper p {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--mb-text-dim);
    text-align: center;
}

/* --------------------------------------------------------------------------
   لوحة البطولات المخفية
   -------------------------------------------------------------------------- */

#match_list_conf > .championship-wrap.hidden-champs {
    margin-top: 10px;
    padding: 6px;
    background: var(--mb-panel-bg);
    border: 1px solid var(--mb-panel-border);
    border-radius: 16px;
}

#match_list_conf > .championship-wrap.hidden-champs > .section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 8px 10px 10px;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--mb-row-line);
}

#match_list_conf > .championship-wrap.hidden-champs > .section-title h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: var(--mb-text-muted);
}

#match_list_conf > .championship-wrap.hidden-champs .matches-wrapper > .header {
    min-height: 40px;
    margin: 4px 0 0;
    padding: 0 10px;
    border-radius: 10px;
    background: var(--mb-row-bg);
}

#match_list_conf > .championship-wrap.hidden-champs .remove-hidden {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: var(--mb-live);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   عمود المحتوى الملاصق (الصفحة الرئيسية، الشاشات الكبيرة)

   قائمة المباريات تطول كثيراً، وكان النقر على مباراة قريبة من أسفل القائمة
   يقذف الصفحة إلى الأعلى ليُظهر لوحة التفاصيل. بجعل عمود المحتوى ملاصقاً
   تبقى اللوحة أمام المستخدم دائماً، فتتبدّل التفاصيل في مكانها بلا أي حركة
   للصفحة — وأُلغي معها التمرير القسري في match_detail.js.

   العمود يمرّر داخلياً حين يطول محتواه؛ والنوافذ المنبثقة في الموقع
   position: fixed فلا يقصّها هذا التمرير.
   -------------------------------------------------------------------------- */

@media (min-width: 992px) {
    .championships-section .main-row {
        align-items: flex-start;
    }

    .championships-section .main-row > .col-lg-7.home-content-panel {
        position: sticky;
        top: 12px;
        align-self: flex-start;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }

    .championships-section .main-row > .col-lg-7.home-content-panel::-webkit-scrollbar {
        width: 6px;
    }

    .championships-section .main-row > .col-lg-7.home-content-panel::-webkit-scrollbar-thumb {
        background: var(--mb-center-line, rgba(127, 127, 127, 0.35));
        border-radius: 3px;
    }

    .championships-section .main-row > .col-lg-7.home-content-panel::-webkit-scrollbar-track {
        background: transparent;
    }
}

/* --------------------------------------------------------------------------
   الجوال واللوحات المتوسطة
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
    #match_list_conf {
        --mb-row-h: 64px;
        --mb-center-w: 72px;
        --mb-ring: 40px;
        --mb-logo: 24px;
        --mb-gutter: 8px;
    }

    .championships-section #match_list_conf.home-matches-panel {
        padding: 0;
    }

    #match_list_conf > .championship-wrap.important-matches {
        border-radius: 14px;
        padding: 4px;
    }

    #match_list_conf .scrollable-matches {
        max-height: initial;
        padding: 4px 2px;
    }
}

@media (max-width: 575px) {
    #match_list_conf {
        --mb-row-h: 62px;
        --mb-center-w: 66px;
        --mb-ring: 38px;
        --mb-ring-w: 3px;
        --mb-logo: 22px;
        --mb-gutter: 6px;
        --mb-radius: 11px;
    }

    #match_list_conf > .championship-wrap.important-matches {
        border: 0;
        border-radius: 12px;
        padding: 2px;
        background: transparent;
    }

    #match_list_conf > .championship-wrap.important-matches > .section-title {
        padding: 8px 6px 10px;
    }

    #match_list_conf .matches-wrapper > .header {
        padding: 0 6px;
        min-height: 32px;
    }

    /* روابط البطولة (هدافون/ترتيب/أخبار) تُزاحم الاسم على الشاشة الضيقة؛
       الوصول إليها متاح من صفحة البطولة نفسها. */
    #match_list_conf .matches-wrapper > .header .champ-links {
        display: none;
    }

    #match_list_conf .mb-row {
        padding: 8px 10px 8px 34px;
    }

    html[dir="ltr"] #match_list_conf .mb-row {
        padding: 8px 34px 8px 10px;
    }

    #match_list_conf .mb-row.active-match,
    #match_list_conf .mb-row.active-match.live-match,
    #match_list_conf .mb-row.active-match.stopped-match {
        padding: 8px 10px 8px 34px;
    }

    html[dir="ltr"] #match_list_conf .mb-row.active-match,
    html[dir="ltr"] #match_list_conf .mb-row.active-match.live-match,
    html[dir="ltr"] #match_list_conf .mb-row.active-match.stopped-match {
        padding: 8px 34px 8px 10px;
    }

    #match_list_conf .mb-row .team---item b {
        font-size: 11.5px;
    }

    #match_list_conf .mb-row .active-match-quick-links {
        left: 7px;
    }

    html[dir="ltr"] #match_list_conf .mb-row .active-match-quick-links {
        left: auto;
        right: 7px;
    }

    #match_list_conf .mb-row .active-match-quick-link {
        width: 20px;
        height: 20px;
    }

    #match_list_conf .mb-row .penalties-shots .p-shot-item {
        width: 11px;
        height: 11px;
    }
}
