/* OSDP Bench Web's styles. The app is embedded in z-bitco.com's /osdp-bench/web/ page (embed.html), so every rule is
   scoped to #osdp-bench-web or the .bench classes and nothing styles the host page. Colors, fonts and radii are the
   Z-bit design system's --zb-* tokens, which the site defines (zbit.css); standalone.css defines them for index.html. */

.bench {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 16px;
    color: var(--zb-text);
    font-family: var(--zb-font-body);
    font-size: 15px;
    line-height: 1.45;
    text-align: left;
}

.bench *, .bench *::before, .bench *::after { box-sizing: border-box; }

.bench h2 {
    font-family: var(--zb-font-body);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--zb-text-muted);
}

.bench h3 {
    font-family: var(--zb-font-body);
    font-size: 13px;
    font-weight: 600;
    margin: 18px 0 6px;
    color: var(--zb-text-muted);
}

.bench-card {
    min-width: 0;
    background: var(--zb-bg-raised);
    border: 1px solid var(--zb-border);
    border-radius: var(--zb-radius-sm);
    padding: 18px;
}

.bench-field { margin-bottom: 14px; }
.bench-field > label { display: block; font-size: 13px; color: var(--zb-text-muted); margin-bottom: 4px; }
.bench-field > label.bench-check { color: var(--zb-text); font-size: 14px; }
.bench-check input { margin: 0 6px 0 0; vertical-align: -1px; }

.bench select,
.bench input[type=number],
.bench input[type=text] {
    width: 100%;
    margin: 0;
    padding: 7px 9px;
    font: inherit;
    color: var(--zb-text);
    background: var(--zb-bg-raised);
    border: 1px solid var(--zb-border-strong);
    border-radius: var(--zb-radius-sm);
}

.bench input[type=text] { margin-top: 6px; }
.bench select:focus-visible,
.bench input:focus-visible,
.bench-button:focus-visible { outline: 2px solid var(--zb-focus); outline-offset: 2px; }

.bench-mono, .bench pre, .bench-events { font-family: var(--zb-font-mono); }

.bench-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.bench-value { font-weight: 500; overflow-wrap: anywhere; }

.bench-button {
    font: inherit;
    font-weight: 500;
    margin: 0;
    padding: 7px 16px;
    border-radius: var(--zb-radius-sm);
    border: 1px solid var(--zb-primary-bg);
    background: var(--zb-primary-bg);
    color: var(--zb-primary-text);
    cursor: pointer;
    white-space: nowrap;
}

.bench-button:hover:not(:disabled) { background: var(--zb-primary-hover); border-color: var(--zb-primary-hover); }
.bench-button--secondary { background: transparent; color: var(--zb-text); border-color: var(--zb-border-strong); }
.bench-button--secondary:hover:not(:disabled) { background: var(--zb-bg-sunken); border-color: var(--zb-text-muted); }
.bench-button:disabled { opacity: .45; cursor: default; }

.bench-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.bench-hint { font-size: 13px; margin: 6px 0 0; }
.bench-warn { color: var(--zb-danger); }

.bench-status { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; margin-bottom: 12px; }
.bench-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--zb-text-muted); }
.bench-status.on .bench-dot { background: var(--zb-ok); }
.bench-status.wait .bench-dot { background: var(--zb-warn); }

.bench dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; margin: 0 0 14px; font-size: 14px; }
.bench dt { color: var(--zb-text-muted); }
.bench dd { margin: 0; font-variant-numeric: tabular-nums; }

.bench pre {
    background: var(--zb-bg-sunken);
    color: var(--zb-text);
    border: 0;
    border-radius: var(--zb-radius-sm);
    padding: 10px;
    font-size: 12px;
    overflow-x: auto;
    margin: 12px 0 0;
}

.bench-events { list-style: none; padding: 0; margin: 0; font-size: 12px; color: var(--zb-text-muted); }
.bench-events li { margin: 0; padding: 2px 0; border-bottom: 1px solid var(--zb-border); overflow-wrap: anywhere; }

/* Shown in the root element until the app first renders. */
.bench-loading { margin: 48px 0; text-align: center; color: var(--zb-text-muted); }

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 10px 16px;
    background: var(--zb-warn-bg);
    color: var(--zb-warn);
    border-top: 1px solid var(--zb-warn-line);
    font-family: var(--zb-font-body);
}

#blazor-error-ui .dismiss { float: right; cursor: pointer; }
