/* Round 4: Budget Builder + Revival Ads additions. Loaded only by budget-builder.html and revival-ads.html.
   Uses the tokens and squared look from styles.css; adds nothing global. */

/* ============ Budget Builder ============ */
.budget-size { display: flex; flex-wrap: wrap; align-items: center; column-gap: 28px; }
.budget-size .sizes-label { width: 100%; }
.budget-typical { margin: 0; padding: 10px 0 10px 18px; border-left: 2px solid var(--copper); font-size: 1rem; color: var(--fg-2); }
.budget-typical strong { color: var(--copper-deep); font-weight: 700; white-space: nowrap; }

/* Formula + remove: small text actions under the item name */
.b-acts { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 2px; }
.b-act { background: none; border: 0; padding: 4px 0; min-height: 32px; font: inherit; font-size: .8rem; font-weight: 600; color: var(--fg-2); cursor: pointer; text-decoration: none; }
.b-act:hover, .b-act[aria-pressed="true"] { color: var(--copper-deep); text-decoration: underline; text-underline-offset: .2em; }
.b-act:disabled { color: #8A93A0; cursor: default; text-decoration: none; }
.b-item.has-fx .b-amt input:disabled { color: #18202F; background: var(--white); border-color: var(--mist); }
.b-item:not(.is-on).has-fx .b-amt input:disabled { color: #67707F; }

/* quantity x cost each = total */
.b-fx { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; padding: 10px 0 4px; border-top: 1px dashed var(--mist); }
.b-fx label { display: flex; flex-direction: column; gap: 4px; position: relative; }
.b-fx label span { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.b-fx-in { display: flex; align-items: center; gap: 6px; font-style: normal; }
.b-fx-in i { font-style: normal; font-weight: 700; }
.b-fx input { width: 110px; min-height: 44px; padding: 8px 10px; text-align: right; font-variant-numeric: tabular-nums; }
.b-fx b { font-weight: 700; font-size: 1.2rem; color: var(--fg-2); padding-bottom: 10px; }
.b-fx output { font-weight: 700; font-size: 1.1rem; padding-bottom: 10px; font-variant-numeric: tabular-nums; color: var(--copper-deep); }

/* + Add item: last row of every section */
.b-add { border-top: 1px solid var(--mist); }
.b-add-btn { display: block; width: 100%; min-height: 48px; padding: 10px 18px; background: none; border: 0; text-align: left; font: inherit; font-weight: 700; color: var(--copper-deep); cursor: pointer; }
.b-add-btn:hover { background: rgba(184, 115, 79, .06); }
.b-add.is-open { padding: 14px 18px; background: rgba(184, 115, 79, .05); }
.b-add-form { display: grid; grid-template-columns: 1fr 150px auto; gap: 12px; align-items: end; }
.b-add-form label { display: flex; flex-direction: column; gap: 4px; position: relative; }
.b-add-form label span { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.b-add-form input { min-height: 46px; }
.b-add-price i { position: absolute; left: 12px; bottom: 12px; font-style: normal; font-weight: 700; color: var(--fg-2); }
.b-add-price input { padding-left: 26px; text-align: right; }
.b-add-form input.is-invalid { border-color: #B3261E; }
.b-add-btns { display: flex; align-items: center; gap: 4px; }
.b-add-btns .btn { min-height: 46px; }
.b-item.is-custom .b-label > span:first-child { font-weight: 600; }

/* Reset all amounts: bottom of the budget, out of the sticky bar */
.b-foot { display: flex; justify-content: flex-end; margin-top: -8px; padding-top: 4px; }
.b-reset-all { color: var(--fg-2); font-weight: 700; }

/* Contingency line: phones only (desktop shows it in the summary rows) */
.sum-cont { display: none; }

@media (max-width: 860px) {
  .budget-summary .sum-cont { display: block; order: 1; width: 100%; margin: 2px 0 0; font-size: .86rem; color: #C9D0D8; }
  .budget-summary .sum-cont span { color: var(--copper-light); font-weight: 700; }
  .budget-summary .small { order: 2; }
  .b-foot { justify-content: flex-start; margin-bottom: 8px; }
}
@media (max-width: 560px) {
  .budget-typical { margin-top: 16px; font-size: .95rem; }
  .b-fx { grid-column: 1 / -1; gap: 8px; }
  .b-fx input { width: 92px; }
  .b-add-form { grid-template-columns: 1fr; }
  .b-add-btn { padding: 10px 12px; }
  .b-add.is-open { padding: 12px; }
}
@media print { .b-add, .b-foot, .b-acts, .budget-typical { display: none !important; } }

/* ============ Revival Ads ============ */
.ra-reach { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--rule); }
.ra-label small { display: block; margin-top: 2px; font-size: .9rem; font-weight: 400; color: var(--fg-2); }
.ra-value--reach output { font-size: clamp(3.2rem, 6.4vw, 5.2rem); min-width: 5ch; }

.ra-spend { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--rule); text-align: center; }
.ra-spend-h { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-2); }
.ra-spend-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0 clamp(16px, 4vw, 48px); margin-top: 10px; }
.ra-spend-main { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(4.6rem, 12vw, 9rem); line-height: .9; color: var(--copper-light); font-variant-numeric: tabular-nums; min-width: 4.2ch; }
.ra-spend-side { margin: 0; display: flex; flex-direction: column; gap: 4px; opacity: .55; font-variant-numeric: tabular-nums; }
.ra-spend-side:first-child { align-items: flex-end; }
.ra-spend-side:last-child { align-items: flex-start; }
.ra-spend-side span { font-size: .74rem; font-weight: 700; letter-spacing: .16em; color: var(--fg-2); }
.ra-spend-side b { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1; color: var(--fg); }
.section--revival .ra-note { text-align: center; margin-left: auto; margin-right: auto; }

@media (max-width: 560px) {
  .ra-spend-row { gap: 0 10px; }
  .ra-spend-main { font-size: clamp(3.4rem, 17vw, 4.6rem); min-width: 0; }
  .ra-spend-side b { font-size: 1.25rem; }
  .ra-spend-side span { font-size: .66rem; letter-spacing: .1em; }
}
