/*
 * Statboard - the server info panel on Game Features.
 *
 * The look is the old MU fan-site server box: a framed table where a label sits
 * left, its value sits right, and a run of dots ties the two together. Built
 * from the theme's own tokens so it reads as part of the site rather than a
 * pastiche - the frame, surface and accent are the same ones the rails use.
 *
 * No extra markup carries the dots: they come from a pseudo-element that grows
 * to fill whatever gap is left between label and value, so a long label simply
 * gets a shorter leader.
 */

/*
 * Double frame.
 *
 * An inset shadow on the panel was the first attempt and it notched the top
 * corners, because the head's own background paints over the inner rule where
 * the two meet. Putting the second frame on the body instead keeps both rules
 * unbroken and reads the same.
 */
.theme-supreme-eternal .et-statboard .et-panel__body {
    border: 1px solid var(--et-line-soft);
    margin: 3px;
    padding: 13px 15px 15px;
}

/* ---- groups ------------------------------------------------------------- */

.theme-supreme-eternal .et-statboard__group + .et-statboard__group {
    margin-top: 16px;
}

.theme-supreme-eternal .et-statboard__heading {
    color: var(--et-accent);
    font: 600 var(--et-size-xs) / 1 var(--et-ui);
    letter-spacing: var(--et-track-label);
    margin: 0 0 8px;
    text-transform: uppercase;
}

/* ---- rows --------------------------------------------------------------- */

.theme-supreme-eternal .et-statboard__rows {
    margin: 0;
    padding: 0;
}

.theme-supreme-eternal .et-statboard__row {
    align-items: baseline;
    display: flex;
    gap: 6px;
    padding: 5px 0;
}

.theme-supreme-eternal .et-statboard__row dt {
    color: var(--et-text-dim);
    flex: 0 0 auto;
    font: 500 var(--et-size-md) / 1.3 var(--et-body);
    margin: 0;
}

/*
 * The leader.
 *
 * `border-bottom: 1px dotted` was the obvious choice and it renders as a solid
 * hairline at this weight - the dots and their gaps both round to sub-pixel and
 * blur together. A radial-gradient tile gives real dots at a size we control:
 * a 2px dot every 5px, one row tall, repeated across whatever space is left.
 */
.theme-supreme-eternal .et-statboard__row::after {
    background-image: radial-gradient(circle, var(--et-accent-deep) 1px, transparent 1px);
    background-position: 0 bottom;
    background-repeat: repeat-x;
    background-size: 5px 2px;
    content: '';
    flex: 1 1 auto;
    height: 1em;
    margin: 0 4px;
    min-width: 20px;
    opacity: 0.85;
    order: 1;
}

.theme-supreme-eternal .et-statboard__row dd {
    color: var(--et-text-bright);
    flex: 0 0 auto;
    font: 600 var(--et-size-md) / 1.3 var(--et-ui);
    /* Values line up in a column even as digits change. */
    font-variant-numeric: tabular-nums;
    margin: 0;
    order: 2;
    text-align: right;
    white-space: nowrap;
}

/* ---- screenshot slot ---------------------------------------------------- */

.theme-supreme-eternal .et-statboard__figure {
    border: 1px solid var(--et-line-panel);
    margin: 16px 0 0;
    padding: 0;
}

.theme-supreme-eternal .et-statboard__figure img {
    display: block;
    height: auto;
    max-width: 100%;
}

.theme-supreme-eternal .et-statboard__figure figcaption {
    border-top: 1px solid var(--et-line-soft);
    color: var(--et-text-label);
    font: 500 var(--et-size-xs) / 1.5 var(--et-ui);
    letter-spacing: 0.06em;
    padding: 7px 10px;
    text-align: center;
}

/* ---- narrow columns ----------------------------------------------------- *
 * Below the rail breakpoint the centre column is narrower still. Long values
 * would push the leader out entirely, so the row breaks into two lines with the
 * value sitting under its label and the dots dropped.
 */
@media (max-width: 640px) {
    .theme-supreme-eternal .et-statboard__row {
        display: grid;
        gap: 1px;
        grid-template-columns: minmax(0, 1fr);
    }

    .theme-supreme-eternal .et-statboard__row::after {
        display: none;
    }

    .theme-supreme-eternal .et-statboard__row dd {
        text-align: left;
    }
}
