/* ==========================================================================
   Team Page (oe-team-page)
   BEM: oe-team-page__element--modifier
   No dark mode.
   ========================================================================== */

/* Hero (team info + venue image)
   ========================================================================== */

.oe-team-page__hero {
    display: flex;
    align-items: stretch;
    background: var(--oe-color-white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 20px;
}

.oe-team-page__hero-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    flex: 1;
    min-width: 0;
}

.oe-team-page__logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
}

.oe-team-page__header-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.oe-team-page__name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.oe-team-page__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--oe-color-text-light);
}

.oe-team-page__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.oe-team-page__country-flag {
    width: 18px;
    height: 14px;
    object-fit: contain;
}

.oe-team-page__venue-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}

.oe-team-page__venue-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.oe-team-page__venue-detail {
    font-size: 0.8rem;
    color: var(--oe-color-text-muted);
}

.oe-team-page__venue-image {
    width: 240px;
    min-height: 160px;
    object-fit: cover;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .oe-team-page__hero {
        flex-direction: column;
    }

    .oe-team-page__venue-image {
        width: 100%;
        height: 140px;
        order: -1;
    }
}

/* Season Selector
   ========================================================================== */

.oe-team-page__season-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.oe-team-page__season-selector label {
    font-weight: 600;
    white-space: nowrap;
}

.oe-team-page__season-select {
    padding: 6px 10px;
    border: 1px solid var(--oe-color-border);
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--oe-color-white);
    cursor: pointer;
    max-width: 300px;
}

/* Content Card (wraps tabs + panels)
   ========================================================================== */

.oe-team-page__content-card {
    background: var(--oe-color-white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 25px;
}

/* Section league headings (inside multi-league panels like fixtures/stats) */
.oe-team-page__section-league-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--oe-color-text);
    margin: 0 0 12px;
    padding: 0;
}

.oe-team-page__section-league-name a {
    color: var(--oe-color-primary);
    text-decoration: none;
}

.oe-team-page__section-league-name a:hover {
    text-decoration: underline;
}

.oe-team-page__section-league-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.oe-team-page__section-league-name + .oe-team-page__section-league-name {
    margin-top: 24px;
}

/* Inner Tabs
   ========================================================================== */

.oe-team-page__tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 2px solid var(--oe-color-border);
}

.oe-team-page__tabs::-webkit-scrollbar {
    display: none;
}

.oe-team-page__tab {
    flex: 1;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--oe-color-text-light);
    background: none;
    border: 1px solid transparent;
    border-bottom-width: 2px;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    text-transform: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.oe-team-page__tab:hover,
.oe-team-page__tab:focus,
.oe-team-page__tab:active {
    color: var(--oe-color-primary);
    background: var(--oe-color-primary-tint);
    outline: none;
}

.oe-team-page__tab:focus-visible {
    outline: 2px solid var(--oe-color-primary);
    outline-offset: -2px;
}

.oe-team-page__tab--active,
.oe-team-page__tab--active:hover,
.oe-team-page__tab--active:focus,
.oe-team-page__tab--active:active {
    color: var(--oe-color-primary);
    background: var(--oe-color-primary-tint);
    border-color: var(--oe-color-primary-a15);
    border-bottom-color: var(--oe-color-primary);
    font-weight: 600;
}

.oe-team-page__tab-icon,
.oe-team-page__tab-league-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    vertical-align: -2px;
    margin-right: 4px;
}

.oe-team-page__tab-league-icon {
    object-fit: contain;
}

/* Tab Panels
   ========================================================================== */

.oe-team-page__tab-panel {
    display: none;
    padding: 20px;
}

.oe-team-page__tab-panel--active {
    display: block;
}

/* Standing Card
   ========================================================================== */

.oe-team-page__standing-card {
    background: var(--oe-color-white);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.oe-team-page__standing-position {
    flex-shrink: 0;
    text-align: center;
}

.oe-team-page__standing-pos-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--oe-color-text-muted);
    text-transform: uppercase;
}

.oe-team-page__standing-pos-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--oe-color-bg-alt);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--oe-color-text-dark);
}

.oe-team-page__standing-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    flex: 1;
}

.oe-team-page__standing-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 36px;
}

.oe-team-page__standing-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--oe-color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.oe-team-page__standing-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--oe-color-text-dark);
}

.oe-team-page__standing-stat--points .oe-team-page__standing-stat-value {
    color: var(--oe-color-primary);
    font-size: 1.1rem;
}

/* Form Dots
   ========================================================================== */

.oe-team-page__standing-form {
    display: flex;
    gap: 4px;
}

.oe-team-page__form-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--oe-color-white);
}

.oe-team-page__form-dot--win {
    background: var(--oe-color-primary);
}

.oe-team-page__form-dot--draw {
    background: var(--oe-color-text-muted);
}

.oe-team-page__form-dot--loss {
    background: var(--oe-color-error);
}

/* Betting Stats — All / Home / Away sub-tabs
   ========================================================================== */

.oe-team-page__stats-tabs {
    display: flex;
    border-bottom: 2px solid var(--oe-color-border);
    margin-bottom: 16px;
}

.oe-team-page__stats-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--oe-color-text-light);
    background: none;
    border: 1px solid transparent;
    border-bottom-width: 2px;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
    text-transform: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.oe-team-page__stats-tab:hover,
.oe-team-page__stats-tab:focus,
.oe-team-page__stats-tab:active {
    color: var(--oe-color-primary);
    background: var(--oe-color-primary-tint);
    outline: none;
}

.oe-team-page__stats-tab--active,
.oe-team-page__stats-tab--active:hover,
.oe-team-page__stats-tab--active:focus,
.oe-team-page__stats-tab--active:active {
    color: var(--oe-color-primary);
    background: var(--oe-color-primary-tint);
    border-color: var(--oe-color-primary-a15);
    border-bottom-color: var(--oe-color-primary);
    font-weight: 600;
}

.oe-team-page__stats-content {
    display: none;
}

.oe-team-page__stats-content--active {
    display: block;
}

.oe-team-page__stats-matches-count {
    font-size: 0.8rem;
    color: var(--oe-color-text-light);
    margin: 0 0 12px;
}

.oe-team-page__stat-group {
    padding: 0 0 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--oe-color-border);
}

.oe-team-page__stat-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.oe-team-page__stat-group-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--oe-color-text-dark);
}

.oe-team-page__stat-group-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.oe-team-page__stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.oe-team-page__stat-item-label {
    flex: 0 0 160px;
    font-size: 0.83rem;
    color: var(--oe-color-text-light);
}

.oe-team-page__stat-bar-wrap {
    flex: 1;
    height: 8px;
    background: var(--oe-color-bg-alt);
    border-radius: 4px;
    overflow: hidden;
}

.oe-team-page__stat-bar {
    height: 100%;
    background: var(--oe-color-primary);
    border-radius: 4px;
    min-width: 2px;
    transition: width 0.3s;
}

.oe-team-page__stat-item-value {
    flex: 0 0 60px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Squad
   ========================================================================== */

.oe-team-page__squad-group {
    margin-bottom: 20px;
}

.oe-team-page__squad-position-header {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 8px;
    padding: 8px 12px;
    background: var(--oe-color-bg-alt);
    border-radius: 6px;
    color: var(--oe-color-text-dark);
}

.oe-team-page__squad-table {
    display: flex;
    flex-direction: column;
}

.oe-team-page__squad-header-row {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--oe-color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--oe-color-border);
}

.oe-team-page__squad-player {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--oe-color-border-light);
    transition: background 0.15s;
}

.oe-team-page__squad-player:hover {
    background: var(--oe-color-bg);
}

.oe-team-page__squad-col--jersey { flex: 0 0 40px; text-align: center; }
.oe-team-page__squad-col--player { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.oe-team-page__squad-col--age { flex: 0 0 50px; text-align: center; }
.oe-team-page__squad-col--height { flex: 0 0 70px; text-align: center; }
.oe-team-page__squad-col--weight { flex: 0 0 70px; text-align: center; }

.oe-team-page__squad-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.oe-team-page__squad-photo--placeholder {
    display: inline-block;
    background: var(--oe-color-border);
}

.oe-team-page__squad-name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oe-team-page__squad-captain-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--oe-color-secondary);
    color: var(--oe-color-text-dark);
    font-size: 0.65rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* Fixtures & Results
   ========================================================================== */

.oe-team-page__fixtures-list,
.oe-team-page__results-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.oe-team-page__fixture-row {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    background: var(--oe-color-bg);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.oe-team-page__fixture-row:hover {
    background: var(--oe-color-bg-alt);
}

.oe-team-page__result-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--oe-color-white);
    line-height: 1;
}

.oe-team-page__result-indicator--win { background: var(--oe-color-primary); }
.oe-team-page__result-indicator--draw { background: var(--oe-color-text-muted); }
.oe-team-page__result-indicator--loss { background: var(--oe-color-error); }

.oe-team-page__fixture-date {
    font-size: 0.8rem;
    color: var(--oe-color-text-light);
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.oe-team-page__fixture-time {
    font-size: 0.75rem;
    color: var(--oe-color-text-muted);
}

.oe-team-page__fixture-teams {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    min-width: 0;
}

.oe-team-page__fixture-team {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--oe-color-text-light);
}

.oe-team-page__fixture-team--highlight {
    font-weight: 600;
    color: var(--oe-color-text-dark);
}

.oe-team-page__fixture-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.oe-team-page__fixture-vs {
    color: var(--oe-color-text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.oe-team-page__fixture-score {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--oe-color-text-dark);
    flex-shrink: 0;
    min-width: 40px;
    text-align: center;
}

.oe-team-page__fixture-league-badge {
    flex-shrink: 0;
}

.oe-team-page__fixture-league-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Expert Tips
   ========================================================================== */

.oe-team-page__tips-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.oe-team-page__tips-fixture {
    background: var(--oe-color-white);
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.oe-team-page__tips-fixture-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--oe-color-border);
}

.oe-team-page__tips-match {
    font-weight: 600;
    font-size: 0.9rem;
}

.oe-team-page__tips-date {
    font-size: 0.8rem;
    color: var(--oe-color-text-muted);
}

.oe-team-page__tip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--oe-color-border-light);
}

.oe-team-page__tip:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.oe-team-page__tip-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.oe-team-page__tip-content {
    flex: 1;
    min-width: 0;
}

.oe-team-page__tip-author {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--oe-color-text-dark);
}

.oe-team-page__tip-text {
    display: block;
    font-size: 0.85rem;
    color: var(--oe-color-text-light);
}

.oe-team-page__tip-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.oe-team-page__tip-odds {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--oe-color-primary);
}

.oe-team-page__tip-bookmaker {
    font-size: 0.75rem;
    color: var(--oe-color-text-muted);
}

/* H2H Table
   ========================================================================== */

.oe-team-page__h2h-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--oe-color-border);
}

.oe-team-page__h2h-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 12px;
}

.oe-team-page__h2h-table {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.oe-team-page__h2h-header {
    display: flex;
    padding: 8px 10px;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--oe-color-text-muted);
    text-transform: uppercase;
    border-bottom: 2px solid var(--oe-color-border);
}

.oe-team-page__h2h-row {
    display: flex;
    padding: 8px 10px;
    border-bottom: 1px solid var(--oe-color-border-light);
    align-items: center;
}

.oe-team-page__h2h-row--win { border-left: 3px solid var(--oe-color-primary); }
.oe-team-page__h2h-row--draw { border-left: 3px solid var(--oe-color-text-muted); }
.oe-team-page__h2h-row--loss { border-left: 3px solid var(--oe-color-error); }

.oe-team-page__h2h-col--date { flex: 0 0 90px; }
.oe-team-page__h2h-col--home { flex: 1; text-align: right; padding-right: 8px; }
.oe-team-page__h2h-col--result { flex: 0 0 50px; text-align: center; font-weight: 700; }
.oe-team-page__h2h-col--away { flex: 1; padding-left: 8px; }
.oe-team-page__h2h-col--comp { flex: 0 0 120px; color: var(--oe-color-text-muted); font-size: 0.8rem; }

.oe-team-page__h2h-col--highlight {
    font-weight: 600;
}

/* Editorial
   ========================================================================== */

.oe-team-page__editorial {
    background: var(--oe-color-white);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    line-height: 1.7;
    font-size: 0.95rem;
}

.oe-team-page__editorial p:first-child {
    margin-top: 0;
}

.oe-team-page__editorial p:last-child {
    margin-bottom: 0;
}

/* Directory
   ========================================================================== */

.oe-team-page__directory-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 16px;
}

.oe-team-page__directory-not-found {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #92400e;
}

.oe-team-page__directory-not-found p {
    margin: 0;
}

.oe-team-page__directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.oe-team-page__directory-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--oe-color-white);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, transform 0.15s;
    text-align: center;
}

.oe-team-page__directory-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.oe-team-page__directory-card-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.oe-team-page__directory-card-logo--placeholder {
    display: block;
    background: var(--oe-color-border);
    border-radius: 50%;
}

.oe-team-page__directory-card-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.oe-team-page__directory-card-country {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--oe-color-text-muted);
}

.oe-team-page__directory-card-flag {
    width: 16px;
    height: 12px;
    object-fit: contain;
}

/* Empty State
   ========================================================================== */

.oe-team-page__empty-message {
    color: var(--oe-color-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.oe-team-page__empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--oe-color-text-muted);
}

/* Responsive
   ========================================================================== */

@media (max-width: 640px) {
    .oe-team-page__header {
        flex-direction: column;
        text-align: center;
    }

    .oe-team-page__meta {
        justify-content: center;
    }

    .oe-team-page__venue {
        flex-direction: column;
    }

    .oe-team-page__venue-image {
        width: 100%;
        height: 120px;
    }

    .oe-team-page__standing-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .oe-team-page__standing-stats {
        gap: 10px;
    }

    .oe-team-page__stat-item {
        flex-wrap: wrap;
    }

    .oe-team-page__stat-item-label {
        flex: 0 0 120px;
        font-size: 0.8rem;
    }

    .oe-team-page__fixture-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .oe-team-page__squad-col--height,
    .oe-team-page__squad-col--weight {
        display: none;
    }

    .oe-team-page__h2h-col--comp {
        display: none;
    }

    .oe-team-page__h2h-col--date {
        flex: 0 0 70px;
        font-size: 0.75rem;
    }

    .oe-team-page__directory-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
