/* prompt-config-panel.css — Shared config panel for prompt pages.
   All rules scoped under .pc-panel. */

.pc-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Fields ──────────────────────────────────────────────── */

.pc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pc-field--default {
    opacity: 0.7;
}

.pc-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    color: rgba(17, 24, 39, 0.87);
}

.pc-default-badge {
    font-size: 11px;
    font-weight: 400;
    color: #919191;
    font-style: italic;
}

.pc-value {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

/* ── Tags (read-only values) ─────────────────────────────── */

.pc-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(74, 74, 74, 0.2);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    color: rgba(17, 24, 39, 0.87);
}

.pc-tag--empty {
    background: none;
    color: #919191;
    font-style: italic;
}

/* ── Binding dropdown ────────────────────────────────────── */

.pc-binding-select {
    flex: 1;
    min-width: 0;
    padding: 4px 8px;
    border: 1px solid hsla(0, 0%, 40%, 0.15);
    border-radius: 6px;
    background: var(--app-bg-primary, #fff);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.pc-binding-status {
    font-size: 13px;
    margin-left: 6px;
}

/* ── Toggle switch ───────────────────────────────────────── */

.pc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.pc-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pc-toggle-track {
    position: relative;
    width: 40px;
    height: 22px;
    background: #ccc;
    border-radius: 16px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.pc-toggle-input:checked + .pc-toggle-track {
    background: #212121;
}

.pc-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 35, 11, 0.2);
    transition: left 0.2s ease;
}

.pc-toggle-input:checked + .pc-toggle-track .pc-toggle-thumb {
    left: 20px;
}

.pc-toggle-label {
    font-size: 14px;
    font-weight: 400;
    color: rgba(17, 24, 39, 0.87);
}

/* ── Number input ────────────────────────────────────────── */

input.pc-number-input {
    padding: 5px 10px;
    border: 1px solid hsla(0, 0%, 40%, 0.15);
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    line-height: 22px;
    color: rgba(17, 24, 39, 0.87);
    width: 80px;
    box-sizing: border-box;
}

input.pc-number-input:focus {
    outline: none;
    border-color: #141b9b;
}

/* ── Subordinate fields (children of a toggle) ───────────── */

/* Indented under their parent toggle with a subtle left border, same
   visual language as the collapsible form sections on the retrieval page. */
.pc-subfields {
    margin: 4px 0 4px 10px;
    padding-left: 14px;
    border-left: 2px solid hsla(0, 0%, 40%, 0.15);
}

/* Dimmed while the parent toggle is off — the values are irrelevant then.
   Still interactive, so a user can prepare a value before enabling. */
.pc-subfields--muted {
    opacity: 0.5;
}
