/* ============================================
   ============================================
   התאמה לנייד - 900px
   ============================================
   ============================================ */

.logo-container {
    margin-left: 4px;
}

/* הקטנת כרטיסים בנייד 900px */
.card-red-icon,
.card-flash-icon.yellow {
    width: 15px !important;
    height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
}

.card-yellow-count,
.card-red-count {
    font-size: 8px !important;
    padding: 0 2px !important;
    min-width: 11px !important;
    top: -5px !important;
    right: -3px !important;
    line-height: 1.1 !important;
}

.match-cards {
    gap: 2px !important;
    margin-right: 1px !important;
    margin-left: 0.5px !important;
}

/* ============================================
   התאמה לנייד - פרטי משחק
   ============================================ */
.match-detail-header h2 {
    font-size: 20px;
}

.back-link {
    font-size: 12px;
    padding: 8px 16px;
}

.match-detail-league {
    padding: 14px 18px;
    gap: 10px;
}

.league-logo-detail {
    width: 32px;
    height: 32px;
}

.league-name-detail {
    font-size: 14px;
}

.match-detail-teams {
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    padding: 30px 20px;
}

.team-logo-detail {
    width: 70px;
    height: 70px;
}

.team-name-detail {
    font-size: 16px;
    max-width: 150px;
}

.match-score-wrapper {
    margin: 0 15px;
    gap: 10px;
}

.match-score-detail {
    font-size: 48px;
    min-width: 140px;
    padding: 16px 24px;
    letter-spacing: 3px;
}

.elapsed-time-under-score {
    font-size: 15px;
    padding: 5px 12px;
    gap: 6px;
}

.live-dot {
    width: 8px;
    height: 8px;
}

.match-detail-info {
    padding: 18px 20px;
}

.match-detail-info p {
    font-size: 13px;
    margin: 10px 0;
}

.match-detail-info strong {
    min-width: 120px;
}

/* ============================================
   football.php (רשימות) - סינון קומפקטי ללא חפיפות ב-900px
   ============================================ */
body[data-page="football"] .filters-row2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}
body[data-page="football"] .filters-row2 .filters-league {
    min-width: 0;
}
body[data-page="football"] .filters-row2 .league-dd-btn {
    min-width: 0;
    width: 100%;
}
body[data-page="football"] .filters-row2 .league-dd-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body[data-page="football"] .filters-row2 .clear-filters-btn-modern {
    width: auto !important;
    min-width: 70px;
}

/* טיפוגרפיה אחידה לסינון בכדורגל (900px) */
body[data-page="football"] .upcoming-filters-modern {
    --filters-h: 34px;
    --filters-fs: 12px;
    --filters-icon: 13px;
}

/* ============================================
   football.php (רשימות) - איחוד גדלי טקסט + רוחבי עמודות (עד 900px)
   כדי שכל הטאבים ייראו אחיד בנייד (Live/Upcoming/Finished)
   ============================================ */
body[data-page="football"] {
    --bets-th-fs: 10px;
    --bets-td-fs: 11px;
    --bets-live-fs: 9px;
    --bets-date-fs: 9px; /* מחזירים גודל טקסט לקודם – משנים רק רוחבים */
    --bets-status-fs: 9px;
    --bets-odds-fs: 10px;

    --col-star-w: 16px; /* הרבה פחות רחב בעמודת הכוכב (רק 900px) */
    --col-time-w: 48px;
    --col-date-w: 46px; /* קומפקטי יותר בתאריך */
    --col-odds-w: 40px;
    --col-actions-w: 36px;
    --col-status-w: 44px; /* סטטוס קומפקטי כמו הכוכב (לא מסתיר טקסט) */
}

body[data-page="football"] #live-matches-container .bets-table th,
body[data-page="football"] #upcoming-matches-container .bets-table th,
body[data-page="football"] #finished-matches-container .bets-table th {
    font-size: var(--bets-th-fs) !important;
}

body[data-page="football"] #live-matches-container .bets-table td,
body[data-page="football"] #upcoming-matches-container .bets-table td,
body[data-page="football"] #finished-matches-container .bets-table td {
    font-size: var(--bets-td-fs) !important;
}

/* Padding כללי קטן יותר (כ~50% פחות) בכל התאים/כותרות */
body[data-page="football"] #live-matches-container .bets-table th,
body[data-page="football"] #upcoming-matches-container .bets-table th,
body[data-page="football"] #finished-matches-container .bets-table th {
    padding: 5px 6px !important;
}

body[data-page="football"] #live-matches-container .bets-table td,
body[data-page="football"] #upcoming-matches-container .bets-table td,
body[data-page="football"] #finished-matches-container .bets-table td {
    padding: 5px 6px !important;
}

/* LIVE: עמודה 1 (זמן) */
body[data-page="football"] #live-matches-container .bets-table th.live-header,
body[data-page="football"] #live-matches-container .bets-table td.live-cell {
    width: var(--col-time-w) !important;
    min-width: var(--col-time-w) !important;
    max-width: var(--col-time-w) !important;
    font-size: var(--bets-live-fs) !important;
}

/* UPCOMING/FINISHED: עמודה 1 (כוכב) */
body[data-page="football"] #upcoming-matches-container .bets-table th.live-header,
body[data-page="football"] #upcoming-matches-container .bets-table td.live-cell,
body[data-page="football"] #finished-matches-container .bets-table th.live-header,
body[data-page="football"] #finished-matches-container .bets-table td.live-cell {
    width: var(--col-star-w) !important;
    min-width: var(--col-star-w) !important;
    max-width: var(--col-star-w) !important;
    padding: 0 !important; /* חשוב: מבטל padding גדול מ-style.css שגורם לעמודה להישאר רחבה */
    box-sizing: border-box !important;
}

/* FINISHED (900px): כוכב בשורות באותו גודל כמו בכותרת */
body[data-page="football"] #finished-matches-container .bets-table th.live-header svg {
    width: 14px !important;
    height: 14px !important;
}

body[data-page="football"] #finished-matches-container .bets-table td.live-cell {
    padding: 0 !important; /* מינימום רווח בתא */
    text-align: center !important;
}

/* גם בקרובים: תא הכוכב צר וממורכז */
body[data-page="football"] #upcoming-matches-container .bets-table th.live-header,
body[data-page="football"] #upcoming-matches-container .bets-table td.live-cell {
    padding: 0 !important;
    text-align: center !important;
}

/* תאריך (900px): לצמצם רוחב + padding בתא */
body[data-page="football"] #upcoming-matches-container .bets-table th:nth-child(2),
body[data-page="football"] #upcoming-matches-container .bets-table td.date-cell,
body[data-page="football"] #finished-matches-container .bets-table th:nth-child(2),
body[data-page="football"] #finished-matches-container .bets-table td.date-cell {
    padding: 3px 1px !important;
}

/* 1X2: לצמצם padding כדי להתאים לרוחב החדש */
body[data-page="football"] #live-matches-container .bets-table td:nth-child(3),
body[data-page="football"] #live-matches-container .bets-table td:nth-child(4),
body[data-page="football"] #live-matches-container .bets-table td:nth-child(5),
body[data-page="football"] #upcoming-matches-container .bets-table td:nth-child(4),
body[data-page="football"] #upcoming-matches-container .bets-table td:nth-child(5),
body[data-page="football"] #upcoming-matches-container .bets-table td:nth-child(6) {
    padding: 4px 1px !important;
}

/* פעולות: פחות padding */
body[data-page="football"] #live-matches-container .bets-table td.actions-cell,
body[data-page="football"] #upcoming-matches-container .bets-table td.actions-cell,
body[data-page="football"] #finished-matches-container .bets-table td.actions-cell {
    padding: 4px 1px !important;
}

/* FINISHED: סטטוס - רקע אדום בולט כמו הדגשה */
body[data-page="football"] #finished-matches-container .bets-table th:nth-child(4),
body[data-page="football"] #finished-matches-container .bets-table td.status-cell {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.28) 0%, rgba(255, 0, 0, 0.16) 100%) !important;
    border-left: 1px solid rgba(255, 0, 0, 0.35) !important;
    padding: 1px 0 !important; /* צמצום רווח פי 2 */
    overflow: hidden !important;
}

body[data-page="football"] #finished-matches-container .match-status-finished {
    color: rgba(255, 255, 255, 0.92) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.35) !important;
}

body[data-page="football"] #finished-matches-container .bets-table td.live-cell .favorite-btn {
    width: 14px !important;
    height: 14px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body[data-page="football"] #finished-matches-container .bets-table td.live-cell .favorite-btn svg {
    width: 14px !important;
    height: 14px !important;
}

body[data-page="football"] #upcoming-matches-container .bets-table td.live-cell .favorite-btn {
    width: 14px !important;
    height: 14px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body[data-page="football"] #upcoming-matches-container .bets-table td.live-cell .favorite-btn svg {
    width: 14px !important;
    height: 14px !important;
}

/* UPCOMING/FINISHED: תאריך */
body[data-page="football"] #upcoming-matches-container .bets-table th:nth-child(2),
body[data-page="football"] #upcoming-matches-container .bets-table td.date-cell,
body[data-page="football"] #finished-matches-container .bets-table th:nth-child(2),
body[data-page="football"] #finished-matches-container .bets-table td.date-cell {
    width: var(--col-date-w) !important;
    min-width: var(--col-date-w) !important;
    max-width: var(--col-date-w) !important;
    font-size: var(--bets-date-fs) !important;
}

/* UPCOMING: עמודות 1X2 */
body[data-page="football"] #upcoming-matches-container .bets-table th:nth-child(4),
body[data-page="football"] #upcoming-matches-container .bets-table th:nth-child(5),
body[data-page="football"] #upcoming-matches-container .bets-table th:nth-child(6),
body[data-page="football"] #upcoming-matches-container .bets-table td:nth-child(4),
body[data-page="football"] #upcoming-matches-container .bets-table td:nth-child(5),
body[data-page="football"] #upcoming-matches-container .bets-table td:nth-child(6) {
    width: var(--col-odds-w) !important;
    min-width: var(--col-odds-w) !important;
    max-width: var(--col-odds-w) !important;
    font-size: var(--bets-odds-fs) !important;
}

/* LIVE: עמודות 1X2 */
body[data-page="football"] #live-matches-container .bets-table th:nth-child(3),
body[data-page="football"] #live-matches-container .bets-table th:nth-child(4),
body[data-page="football"] #live-matches-container .bets-table th:nth-child(5),
body[data-page="football"] #live-matches-container .bets-table td:nth-child(3),
body[data-page="football"] #live-matches-container .bets-table td:nth-child(4),
body[data-page="football"] #live-matches-container .bets-table td:nth-child(5) {
    width: var(--col-odds-w) !important;
    min-width: var(--col-odds-w) !important;
    max-width: var(--col-odds-w) !important;
    font-size: var(--bets-odds-fs) !important;
}

/* FINISHED: סטטוס */
body[data-page="football"] #finished-matches-container .bets-table th:nth-child(4),
body[data-page="football"] #finished-matches-container .bets-table td.status-cell {
    width: var(--col-status-w) !important;
    min-width: var(--col-status-w) !important;
    max-width: var(--col-status-w) !important;
    font-size: var(--bets-status-fs) !important;
}

body[data-page="football"] #finished-matches-container .match-status-finished {
    font-size: var(--bets-status-fs) !important;
    line-height: 1.2 !important;
    white-space: pre-line !important; /* מאפשר \n לשבור שורה */
    word-break: break-word !important;
}

/* פעולות */
body[data-page="football"] #live-matches-container .bets-table th.actions-header,
body[data-page="football"] #live-matches-container .bets-table td.actions-cell,
body[data-page="football"] #upcoming-matches-container .bets-table th.actions-header,
body[data-page="football"] #upcoming-matches-container .bets-table td.actions-cell,
body[data-page="football"] #finished-matches-container .bets-table th.actions-header,
body[data-page="football"] #finished-matches-container .bets-table td.actions-cell {
    width: var(--col-actions-w) !important;
    min-width: var(--col-actions-w) !important;
    max-width: var(--col-actions-w) !important;
}

/* ============================================
   football.php (רשימות) - Upcoming/Finished כמו Live בניידים גדולים (עד 900px)
   שתי שורות אנכיות + יישור זהה לשתי הקבוצות (RTL)
   ============================================ */
#upcoming-matches-container .bets-table td:nth-child(3) .match-teams,
#finished-matches-container .bets-table td:nth-child(3) .match-teams {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    align-items: stretch !important;
    width: 100% !important;
    padding: 4px 0 !important;
}

#upcoming-matches-container .bets-table td:nth-child(3) .match-teams .match-info,
#finished-matches-container .bets-table td:nth-child(3) .match-teams .match-info {
    display: none !important; /* מסתיר VS/תוצאה מרכזית */
}

#upcoming-matches-container .bets-table td:nth-child(3) .match-teams .team-name,
#finished-matches-container .bets-table td:nth-child(3) .match-teams .team-name {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    direction: rtl !important;
    text-align: right !important;
    flex-wrap: nowrap !important;
    position: relative !important;
    padding: 2px 4px 2px 36px !important; /* מקום קבוע לתוצאה משמאל */
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

#upcoming-matches-container .bets-table td:nth-child(3) .match-teams .team-name:first-of-type,
#upcoming-matches-container .bets-table td:nth-child(3) .match-teams .team-name:last-of-type,
#finished-matches-container .bets-table td:nth-child(3) .match-teams .team-name:first-of-type,
#finished-matches-container .bets-table td:nth-child(3) .match-teams .team-name:last-of-type {
    flex-direction: row !important; /* מנטרל row-reverse גלובלי */
    justify-content: flex-start !important;
    direction: rtl !important;
    text-align: right !important;
    padding: 2px 4px 2px 36px !important; /* אותה התחלה לשתי שורות */
}

#upcoming-matches-container .bets-table td:nth-child(3) .match-teams .team-name .team-logo,
#finished-matches-container .bets-table td:nth-child(3) .match-teams .team-name .team-logo {
    order: 0 !important; /* לוגו תמיד ראשון */
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

#upcoming-matches-container .bets-table td:nth-child(3) .match-teams .team-name .match-score-inline,
#finished-matches-container .bets-table td:nth-child(3) .match-teams .team-name .match-score-inline {
    display: inline-flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    position: absolute !important;
    left: 4px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    min-width: 32px !important;
    width: 32px !important;
    font-weight: 700 !important;
    font-size: 10px !important;
    color: var(--text-white) !important;
    text-align: left !important;
    direction: ltr !important;
}

/* ============================================
   FINAL (900px): ביטול כפל/דריסות – קומפקט קבוע לכל הטבלאות
   ============================================ */
body[data-page="football"] #live-matches-container .bets-table,
body[data-page="football"] #upcoming-matches-container .bets-table,
body[data-page="football"] #finished-matches-container .bets-table {
    table-layout: fixed !important;
}

body[data-page="football"] #live-matches-container .bets-table th,
body[data-page="football"] #upcoming-matches-container .bets-table th,
body[data-page="football"] #finished-matches-container .bets-table th,
body[data-page="football"] #live-matches-container .bets-table td,
body[data-page="football"] #upcoming-matches-container .bets-table td,
body[data-page="football"] #finished-matches-container .bets-table td {
    padding: 4px 4px !important; /* ~50% פחות מהדיפולט, ועוד קצת */
    line-height: 1.1 !important;
    box-sizing: border-box !important;
}

/* כוכב: עמודה דקה באמת */
body[data-page="football"] #upcoming-matches-container .bets-table th.live-header,
body[data-page="football"] #upcoming-matches-container .bets-table td.live-cell,
body[data-page="football"] #finished-matches-container .bets-table th.live-header,
body[data-page="football"] #finished-matches-container .bets-table td.live-cell {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    padding: 6px 0 !important; /* פי 2 מההגדלה הקודמת */
    text-align: center !important;
}

/* תאריך: קומפקט */
body[data-page="football"] #upcoming-matches-container .bets-table th:nth-child(2),
body[data-page="football"] #upcoming-matches-container .bets-table td.date-cell,
body[data-page="football"] #finished-matches-container .bets-table th:nth-child(2),
body[data-page="football"] #finished-matches-container .bets-table td.date-cell {
    width: var(--col-date-w) !important;
    min-width: var(--col-date-w) !important;
    max-width: var(--col-date-w) !important;
    padding: 3px 1px !important;
}

/* 1X2 + פעולות קומפקט */
body[data-page="football"] #live-matches-container .bets-table td:nth-child(3),
body[data-page="football"] #live-matches-container .bets-table td:nth-child(4),
body[data-page="football"] #live-matches-container .bets-table td:nth-child(5),
body[data-page="football"] #upcoming-matches-container .bets-table td:nth-child(4),
body[data-page="football"] #upcoming-matches-container .bets-table td:nth-child(5),
body[data-page="football"] #upcoming-matches-container .bets-table td:nth-child(6) {
    padding: 3px 1px !important;
}

body[data-page="football"] #live-matches-container .bets-table td.actions-cell,
body[data-page="football"] #upcoming-matches-container .bets-table td.actions-cell,
body[data-page="football"] #finished-matches-container .bets-table td.actions-cell {
    padding: 3px 1px !important;
}

/* FINISHED: סטטוס קומפקט (הרקע האדום נשאר מהבלוק הקודם) */
body[data-page="football"] #finished-matches-container .bets-table td.status-cell {
    padding: 0 !important; /* התחלה מ-0 */
    overflow: hidden !important;
}

/* FINAL (900px): סטטוס קומפקטי (לא מסתיר טקסט) */
body[data-page="football"] #finished-matches-container .bets-table th:nth-child(4),
body[data-page="football"] #finished-matches-container .bets-table td.status-cell {
    width: var(--col-status-w) !important;
    min-width: var(--col-status-w) !important;
    max-width: var(--col-status-w) !important;
    padding: 1px 0 !important; /* צמצום רווח פי 2 */
    overflow: hidden !important;
}

body[data-page="football"] #finished-matches-container .match-status-finished {
    max-width: 100% !important;
    overflow: visible !important;
}

/* UPCOMING/FINISHED: קומפקט פנימי של שורת הקבוצות */
body[data-page="football"] #upcoming-matches-container .bets-table td:nth-child(3) .match-teams,
body[data-page="football"] #finished-matches-container .bets-table td:nth-child(3) .match-teams {
    padding: 2px 0 !important;
    gap: 3px !important;
}

body[data-page="football"] #upcoming-matches-container .bets-table td:nth-child(3) .match-teams .team-name,
body[data-page="football"] #finished-matches-container .bets-table td:nth-child(3) .match-teams .team-name {
    padding: 1px 3px 1px 30px !important; /* פחות padding פנימי */
    gap: 5px !important;
}

body[data-page="football"] #upcoming-matches-container .bets-table td:nth-child(3) .match-teams .team-name .match-score-inline,
body[data-page="football"] #finished-matches-container .bets-table td:nth-child(3) .match-teams .team-name .match-score-inline {
    left: 2px !important;
    min-width: 28px !important;
    width: 28px !important;
}