/* [یادداشت]: این فایل را در پوشه public/css/ خود کپی کنید. */

/* استایل‌های جدول مرحله گروهی */
.league-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 30px;
    background-color: var(--panel-bg);
    border: 1px solid var(--sub-color);
    border-radius: 8px;
    overflow: hidden;
    table-layout: fixed;
}

.league-table th {
    padding: 10px 5px;
    text-align: center;
    border-bottom: 1px solid var(--sub-color);
    color: var(--text-color);
    font-family: var(--font-persian);
    font-weight: 500;
    font-size: 0.85rem;
    vertical-align: middle;
}

.league-table td {
    padding: 10px 5px;
    text-align: center;
    border-bottom: 1px solid var(--sub-color);
    font-family: var(--font-english);
    color: var(--text-color);
    vertical-align: middle;
    word-wrap: break-word;
}

/* ستون نام تیم/بازیکن */
.league-table td:first-child {
    text-align: right;
    font-weight: 500;
    color: var(--text-color);
    font-family: var(--font-english);
    white-space: normal; 
    overflow: visible;
    text-overflow: clip;
}

.league-table td:last-child {
    font-weight: 700;
    color: var(--main-color);
}

.league-table tbody tr:last-child td {
    border-bottom: none;
}

/* هایلایت رتبه‌های برتر */
.league-table tbody tr:nth-child(1) td:first-child,
.league-table tbody tr:nth-child(2) td:first-child {
    color: var(--main-color);
    position: relative;
    padding-right: 12px !important; 
}

.league-table tbody tr:nth-child(1) td:first-child::before,
.league-table tbody tr:nth-child(2) td:first-child::before {
    content: '';
    position: absolute;
    right: 2px; 
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 70%;
    background-color: var(--main-color);
    border-radius: 2px;
}

/* --- استایل لیست بازی‌ها (Match List) --- */
.league-match-list {
    list-style: none;
    padding: 0;
}

.league-match-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--panel-bg); 
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid var(--sub-color);
    gap: 8px;
}

/* کلاس‌های اصلاح شده */
.league-match-team {
    font-family: var(--font-english);
    font-size: 1rem;
    color: var(--text-color);
    flex: 1;
    min-width: 0;
    white-space: normal; 
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.league-match-team:last-of-type {
    text-align: left;
}

.league-match-score {
    font-family: var(--font-english);
    font-size: 1.1rem;
    color: var(--main-color);
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0 8px;
    font-weight: bold;
}

.league-match-status {
    font-family: var(--font-persian);
    font-size: 0.85rem;
    color: var(--text-color); 
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- مدیا کوئری موبایل (اصلاحات اصلی) --- */
@media (max-width: 768px) {
    /* کوچک کردن پدینگ‌ها */
    .league-match-item {
        padding: 8px 4px; 
    }
    
    /* فونت کوچک برای تیم‌ها در گروهی */
    .league-match-team {
        font-size: 0.8rem; 
    }
    
    /* فونت کوچک برای اسم‌ها در حذفی */
    .player-link {
        font-size: 0.8rem !important; /* اجبار به کوچک شدن */
        line-height: 1.1 !important;  /* فاصله خطوط کم */
    }

    /* تنظیم آیکون جام در موبایل */
    .bi-trophy-fill {
        font-size: 0.8rem;
    }

    /* فونت امتیازها */
    .league-match-score {
        font-size: 0.9rem;
        padding: 0 2px;
    }

    /* فشرده‌سازی جدول لیگ */
    .league-table th, .league-table td {
        padding: 6px 2px;
        font-size: 0.7rem;
    }
    
    /* فاصله باکس‌های حذفی */
    .list-group-item {
        padding: 10px 5px !important;
    }
}