/* Shared building blocks of the public pages ("steel & bullseye" theme).
   The --bt-* tokens are defined on .pub-shell in PublicLayout. */
.bt-page {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem;
    color: var(--bt-text);
}

.bt-hero {
    margin-bottom: 1.75rem;
    padding: 2.25rem 0;
    border-top: 1px solid var(--bt-line-strong);
    border-bottom: 1px solid var(--bt-line-strong);
}

    .bt-hero h1 {
        margin: 0;
        font-family: var(--bt-display);
        font-size: clamp(1.8rem, 4.2vw, 3.4rem);
        font-weight: 600;
        line-height: 1.1;
        letter-spacing: .1em;
        text-transform: uppercase;
        color: #fff;
    }

.bt-kicker {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .6rem;
    color: var(--bt-red-hot);
    font-family: var(--bt-display);
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .32em;
    text-transform: uppercase;
}

    .bt-kicker::before {
        content: "";
        width: 2rem;
        height: 2px;
        background: var(--bt-red);
    }

/* ---------- toolbar + form controls (incl. the Bootstrap-styled competition dropdown) ---------- */
.bt-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.1rem 1.25rem 1.25rem;
    background: var(--bt-panel);
    border: 1px solid var(--bt-line);
    border-top: 3px solid var(--bt-red);
}

    .bt-toolbar .mb-3 {
        margin-bottom: 0 !important;
    }

.bt-page label,
.bt-page .form-label {
    display: block;
    margin-bottom: .4rem;
    font-family: var(--bt-display);
    font-size: .7rem;
    font-weight: 500 !important;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--bt-muted);
}

.bt-input,
.bt-page .form-select {
    width: 100%;
    min-height: 44px;
    padding: .6rem .8rem;
    background-color: rgba(8, 8, 10, .7);
    color: var(--bt-text);
    border: 1px solid var(--bt-line-strong);
    border-radius: 0;
    color-scheme: dark;
    font: inherit;
    font-size: .95rem;
}

.bt-page .form-select {
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23a3adb8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

    .bt-input:focus,
    .bt-page .form-select:focus {
        outline: none;
        border-color: var(--bt-red);
        box-shadow: 0 0 0 1px var(--bt-red);
    }

    .bt-page .form-select option {
        background: #101013;
    }

/* ---------- chips ---------- */
.bt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 2rem;
}

/* long lists (every thrower of a competition) scroll inside their own box */
.bt-chips.scroll {
    max-height: 13.5rem;
    overflow-y: auto;
    padding: .75rem;
    border: 1px solid var(--bt-line);
    scrollbar-width: thin;
    scrollbar-color: #3a3a40 transparent;
}

.bt-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .8rem;
    border: 1px solid var(--bt-line-strong);
    border-radius: 0;
    background: rgba(8, 8, 10, .6);
    color: var(--bt-steel);
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    transition: color .15s, border-color .15s, background-color .15s;
}

    .bt-chip:hover {
        color: #fff;
        border-color: #fff;
    }

    .bt-chip.active {
        background: var(--bt-red);
        border-color: var(--bt-red);
        color: #fff;
    }

    .bt-chip small {
        font-family: var(--bt-display);
        font-size: .75rem;
        font-weight: 500;
        opacity: .7;
    }

.bt-flag {
    width: 1.35em;
    height: 1em;
    flex-shrink: 0;
    object-fit: cover;
    outline: 1px solid rgba(255, 255, 255, .18);
}

/* ---------- section title ---------- */
.bt-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem .9rem;
    margin: 0 0 1rem;
    font-family: var(--bt-display);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
}

    .bt-title small {
        font-family: var(--bt-body);
        font-size: .95rem;
        font-weight: 400;
        letter-spacing: 0;
        text-transform: none;
        color: var(--bt-steel);
    }

/* ---------- cards ---------- */
.bt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr));
    gap: 1.25rem;
    align-items: start;
}

    .bt-grid.tight {
        grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
        gap: 1rem;
    }

.bt-card {
    position: relative;
    min-width: 0;
    background: var(--bt-panel);
    border: 1px solid var(--bt-line);
}

    .bt-card > header {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: .75rem;
        padding: .8rem 1rem;
        border-bottom: 2px solid var(--bt-red);
    }

    .bt-card h3 {
        margin: 0;
        font-family: var(--bt-display);
        font-size: 1.05rem;
        font-weight: 600;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: #fff;
    }

    .bt-card > header span {
        font-size: .8rem;
        color: var(--bt-muted);
        white-space: nowrap;
    }

/* one result of one thrower */
.bt-result {
    --metal: var(--bt-line-strong);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1rem;
    border-left: 3px solid var(--metal);
}

    .bt-result.top1 { --metal: var(--bt-gold); }
    .bt-result.top2 { --metal: var(--bt-silver); }
    .bt-result.top3 { --metal: var(--bt-bronze); }
    .bt-result.tie { outline: 1px solid var(--bt-red); }

.bt-result-rank {
    width: 2.6rem;
    flex-shrink: 0;
    text-align: center;
    font-family: var(--bt-display);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--bt-muted);
}

.bt-result.top1 .bt-result-rank,
.bt-result.top2 .bt-result-rank,
.bt-result.top3 .bt-result-rank {
    color: var(--metal);
}

.bt-result-body {
    flex: 1;
    min-width: 0;
}

    .bt-result-body p {
        margin: .15rem 0 0;
        font-size: .82rem;
        color: var(--bt-muted);
    }

.bt-result-score {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    font-family: var(--bt-display);
    font-size: 1.5rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #fff;
}

    .bt-result-score small {
        font-family: var(--bt-body);
        font-size: .75rem;
        font-weight: 400;
        color: var(--bt-red-hot);
    }

/* ---------- ranked rows ---------- */
.bt-row {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

    .bt-row:first-child {
        border-top: 0;
    }

    .bt-row:hover {
        background: rgba(255, 255, 255, .05);
    }

.bt-rank {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 1.5rem;
    flex-shrink: 0;
    font-family: var(--bt-display);
    font-size: .95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--bt-muted);
}

    .bt-rank.top1, .bt-rank.top2, .bt-rank.top3 {
        color: #08080a;
        clip-path: polygon(22% 0, 100% 0, 78% 100%, 0 100%);
    }

    .bt-rank.top1 { background: var(--bt-gold); }
    .bt-rank.top2 { background: var(--bt-silver); }
    .bt-rank.top3 { background: var(--bt-bronze); }

.bt-row-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.bt-row-score {
    font-family: var(--bt-display);
    font-size: 1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #fff;
}

.bt-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--bt-muted);
}

    .bt-card .bt-empty {
        padding: 1.25rem 1rem;
        font-size: .9rem;
    }

.bt-error {
    padding: .8rem 1rem;
    border-left: 3px solid var(--bt-red);
    background: rgba(224, 19, 28, .12);
    color: var(--bt-text);
}

@media (max-width: 700px) {
    .bt-page { padding: 1rem 1rem 2rem; }
    .bt-hero { padding: 1.5rem 0; }
    .bt-toolbar { grid-template-columns: 1fr; }
    .bt-grid { grid-template-columns: 1fr; }
}
