/* ============================================
   v2/css/cup-bracket.css
   استایل درخت حذفی (Cup Bracket)
   سایت اخبار استقلال — نسخه ۲
   ============================================ */

/* ─── کانتینر اصلی ─── */
.cup-bracket-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 12px;
}

/* ─── هر دور ─── */
.cup-round {
  background: #fff;
  border-radius: 16px;
  border: 2px solid var(--border, #e8ecf0);
  overflow: hidden;
}

.cup-round-header {
  background: linear-gradient(145deg, var(--primary, #1560bd), #0d4a9b);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cup-round-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.cup-round-count {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: 12px;
}

.cup-round-matches {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─── هر مسابقه ─── */
.cup-match {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-light, #f8fafc);
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}

.cup-match:hover {
  background: #fff;
  border-color: var(--gold, #f5c842);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.cup-match.cup-match-esteghlal {
  background: linear-gradient(90deg, rgba(245, 200, 66, 0.12) 0%, rgba(245, 200, 66, 0.02) 100%);
  border-right: 3px solid var(--gold, #f5c842);
}

/* ─── تیم ─── */
.cup-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.2s;
}

.cup-team-logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--border, #e8ecf0);
  padding: 4px;
  overflow: hidden;
}

.cup-team-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cup-team-logo .no-logo {
  color: #aab8c8;
  font-size: 1.2rem;
}

.cup-team-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary, #1560bd);
  text-align: center;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* تیم برنده */
.cup-team.cup-team-winner {
  background: rgba(34, 197, 94, 0.08);
}

.cup-team.cup-team-winner .cup-team-name {
  color: #15803d;
  font-weight: 800;
}

.cup-team.cup-team-winner .cup-team-logo {
  border-color: #22c55e;
  border-width: 2px;
}

/* تیم بازنده */
.cup-team.cup-team-loser {
  opacity: 0.55;
}

/* استقلال */
.cup-team.is-esteghlal .cup-team-name {
  color: #1560bd;
  font-weight: 800;
}

/* ─── امتیاز وسط ─── */
.cup-match-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  min-width: 70px;
  padding: 4px 8px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border, #e8ecf0);
}

.cup-score-line {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary, #1560bd);
  direction: ltr;
  letter-spacing: 1px;
}

.cup-match-pen {
  font-size: 0.62rem;
  color: #d97706;
  font-weight: 700;
}

.cup-match-status {
  font-size: 0.6rem;
  color: var(--text-muted, #7a8a9a);
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  background: var(--bg, #eef2f6);
  border-radius: 6px;
}

/* ─── سکشن‌های جانبی ─── */
.cup-section {
  margin-bottom: 20px;
}

.cup-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary, #1560bd);
  margin: 0 0 10px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cup-section-title i {
  color: var(--gold, #f5c842);
}

/* ─── ریسپانسیو ─── */
@media (max-width: 380px) {
  .cup-team-logo {
    width: 34px;
    height: 34px;
  }
  .cup-team-name {
    font-size: 0.65rem;
  }
  .cup-score-line {
    font-size: 0.85rem;
  }
  .cup-match-score {
    min-width: 60px;
  }
}

/* ─── تیم‌های اروپایی/عربی طولانی ─── */
.cup-team-name {
  max-width: 110px;
}