/* The list of every BSC tournament (bscevents.js) and the switch that shows it on Tournament Results and the BSC Tournaments page. */

/* ---------- the switch above the page's own controls ---------- */
.be-switch {
    display: flex;
    justify-content: center;
    margin: 0 auto 18px;
}

.be-switch-inner {
    display: inline-flex;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.be-switch button {
    padding: 9px 16px;
    background: var(--surface-2);
    color: var(--text-dim);
    border: 0;
    font: 700 13px var(--font-body);
    cursor: pointer;
}

.be-switch button + button { border-left: 1px solid var(--border-strong); }
.be-switch button:hover { color: var(--text); }
.be-switch button[aria-pressed="true"] { background: var(--primary); color: #0b0e14; }

/* the BSC page: "All tournaments" replaces the day picker and the day's cards */
#listView.be-all > .mt-filters,
#listView.be-all > .mt-daynav,
#listView.be-all > #featuredSection,
#listView.be-all > #starterSection { display: none !important; }
#allEvents { display: none; }
#listView.be-all > #allEvents { display: block; }

/* ---------- the list ---------- */
.be { max-width: 980px; margin: 0 auto; }

.be-tools {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.be-fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-dim); }

.be-fld input,
.be-fld select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    background: var(--surface-3);
    color: var(--text);
    color-scheme: dark;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font: 400 14px var(--font-body);
}

.be-fld input:focus,
.be-fld select:focus { outline: none; border-color: var(--primary); box-shadow: var(--primary-glow); }

.be-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.be-count { font-size: 13px; color: var(--text-muted); }

.be-list { display: grid; gap: 6px; }

.be-month {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 14px 0 2px;
    padding: 8px 4px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--text);
}

.be-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto 18px;
    gap: 14px;
    align-items: center;
    padding: 10px 14px 10px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text);
    text-decoration: none;
    transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.be-row:hover { background: var(--surface-2); border-color: var(--primary); }
.be-row--live { border-left-color: #ff6b6b; }
.be-row--upcoming { border-left-color: var(--blue); }

.be-date { display: grid; justify-items: center; line-height: 1.05; }
.be-date b { font-family: var(--font-display); font-size: 24px; font-weight: 400; }
.be-date small { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }

.be-main { display: grid; gap: 2px; min-width: 0; }
.be-main strong { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.be-main small { font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }

.be-tags { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.be-region { padding: 2px 9px; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: 99px; font-size: 11px; font-weight: 700; color: var(--text-dim); white-space: nowrap; }
.be-status { padding: 2px 9px; border-radius: 99px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.be-status--live { background: rgba(255, 107, 107, 0.15); color: #ff7a7a; }
.be-status--upcoming { background: rgba(110, 168, 254, 0.15); color: var(--blue); }
.be-status--ended { color: var(--text-muted); }

.be-go { font-size: 22px; color: var(--text-muted); text-align: right; }
.be-row:hover .be-go { color: var(--primary); }

.be-empty { padding: 28px 16px; text-align: center; color: var(--text-muted); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-md); }
.be-empty--error { color: #ff7a7a; }

@media (max-width: 640px) {
    .be-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .be-fld--grow { grid-column: 1 / -1; }
    .be-row { grid-template-columns: 44px minmax(0, 1fr) 14px; }
    .be-tags { grid-column: 2; justify-content: flex-start; }
    .be-go { grid-row: 1; grid-column: 3; }
}
