/* ── Design v4: Teams list (colours from tb-design.css, dark/light) ── */
.tb-teams-page {
    padding: 0 16px calc(96px + env(safe-area-inset-bottom));
    color: var(--tb-text);
}
.tb-teams-head { margin-bottom: 20px; }

/* Filters: search full width, Country + Competition side by side (mobile); one row on desktop */
.tb-teams-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 8px;
    margin-bottom: 12px;
}
.tb-teams-filter-search { grid-column: 1 / -1; }
.tb-teams-hint {
    margin: 0 0 16px;
    color: var(--tb-muted);
    font-size: 13px;
    line-height: 18px;
}

/* Table: Team | Market value | Salary/mo — fits the phone width, no horizontal scroll needed */
.tb-teams-table .tb-col-team { width: 46%; }
.tb-teams-table .tb-col-value,
.tb-teams-table .tb-col-salary { width: 27%; white-space: nowrap; }
.tb-teams-table thead th { white-space: normal; }
.tb-teams-table tbody td { height: 72px; }
.tb-team-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.tb-team-logo {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}
.tb-team-logo img { max-width: 36px; max-height: 36px; object-fit: contain; }
.tb-team-logo img.is-flag { border-radius: 3px; object-fit: cover; }
.tb-team-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px;
    line-height: 20px;
    font-weight: 500;
}
.tb-teams-table tbody tr:hover { --tb-row-bg: var(--tb-surface-alt); }

/* Pagination in the design colours */
.tb-teams-list .pagination-container { margin-top: 16px; }
.tb-teams-list .pagination-container .btn {
    min-width: 36px;
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    border-radius: 8px;
    color: var(--tb-text);
}
.tb-teams-list .pagination-container .btn:hover { border-color: var(--tb-muted); }
.tb-teams-list .pagination-container .btn.btn-primary {
    background: var(--tb-green);
    border-color: var(--tb-green);
    color: var(--tb-on-green);
}
.tb-teams-list .pagination-container .btn:disabled,
.tb-teams-list .pagination-container .btn.disabled { opacity: .4; }
.tb-teams-list #per-page-select {
    width: auto;
    background-color: var(--tb-surface);
    border-color: var(--tb-border);
    border-radius: 8px;
    color: var(--tb-text);
}
@media (max-width: 767.98px) {
    .tb-teams-list .pagination-container {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .tb-teams-list .pagination-container .pagination-wrapper {
        flex-wrap: nowrap !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 991.98px) {
    /* Mobile: content starts 16px under the fixed navbar (height measured in base.htm) */
    .tb-teams-page { padding-top: calc(var(--site-navbar-h, 72px) + 16px); }
}

@media (min-width: 992px) {
    .tb-teams-page { padding: 0 24px 120px; }
    .tb-teams-head { margin-bottom: 24px; text-align: center; }
    .tb-teams-filters {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
        gap: 16px;
        margin-bottom: 20px;
    }
    .tb-teams-filter-search { grid-column: auto; }
    .tb-teams-filters .tb-search input,
    .tb-teams-filters .tb-select2-field .select2-container--default .select2-selection--single { height: 52px; }
    .tb-teams-filters .tb-select2-field .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 50px; }
    .tb-teams-filters .tb-select2-field .select2-container--default .select2-selection--single .select2-selection__arrow { height: 50px; }
    .tb-teams-table .tb-col-team { width: 50%; }
    .tb-teams-table .tb-col-value,
    .tb-teams-table .tb-col-salary { width: 25%; }
}
@media (min-width: 1400px) {
    .tb-teams-page > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
}
