/* CMP 3.0 — Budget Calculator and Retirement Living Standards cards in the Target income tab (19.10.26).
   See static/budget-tab.js. */

/* Only on the Target income tab */
#inputsPane:not([data-tab="target"]) #cmp3Rls, #inputsPane:not([data-tab="target"]) #cmp3Budget { display: none !important; }
#inputsPane #cmp3Budget[hidden] { display: none !important; }
/* The old link to the separate Budget Calculator page is replaced by the card */
#inputsPane #budgetCalculatorButton { display: none !important; }

/* Layout: target section and the standards on the left, the budget on the right */
#inputsPane { container-type: inline-size; }
#inputsPane[data-tab="target"] .cmp3-ip-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-rows: auto; gap: 16px; align-items: start; }
#inputsPane[data-tab="target"] #leftColumn { grid-column: 1; grid-row: 1; column-count: 1 !important; columns: auto !important; }
#inputsPane[data-tab="target"] #leftColumn .accordion-item[data-cmp3-tab="target"] { margin-bottom: 0; }
#inputsPane[data-tab="target"] #cmp3Rls { grid-column: 1; grid-row: 2; }
#inputsPane[data-tab="target"] #cmp3Budget { grid-column: 2; grid-row: 1; }
/* Budget not in use: the standards sit beside the target section */
#inputsPane[data-tab="target"] .cmp3-ip-body:has(> #cmp3Budget[hidden]) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto; }
#inputsPane[data-tab="target"] .cmp3-ip-body:has(> #cmp3Budget[hidden]) #cmp3Rls { grid-column: 2; grid-row: 1; }
/* Narrow (side by side view, small windows): one column */
@container (max-width: 860px) {
  #inputsPane[data-tab="target"] .cmp3-ip-body { display: block; }
  #inputsPane[data-tab="target"] #cmp3Rls, #inputsPane[data-tab="target"] #cmp3Budget { margin-top: 16px; }
}

/* Cards, as the input sections */
.bt-card { background: #ffffff; border: 1px solid #e3e4dc; border-radius: 12px; padding: 20px 22px; color: #24261f; box-sizing: border-box; min-width: 0; }
.bt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 4px; }
.bt-head h3 { margin: 0; font-size: 18px; font-weight: 700; color: #24261f; }
.bt-muted { margin: 4px 0 14px; color: #55584c; font-size: 14px; line-height: 1.45; }
.bt-foot { margin: 14px 0 0; font-size: 12.5px; }

/* Standards card */
.bt-std { border: 1px solid #e3e4dc; background: #f7f6f1; border-radius: 10px; padding: 14px 16px; margin-top: 10px; }
.bt-std-on { border-color: #2E6B33; box-shadow: inset 4px 0 0 #2E6B33; }
.bt-std-k { display: flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #4b4e44; }
.bt-std-k span { letter-spacing: 0.02em; text-transform: none; font-size: 11.5px; font-weight: 700; color: #ffffff; background: #2E6B33; border-radius: 999px; padding: 2px 9px; }
.bt-std-v { font-size: 26px; font-weight: 600; margin-top: 4px; line-height: 1.15; }
.bt-std-v small { font-size: 14px; font-weight: 400; color: #55584c; }
.bt-std-y { font-size: 13px; color: #55584c; }
.bt-std p { margin: 6px 0 0; font-size: 14px; color: #33352d; }
.bt-src { margin: 12px 0 0; font-size: 12.5px; }
.bt-src a { color: #2E6B33; }

/* Budget card */
.bt-total { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.bt-total small { font-size: 12px; color: #55584c; text-transform: uppercase; letter-spacing: 0.08em; }
.bt-total strong { font-size: 24px; color: #2E6B33; }
.bt-ty { font-size: 13px; color: #55584c; margin-left: 6px; }
.bt-all { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; background: #f1f3ec; border-radius: 10px; margin-bottom: 4px; }
.bt-all > span { font-size: 14px; font-weight: 600; }
.bt-row { padding: 14px 0 12px; border-bottom: 1px solid #ecece4; }
.bt-row:last-of-type { border-bottom: none; }
.bt-row-top { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.bt-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.bt-info { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #c9ccbf; color: #ffffff;
  font-size: 11px; font-weight: 700; font-style: italic; font-family: Georgia, serif; cursor: help; }
.bt-pill { display: inline-flex; background: #ecede6; border-radius: 999px; padding: 2px; }
.bt-pill button { font-family: inherit; border: none; background: transparent; color: #4b4e44; font-size: 12.5px; font-weight: 600; min-height: 28px; padding: 0 11px; border-radius: 999px; cursor: pointer; }
.bt-pill button.bt-on { background: #2E6B33; color: #ffffff; }
.bt-pill button:focus-visible { outline: 2px solid #2E6B33; outline-offset: 1px; }
.bt-row-bottom { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.bt-slider { flex: 1 1 auto; min-width: 80px; accent-color: #2E6B33; }
.bt-figs { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.bt-figs small { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #6b6e62; }
.bt-figs strong { font-size: 14px; min-width: 54px; text-align: right; }
.bt-figs strong.bt-m { color: #2f5f8f; margin-right: 6px; }
.bt-rent { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.bt-rent[hidden] { display: none; }
.bt-rent select { flex: 1 1 120px; min-width: 0; min-height: 36px; border: 1px solid #d6d8cc; border-radius: 8px; padding: 0 8px; font-family: inherit; font-size: 13.5px; color: #24261f; background: #ffffff; }
.bt-rent select:disabled { color: #9a9d90; background: #f4f4ef; }
@container (max-width: 520px) {
  .bt-row-bottom { flex-wrap: wrap; }
  .bt-figs { width: 100%; justify-content: flex-end; }
}

/* Not in use: what the calculator does, and a button to start (19.10.26) */
.bt-cats { list-style: none; margin: 4px 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bt-cats li { font-size: 12.5px; color: #4b4e44; background: #f1f3ec; border-radius: 999px; padding: 4px 10px; }
.bt-start { font-family: inherit; min-height: 42px; padding: 0 20px; border-radius: 10px; border: none; background: #2E6B33; color: #ffffff; font-size: 15px; font-weight: 600; cursor: pointer; }
.bt-start:hover { background: #255a2a; }
/* Budget against the modelled income */
.bt-vs { font-size: 13.5px; color: #4b4e44; margin: 2px 0 4px; }
.bt-vs[hidden] { display: none; }
.bt-vs strong { color: #24261f; }
.bt-surplus { color: #2E6B33; font-weight: 700; }
.bt-short { color: #b23b2a; font-weight: 700; }
