/* Dense chapter-tree view for fee rules: one readable line per fee item. */
.ribbon-dropdown-menu { width: 158px; }
.ribbon #calculationSettingsMenu { height: 45px; align-self: flex-start; }
.ribbon #calculationSettingsMenu > button { height: 45px !important; }
.ribbon #calculationSettingsMenu .ribbon-label-with-chevron { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.ribbon-dropdown-chevron { display: inline-block; align-self: center; width: 6px; height: 6px; margin: 0; border-right: 1.5px solid #507493; border-bottom: 1.5px solid #507493; transform: rotate(45deg); transform-origin: center; transition: transform .18s ease, border-color .18s ease; }
.ribbon-dropdown.open .ribbon-dropdown-chevron { margin: 0; border-color: #176cab; transform: rotate(225deg); }
.ribbon .ribbon-dropdown-menu button { display: flex !important; width: 100% !important; min-width: 0 !important; height: 34px !important; min-height: 34px; padding: 6px 9px !important; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; gap: 9px !important; text-align: left; white-space: nowrap; }
.ribbon .ribbon-dropdown-menu button > span:last-child { font-size: 13px; line-height: 1.2; }
.calculation-menu-icon { display: inline-flex; flex: 0 0 21px; width: 21px; height: 21px; align-items: center; justify-content: center; border-radius: 5px; background: #e8f2fb; color: #176cac; font-size: 12px; font-weight: 800; line-height: 1; }
.ribbon .ribbon-dropdown-menu .calculation-menu-icon { font-size: 12px; line-height: 1; }
.calculation-menu-icon.material { background: #e9f6ef; color: #257a53; }
.calculation-menu-icon.machine { background: #fff3df; color: #a56a13; }
.calculation-menu-icon.equipment { background: #eeeafd; color: #6650aa; }
.ribbon .ribbon-dropdown-menu .calculation-menu-icon.formula { background: #e8efff; color: #345fbd; font-family: Georgia, serif; font-size: 15px; }
#feeDialog { height: 88vh; }
.formula-dialog .calculation-section { display: block; position: relative; min-height: 0; overflow: hidden; }
.formula-dialog .formula-settings { position: absolute; inset: 0; height: auto; min-height: 0; overflow: hidden; }
.fee-workspace-host { height: 100%; max-height: none; overflow: hidden; }
.fee-workspace-panel,
.fee-tree-main { height: 100%; overflow: hidden; }
.fee-formula-table-wrap { height: 0; min-height: 0; flex: 1 1 0; }
.formula-dialog .dialog-head { min-height: 60px; padding: 10px 18px 6px; }
.formula-dialog .dialog-head h3 { font-size: 17px; }
.formula-dialog > #calculationScopeHint { padding: 6px 18px; }
.formula-dialog #feeRoundingPanel { padding: 6px 18px; }
.formula-dialog #feeRoundingPanel label { flex-direction: row; }
.fee-workspace-tabs { min-height: 37px; }
.fee-workspace-tabs button { height: 27px; padding: 0 10px; }
.fee-tree-main .fee-formula-toolbar { min-height: 46px; padding: 7px 14px; }
.fee-formula-toolbar strong { font-size: 13px; }
.fee-formula-toolbar small { display: none; }
.fee-formula-toolbar input { height: 27px; width: 205px; }
.fee-tree-filter button { height: 25px; padding: 0 8px; }
.fee-tree-table { border-collapse: separate; border-spacing: 0; }
.fee-tree-table th { height: 29px !important; padding: 4px 7px !important; }
.fee-tree-table td { height: 29px !important; padding: 4px 7px !important; border-right: 1px solid #edf2f6; line-height: 1.2; }
.fee-tree-table th:last-child,
.fee-tree-table td:last-child { border-right: 0; }
.fee-tree-name { min-width: 190px; }
.fee-tree-name.leaf { padding-left: 7px !important; }
.fee-tree-name.leaf::before { content: none !important; }
.fee-tree-name.leaf strong::before { content: none !important; }
.fee-directory-name { display: flex; min-width: 0; align-items: center; gap: 4px; padding-left: calc(var(--fee-depth, 0) * .55em); white-space: nowrap; line-height: 1.2; }
.fee-directory-name strong { display: inline; overflow: hidden; color: #284f70; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.fee-tree-toggle,
.fee-tree-toggle-placeholder { display: inline-flex; flex: 0 0 16px; width: 16px; height: 18px; padding: 0; align-items: center; justify-content: center; border: 0; background: transparent; color: #67839c; font-size: 10px; line-height: 1; }
.fee-tree-toggle { cursor: pointer; }
.fee-tree-toggle:hover { color: #176cab; background: #e1edf7; }
.fee-tree-name.summary strong { color: #183f60; font-weight: 800; }
.fee-tree-name small,
.fee-tree-formula small { display: none; }
.fee-tree-formula { min-width: 300px; }
.fee-tree-formula .formula-input { height: 25px; padding: 2px 6px; }
.fee-tree-auto { font-size: 11px; }
.fee-tree-table .fee-inline-input input { height: 25px; }
.fee-tree-table .fee-inline-input,
.fee-tree-table .fee-enabled { flex-direction: row; align-items: center; gap: 4px; margin: 0; }
.fee-tree-group td { height: 29px !important; padding: 4px 7px !important; background: #f4f8fb; }
.fee-directory-group b { margin-left: auto; color: #8ba1b2; font-size: 10px; font-weight: 700; }
.fee-tree-group-note { overflow: hidden; color: #7890a3 !important; font-size: 11px; font-weight: 500 !important; text-overflow: ellipsis; white-space: nowrap; }
.formula-dialog > .dialog-actions { min-height: 48px; padding: 7px 18px; }
.formula-dialog > #feeSource { padding: 5px 18px; }
