/** Panel — typed region container with optional collapsible header. */ .panel { border: 1px solid var(--border-color, rgba(0, 0, 0, 0.12)); border-radius: 8px; background: var(--bg-primary, #fff); overflow: clip; display: flex; flex-direction: column; min-height: 0; } /* Card regions in bounded flex hosts (sidebar, PanelLayout pane): body fills and scrolls. */ .panel[data-variant="card"] .body:not(.bodyHidden) { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; } /* --- Variant: table — fills available height, bounded scroll --- */ .panel[data-variant="table"] { flex: 1; min-height: 0; display: flex; flex-direction: column; } .panel[data-variant="table"] .body { flex: 1; min-height: 0; padding: 0; display: flex; flex-direction: column; } /* --- Variant: dashboard — natural height, grid-friendly --- */ .panel[data-variant="dashboard"] .body { padding: 14px; } /* --- Variant: toolbar — compact, no border-radius, minimal chrome --- */ .panel[data-variant="toolbar"] { border-radius: 0; border-left: none; border-right: none; } .panel[data-variant="toolbar"] .body { padding: 8px 14px; } /* Toolbars are chrome (filter/action bars), not collapsible content regions. title/id are still required for identification + a11y, but no visible header bar is rendered to avoid duplicate headers above existing toolbar content. */ .panel[data-variant="toolbar"] .header { display: none; } /* --- Generic fill — any variant can grow to fill a bounded region --- */ .panel[data-fill="true"] { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; } .panel[data-fill="true"] .body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; } /* --- Variant: editor — full height, no body padding --- */ .panel[data-variant="editor"] { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: visible; } .panel[data-variant="editor"] .body { flex: 1; min-height: 0; padding: 0; display: flex; flex-direction: column; overflow: visible; } /* --- Variant: wizard — step container --- */ .panel[data-variant="wizard"] .body { padding: 20px; } .header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--bg-secondary, rgba(0, 0, 0, 0.02)); border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.08)); min-height: 40px; position: relative; } .headerCollapsible { cursor: pointer; user-select: none; /* Reserve space so action icons never overlap the collapse chevron */ padding-right: 30px; } .headerCollapsible:hover { background: var(--bg-hover, rgba(0, 0, 0, 0.04)); } .titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; } .title { font-size: 14px; font-weight: 600; color: var(--text-primary, #1a1a1a); line-height: 1.3; } .subtitle { font-size: 12px; font-weight: 400; color: var(--text-secondary, #666); line-height: 1.3; } .actions { flex-shrink: 1; min-width: 0; display: flex; align-items: center; gap: 4px; margin-left: auto; } /* Collapse chevron: always rightmost, above action icons (never covered). */ .chevron { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; font-size: 12px; color: var(--text-tertiary, #888); z-index: 2; pointer-events: none; } .body { padding: 14px; } .bodyHidden { display: none; } /* Dark theme */ :global(.dark-theme) .panel { border-color: var(--border-color, rgba(255, 255, 255, 0.1)); background: var(--bg-primary, #1e1e1e); } :global(.dark-theme) .header { background: var(--bg-secondary, rgba(255, 255, 255, 0.03)); border-bottom-color: var(--border-color, rgba(255, 255, 255, 0.06)); } :global(.dark-theme) .headerCollapsible:hover { background: var(--bg-hover, rgba(255, 255, 255, 0.05)); }