/* One surface, one primary action, and controls only when editing. */
.panel-header { min-height: 52px; padding: 10px 16px; }
.right-panel { --workspace-surface: #0d1420; background: var(--workspace-surface); }
.right-panel > .panel-header { position: relative; overflow: visible; z-index: 4; background: var(--workspace-surface); }
.right-panel .panel-title { width: auto; font-size: 12px; letter-spacing: .4px; }
.output-actions { position: relative; margin-left: 0; }
.output-actions > summary { list-style: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: #aebbd1; border-radius: 5px; cursor: pointer; font-size: 22px; line-height: 1; }
.output-actions > summary::-webkit-details-marker { display: none; }
.output-actions > summary:hover, .output-actions[open] > summary { background: #1b2639; color: #eef2ff; }
.output-actions-list { position: absolute; z-index: 20; right: 0; top: 38px; width: 180px; padding: 6px; border: 1px solid #35435b; border-radius: 8px; background: #151f30; box-shadow: 0 12px 32px #0006; }
.output-actions-list .example-btn { display: flex; width: 100%; min-height: 34px; justify-content: flex-start; padding: 7px 10px; margin: 0; border: 0; border-radius: 4px; background: transparent; font-size: 12px; font-weight: 400; color: #c3cfe2; }
.output-actions-list .example-btn:hover { background: #26344b; color: #fff; }
.output-actions-list svg { display: none; }
.right-panel .query-toolbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; padding: 12px 16px; background: var(--workspace-surface); border-color: #253044; }
.right-panel .query-toolbar .settings-group { flex: 1 1 auto !important; display: flex; flex-wrap: nowrap; min-width: 0; }
.right-panel .query-toolbar .settings-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.right-panel .query-toolbar .settings-input { flex: 1 1 auto !important; width: 100%; height: 36px; padding: 8px 10px; font-size: 12px; background: #0a111d; border-color: #344057; }
.query-toolbar #clearPathBtn { display: none; }
.right-panel .settings-btn { min-height: 34px; border-radius: 5px; padding: 6px 12px; font-size: 12px; font-weight: 500; background: #6366f1; }
.right-panel .settings-btn:hover { background: #7779f5; }
.right-panel #conditionalToggle { order: 1; flex-shrink: 0; min-height: 34px; padding: 6px 10px; background: transparent; border: 0; color: #b9c6de; font-size: 12px; }
.right-panel #evaluatePathBtn { order: 2; }
.right-panel #shareBtn { display: inline-flex; flex-shrink: 0; margin-left: auto; background: #1a2335; color: #d7e0f0; }
.right-panel #shareBtn:hover { background: #26344b; color: #eef2ff; }
.right-panel.is-editing-filter #evaluatePathBtn, .right-panel.is-editing-filter #conditionalToggle { display: none; }
.right-panel.is-editing-filter .query-toolbar { border-bottom: 0; padding-bottom: 4px; }
.right-panel .group-picker, .right-panel .conditional-builder { padding: 12px 16px; background: var(--workspace-surface); }
.right-panel .builder-heading { margin-bottom: 12px; align-items: center; }
.right-panel .builder-heading h3 { font-size: 12px; font-weight: 500; color: #c5d0e3; }
.builder-secondary { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.right-panel .builder-heading .example-btn, .right-panel #addCondition { padding: 4px 6px; min-height: 30px; font-size: 11px; border: 0; background: transparent; color: #aebcd4; font-weight: 400; }
.right-panel .builder-heading .example-btn:hover, .right-panel #addCondition:hover { color: #e5eaff; background: #1a2538; }
.right-panel .builder-heading .editor-close { width: 28px; font-size: 20px; padding: 0; }
.right-panel .group-choices { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 10px; margin: 0; }
.right-panel #groupParentLabel { margin-bottom: 10px; }
.right-panel .group-choices .settings-btn { height: 36px; }
.group-value-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
#groupCount { color: #8f9fb9; font-size: 10px; font-weight: 400; }
.right-panel .conditional-builder input, .right-panel .conditional-builder select, .right-panel .group-picker select { background: #0a111d; border-color: #344057; border-radius: 5px; }
.right-panel .builder-actions { margin-top: 8px; }
.right-panel .filter-explanation { padding: 10px 16px; border-top: 0; border-bottom: 1px solid #253044; background: var(--workspace-surface); }
.right-panel .filter-explanation p { font-size: 12px; color: #b5c3d9; }
.right-panel #showFilterFlow { padding: 4px 0 4px 8px; min-height: 28px; border: 0; background: transparent; color: #9eafd0; font-size: 11px; font-weight: 400; }
.right-panel #showFilterFlow:hover { color: #e1e7ff; }
.right-panel #showFilterFlow svg { display: none; }
.right-panel .group-selection { background: var(--workspace-surface); padding: 8px 16px; }
.right-panel .group-selection .example-btn { border: 0; background: transparent; font-weight: 400; color: #bac8e5; }
@media (max-width: 640px) {
    .right-panel .query-toolbar { padding: 10px 12px; flex-wrap: wrap; gap: 6px; }
    .right-panel .query-toolbar .settings-group { flex-basis: 100% !important; }
    .right-panel #conditionalToggle { margin-left: auto; }
    .right-panel .group-picker, .right-panel .conditional-builder { padding: 10px 12px; }
    .right-panel .filter-explanation { padding: 9px 12px; }
    .right-panel .builder-heading { flex-wrap: nowrap; gap: 6px; }
    .builder-secondary { gap: 2px; }
    .right-panel .group-choices { gap: 8px; }
    .right-panel .group-choices .settings-btn { padding-inline: 10px; }
}
