/* ==========================================================================
   Nitro Simracing - Tournament Fixture
   ========================================================================== */

.tfx-shell {
    position: relative;
    display: grid;
    gap: 18px;
    padding: 22px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 0% 0%, rgba(209, 17, 8, 0.18), transparent 28%),
        radial-gradient(circle at 100% 100%, rgba(30, 76, 168, 0.22), transparent 28%),
        linear-gradient(155deg, rgba(8, 13, 24, 0.96), rgba(10, 16, 28, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        0 24px 56px rgba(0, 0, 0, 0.42);
    color: #e8eef9;
}

.tfx-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 28%);
}

.tfx-header {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
}

.tfx-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    width: fit-content;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(209, 17, 8, 0.28);
    background: rgba(209, 17, 8, 0.12);
    color: #ffb7b2;
    font: 800 0.78rem/1 var(--sn-font-sans, system-ui);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tfx-title {
    margin: 0;
    color: #f7fbff;
    font: 800 clamp(1.65rem, 2.55vw, 2.3rem)/0.96 "Akshar", var(--sn-font-sans, system-ui);
    text-transform: uppercase;
}

.tfx-subtitle {
    max-width: 760px;
    margin: 0;
    color: rgba(221, 231, 247, 0.72);
    font: 500 1rem/1.45 var(--sn-font-sans, system-ui);
}

.torneo-fixture-scroll {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
}

.torneo-fixture-inner {
    display: grid;
    align-items: start;
    gap: 16px;
    min-width: 0;
}

.tfx-phase-tabs {
    margin-bottom: 2px;
}

.tfx-division-tabs {
    margin-bottom: 2px;
}

.tfx-phase-tabs .tfx-phase-arrow {
    opacity: 0.75;
    font-size: 0.8em;
}

.tfx-division-tabs .tfx-phase-arrow {
    opacity: 0.65;
    font-size: 0.76em;
}

.tfx-phase-panel {
    min-width: 0;
}

.tfx-division-panel {
    min-width: 0;
}

.torneo-fixture-loading {
    min-width: 320px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.014)),
        linear-gradient(155deg, rgba(11, 17, 30, 0.98), rgba(15, 22, 38, 0.98));
    color: rgba(221, 231, 247, 0.8);
    text-align: center;
    font: 700 0.95rem/1.2 var(--sn-font-sans, system-ui);
}

.tfx-phase {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
        linear-gradient(160deg, rgba(10, 16, 29, 0.96), rgba(8, 14, 26, 0.98));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.tfx-phase-title {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0 2px;
}

.tfx-phase-title > span {
    color: #f6fbff;
    font: 800 1.08rem/1.02 "Akshar", var(--sn-font-sans, system-ui);
    text-transform: uppercase;
}

.tfx-phase-range {
    color: rgba(174, 189, 214, 0.78);
    font: 700 0.8rem/1.2 var(--sn-font-sans, system-ui);
}

.tfx-division {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.024), rgba(255,255,255,0.01)),
        linear-gradient(160deg, rgba(13, 20, 36, 0.96), rgba(8, 14, 26, 0.98));
}

.tfx-division-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tfx-division-title {
    margin: 0;
    color: #f7fbff;
    font: 800 1rem/1 "Akshar", var(--sn-font-sans, system-ui);
    text-transform: uppercase;
}

.tfx-division-date-inline {
    flex: 0 0 auto;
    color: rgba(174, 189, 214, 0.84);
    font: 700 0.78rem/1.1 var(--sn-font-sans, system-ui);
    text-align: right;
}

.tfx-entrants {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.018);
}

.tfx-entrants-title {
    color: rgba(174, 189, 214, 0.78);
    font: 800 0.74rem/1 var(--sn-font-sans, system-ui);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tfx-entrants-grid {
    display: grid;
    gap: 8px;
}

.tfx-entrant {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 11px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.022);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.tfx-entrant-square {
    width: 10px;
    height: 10px;
    margin-top: 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #27c46a, #11984c);
    box-shadow: 0 0 0 3px rgba(39, 196, 106, 0.14);
}

.tfx-entrant-text {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.tfx-entrant-name,
.tfx-flow .tfx-piloto {
    min-width: 0;
}

.tfx-entrant .tfx-pilot-stack {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tfx-entrant .tfx-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}

.tfx-entrant .tfx-pilot-copy {
    gap: 5px;
}

.tfx-entrant-from {
    color: rgba(174, 189, 214, 0.72);
    font: 700 0.78rem/1.2 var(--sn-font-sans, system-ui);
}

.tfx-flow {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.024), rgba(255,255,255,0.01)),
        rgba(9, 15, 27, 0.72);
}

.tfx-flow-top {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    min-width: 0;
}

.tfx-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffd95c;
    font: 900 0.88rem/1 var(--sn-font-sans, system-ui);
}

.tfx-sep {
    color: rgba(174, 189, 214, 0.32);
    font-weight: 700;
    padding-top: 7px;
}

.tfx-flow .tfx-pilot-stack {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tfx-flow .tfx-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: cover;
    display: block;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}

.tfx-pilot-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.tfx-pilot-copy .sn-pilot-meta-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
}

.tfx-pilot-copy .sn-pilot-link,
.tfx-pilot-copy .sn-pilot-label {
    max-width: 100%;
}

.tfx-pilot-copy .sn-pilot-link span,
.tfx-pilot-copy .sn-pilot-label span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tfx-team {
    display: flex;
    min-width: 0;
    max-width: 100%;
}

.tfx-team .sn-team-identity-badge {
    max-width: 100%;
}

.tfx-flow-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 2px;
    color: rgba(174, 189, 214, 0.84);
    font: 700 0.8rem/1.25 var(--sn-font-sans, system-ui);
}

.tfx-flow-date {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tfx-arrow {
    color: #ff5344;
    font-size: 0.92rem;
}

.tfx-dest {
    color: #dce6f8;
}

.tfx-entrants.tfx-empty {
    color: rgba(174, 189, 214, 0.72);
    font-style: normal;
    text-align: center;
}

@media (max-width: 760px) {
    .tfx-shell {
        gap: 14px;
        padding: 14px;
        border-radius: 20px;
    }

    .tfx-header {
        gap: 6px;
    }

    .tfx-eyebrow {
        min-height: 28px;
        padding: 0 11px;
        font-size: 0.7rem;
    }

    .tfx-title {
        font-size: 1.34rem;
    }

    .tfx-subtitle {
        font-size: 0.84rem;
        line-height: 1.4;
    }

    .tfx-phase {
        padding: 14px;
        border-radius: 20px;
    }

    .tfx-division {
        padding: 12px;
        border-radius: 18px;
    }

    .tfx-division-head {
        display: grid;
        gap: 6px;
    }

    .tfx-division-date-inline {
        text-align: left;
    }

    .tfx-flow-top {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .tfx-sep {
        display: none;
    }

    .tfx-flow .tfx-pilot-stack {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .tfx-flow .tfx-avatar {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .tfx-entrant .tfx-pilot-stack {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .tfx-entrant .tfx-avatar {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }
}

@media (max-width: 640px) {
    .tfx-division {
        min-width: 0;
    }

    .tfx-flow-top,
    .tfx-flow-match,
    .tfx-flow-entry,
    .tfx-entrant,
    .tfx-pilot-copy .sn-pilot-meta-main {
        min-width: 0;
    }

    .tfx-pilot-copy .sn-pilot-link span,
    .tfx-pilot-copy .sn-pilot-label span {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.2;
    }

    .tfx-flow-meta {
        gap: 6px;
        font-size: 0.74rem;
    }
}
