﻿.est-root {
    padding: 0;
}

/* ── EMPTY ── */
.est-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
    opacity: 0.55;
}

.est-empty-icon {
    font-size: 3rem !important;
    margin-bottom: 16px;
    opacity: 0.4;
}

.est-empty-title {
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}

.est-empty-sub {
    font-size: 0.84rem;
}

/* ── TOP BAR ── */
.est-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(52,211,153,0.25);
}

.est-stage-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.est-stage-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #34d399;
    flex-shrink: 0;
}

.est-stage-title {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.est-stage-sub {
    font-size: 0.70rem;
    color: var(--mud-palette-text-secondary);
}

.est-filter {
    flex-shrink: 0;
}

/* ── GROUP CARD ── */
.est-group-card {
    border-radius: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.est-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px 0 0;
    background: linear-gradient(135deg,rgba(52,211,153,0.18) 0%,rgba(52,211,153,0.06) 100%);
    border-bottom: 2px solid rgba(52,211,153,0.25);
    min-height: 52px;
}

.est-group-band {
    width: 5px;
    align-self: stretch;
    background: #34d399;
    flex-shrink: 0;
}

.est-group-badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #0f766e;
    color: #fff;
    font-size: 0.80rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.est-group-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.est-group-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

.est-group-sub {
    font-size: 0.62rem;
    color: var(--mud-palette-text-secondary);
}

.est-group-status {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.est-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.est-dot-planned {
    background: #94a3b8;
}

.est-dot-running {
    background: #34d399;
    box-shadow: 0 0 6px rgba(52,211,153,0.6);
}

.est-dot-completed {
    background: #34d399;
}

.est-status-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-transform: capitalize;
}

/* ── STANDINGS TABLE ── */
.est-table-wrap {
    overflow-x: auto;
}

.est-table {
    width: 100%;
    border-collapse: collapse;
}

.est-thead th {
    padding: 7px 8px;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    background: var(--mud-palette-background-grey);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    text-align: center;
    white-space: nowrap;
}

.est-th-player {
    text-align: left !important;
    padding-left: 12px !important;
}

.est-th-seed {
    width: 24px;
}

.est-th-rank {
    width: 32px;
}

.est-th-stat {
    min-width: 44px;
}

/* Pts (Match Points) — hero column */
.est-th-pts {
    min-width: 40px;
    color: var(--mud-palette-primary) !important;
    font-weight: 700 !important;
}

.est-td-pts {
    background: rgba(var(--mud-palette-primary-rgb), 0.04);
}

.est-pts-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--mud-palette-primary);
    letter-spacing: 0.02em;
}

.est-th-history {
    min-width: 64px;
}

.est-th-status {
    min-width: 52px;
}

.est-row {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    transition: background .12s;
}

    .est-row:last-child {
        border-bottom: none;
    }

    .est-row:hover {
        background: var(--mud-palette-action-hover);
    }

.est-row-voided {
    opacity: 0.42;
}

.est-row-qualified {
    background: rgba(52,211,153,0.03);
}

.est-row td {
    padding: 8px;
    vertical-align: middle;
    text-align: center;
    font-size: 0.72rem;
    color: var(--mud-palette-text-primary);
    font-variant-numeric: tabular-nums;
}

/* Rank */
.est-td-rank {
    text-align: center;
    width: 32px;
}

.est-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.64rem;
    font-weight: 800;
    position: relative;
}

.est-rank-1 {
    background: rgba(251,191,36,0.16);
    color: #f59e0b;
    border: 1px solid rgba(251,191,36,0.35);
}

.est-rank-2 {
    background: rgba(148,163,184,0.13);
    color: #94a3b8;
    border: 1px solid rgba(148,163,184,0.28);
}

.est-rank-3 {
    background: rgba(180,100,60,0.13);
    color: #cd7f4a;
    border: 1px solid rgba(180,100,60,0.25);
}

.est-rank-other {
    background: transparent;
    color: var(--mud-palette-text-disabled);
    border: 1px solid transparent;
    font-size: 0.66rem;
}

.est-tb-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7c8eff;
    border: 1.5px solid var(--mud-palette-surface);
}

/* Player cell — left aligned, uses same pattern as grp-mem-row */
.est-td-player {
    text-align: left !important;
    padding-left: 12px !important;
}

.est-td-seed {
    width: 24px;
    text-align: center;
    padding: 0 4px !important;
    vertical-align: middle;
}

.est-player {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.est-avatars {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.est-player-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.est-player-name-row {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.est-player-name {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    min-width: 0;
}

.est-seed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: rgba(124,142,255,0.18);
    border: 1px solid rgba(124,142,255,0.35);
    color: #7c8eff;
    font-size: 0.55rem;
    font-weight: 800;
    flex-shrink: 0;
    line-height: 1;
}

/* Stats */
.est-td-stat {
    text-align: center;
}

.est-wl {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 0.72rem;
    font-weight: 600;
}

.est-w {
    color: #059669;
    font-weight: 700;
}

.est-l {
    color: #dc2626;
    font-weight: 600;
}

.est-sep {
    color: var(--mud-palette-text-disabled);
}

.est-pos {
    color: #059669;
    font-weight: 700;
}

.est-neg {
    color: #dc2626;
    font-weight: 600;
}

.est-neutral {
    color: var(--mud-palette-text-secondary);
}

/* History */
.est-td-history {
    text-align: center;
}

.est-history {
    display: flex;
    gap: 3px;
    align-items: center;
    justify-content: center;
}

.est-hist {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    font-size: 0.56rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.est-hist-w {
    background: rgba(52,211,153,0.18);
    color: #34d399;
    border: 1px solid rgba(52,211,153,0.35);
}

.est-hist-l {
    background: rgba(248,113,113,0.15);
    color: #f87171;
    border: 1px solid rgba(248,113,113,0.28);
}

.est-hist-d {
    background: rgba(148,163,184,0.12);
    color: #94a3b8;
    border: 1px solid rgba(148,163,184,0.25);
}

/* Qual badge */
.est-td-status {
    text-align: center;
}

.est-qual {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.est-qual-direct {
    background: rgba(52,211,153,0.12);
    color: #34d399;
    border: 1px solid rgba(52,211,153,0.28);
}

.est-qual-br {
    background: rgba(124,142,255,0.12);
    color: #7c8eff;
    border: 1px solid rgba(124,142,255,0.28);
}

.est-qual-wo {
    background: rgba(248,113,113,0.10);
    color: #f87171;
    border: 1px solid rgba(248,113,113,0.22);
}

.est-qual-ret {
    background: rgba(251,146,60,0.10);
    color: #fb923c;
    border: 1px solid rgba(251,146,60,0.22);
}

.est-qual-dsq {
    background: rgba(168,85,247,0.10);
    color: #a855f7;
    border: 1px solid rgba(168,85,247,0.22);
}

/* Loading / empty */
.est-loading {
    padding: 16px 12px;
    text-align: center;
}

.est-no-data {
    padding: 20px 12px;
    text-align: center;
    font-size: 0.70rem;
    color: var(--mud-palette-text-disabled);
    font-style: italic;
}

/* ── MATCH PROGRESS ── */
.est-match-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    margin-right: 8px;
    flex-shrink: 0;
}

.est-match-frac {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--mud-palette-text-secondary);
    font-variant-numeric: tabular-nums;
}

    .est-match-frac.est-match-done {
        color: #34d399;
    }

.est-match-label {
    font-size: 0.52rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mud-palette-text-disabled);
}

/* ── H2H SECTION ── */
.est-h2h-section {
    border-top: 1px solid var(--mud-palette-lines-default);
    padding: 12px 14px 14px;
    background: rgba(128,128,128,0.02);
}

.est-h2h-label {
    font-size: 0.60rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 10px;
}

.est-h2h-wrap {
    overflow-x: auto;
}

.est-h2h-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.70rem;
    border: 1px solid var(--mud-palette-lines-default);
}

.est-h2h-th-name {
    text-align: left;
    padding: 5px 8px;
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    border: 1px solid var(--mud-palette-lines-default);
}

.est-h2h-th-col {
    text-align: center;
    padding: 5px 6px;
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--mud-palette-text-secondary);
    border: 1px solid var(--mud-palette-lines-default);
    min-width: 60px;
}

.est-h2h-row {
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

    .est-h2h-row:last-child {
        border-bottom: 1px solid var(--mud-palette-lines-default);
    }

    .est-h2h-row:hover td {
        background: rgba(128,128,128,0.04);
    }

.est-h2h-td-name {
    padding: 7px 8px;
    white-space: nowrap;
    text-align: left;
    border: 1px solid var(--mud-palette-lines-default);
    vertical-align: middle;
}

.est-h2h-td-name-inner {
    display: flex;
    align-items: center;
    gap: 6px;
}

.est-h2h-idx {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--mud-palette-text-disabled);
    min-width: 12px;
    text-align: center;
    flex-shrink: 0;
    align-self: center;
}

.est-h2h-name {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--mud-palette-text-primary);
}

.est-h2h-td {
    text-align: center;
    padding: 5px 4px;
    vertical-align: middle;
    border: 1px solid var(--mud-palette-lines-default);
}

.est-h2h-self {
    background: rgba(128,128,128,0.07);
}

.est-h2h-win {
    background: rgba(52,211,153,0.07);
}

.est-h2h-loss {
    background: rgba(248,113,113,0.05);
}

.est-h2h-result {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    font-size: 0.60rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.est-h2h-win .est-h2h-result {
    background: rgba(52,211,153,0.18);
    color: #34d399;
    border: 1px solid rgba(52,211,153,0.35);
}

.est-h2h-loss .est-h2h-result {
    background: rgba(248,113,113,0.15);
    color: #f87171;
    border: 1px solid rgba(248,113,113,0.28);
}

.est-h2h-score {
    display: block;
    font-size: 0.54rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.2;
    white-space: nowrap;
}

.est-h2h-pending {
    color: var(--mud-palette-text-disabled);
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width:600px) {
    .est-hide-sm {
        display: none;
    }

    .est-player-name {
        max-width: 90px;
    }

    .est-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .est-filter {
        width: 100%;
    }
}

.est-cycle-band {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    margin: 6px 0 -4px;
    background: rgba(128,128,128,0.07);
    border-left: 3px solid var(--mud-palette-primary);
    border-radius: 0 8px 8px 0;
}

.est-cycle-title {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--mud-palette-text-primary);
}


@media (max-width:860px) {
    .est-hide-md {
        display: none;
    }
}

/* Sc column (PointsWon-PointsLost) */
.est-sc-val {
    font-size: 0.70rem;
    color: var(--mud-palette-text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

/* H2H pair second name */
.est-h2h-pair2 {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--mud-palette-text-primary);
    margin-top: 1px;
    display: block;
}
