/* ─── Global Application Settings ───────────────────────────────────────────
 *
 * Only what is genuinely unique to this section (inspector-ui-patterns §14). Containers,
 * cards, tables, buttons, inputs, the scroll sentinel and the pagination bar all come from
 * main.css / components.css.
 *
 * Every custom property below is verified to exist in main.css's :root. The previous version
 * of this file referenced --color-primary-500, --text-tertiary, --font-mono,
 * --font-size-heading-sm and --color-destructive-500, none of which are defined anywhere —
 * so those rules silently did nothing, which is why the breadcrumb rendered as plain body
 * text and looked unclickable (§23 anti-pattern: invented tokens).
 */

/* ── Filter bar (list view) ── */

.gas-filter-bar {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.gas-search-input {
    flex: 1;
    max-width: 420px;
}

/* ── Shared text/atoms ── */

.gas-muted {
    color: var(--text-muted);
}

.gas-error {
    color: var(--accent-danger);
}

.gas-hint {
    color: var(--text-secondary);
    font-size: var(--font-size-body-xs);
    margin-bottom: var(--spacing-sm);
}

.gas-section-h {
    margin: 0 0 var(--spacing-sm);
    color: var(--text-primary);
    font-size: var(--font-size-body-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.gas-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: var(--font-size-body-xs);
    font-weight: 600;
    line-height: 1.4;
}

.gas-badge--yes {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-confirm);
}

.gas-badge--no {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

/* Rows are clickable across their whole width; `.table tbody tr:hover` supplies the hover. */
.gas-row {
    cursor: pointer;
}

/* ── Inline create forms (application / context) ── */

.gas-create-host:empty {
    display: none;
}

.gas-create-host {
    margin-bottom: var(--spacing-sm);
}

.gas-create-grid {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: var(--spacing-sm) var(--spacing-md);
    align-items: center;
    max-width: 720px;
}

.gas-create-grid > label {
    color: var(--text-secondary);
    font-size: var(--font-size-body-sm);
}

.gas-create-kv {
    display: flex;
    gap: var(--spacing-sm);
}

.gas-create-kv > input {
    flex: 1;
    min-width: 0;
}

.gas-form-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.gas-form-error {
    margin-top: var(--spacing-sm);
    color: var(--accent-danger);
    font-size: var(--font-size-body-xs);
}

/* ── Key/value editor (vault pattern, §24) ── */

.gas-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.gas-anon-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-body-sm);
    cursor: pointer;
}

.gas-kv {
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.gas-kv-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(0, 2fr) auto;
    gap: var(--spacing-sm);
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-subtle);
}

.gas-kv-row:last-child {
    border-bottom: none;
}

.gas-kv-row--header {
    background: var(--bg-muted);
    color: var(--text-secondary);
    font-size: var(--font-size-body-sm);
    font-weight: 600;
}

/* The permanent blank add row sits visually apart from the saved rows above it. */
.gas-kv-row--add {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-default);
}

/* Brief confirmation flash after a per-row save. */
.gas-kv-row--saved {
    background: rgba(34, 197, 94, 0.12);
    transition: background var(--transition-slow);
}

.gas-kv-key {
    font-family: var(--font-family-mono);
    font-size: var(--font-size-body-xs);
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.gas-kv-value {
    font-family: var(--font-family-mono);
    width: 100%;
}

.gas-kv-actions {
    display: flex;
    gap: var(--spacing-xs);
    justify-content: flex-end;
}
