/* Shared key/value field-grid styling for detail pages (Survey Detail, Sample
   cards, etc.). Global (not scoped) so it can be reused across component
   files without needing ::deep — Blazor scoped CSS doesn't cross component
   boundaries, and these classes are used both in the page that first defined
   them (SurveyDetail.razor) and in new, separate Sample-card components. */
.sd-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 32px;
}

/* Denser column counts for field sets that are mostly short values (ADO 5711):
   --3 for Sample Details, --4 for the gear-metadata blocks. Survey Details keeps
   the 2-column default, where the values are long names and prose. */
.sd-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sd-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Two spans, deliberately named for what they do — at 2 columns they were the
   same thing, but from 3 columns up they are not. */
.sd-span-all {
    grid-column: 1 / -1;
}

.sd-span-2 {
    grid-column: span 2;
}

.sd-k {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--rtr-web-text-faint);
    margin-bottom: 2px;
}

.sd-v {
    font-size: 14px;
    color: var(--rtr-web-text);
}

.sd-v.mono {
    font-variant-numeric: tabular-nums;
}

.sd-v.missing {
    color: var(--rtr-web-danger);
}

.sd-substrate-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.sd-substrate-name {
    width: 70px;
    flex: 0 0 auto;
    font-size: 13px;
    color: var(--rtr-web-text-muted);
}

.sd-substrate-track {
    flex: 1 1 auto;
    height: 8px;
    border-radius: 999px;
    background: var(--rtr-web-surface-muted);
    overflow: hidden;
}

.sd-substrate-fill {
    display: block;
    height: 100%;
    background: var(--rtr-web-accent);
    border-radius: inherit;
}

.sd-substrate-pct {
    width: 40px;
    flex: 0 0 auto;
    text-align: right;
    font-size: 13px;
    color: var(--rtr-web-text-muted);
}

/* Detail-header right-hand cluster (ADO 5711): KPI tiles + that row's controls,
   grouped so the header's justify-space-between only ever opens a gap after the
   title instead of stranding the tiles mid-row. Wraps as a unit on narrow
   viewports. Shared by SurveyDetail's page header and each SampleCard header —
   separate components, hence global here rather than a scoped ::deep in each. */
.sd-head-right {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

/* RtrWebStatStrip's compact gap (18px) is tuned for the tight tiles on the survey
   list cards; these header strips are wider and need more air between labels
   like "CATCH RECORDS". The leading `div` is load-bearing: the library's own
   scoped rule `.rtr-web-statstrip--compact[b-*]` also scores 0,2,0, so without that
   extra element specificity the winner would come down to stylesheet order. */
div.sd-head-right > .rtr-web-statstrip--compact {
    gap: 28px;
}

.sd-map-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    border-radius: var(--rtr-web-radius);
    background: var(--rtr-web-surface-muted);
    color: var(--rtr-web-text-faint);
    font-size: 13px;
    text-align: center;
    padding: 12px;
}
