/* ══════════════════════════════════════════════════════════
   TRAIL ROWS — Horizontal condensed layout
   frontend/style/trail-rows.css
   ══════════════════════════════════════════════════════════ */

/* ── Runs Section Container ──────────────────────────── */

.runs-section {
    margin-top: 0.5rem;
}

.run-count {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--t3);
    margin-left: 0.3rem;
}

/* ── Filter Chips ────────────────────────────────────── */

.filter-chip {
    background: var(--bg-glass);
    border: 1px solid var(--bdr);
    color: var(--t3);
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.filter-chip.active {
    border-color: var(--acc);
    color: var(--acc);
    background: rgba(56, 189, 248, 0.06);
}

.filter-chip:hover:not(.active) {
    border-color: var(--bdr-h);
    color: var(--t2);
}

.fc-icon { font-size: 0.65rem; }
.filter-green .fc-icon { color: var(--green); }
.filter-blue .fc-icon  { color: var(--blue); }
.filter-black .fc-icon { color: var(--blk); }
.filter-dblack .fc-icon { color: var(--dblk); }

.filter-green.active { border-color: var(--green); color: var(--green); background: rgba(74, 222, 128, 0.06); }
.filter-blue.active  { border-color: var(--blue);  color: var(--blue);  background: rgba(96, 165, 250, 0.06); }
.filter-black.active { border-color: var(--blk);   color: var(--blk);   background: rgba(248, 113, 113, 0.06); }
.filter-dblack.active { border-color: var(--dblk); color: var(--dblk);  background: rgba(239, 68, 68, 0.06); }

/* ── Trail Map Section ───────────────────────────────── */

.trail-map-section {
    margin-bottom: 1.25rem;
}

.trail-map-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.trail-map-section .section-header h2 {
    font-size: 1rem;
}

.trail-map-link {
    font-size: 0.78rem;
    color: var(--acc);
    text-decoration: none;
    transition: color 0.15s;
}

.trail-map-link:hover {
    color: var(--acc2);
}

.trail-map-img-wrapper {
    border-radius: var(--r-m);
    overflow: hidden;
    border: 1px solid var(--bdr);
}

.trail-map-img {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 280px;
}

/* ── Trail List ──────────────────────────────────────── */

.trail-list {
    border: 1px solid var(--bdr);
    border-radius: var(--r-m);
    overflow: hidden;
    background: var(--bg-3);
}

/* ── Trail Row — Single horizontal line ──────────────── */

.trail-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--bdr);
    transition: background 0.12s;
}

.trail-row:last-child {
    border-bottom: none;
}

.trail-row:hover {
    background: var(--bg-4);
}

/* Click area: badge → name → score → stars → count */
.trail-info-click {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    padding: 0.55rem 1rem;
    cursor: pointer;
    min-width: 0;
}

/* Difficulty badge */
.trail-diff-badge {
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-s);
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 800;
}

.trail-diff-badge.green        { background: rgba(74, 222, 128, 0.1);  color: var(--green); }
.trail-diff-badge.blue         { background: rgba(96, 165, 250, 0.1);  color: var(--blue); }
.trail-diff-badge.black        { background: rgba(248, 113, 113, 0.1); color: var(--blk); }
.trail-diff-badge.double-black { background: rgba(239, 68, 68, 0.1);   color: var(--dblk); font-size: 0.8rem; }

/* Trail name */
.trail-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--t1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

/* Average score number */
.trail-avg-score {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    flex-shrink: 0;
}

/* Mini star display */
.trail-mini-stars {
    flex-shrink: 0;
    line-height: 1;
}

.mini-stars {
    color: var(--gold);
    font-size: 0.78rem;
    letter-spacing: -0.5px;
}

/* Rating count */
.trail-avg-count {
    font-size: 0.72rem;
    color: var(--t3);
    flex-shrink: 0;
    white-space: nowrap;
}

/* Rate button */
.trail-action-cell {
    flex-shrink: 0;
    padding: 0 0.75rem 0 0;
}

.trail-rate-btn {
    background: var(--bg-glass);
    border: 1px solid var(--bdr);
    border-radius: var(--r-s);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.trail-rate-btn:hover {
    border-color: var(--acc);
    background: rgba(56, 189, 248, 0.06);
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 640px) {
    .trail-info-click {
        gap: 0.4rem;
        padding: 0.5rem 0.75rem;
    }

    .trail-avg-count {
        display: none;
    }

    .trail-name {
        font-size: 0.82rem;
    }

    .trail-diff-badge {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.85rem;
    }

    .filter-chip {
        font-size: 0.68rem;
        padding: 0.2rem 0.45rem;
    }
}