/* DTTF_V2 modular stylesheet: tournament.css */

   TOURNAMENT REGISTRATION / CHECK-IN
   Append to assets/css/dttf.css
   ========================================================= */

.tournament-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1rem;
}

.tournament-actions .button {
    margin: 0;
}

.tournament-state {
    cursor: default;
    pointer-events: none;
    background: var(--dttf-green-soft);
    border-color: var(--dttf-green);
    color: var(--dttf-green-dark);
}

.tournament-state.is-complete {
    font-weight: 700;
}

.tournament-action-message {
    flex-basis: 100%;
    min-height: 1.2em;
    font-size: 0.82rem;
}

.tournament-action-message:empty {
    min-height: 0;
}

.tournament-action-message.is-success {
    color: var(--dttf-green-dark);
}

.tournament-action-message.is-error {
    color: var(--dttf-danger);
}

.tournament-actions button.is-loading {
    opacity: 0.7;
    cursor: wait;
}

.game-card-actions {
    margin-top: 0.9rem;
}

.next-tournament-actions {
    margin-top: 1rem;
}

@media (max-width: 699px) {
    .tournament-actions .button {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* =========================================================
   TOURNAMENT DETAIL
   ========================================================= */

.tournament-detail-page {
    display: grid;
    gap: 1rem;
}

.tournament-detail-card h1 {
    margin: 0.25rem 0 0.35rem;
}

.tournament-detail-datetime {
    font-weight: 700;
    color: var(--dttf-text);
}

.tournament-detail-description {
    margin: 0.8rem 0 0;
}

.tournament-detail-notice {
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--dttf-radius-sm);
    background: #fff1f1;
    color: var(--dttf-danger);
    font-weight: 700;
}

.tournament-roster-count {
    color: var(--dttf-text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.tournament-roster {
    overflow-x: auto;
}

.tournament-roster-row {
    display: grid;
    grid-template-columns: minmax(130px, 1.4fr) minmax(125px, 1fr) minmax(125px, 1fr);
    gap: 0.75rem;
    align-items: center;
    min-width: 440px;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--dttf-border);
}

.tournament-roster-row:last-child {
    border-bottom: 0;
}

.tournament-roster-header {
    padding-top: 0;
    color: var(--dttf-text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tournament-roster-player {
    font-weight: 800;
}

.roster-time {
    display: block;
    color: var(--dttf-text-muted);
    font-size: 0.82rem;
}

@media (min-width: 700px) {
    .roster-time {
        display: inline;
        margin-left: 0.25rem;
    }
}

/* Tournament venue address / directions */
.tournament-detail-location {
    margin-top: 0.65rem;
}

.tournament-detail-address {
    font-weight: 600;
    color: var(--dttf-text);
}

.tournament-directions-link {
    display: inline-block;
    margin-top: 0.25rem;
    font-weight: 800;
    color: var(--dttf-green-dark);
    text-decoration: none;
}

.tournament-directions-link:hover,
.tournament-directions-link:focus-visible {
    text-decoration: underline;
}

/* =========================================================
   TOURNAMENT ACTION STATUS BUTTONS
   ========================================================= */

.tournament-view-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    text-decoration: none;
}

.tournament-view-button.is-registered {
    background: #fff;
    border: 2px solid var(--dttf-green-dark);
    color: var(--dttf-green-dark);
}

.tournament-view-button.is-checked-in {
    background: var(--dttf-green-dark);
    border: 2px solid var(--dttf-green-dark);
    color: #fff;
}

.tournament-view-button.is-neutral {
    background: #f5f7f8;
    border: 1px solid var(--dttf-border);
    color: var(--dttf-text);
}

.tournament-status-icon {
    display: inline-grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    flex: 0 0 1.45rem;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 900;
}

.is-registered .tournament-status-icon {
    background: var(--dttf-green-dark);
    color: #fff;
}

.is-checked-in .tournament-status-icon {
    background: #fff;
    color: var(--dttf-green-dark);
}

/* Tournament detail status banner */
.tournament-detail-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem 0.9rem;
    margin-bottom: 0.75rem;
    border-radius: var(--dttf-radius-sm);
    border: 1px solid var(--dttf-border);
}

.tournament-detail-status strong,
.tournament-detail-status span {
    display: block;
}

.tournament-detail-status strong {
    font-size: 0.95rem;
}

.tournament-detail-status > div > span {
    margin-top: 0.1rem;
    font-size: 0.85rem;
}

.tournament-detail-status-icon {
    display: grid !important;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border-radius: 50%;
    font-weight: 900;
}

.tournament-detail-status.is-registered {
    background: #eef9eb;
    border-color: #ccebc3;
    color: var(--dttf-green-dark);
}

.tournament-detail-status.is-registered .tournament-detail-status-icon {
    border: 2px solid var(--dttf-green-dark);
}

.tournament-detail-status.is-checked-in {
    background: #e8f7e5;
    border-color: #bfe5b5;
    color: var(--dttf-green-dark);
}

.tournament-detail-status.is-checked-in .tournament-detail-status-icon {
    background: var(--dttf-green-dark);
    color: #fff;
}

.tournament-detail-status.is-checkin-open {
    background: #fff3e8;
    border-color: #ffd3ad;
    color: #b84a00;
}

.tournament-detail-status.is-checkin-open .tournament-detail-status-icon {
    background: #ff6b00;
    color: #fff;
}

.tournament-detail-status.is-not-registered {
    background: #edf5ff;
    border-color: #c9ddf7;
    color: #1659b7;
}

.tournament-detail-status.is-not-registered .tournament-detail-status-icon {
    background: #1e6ee8;
    color: #fff;
}

@media (max-width: 520px) {
    .game-card-actions .tournament-view-button span:not(.tournament-status-icon) {
        white-space: nowrap;
    }
}
/* =========================================================
   NEXT TOURNAMENT HERO - ACTION BUTTON OVERRIDES
   ========================================================= */

.next-tournament-actions .tournament-view-button.is-neutral {
    background: #ffffff;
    border: 2px solid #ffffff;
    color: #142333;
}

.next-tournament-actions .tournament-view-button.is-neutral:hover {
    background: #f2f5f6;
    border-color: #f2f5f6;
    color: #142333;
}

.next-tournament-actions .tournament-view-button.is-registered {
    background: #ffffff;
    border: 2px solid var(--dttf-green);
    color: var(--dttf-green-dark);
}

.next-tournament-actions .tournament-view-button.is-checked-in {
    background: var(--dttf-green);
    border: 2px solid var(--dttf-green);
    color: #142333;
}

/* =========================================================
   TOURNAMENT DETAIL EXPERIENCE
   ========================================================= */

.tournament-detail-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .45rem;
}

.tournament-status-badge,
.roster-status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    border-radius: 999px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.tournament-status-badge {
    padding: .45rem .7rem;
    font-size: .75rem;
    letter-spacing: .02em;
}

.tournament-status-badge.is-registration,
.tournament-status-badge.is-checkin {
    background: var(--dttf-green-soft);
    color: var(--dttf-green-dark);
}

.tournament-status-badge.is-upcoming {
    background: #eef2f4;
    color: var(--dttf-text);
}

.tournament-status-badge.is-complete {
    background: #e8edf0;
    color: var(--dttf-text);
}

.tournament-status-badge.is-canceled {
    background: #f8e8e8;
    color: var(--dttf-danger);
}

.tournament-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin: 1.15rem 0;
}

.tournament-info-item {
    min-width: 0;
    padding: .8rem .85rem;
    background: var(--dttf-page-bg);
    border: 1px solid var(--dttf-border);
    border-radius: 10px;
}

.tournament-info-item strong {
    display: block;
    margin-top: .25rem;
    font-size: .95rem;
    color: var(--dttf-text);
}

.tournament-info-label {
    display: block;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #667785;
}

.tournament-roster-summary {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
    font-size: .82rem;
    color: #667785;
}

.tournament-roster-summary strong {
    color: var(--dttf-text);
}

.tournament-roster-summary-divider {
    opacity: .55;
}

.tournament-roster-player {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.roster-status-badge {
    padding: .28rem .45rem;
    font-size: .65rem;
}

.roster-status-badge.is-checked-in {
    background: var(--dttf-green);
    color: #142333;
}

.roster-status-badge.is-registered {
    background: var(--dttf-green-soft);
    color: var(--dttf-green-dark);
}

@media (max-width: 699px) {
    .tournament-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tournament-roster-header {
        display: none;
    }

    .tournament-roster-row:not(.tournament-roster-header) {
        grid-template-columns: 1fr;
        gap: .4rem;
        padding: .8rem 0;
    }

    .tournament-roster-row:not(.tournament-roster-header) > div:nth-child(2),
    .tournament-roster-row:not(.tournament-roster-header) > div:nth-child(3) {
        font-size: .75rem;
        color: #667785;
    }

    .tournament-roster-row:not(.tournament-roster-header) > div:nth-child(2)::before {
        content: "Registered: ";
        font-weight: 700;
    }

    .tournament-roster-row:not(.tournament-roster-header) > div:nth-child(3)::before {
        content: "Checked in: ";
        font-weight: 700;
    }
}

@media (max-width: 420px) {
    .tournament-detail-heading-row {
        align-items: flex-start;
    }

    .tournament-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tournament-roster-summary-divider {
        display: none;
    }

    .tournament-roster-summary {
        gap: .35rem .65rem;
    }
}
/* TOURNAMENT DETAIL - WHO'S PLAYING */
.tournament-player-list { display:flex; flex-direction:column; }
.tournament-player-row { padding:.9rem 0; border-bottom:1px solid var(--dttf-border); }
.tournament-player-row:last-child { border-bottom:0; }
.tournament-player-main { display:flex; align-items:center; gap:.55rem; flex-wrap:wrap; }
.tournament-player-name { font-size:.98rem; font-weight:800; color:var(--dttf-text); }
.tournament-player-meta { display:flex; gap:.35rem 1rem; flex-wrap:wrap; margin-top:.35rem; font-size:.74rem; color:#667785; }
@media (min-width:700px) {
  .tournament-player-row { display:flex; align-items:center; justify-content:space-between; gap:1.25rem; }
  .tournament-player-meta { justify-content:flex-end; margin-top:0; text-align:right; }
}
/* =========================================================
   DTTF TOURNAMENT RESULTS
   Replace the ENTIRE previous Tournament Results CSS with this block.
   Requires:
     /assets/images/winner-chips-bg.png
     /assets/images/default-poker-player.png
   ========================================================= */

/* ----- Results section/card ----- */

.tournament-results-card {
    width: 100%;
    overflow: visible;
}

.tournament-results-card .section-heading {
    margin-bottom: 0.75rem;
}


/* ----- Champion hero ----- */

.tournament-winner-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    display: flex;
    align-items: center;
    gap: 1.35rem;

    min-height: 160px;
    margin: 0 0 1rem;
    padding: 1.1rem;

    border: 0;
    border-radius: var(--dttf-radius);
    background-color: #0b4439;

    box-shadow: 0 6px 18px rgba(20, 35, 51, 0.12);
}

/* Chips image occupies the right side only. */
.tournament-winner-hero::before {
    content: "";
    position: absolute;
    z-index: -2;
    top: 0;
    right: 0;
    bottom: 0;

    width: 58%;

    background-image: url("../images/winner-chips-bg.png");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover;
}

/* Smoothly blends the chips into the green left side. */
.tournament-winner-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            #073b32 0%,
            #0b4439 32%,
            rgba(11, 68, 57, 0.98) 43%,
            rgba(11, 68, 57, 0.82) 52%,
            rgba(11, 68, 57, 0.34) 67%,
            rgba(11, 68, 57, 0.04) 84%
        );
    pointer-events: none;
}


/* ----- Champion portrait ----- */

.tournament-winner-photo-wrap {
    position: relative;
    z-index: 1;

    flex: 0 0 118px;
    width: 118px;
    height: 118px;
}

.tournament-winner-photo {
    display: block;

    width: 118px;
    height: 118px;

    border: 4px solid #ffffff;
    border-radius: 50%;

    object-fit: cover;
    object-position: center;

    background: #07110f;

    box-shadow:
        0 0 0 3px rgba(123, 220, 92, 0.30),
        0 5px 18px rgba(0, 0, 0, 0.30);
}

/* Used when the player has no profile picture. */
.tournament-profile-fallback {
    object-fit: cover;
    object-position: center;
    background: #07110f;
}


/* ----- Champion copy ----- */

.tournament-winner-content {
    position: relative;
    z-index: 1;

    min-width: 0;
    max-width: 320px;

    padding-right: 0.5rem;
}

.tournament-winner-crown {
    display: none;
}

.tournament-winner-label {
    display: block;
    position: relative;
    width: fit-content;
    min-width: 210px;

    margin: 0 0 0.55rem;
    padding-bottom: 0.38rem;

    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.24em;

    color: var(--dttf-green);
    text-shadow: 0 0 10px rgba(123, 220, 92, 0.18);
}

.tournament-winner-label::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: 1px;

    background: linear-gradient(
        90deg,
        var(--dttf-green) 0%,
        rgba(123, 220, 92, 0.75) 72%,
        rgba(123, 220, 92, 0) 100%
    );

    box-shadow: 0 0 6px rgba(123, 220, 92, 0.35);
}

.tournament-winner-content h3 {
    margin: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.08;

    color: #ffffff;
}

.tournament-winner-team {
    margin-top: 0.25rem;

    font-size: 0.72rem;
    font-weight: 600;

    color: rgba(255, 255, 255, 0.72);
}

.tournament-winner-points {
    margin-top: 0.45rem;

    font-size: 0.78rem;
    font-weight: 750;

    color: #ffffff;
}

.tournament-winner-points sup {
    color: var(--dttf-green);
}


/* ----- Results table shell ----- */

.tournament-results-table {
    width: 100%;

    overflow: hidden;

    border: 1px solid var(--dttf-border);
    border-radius: var(--dttf-radius);

    background: #ffffff;
}


/* ----- Table header and rows ----- */

.tournament-results-table-header,
.tournament-result-compact-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 64px;
    align-items: center;
    column-gap: 0.7rem;
}

.tournament-results-table-header {
    min-height: 42px;
    padding: 0.5rem 0.75rem;

    border-bottom: 1px solid var(--dttf-border);

    background: #e6ecef;

    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.055em;

    color: #596b78;
}

.tournament-results-table-header span:first-child {
    text-align: center;
}

.tournament-results-table-header span:last-child {
    text-align: right;
}

.tournament-result-compact-row {
    min-height: 56px;
    padding: 0.45rem 0.75rem;

    border: 0;

    background: #ffffff;
}

/*
   Header is the first child inside .tournament-results-table,
   therefore result rows alternate correctly using even/odd child positions.
*/
.tournament-result-compact-row:nth-child(odd) {
    background: #eef2f4;
}

.tournament-result-compact-row:nth-child(even) {
    background: #ffffff;
}


/* ----- Place ----- */

.tournament-result-place {
    text-align: center;

    font-size: 0.92rem;
    font-weight: 800;

    color: var(--dttf-text);
}


/* ----- Player ----- */

.tournament-result-player-compact {
    display: flex;
    align-items: center;
    gap: 0.65rem;

    min-width: 0;
}

.tournament-result-avatar {
    display: block;

    width: 38px;
    height: 38px;
    flex: 0 0 38px;

    border: 1px solid rgba(20, 35, 51, 0.12);
    border-radius: 50%;

    object-fit: cover;
    object-position: center;

    background: #07110f;
}

.tournament-result-player-copy {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.tournament-result-player-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 0.92rem;
    font-weight: 800;

    color: var(--dttf-text);
}

.tournament-result-player-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    margin-top: 0.05rem;

    font-size: 0.67rem;

    color: #778793;
}


/* ----- Points ----- */

.tournament-result-points-compact {
    text-align: right;
}

.tournament-result-points-compact strong {
    font-size: 0.92rem;
    font-weight: 800;

    color: var(--dttf-text);
}

.tournament-result-points-compact sup {
    margin-left: 1px;
    color: #d23a32;
}


/* ----- Late-entry note ----- */

.tournament-results-footnote {
    margin-top: 0.7rem;
    padding: 0.65rem 0.75rem;

    border: 0;
    border-radius: 8px;

    background: #fff0ef;

    font-size: 0.72rem;
    font-weight: 600;

    color: #b4312a;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 699px) {

    .tournament-winner-hero {
        gap: 0.85rem;

        min-height: 128px;
        padding: 0.85rem;
    }

    .tournament-winner-hero::before {
        width: 48%;
        opacity: 0.90;
    }

    .tournament-winner-hero::after {
        background:
            linear-gradient(
                90deg,
                #073b32 0%,
                #0b4439 42%,
                rgba(11, 68, 57, 0.94) 55%,
                rgba(11, 68, 57, 0.50) 72%,
                rgba(11, 68, 57, 0.08) 92%
            );
    }

    .tournament-winner-photo-wrap {
        flex-basis: 82px;
        width: 82px;
        height: 82px;
    }

    .tournament-winner-photo {
        width: 82px;
        height: 82px;
        border-width: 3px;
    }

    .tournament-winner-content {
        max-width: 48%;
    }

    .tournament-winner-label {
        min-width: 145px;
        margin-bottom: 0.42rem;
        padding-bottom: 0.28rem;
        font-size: 0.72rem;
        letter-spacing: 0.16em;
    }

    .tournament-winner-content h3 {
        font-size: 1.35rem;
    }

    .tournament-winner-team {
        font-size: 0.65rem;
    }

    .tournament-winner-points {
        margin-top: 0.3rem;
        font-size: 0.70rem;
    }

    .tournament-results-table-header,
    .tournament-result-compact-row {
        grid-template-columns: 38px minmax(0, 1fr) 48px;
        column-gap: 0.45rem;
    }

    .tournament-results-table-header {
        min-height: 38px;
        padding: 0.42rem 0.45rem;
    }

    .tournament-result-compact-row {
        min-height: 50px;
        padding: 0.38rem 0.45rem;
    }

    .tournament-result-avatar {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .tournament-result-player-compact {
        gap: 0.5rem;
    }

    .tournament-result-player-copy strong,
    .tournament-result-points-compact strong,
    .tournament-result-place {
        font-size: 0.85rem;
    }
}


/* =========================================================

/* =========================================================
   TOURNAMENT DIRECTORY
   Upcoming schedule + weekly league results.
   Mobile-first and isolated from Tournament Detail styles.
   ========================================================= */

.tournament-directory {
    display: grid;
    gap: 1.25rem;
}

.tournament-directory-header {
    padding: 0.25rem 0;
}

.tournament-directory-header h1 {
    margin: 0;
    font-size: clamp(1.75rem, 5vw, 2.35rem);
    line-height: 1.1;
    color: var(--dttf-text);
}

.tournament-directory-header p {
    margin: 0.4rem 0 0;
    color: var(--dttf-text-muted);
    font-size: 0.92rem;
}


/* =========================================================
   DIRECTORY SECTION CARDS
   ========================================================= */

.tournament-directory-section {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--dttf-border);
    border-radius: var(--dttf-radius);
    box-shadow: 0 4px 14px rgba(20, 35, 51, 0.06);
}

.tournament-directory-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--dttf-border);
}

.tournament-directory-section-heading h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--dttf-text);
}

.tournament-directory-section-heading p {
    margin: 0.2rem 0 0;
    color: var(--dttf-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.tournament-directory-empty {
    margin: 0;
    padding: 1.25rem 1rem;
    color: var(--dttf-text-muted);
}


/* =========================================================
   UPCOMING TOURNAMENTS
   ========================================================= */

.tournament-upcoming-list {
    display: flex;
    flex-direction: column;
}

.tournament-upcoming-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
        "date main"
        "date action";
    gap: 0.45rem 0.85rem;
    align-items: center;
    padding: 0.9rem 1rem;
}

.tournament-upcoming-card + .tournament-upcoming-card {
    border-top: 1px solid var(--dttf-border);
}

.tournament-upcoming-date {
    grid-area: date;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding-right: 0.85rem;
    border-right: 1px solid var(--dttf-border);
    text-align: center;
}

.tournament-upcoming-day {
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dttf-green-dark);
}

.tournament-upcoming-date strong {
    margin-top: 0.08rem;
    font-size: 0.92rem;
    color: var(--dttf-text);
}

.tournament-upcoming-date > span:last-child {
    margin-top: 0.1rem;
    font-size: 0.67rem;
    font-weight: 700;
    color: var(--dttf-text-muted);
}

.tournament-upcoming-main {
    grid-area: main;
    min-width: 0;
}

.tournament-upcoming-venue {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    color: var(--dttf-text);
    font-size: 0.98rem;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tournament-upcoming-venue:hover,
.tournament-upcoming-venue:focus-visible {
    color: var(--dttf-green-dark);
    text-decoration: underline;
}

.tournament-upcoming-location {
    margin-top: 0.12rem;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--dttf-text-muted);
}

.tournament-upcoming-status {
    margin-top: 0.35rem;
}

.tournament-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.tournament-status-registration {
    background: var(--dttf-green-soft);
    color: var(--dttf-green-dark);
}

.tournament-status-checkin {
    background: #fff3e8;
    color: #b84a00;
}

.tournament-status-upcoming {
    background: #eef2f4;
    color: var(--dttf-text);
}

.tournament-upcoming-link {
    grid-area: action;
    width: fit-content;
    color: var(--dttf-green-dark);
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
}

.tournament-upcoming-link:hover,
.tournament-upcoming-link:focus-visible {
    text-decoration: underline;
}


/* =========================================================
   WEEK SELECTOR
   ========================================================= */

.tournament-results-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.tournament-results-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.tournament-season-form {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.tournament-season-form label {
    color: var(--dttf-text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.tournament-season-form select {
    min-height: 32px;
    max-width: 180px;
    padding: 0.25rem 1.8rem 0.25rem 0.55rem;
    border: 1px solid var(--dttf-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--dttf-text);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
}

.tournament-week-navigation {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.5rem;
}

.tournament-week-button {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--dttf-text);
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
}

.tournament-week-previous {
    justify-content: flex-start;
}

.tournament-week-next {
    justify-content: flex-end;
}

.tournament-week-button:hover,
.tournament-week-button:focus-visible {
    color: var(--dttf-green-dark);
    text-decoration: underline;
}

.tournament-week-button.is-disabled {
    color: var(--dttf-text-muted);
    opacity: 0.45;
    cursor: default;
    text-decoration: none;
}

.tournament-week-form {
    position: relative;
    min-width: 92px;
    min-height: 32px;
}

.tournament-week-form label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.tournament-week-range {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 0.6rem;
    border: 1px solid var(--dttf-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--dttf-text);
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.tournament-week-form input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}


/* =========================================================
   WEEKLY RESULTS
   Mirrors the Venue Profile result concept while adding venue.
   ========================================================= */

.tournament-results-list {
    display: flex;
    flex-direction: column;
}

.tournament-result-card {
    padding: 0;
}

.tournament-result-card + .tournament-result-card {
    border-top: 1px solid var(--dttf-border);
}

.tournament-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    background: #f5f7f8;
}

.tournament-result-heading-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tournament-result-venue {
    overflow: hidden;
    color: var(--dttf-text);
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tournament-result-venue:hover,
.tournament-result-venue:focus-visible {
    color: var(--dttf-green-dark);
    text-decoration: underline;
}

.tournament-result-date {
    margin-top: 0.18rem;
    color: var(--dttf-text-muted);
    font-size: 0.69rem;
    font-weight: 650;
    text-decoration: none;
}

.tournament-result-date:hover,
.tournament-result-date:focus-visible {
    text-decoration: underline;
}

.tournament-result-entries {
    flex: 0 0 auto;
    color: var(--dttf-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.tournament-result-entries:hover,
.tournament-result-entries:focus-visible {
    color: var(--dttf-green-dark);
}

.tournament-result-places {
    display: grid;
    grid-template-columns: 1fr;
}

.tournament-result-player {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px 38px minmax(0, 1fr);
    gap: 0.6rem;
    align-items: center;
    min-height: 54px;
    padding: 0.45rem 1rem;
    color: var(--dttf-text);
    text-decoration: none;
}

.tournament-result-player + .tournament-result-player {
    border-top: 1px solid #edf0f2;
}

.tournament-result-player:hover,
.tournament-result-player:focus-visible {
    background: #f8faf9;
}

.tournament-result-place {
    text-align: center;
    color: var(--dttf-text-muted);
    font-size: 0.72rem;
    font-weight: 900;
}

.tournament-result-player img {
    display: block;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(20, 35, 51, 0.12);
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
}

.tournament-result-player > span:last-child {
    overflow: hidden;
    font-size: 0.88rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   TABLET / DESKTOP
   ========================================================= */

@media (min-width: 700px) {

    .tournament-directory {
        gap: 1.5rem;
    }

    .tournament-directory-section-heading {
        padding: 1rem 1.15rem;
    }

    /* Compact desktop schedule: date | venue + status | action */
    .tournament-upcoming-card {
        grid-template-columns: 90px minmax(0, 1fr) auto;
        grid-template-areas: "date main action";
        gap: 1rem;
        min-height: 0;
        padding: 0.7rem 1.15rem;
    }

    .tournament-upcoming-date {
        align-self: center;
        align-items: flex-start;
        justify-content: center;
        padding-right: 1rem;
        text-align: left;
    }

    .tournament-upcoming-day {
        font-size: 0.62rem;
    }

    .tournament-upcoming-date strong {
        font-size: 0.86rem;
    }

    .tournament-upcoming-date > span:last-child {
        font-size: 0.64rem;
    }

    .tournament-upcoming-main {
        align-self: center;
        display: flex;
        align-items: center;
        gap: 0.8rem;
    }

    .tournament-upcoming-venue {
        font-size: 0.94rem;
    }

    .tournament-upcoming-location {
        flex: 0 0 auto;
        margin-top: 0;
        margin-left: -0.35rem;
        white-space: nowrap;
    }

    .tournament-upcoming-status {
        flex: 0 0 auto;
        margin-top: 0;
    }

    .tournament-upcoming-link {
        align-self: center;
        padding: 0;
        border: 0;
        border-radius: 0;
        white-space: nowrap;
    }

    .tournament-upcoming-link:hover,
    .tournament-upcoming-link:focus-visible {
        border-color: transparent;
        text-decoration: underline;
    }

    .tournament-results-heading {
        flex-direction: row;
        align-items: center;
    }

    .tournament-week-navigation {
        width: auto;
        min-width: 310px;
    }

    .tournament-result-heading {
        padding: 0.75rem 1.15rem;
    }

    .tournament-result-places {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 0.55rem 0.65rem;
    }

    .tournament-result-player {
        grid-template-columns: 32px 38px minmax(0, 1fr);
        padding: 0.35rem 0.5rem;
        border-radius: 8px;
    }

    .tournament-result-player + .tournament-result-player {
        border-top: 0;
        border-left: 1px solid #edf0f2;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */



@media (max-width: 520px) {
    .tournament-results-title {
        align-items: flex-end;
    }

    .tournament-season-form {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .tournament-season-form select {
        max-width: 150px;
    }
}
