/* Storage-Locations admin (M-314). Presentation for the driver-config form's per-driver groups, the multi-line
   key field, and the inline "Test connection" verdict — the locations counterparts of masterdata's
   `masterdata-driver-*` rules, kept in platform because the Locations admin is platform-owned. No inline styles,
   no markup in JS (§4); every colour comes from a design token. */

/* Each driver's config renders as one `.platform-form__fields` group (shared flex-column layout + gap); the
   `location-form` controller shows only the live driver's group by flipping `.is-hidden` (no inline style, no
   markup in JS — §4). Two-class selector so `display: none` wins over `.platform-form__fields`'s
   `display: flex`. The surrounding fieldset uses the platform's `.platform-form__group` (border/padding + the
   Bootstrap-Reboot-safe legend), so no fieldset styling is duplicated here (§3). */
.platform-location-group.is-hidden {
    display: none;
}

/* The multi-line key field (an SFTP PEM private key, M-314) — monospace so the block reads as structured text,
   and only vertically resizable so it can grow for a long key without breaking the form's column. */
.platform-location-key {
    font-family: var(--platform-font-mono, ui-monospace, "SFMono-Regular", "Menlo", monospace);
    white-space: pre;
    resize: vertical;
}

/* Two-column edit layout (M-326): driver configuration on the left, live connection-test output on the right.
   The layout itself is the shared `<x-platform::two-column>` shell (M-074) + `platform-form--split` (which
   lifts the single-stack 40rem cap so the form spans the page), the same split the contract/směrnice editors
   use — so nothing here re-declares the columns. Only the test-panel body below is locations-specific. */

/* The connection-test panel body: the run button, the resting hint, the tone-coded verdict, the folder listing
   and the read-check line. Colours come from design tokens; the resting states carry neither tone class. */
.platform-location-test {
    display: flex;
    flex-direction: column;
    gap: var(--platform-space-sm, 0.5rem);
}

.platform-location-test__run {
    align-self: flex-start;
}

.platform-location-test__idle {
    margin: 0;
    color: var(--platform-color-text-muted, #57606a);
    font-size: var(--platform-font-size-sm, 0.875rem);
}

.platform-location-test__verdict,
.platform-location-test__read {
    margin: 0;
    font-weight: 600;
}

.platform-location-test__verdict.is-ok,
.platform-location-test__read.is-ok {
    color: var(--platform-color-ok, #1a7f37);
}

.platform-location-test__verdict.is-error,
.platform-location-test__read.is-error {
    color: var(--platform-color-error, #cf222e);
}

.platform-location-test__subhead {
    margin: var(--platform-space-sm, 0.5rem) 0 var(--platform-space-xs, 0.25rem);
    font-size: var(--platform-font-size-sm, 0.875rem);
    font-weight: 700;
}

.platform-location-test__entries {
    list-style: none;
    margin: 0;
    padding: 0;
}

.platform-location-test__truncated {
    margin: var(--platform-space-xs, 0.25rem) 0 0;
    color: var(--platform-color-text-muted, #57606a);
    font-size: var(--platform-font-size-xs, 0.75rem);
}

/* One listing row: a type badge, the entry name (wraps on long names), and a right-aligned size for files. */
.platform-location-entry {
    display: flex;
    align-items: baseline;
    gap: var(--platform-space-sm, 0.5rem);
    padding: var(--platform-space-xs, 0.25rem) 0;
    border-bottom: 1px solid var(--platform-color-border, #d0d7de);
}

.platform-location-entry__badge {
    flex: 0 0 auto;
    padding: 0 var(--platform-space-xs, 0.25rem);
    border-radius: var(--platform-radius-sm, 0.25rem);
    background: var(--platform-color-surface-muted, #f6f8fa);
    color: var(--platform-color-text-muted, #57606a);
    font-size: var(--platform-font-size-xs, 0.75rem);
}

.platform-location-entry__badge--dir {
    color: var(--platform-color-accent, #0969da);
}

.platform-location-entry__name {
    flex: 1 1 auto;
    word-break: break-all;
}

.platform-location-entry__size {
    flex: 0 0 auto;
    color: var(--platform-color-text-muted, #57606a);
    font-size: var(--platform-font-size-sm, 0.875rem);
    font-variant-numeric: tabular-nums;
}
