/* DaylyAz Sports Tables — minimalistic */

.ds-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.07);
}

.ds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
    line-height: 1.4;
    background: #111827;
    color: #d1d5db;
}

.ds-table thead tr {
    background: #1f2937;
    border-bottom: 2px solid #8b5cf6;
}

.ds-table thead th {
    padding: 10px 8px;
    font-weight: 600;
    font-size: .75rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #9ca3af;
    text-align: center;
    white-space: nowrap;
}

.ds-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,.05);
    transition: background .15s;
}

.ds-table tbody tr:hover {
    background: #1f2937;
}

.ds-table tbody td {
    padding: 9px 8px;
    text-align: center;
    white-space: nowrap;
}

/* alignment helpers */
.ds-left  { text-align: left !important; }
.ds-right { text-align: right !important; }

/* pos column */
.ds-pos {
    color: #6b7280;
    font-size: .8rem;
    width: 28px;
}

/* top 3 highlight */
.ds-standings tbody tr:nth-child(1) .ds-pts,
.ds-standings tbody tr:nth-child(2) .ds-pts,
.ds-standings tbody tr:nth-child(3) .ds-pts {
    color: #8b5cf6;
    font-weight: 700;
}

/* points */
.ds-pts {
    font-weight: 700;
    color: #f9fafb;
}

/* team cell */
.ds-team {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 500;
    color: #f9fafb;
}

/* team badge */
.ds-badge {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

/* score */
.ds-score {
    font-weight: 700;
    color: #f9fafb;
    letter-spacing: .05em;
    min-width: 60px;
}

/* vs */
.ds-vs {
    color: #4b5563;
    font-size: .75rem;
}

/* date / time */
.ds-date { color: #6b7280; font-size: .8rem; }
.ds-time { color: #8b5cf6; font-size: .82rem; font-weight: 600; }

/* scorers */
.ds-player { font-weight: 600; color: #f9fafb; }
.ds-goals  { font-weight: 700; color: #8b5cf6; }

/* squad position badges */
.ds-pos-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
}
.ds-pos-gk  { background: #1d4ed8; color: #fff; }
.ds-pos-def { background: #065f46; color: #fff; }
.ds-pos-mf  { background: #92400e; color: #fff; }
.ds-pos-hüc { background: #7f1d1d; color: #fff; }

.ds-nat { color: #9ca3af; font-size: .8rem; }

/* no data */
.ds-no-data {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: .85rem;
}

/* ── Tabs ── */
.ds-tabs {
    margin: 20px 0;
}

.ds-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid #1f2937;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ds-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 9px 14px;
    font-size: .8rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: color .15s, border-color .15s, background .15s;
    white-space: nowrap;
}

.ds-tab-btn:hover {
    color: #d1d5db;
    background: #1f2937;
}

.ds-tab-btn.ds-tab-active {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
    background: #1a1030;
}

.ds-tab-panel {
    border: 1px solid rgba(255,255,255,.07);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.ds-tab-panel.hidden {
    display: none;
}

.ds-tab-panel .ds-table-wrap {
    margin: 0;
    border: none;
    border-radius: 0 0 8px 8px;
}

/* ── Responsive ── */

/* Tab nav: scroll horizontally on mobile if too many tabs */
.ds-tab-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.ds-tab-nav::-webkit-scrollbar { height: 4px; }
.ds-tab-nav::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 2px; }

/* Tablet — hide less critical columns */
@media (max-width: 768px) {
    /* Standings: hide GF, GA, GD columns (cols 6,7) */
    .ds-standings th:nth-child(6),
    .ds-standings td:nth-child(6),
    .ds-standings th:nth-child(7),
    .ds-standings td:nth-child(7) {
        display: none;
    }

    /* Squad: hide nationality column */
    .ds-squad th:nth-child(3),
    .ds-squad td:nth-child(3) {
        display: none;
    }

    /* Fixtures: hide last column (liqa/competition badge) */
    .ds-fixtures th:last-child,
    .ds-fixtures td:last-child {
        display: none;
    }

    /* Results: hide last column (liqa/competition) */
    .ds-results th:last-child,
    .ds-results td:last-child {
        display: none;
    }

    /* Scorers: hide nationality */
    .ds-scorers th:nth-child(3),
    .ds-scorers td:nth-child(3) {
        display: none;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .ds-table-wrap { margin: 12px 0; }
    .ds-table { font-size: .78rem; }
    .ds-table thead th,
    .ds-table tbody td { padding: 7px 4px; }
    .ds-badge { width: 16px; height: 16px; }

    .ds-tab-btn { padding: 7px 10px; font-size: .75rem; }
    .ds-tab-nav { gap: 2px; }

    /* truncate team names to prevent overflow */
    .ds-team, .ds-left {
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Standings: also hide P (played) and points column moves */
    .ds-standings th:nth-child(7),
    .ds-standings td:nth-child(7),
    .ds-standings th:nth-child(8),
    .ds-standings td:nth-child(8) {
        display: none;
    }

    /* Fixtures: also hide Vaxt (time) column to save space */
    .ds-fixtures .ds-time {
        font-size: .7rem;
        font-weight: 500;
    }

    /* Score min-width smaller */
    .ds-score { min-width: 44px; font-size: .82rem; }

    /* Position badges smaller */
    .ds-pos-badge { font-size: .65rem; padding: 1px 4px; }
}

/* Extra small screens — phones in portrait */
@media (max-width: 400px) {
    .ds-table { font-size: .72rem; }
    .ds-table thead th { font-size: .65rem; padding: 6px 3px; }
    .ds-table tbody td { padding: 6px 3px; }
    .ds-team, .ds-left { max-width: 85px; }
    .ds-badge { width: 14px; height: 14px; }
    .ds-tab-btn { padding: 6px 8px; font-size: .7rem; }

    /* Hide time column on fixtures completely */
    .ds-fixtures .ds-time { display: none; }
    .ds-fixtures th:nth-last-child(2),
    .ds-fixtures td:nth-last-child(2) { display: none; }
}
