/* business.css
   Extra styles for the Business Protection Estimator only. It sits on top of the
   shared /tools/tools.css and adds the two-situation switch, the owner blocks and the
   per-owner results table. No inline styles are used anywhere (the content-security
   policy blocks them). */

/* The hidden attribute must win over the display rules below and in tools.css */
.tools-body .btn[hidden],
.tools-body .owner-block[hidden],
.tools-body .mode-btn[hidden],
.tools-body .tool-note[hidden],
.tools-body .tool-disclaimer[hidden],
.tools-body table[hidden],
.tools-body div[hidden] { display: none !important; }

/* ---------- Choose a situation ---------- */
.mode-switch { margin: 0 0 24px; }
.mode-heading {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--navy);
  margin: 0 0 10px;
}
.mode-buttons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 600px) { .mode-buttons { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.mode-btn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 44px;
  padding: 16px 18px;
  text-align: left;
  border: 2px solid var(--navy);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-family: var(--sans);
  cursor: pointer;
}
.mode-btn:hover { background: var(--cream); }
.mode-btn[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  box-shadow: inset 0 -5px 0 var(--gold);
}
.mode-btn[aria-pressed="true"]:hover { background: var(--navy-mid); }
.mode-title { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; line-height: 1.3; }
.mode-btn[aria-pressed="true"] .mode-title::before { content: "\2713\00a0"; color: var(--gold); }
.mode-desc { font-size: 0.95rem; line-height: 1.45; }

/* ---------- Owners ---------- */
fieldset.tool-fields.owner-block {
  margin: 0 0 8px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--line);
}
fieldset.tool-fields.owner-block:first-of-type { border-top: 0; padding-top: 0; }
/* float and full width keep the legend inside the box, so the divider line never runs through it */
.owner-legend {
  float: left;
  width: 100%;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--navy);
  padding: 0 0 8px;
}
.owner-fields { clear: both; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; }
@media (min-width: 700px) { .owner-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.owner-remove { margin: 0 0 12px; }
.owner-add-row { margin: 12px 0 0; }

/* ---------- Per-owner results: each owner is a small block, so five columns never overflow ---------- */
.breakdown.owners-table,
.breakdown.owners-table tbody { display: block; }
.breakdown.owners-table tr {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.breakdown.owners-table th[scope="row"] {
  display: block;
  padding: 0 0 4px;
  border: 0;
  font-weight: 700;
  color: #fff;
}
.breakdown.owners-table td {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
  border: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.breakdown.owners-table td::before {
  content: attr(data-label);
  text-align: left;
  color: var(--gold-light);
}
.breakdown.owners-table tr.total { border-top: 2px solid var(--gold); border-bottom: 0; }
.breakdown.owners-table tr.total th,
.breakdown.owners-table tr.total td { border-top: 0; }

/* ---------- Printing ---------- */
@media print {
  .mode-btn[aria-pressed="false"] { display: none !important; }
  .mode-btn { border-color: #000; background: #fff; color: #000; box-shadow: none; }
  .breakdown.owners-table th[scope="row"] { color: #000; }
  .breakdown.owners-table td::before { color: #000; }
  .breakdown.owners-table tr { border-bottom-color: #000; }
  .breakdown.owners-table tr.total { border-top-color: #000; }
}
