/* DTTF_V2 modular stylesheet: dashboard.css */

   10. CURRENT TEMPORARY HOMEPAGE HERO
   ========================================================= */

.home-hero {
    margin-top: 0;
    padding: 26px 22px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            var(--navy-dark),
            var(--navy-light)
        );

    color: var(--text-light);

    border-radius:
        var(--radius-lg);

    box-shadow:
        var(--shadow-raised);
}

.hero-content {
    max-width: 720px;
}

.hero-eyebrow {
    margin-bottom: 8px;

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

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

    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home-hero h1 {
    margin: 0;

    color: #ffffff;

    font-size:
        clamp(2rem, 9vw, 3.5rem);

    font-weight: 850;

    line-height: 1;
    letter-spacing: -0.035em;
}

.home-hero h1 span {
    color:
        var(--dttf-green);
}

.hero-description {
    max-width: 580px;

    margin:
        15px 0 0;

    color:
        rgba(255, 255, 255, 0.76);

    font-size: 0.95rem;
}

.hero-actions {
    margin-top: 20px;

    display: flex;
    flex-wrap: wrap;

    gap: 9px;
}

.home-hero .button-secondary {
    color: #ffffff;

    background:
        rgba(255, 255, 255, 0.08);

    border-color:
        rgba(255, 255, 255, 0.25);
}

.home-hero .button-secondary:hover {
    background:
        rgba(255, 255, 255, 0.14);
}


/* =========================================================
   11. UPCOMING GAME CARDS
   ========================================================= */

.game-grid {
    display: grid;
    gap: 10px;
}

.game-card {
    min-height: 100px;

    display: flex;
    overflow: hidden;

    background:
        var(--surface-alt);

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

    border-radius:
        var(--radius-md);
}

.game-day {
    width: 62px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;

    background:
        var(--navy);

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

    letter-spacing: 0.06em;
}

.game-card-body {
    padding: 14px 16px;
}

.game-status {
    margin-bottom: 2px;

    color:
        var(--dttf-green-dark);

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

    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.game-card h3 {
    margin: 0;

    color: var(--text);

    font-size: 1rem;
    font-weight: 750;
}

.game-time {
    margin-top: 3px;

    color: var(--text);

    font-size: 0.9rem;
    font-weight: 700;
}

.game-meta {
    margin-top: 1px;

    color:
        var(--text-muted);

    font-size: 0.76rem;
}


/* =========================================================
   12. ROAD TO 54
   Temporary component until ToC dashboard is built
   ========================================================= */

.road-to-54 {
    position: relative;

    margin-top: 16px;
    padding: 20px;

    display: flex;
    align-items: center;

    gap: 18px;

    overflow: hidden;

    background:
        var(--surface);

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

    border-radius:
        var(--radius-lg);

    box-shadow:
        var(--shadow-card);
}

.road-number {
    flex-shrink: 0;

    color:
        var(--dttf-green-dark);

    font-size:
        clamp(4rem, 20vw, 7rem);

    font-weight: 900;

    line-height: 0.8;
    letter-spacing: -0.08em;
}

.road-content {
    position: relative;
    z-index: 1;
}

.road-content h2 {
    margin: 0;

    color:
        var(--text);

    font-size: 1.25rem;
    font-weight: 800;
}

.road-content p {
    margin: 7px 0 14px;

    color:
        var(--text-muted);

    font-size: 0.86rem;
}


/* =========================================================
   13. LEADER CARDS
   ========================================================= */

.leader-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;
}

.leader-card {
    padding: 15px;

    background:
        var(--surface-alt);

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

    border-radius:
        var(--radius-md);
}

.leader-label {
    color:
        var(--text-muted);

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

    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.leader-value {
    margin-top: 6px;

    color:
        var(--text);

    font-size: 1rem;
    font-weight: 750;
}

.leader-stat {
    margin-top: 1px;

    color:
        var(--dttf-green-dark);

    font-size: 0.8rem;
    font-weight: 800;
}


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

   NEXT TOURNAMENT
   ========================================================= */

.next-tournament {
    position: relative;
    min-height: 280px;

    display: flex;
    align-items: stretch;

    overflow: hidden;

    color: #fff;

    background:
        linear-gradient(
            105deg,
            rgba(5, 16, 24, 0.98) 0%,
            rgba(9, 28, 40, 0.92) 48%,
            rgba(15, 42, 57, 0.78) 100%
        );

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-raised);
}

.next-tournament-overlay {
    width: 100%;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 26px 24px;
}

.next-tournament-label {
    margin-bottom: 7px;

    color: rgba(255, 255, 255, 0.8);

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

    letter-spacing: 0.08em;
}

.next-tournament-time {
    margin: 0;

    color: #fff;

    font-size: clamp(1.8rem, 8vw, 3rem);
    font-weight: 850;

    line-height: 1.05;
    letter-spacing: -0.025em;
}

.next-tournament-time span {
    color: #fff;
}

.next-tournament-venue {
    margin-top: 8px;

    color: var(--dttf-green);

    font-size: clamp(1.35rem, 6vw, 2rem);
    font-weight: 800;
}

.next-tournament-date {
    margin-top: 1px;

    color: rgba(255, 255, 255, 0.82);

    font-size: 0.9rem;
    font-weight: 600;
}

.next-tournament-button {
    align-self: flex-start;

    margin-top: 20px;
}
/* =========================================================
   YOUR VENUE RACES
   ========================================================= */

.dashboard-section {
    margin-top: 24px;

    /* Allow horizontally scrollable children to stay inside the dashboard. */
    min-width: 0;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    margin-bottom: 12px;
}

.section-eyebrow {
    color: var(--text-muted);

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

    letter-spacing: 0.08em;
}

.section-heading h2 {
    margin: 2px 0 0;

    font-size: 1.35rem;
    color: var(--text);
}

.venue-race-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.venue-race-card {
    padding: 18px;

    background: var(--surface);

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

    box-shadow: var(--shadow-card);
}

.venue-race-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 16px;
}

.venue-race-name {
    color: var(--text);

    font-size: 1.05rem;
    font-weight: 800;
}

.venue-race-played {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 0.78rem;
}

.venue-race-rank {
    min-width: 58px;

    text-align: right;
}

.rank-label {
    display: block;

    color: var(--text-muted);

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

    letter-spacing: 0.08em;
}

.venue-race-rank strong {
    color: var(--dttf-green-dark);

    font-size: 1.6rem;
    line-height: 1;
}

.venue-race-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    margin-top: 16px;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.venue-race-stat {
    padding: 12px 6px;

    text-align: center;
}

.venue-race-stat + .venue-race-stat {
    border-left: 1px solid var(--border);
}

.venue-race-stat span {
    display: block;

    color: var(--text-muted);

    font-size: 0.68rem;
    font-weight: 700;
}

.venue-race-stat strong {
    display: block;

    margin-top: 2px;

    color: var(--text);

    font-size: 1.05rem;
}

.venue-race-status {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-top: 12px;

    font-size: 0.78rem;
    font-weight: 700;
}

.venue-race-status.qualified {
    color: var(--success);
}

.venue-race-status.outside {
    color: var(--danger);
}

.status-dot {
    width: 8px;
    height: 8px;

    flex: 0 0 8px;

    border-radius: 50%;

    background: currentColor;
}

@media (min-width: 700px) {

    .venue-race-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}
/* =========================================================
   ROAD TO THE TOC
   ========================================================= */

.toc-status-card {
    overflow: hidden;

    background: var(--surface);

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

    box-shadow: var(--shadow-card);
}

.toc-path-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    padding: 17px 18px;
}

.toc-path-row + .toc-path-row {
    border-top: 1px solid var(--border);
}

.toc-path-status {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 20px;
    min-width: 20px;

    padding-top: 4px;
}

.toc-path-status .status-dot {
    width: 10px;
    height: 10px;

    border-radius: 50%;
}

.toc-path-status.active .status-dot {
    background: var(--success);
}

.toc-path-status.inactive .status-dot {
    background: var(--danger);
}

.toc-path-content {
    min-width: 0;
    flex: 1;
}

.toc-path-title {
    color: var(--text);

    font-size: 0.95rem;
    font-weight: 800;
}

.toc-path-detail {
    margin-top: 2px;

    color: var(--text);

    font-size: 0.84rem;
    font-weight: 700;
}

.toc-path-message {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 0.76rem;
}

/* =========================================================
   VENUE STANDINGS

   The outer wrapper clips the component to the dashboard width.
   The inner tab row owns horizontal scrolling so long venue names
   remain on one line and can be reached by mouse, trackpad, or touch.
   ========================================================= */

/* Constrains the scrolling tab row to the available page width. */
.venue-tabs-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    overflow: hidden;
}

/* Horizontal venue selector. */
.venue-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;

    width: 100%;
    min-width: 0;
    max-width: 100%;

    margin-bottom: 12px;
    padding: 2px 0 8px;

    overflow-x: auto;
    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;

    /* Keep a visible scrollbar on desktop so mouse users can discover
       and operate the horizontal venue list. */
    scrollbar-width: thin;
    scrollbar-color: var(--border-dark) transparent;
}

.venue-tabs::-webkit-scrollbar {
    height: 7px;
}

.venue-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.venue-tabs::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 999px;
}

/* Individual venue pill. */
.venue-tab {
    flex: 0 0 auto;
    white-space: nowrap;

    padding: 8px 14px;

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

    background: var(--surface);
    color: var(--text-muted);

    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;

    cursor: pointer;
}

.venue-tab:hover {
    border-color: var(--dttf-green);
    color: var(--text);
}

.venue-tab.active {
    border-color: var(--dttf-green);
    background: var(--dttf-green);
    color: var(--navy);
}

/* Standings card and data rows. */
.standings-card {
    overflow: hidden;

    background: var(--surface);

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

    box-shadow: var(--shadow-card);
}

.standings-table {
    width: 100%;
}

.standings-table.loading {
    opacity: 0.45;
    pointer-events: none;
}

.standings-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 58px 38px 48px 42px;
    align-items: center;

    min-height: 48px;
    padding: 0 12px;

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

.standings-header {
    min-height: 38px;

    background: var(--page-bg);
    color: var(--text-muted);

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

    letter-spacing: 0.05em;
}

.standings-rank {
    font-size: 0.82rem;
    font-weight: 800;
}

.standings-player {
    overflow: hidden;

    color: var(--text);

    font-size: 0.86rem;
    font-weight: 700;

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

/* Compact performance columns: points, final tables, Top 3s, wins. */
.standings-points,
.standings-finals,
.standings-top3,
.standings-wins {
    font-size: 0.82rem;
    font-weight: 700;
}

.standings-points {
    text-align: left;
}

.standings-finals,
.standings-top3,
.standings-wins {
    text-align: center;
}

/* Empty/loading support and footer actions. */
.standings-empty {
    padding: 24px 16px;

    color: var(--text-muted);

    font-size: 0.82rem;
    text-align: center;
}

.standings-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    padding: 12px 14px;

    color: var(--text-muted);

    font-size: 0.72rem;
}

.standings-link {
    flex: 0 0 auto;

    color: var(--link);
    font-weight: 800;
    text-decoration: none;
}

.standings-link:hover {
    text-decoration: underline;
}

/* =========================================================
   RECENT TOURNAMENT RESULTS

   Mobile-first list matching the DTTF dashboard language.
   The trophy icon replaces the repeated "Winner:" label.
   ========================================================= */

.recent-results-card {
    overflow: hidden;

    background: var(--surface);

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

    box-shadow: var(--shadow-card);
}

.recent-result-row {
    padding: 15px 16px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "primary entries"
        "winner winner"
        "action action";

    gap: 10px 14px;

    align-items: center;
}

.recent-result-row + .recent-result-row {
    border-top: 1px solid var(--border);
}

.recent-result-primary {
    grid-area: primary;
    min-width: 0;
}

.recent-result-venue {
    overflow: hidden;

    color: var(--text);

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

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

.recent-result-date {
    margin-top: 2px;

    color: var(--text-muted);

    font-size: 0.76rem;
    font-weight: 600;
}

.recent-result-winner {
    grid-area: winner;

    min-width: 0;

    display: flex;
    align-items: center;

    gap: 9px;
}

.recent-result-trophy {
    flex: 0 0 auto;

    font-size: 1.2rem;
    line-height: 1;
}

.recent-result-winner-name {
    overflow: hidden;

    color: var(--text);

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

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

.recent-result-entries {
    grid-area: entries;

    display: inline-flex;
    align-items: center;
    justify-content: flex-end;

    gap: 5px;

    color: var(--text-muted);

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

.recent-result-players-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.recent-result-link {
    grid-area: action;

    min-height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    color: #ffffff;
    background: var(--navy);

    border-radius: var(--radius-md);

    font-size: 0.78rem;
    font-weight: 800;
}

.recent-result-link:hover {
    background: var(--navy-light);
}


/* Give recent results more horizontal structure on tablets/desktops. */
@media (min-width: 700px) {

    .recent-result-row {
        min-height: 72px;

        grid-template-columns:
            minmax(180px, 1.35fr)
            minmax(180px, 1fr)
            70px
            auto;

        grid-template-areas:
            "primary winner entries action";

        gap: 18px;

        padding: 12px 16px;
    }

    .recent-result-link {
        min-width: 118px;

        padding: 0 14px;
    }

}

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

/* =========================================================
   DTTF HOMEPAGE - CURRENT LAYOUT ADDITIONS
   Append to assets/css/dashboard.css
   ========================================================= */

/* Logged-out replacement for personalized player content */
.join-dttf-card {
    padding: 28px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.join-dttf-card h2 {
    margin: 4px 0 8px;
}

.join-dttf-card p {
    margin: 0;
    max-width: 680px;
    line-height: 1.55;
}

.join-dttf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.join-dttf-login {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.16);
}

/* Season venue leaders */
.venue-leaders-heading {
    margin-top: 22px;
    margin-bottom: 10px;
}

.venue-leaders-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 2px 2px 12px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.venue-leader-card {
    flex: 0 0 190px;
    scroll-snap-align: start;
    padding: 16px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

.venue-leader-venue {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.68;
}

.venue-leader-name {
    margin-top: 8px;
    font-size: 1.05rem;
    font-weight: 800;
}

.venue-leader-stat {
    margin-top: 4px;
    font-size: 0.88rem;
    font-weight: 700;
}

/* Most Recent Winner */
.recent-winner-card {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.recent-winner-photo-wrap {
    width: 230px;
    flex: 0 0 230px;
    padding: 18px;
}

.recent-winner-photo {
    width: 100%;
    height: 230px;
    display: block;
    object-fit: cover;
    border-radius: 14px;
}

.recent-winner-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #eef1f4;
    font-weight: 800;
}

.recent-winner-photo-placeholder span:first-child {
    font-size: 2.5rem;
}

.recent-winner-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 28px;
}

.recent-winner-kicker {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.65;
}

.recent-winner-content h3 {
    margin: 7px 0 3px;
    font-size: clamp(1.7rem, 4vw, 2.35rem);
    line-height: 1.05;
}

.recent-winner-venue {
    margin-bottom: 20px;
    font-weight: 700;
}

@media (max-width: 600px) {
    .recent-winner-card {
        grid-template-columns: 1fr;
    }
    .recent-winner-photo-wrap {
        width: 100%;
        padding: 16px 16px 0;
    }

    .recent-winner-photo {
        width: 180px;
        height: 180px;
    }

    .recent-winner-content {
        padding: 20px;
    }

    .join-dttf-card {
        padding: 22px;
    }
}

/* =========================================================
   HOMEPAGE LEADER PHOTOS
   Small, consistent avatars. Player photos remain secondary
   to the leader name/stat and use the standard site fallback.
   ========================================================= */

.leader-person {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 0.75rem;
}

.leader-avatar {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.venue-leader-person {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.55rem;
}

.venue-leader-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}





/* =========================================================
   PLAYER PROFILE LINKS
   Player names and leader photos link to the public profile.
   ========================================================= */

.player-name-link {
    color: inherit;
    text-decoration: none;
}

.player-name-link:hover,
.player-name-link:focus-visible {
    text-decoration: underline;
}

.leader-photo-link {
    display: block;
    flex: 0 0 auto;
    border-radius: 50%;
    text-decoration: none;
}

.leader-photo-link:focus-visible {
    outline: 2px solid var(--dttf-green);
    outline-offset: 3px;
}
