/* ============================================================
 * بلوكات المباريات — ستايل معزول (بادئة mtch-)
 * يرث خلفية البطاقة من متغيّرات القالب نفسها.
 * ============================================================ */

.mtch-list{display:flex;flex-direction:column;gap:22px;}

.mtch-card{
  display:block;
  background:linear-gradient(180deg,var(--hp-surface,#171A24),var(--hp-bg-2,#12141C));
  border:1px solid var(--hp-border,#242A38);
  border-radius:var(--hp-radius,14px);
  padding:22px 24px;
  text-decoration:none;color:inherit;
  box-shadow:0 1px 0 rgba(255,255,255,.02) inset,0 12px 34px -20px rgba(0,0,0,.75);
  transition:border-color .2s,transform .2s;
}
a.mtch-card:hover{border-color:rgba(244,183,64,.45);transform:translateY(-2px);}

/* بلوك مقفول (المباراة انتهت) — لا يفتح رابطًا */
.mtch-card.mtch-locked{cursor:default;}
a.mtch-card.mtch-locked:hover{border-color:var(--hp-border,#242A38);transform:none;}

/* سطر علوي: البطولة (يمين) + الحالة (يسار) */
.mtch-top{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding-bottom:12px;margin-bottom:16px;
  border-bottom:1px solid var(--hp-border,#242A38);
}
.mtch-league{color:var(--hp-muted,#7C8199);font-size:.9rem;font-weight:600;}
.mtch-status{
  font-size:.78rem;font-weight:700;padding:4px 12px;border-radius:999px;
  white-space:nowrap;border:1px solid transparent;
}
/* ألوان الحالات */
.mtch-status[data-s="notstarted"]{color:#9aa0b4;background:rgba(124,129,153,.12);border-color:rgba(124,129,153,.3);}
.mtch-status[data-s="soon"]{color:#F4B740;background:rgba(244,183,64,.12);border-color:rgba(244,183,64,.4);}
.mtch-status[data-s="live"]{color:#ff5a5a;background:rgba(255,90,90,.14);border-color:rgba(255,90,90,.5);}
.mtch-status[data-s="live"]::before{
  content:"";display:inline-block;width:7px;height:7px;border-radius:50%;
  background:#ff5a5a;margin-inline-end:6px;vertical-align:middle;
  animation:mtch-pulse 1.2s infinite;
}
.mtch-status[data-s="ended"]{color:#7fd18b;background:rgba(127,209,139,.1);border-color:rgba(127,209,139,.35);}
@keyframes mtch-pulse{0%,100%{opacity:1;}50%{opacity:.35;}}

/* الجسم: فريق - وسط - فريق */
.mtch-body{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px;}
.mtch-team{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;min-width:0;}
.mtch-list .mtch-card .mtch-logo,
.mtch-logo{
  width:74px;height:74px;border-radius:50%!important;object-fit:contain;
  background:var(--hp-bg,#0E1016);border:1px solid var(--hp-border,#242A38);padding:6px;
  box-sizing:border-box;max-width:74px;
}
.mtch-logo-ph{
  width:74px;height:74px;border-radius:50%;
  background:var(--hp-bg,#0E1016);border:1px solid var(--hp-border,#242A38);
  display:flex;align-items:center;justify-content:center;color:var(--hp-muted,#7C8199);font-size:1.6rem;
}
.mtch-name{color:var(--hp-heading,#E7E9F2);font-weight:700;font-size:1.05rem;line-height:1.3;}

/* الوسط: التوقيت + (النتيجة عند الانتهاء) */
.mtch-center{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:96px;}
.mtch-time{color:var(--hp-heading,#E7E9F2);font-size:1.5rem;font-weight:800;white-space:nowrap;}
.mtch-score[hidden]{display:none;}
.mtch-score{
  display:inline-flex;align-items:center;gap:8px;
  color:var(--hp-accent,#F4B740);font-size:1.35rem;font-weight:800;
}
.mtch-score .mtch-s{min-width:1ch;text-align:center;}
.mtch-score .mtch-sep{opacity:.7;}

/* البلوك الفارغ (لا يوجد مباريات) */
.mtch-empty{
  display:flex;align-items:center;justify-content:center;text-align:center;
  min-height:300px;
  background:linear-gradient(180deg,var(--hp-surface,#171A24),var(--hp-bg-2,#12141C));
  border:1px solid var(--hp-border,#242A38);border-radius:var(--hp-radius,14px);
  color:var(--hp-muted,#7C8199);font-size:1.15rem;font-weight:600;
}

/* استجابة */
@media (max-width:560px){
  .mtch-card{padding:18px 16px;}
  .mtch-logo,.mtch-logo-ph{width:56px;height:56px;}
  .mtch-name{font-size:.92rem;}
  .mtch-time{font-size:1.25rem;}
  .mtch-center{min-width:72px;}
}

/* ============ ضمان الإخفاء (يتغلب على display الخاص) ============ */
.mtch-card[hidden],
.mtch-empty[hidden],
.mtch-score[hidden]{display:none!important;}

/* ============ صورة بارزة في صفحة المباراة ============ */
.hp-thumb{margin:0 0 18px;}
.hp-thumb img{width:100%;height:auto;border-radius:10px;display:block;}

/* ============ بطاقة معلومات المباراة ============ */
.mtch-info{
  background:linear-gradient(180deg,var(--hp-surface,#171A24),var(--hp-bg-2,#12141C));
  border:1px solid var(--hp-border,#242A38);
  border-radius:var(--hp-radius,14px);
  overflow:hidden;
  box-shadow:0 1px 0 rgba(255,255,255,.02) inset,0 12px 34px -20px rgba(0,0,0,.75);
}
.mtch-info-head{
  padding:14px 22px;
  font-weight:700;color:var(--hp-heading,#E7E9F2);
  background:linear-gradient(180deg,rgba(244,183,64,.12),rgba(244,183,64,.04));
  border-bottom:1px solid var(--hp-border,#242A38);
}
.mtch-info-rows{display:flex;flex-direction:column;}
.mtch-info-row{
  display:flex;align-items:stretch;gap:16px;
  padding:14px 22px;
  border-bottom:1px solid var(--hp-border,#242A38);
}
.mtch-info-row:last-child{border-bottom:0;}
.mtch-info-k{
  flex:0 0 38%;max-width:220px;
  color:var(--hp-muted,#7C8199);font-weight:600;font-size:.92rem;
  align-self:stretch;display:flex;align-items:center;
  border-inline-end:1px solid var(--hp-border,#242A38);
  padding-inline-end:16px;
}
.mtch-info-v{
  flex:1;color:var(--hp-heading,#E7E9F2);font-weight:600;
  display:flex;align-items:center;gap:6px;flex-wrap:wrap;
}
.mtch-info-time{font-variant-numeric:tabular-nums;}
.mtch-info-tz{color:var(--hp-muted,#7C8199);font-weight:500;font-size:.86rem;}
.mtch-info .mtch-info-status{font-size:.8rem;}

@media (max-width:560px){
  .mtch-info-row{padding:12px 16px;gap:10px;}
  .mtch-info-k{flex:0 0 42%;font-size:.85rem;padding-inline-end:12px;}
  .mtch-info-v{font-size:.9rem;}
  .mtch-info-head{padding:12px 16px;}
}
