/* Ban Statistics at the top of the Ban List (bans.php). Loaded after topfrag-theme.css and uses its colour tokens.
 * Same look as the activity figures on the Badges & Awards page. */

.bs { margin: 4px 0 18px; }

.bs-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 12px;
}
.bs-title h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-family: var(--font-cond);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--text-bright);
}
.bs-title h2 i { color: var(--accent); }
.bs-title p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-dim); }

.bs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.bs-periods { display: inline-flex; gap: 3px; padding: 3px; background: var(--panel-2); border-radius: 999px; }
.bs-period {
    padding: 8px 16px;
    font-family: var(--font-cond);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--text-dim);
    cursor: pointer;
    background: transparent;
    border: 0;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}
.bs-period:hover { color: var(--text-bright); }
.bs-period:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bs-period[aria-pressed="true"] { color: #04140f; background: var(--accent); box-shadow: 0 0 12px rgba(0, 245, 195, 0.35); }
.bs-updated { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; white-space: nowrap; color: var(--text-dim); }
.bs-live { width: 8px; height: 8px; background: var(--online); border-radius: 50%; box-shadow: 0 0 10px rgba(34, 197, 94, 0.7); }

/* ---- cards ---- */
.bs-grid { display: grid; grid-template-columns: 1.08fr 1fr 1fr 1fr; gap: 12px; }
.bs-card {
    position: relative;
    min-width: 0;
    padding: 14px 18px 14px;
    overflow: hidden;
    background: linear-gradient(110deg, var(--panel-alt), var(--panel) 90%);
    border: 1px solid var(--border-soft);
    border-radius: 13px;
}
.bs-card--main {
    border-color: rgba(0, 245, 195, 0.55);
    box-shadow: 0 0 18px rgba(0, 245, 195, 0.12), inset 0 0 24px rgba(0, 245, 195, 0.05);
}
.bs-label {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    overflow: hidden;
    font-family: var(--font-cond);
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-bright);
}
.bs-label i { flex-shrink: 0; width: 18px; font-size: 15px; text-align: center; color: var(--accent); }
.bs-body { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; min-height: 64px; margin-top: 8px; }
.bs-value {
    font-family: var(--font-head);
    font-size: 44px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    color: var(--text-bright);
}
.bs-card--main .bs-value { color: var(--accent); }
.bs-change { display: flex; flex-direction: column; gap: 5px; white-space: nowrap; }
.bs-change small { font-size: 12px; color: var(--text-dim); }
.bs-delta {
    width: max-content;
    padding: 3px 9px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-bright);
    background: var(--panel-2);
    border-radius: 8px;
}

.bs-spark { flex: 0 1 134px; min-width: 0; height: 56px; margin-left: auto; overflow: visible; }
.bs-spark-area { fill: var(--accent); fill-opacity: 0.1; }
.bs-spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.bs-spark-dot { fill: var(--accent); stroke: var(--panel-alt); stroke-width: 2; }
.bs-spark-hit { fill: transparent; }
.bs-spark-hit:hover { fill: rgba(255, 255, 255, 0.05); }

/* one bar a day: today in full colour */
/* the bars narrow to fit the card instead of running off its edge */
.bs-bars { display: flex; flex: 0 1 121px; align-items: flex-end; gap: 5px; min-width: 0; height: 56px; margin-left: auto; border-bottom: 1px solid var(--border-soft); }
.bs-bars--thin { flex-basis: 178px; gap: 2px; }
.bs-bar { display: flex; flex: 1 1 0; align-items: flex-end; min-width: 2px; max-width: 13px; height: 100%; }
.bs-bars--thin .bs-bar { max-width: 4px; }
.bs-bar i { display: block; width: 100%; background: rgba(0, 245, 195, 0.35); border-radius: 4px 4px 0 0; }
.bs-bars--thin .bs-bar i { border-radius: 2px 2px 0 0; }
.bs-bar.is-today i { background: var(--accent); }
.bs-bar:hover i { background: rgba(0, 245, 195, 0.6); }
.bs-bar.is-today:hover i { background: var(--accent-hover); }

.bs-country { display: flex; align-items: center; gap: 12px; min-width: 0; margin-top: 16px; }
.bs-country img { flex-shrink: 0; width: 40px; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07); }
.bs-country strong {
    overflow: hidden;
    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--accent);
}
.bs-sub { margin: 8px 0 0; font-size: 13px; color: var(--text-dim); }
.bs-none { margin: 14px 0 0; font-size: 13px; color: var(--text-dim); }

.bs-mark { position: absolute; right: 16px; bottom: 10px; z-index: 0; font-size: 62px; color: rgba(0, 245, 195, 0.14); pointer-events: none; }

/* ---- bans by server ---- */
.bs-servers {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px 26px;
    margin-top: 12px;
    padding: 12px 20px;
    background: linear-gradient(110deg, var(--panel-alt), var(--panel));
    border: 1px solid var(--border);
    border-radius: 12px;
}
.bs-servers-intro { display: flex; grid-row: span 2; align-items: center; gap: 14px; }
.bs-servers-intro i { font-size: 19px; color: var(--accent); }
.bs-servers-intro h3 {
    margin: 0;
    font-family: var(--font-cond);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--text-bright);
}
.bs-servers-intro p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-dim); }
.bs-servers-bar { display: flex; gap: 2px; height: 20px; }
.bs-servers-bar span { min-width: 4px; border-radius: 4px; }
.bs-servers-bar--empty { background: var(--panel-2); border-radius: 4px; }
.bs-servers .bs-none { margin: 0; }
.bs-servers-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.bs-servers-legend li { display: grid; grid-template-columns: 11px auto; column-gap: 7px; row-gap: 1px; white-space: nowrap; }
.bs-dot { align-self: center; width: 11px; height: 11px; border-radius: 3px; }
.bs-servers-legend b { font-size: 12px; font-weight: 700; color: var(--text-bright); }
.bs-servers-legend small { grid-column: 2; font-size: 12px; color: var(--text-dim); }

/* four across only while each card still fits its number, comparison and chart side by side */
@media (max-width: 1399px) {
    .bs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- phones ---- */
@media (max-width: 720px) {
    .bs-head { align-items: stretch; }
    .bs-actions { width: 100%; justify-content: space-between; }
    .bs-periods { display: flex; flex: 1 1 auto; }
    .bs-period { flex: 1 1 0; padding: 9px 6px; font-size: 12.5px; }
    .bs-grid { gap: 9px; }
    .bs-card { padding: 12px; }
    .bs-label { align-items: flex-start; gap: 7px; font-size: 12px; white-space: normal; }
    .bs-body { flex-wrap: wrap; gap: 6px 10px; min-height: 0; }
    .bs-value { font-size: 32px; }
    .bs-change small { font-size: 11px; }
    .bs-delta { padding: 2px 7px; font-size: 11.5px; }
    .bs-spark, .bs-bars { display: none; }
    .bs-country { gap: 8px; margin-top: 12px; }
    .bs-country img { width: 30px; }
    .bs-country strong { font-size: 20px; }
    .bs-sub { font-size: 11.5px; }
    .bs-card .bs-mark { display: none; }
    .bs-servers { grid-template-columns: minmax(0, 1fr); padding: 12px; }
    .bs-servers-intro { grid-row: auto; gap: 12px; }
    .bs-servers-legend { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .bs-period { transition: none; }
}
