/* FireCAD app: shared styles for every host (web and desktop), served as _content/FireCAD.UI/firecad-ui.css.
   Load after FireCad.Brand (brand.css) and MudBlazor. Colours and font only through the --fc-* brand tokens.
   Sections: shell · module page head · toolbar · two-column module layout · result tables · warnings · print. */

/* ---------- shell ---------- */
html, body { font-family: var(--fc-font); color: var(--fc-ink); background: var(--fc-bg); }
/* The brand bar is centred at 72rem for the marketing sites; the app is full width, so the logo lines up with the menu. */
.fc-header .fc-bar { max-width: none; }
h1:focus { outline: none; }

/* ---------- module page head ---------- */
.fc-module { --fc-radius: 12px; --fc-radius-s: 8px;
    --fc-shadow: 0 1px 2px color-mix(in srgb, var(--fc-navy) 7%, transparent), 0 2px 8px color-mix(in srgb, var(--fc-navy) 5%, transparent); }
.fc-module-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.8rem 1.5rem; margin-bottom: 0.9rem; }
.fc-module-head h1 { margin: 0 0 0.2rem; color: var(--fc-navy); font-size: clamp(1.5rem, 2.6vw, 1.95rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.012em; }
.fc-lead { margin: 0; max-width: 48rem; color: var(--fc-muted); font-size: 1rem; }

/* Unit system: segmented switch */
.fc-units { display: inline-flex; padding: 3px; background: #fff; border: 1px solid var(--fc-rule); border-radius: 10px; }
.fc-units button { min-width: 3.4rem; padding: 0.35rem 0.8rem; border: 0; border-radius: 7px; background: transparent; color: var(--fc-navy-2);
    font: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer; }
.fc-units button:hover { background: var(--fc-bg); }
.fc-units button.on { background: var(--fc-navy-2); color: #fff; }
.fc-units button:focus-visible { outline: 2px solid var(--fc-orange); outline-offset: 2px; }

/* ---------- project bar ---------- */
.fc-module-toolbar { margin-bottom: 1rem; padding: 0.6rem 0.9rem; background: #fff; border: 1px solid var(--fc-rule); border-radius: var(--fc-radius); box-shadow: var(--fc-shadow); }
.fc-projectbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; }
.fc-projectbar .fc-projectbar-name { flex: 1 1 16rem; max-width: 24rem; }
.fc-projectbar .fc-projectbar-open { flex: 1 1 16rem; max-width: 24rem; }
.fc-projectbar .mud-input-control { margin-top: 0; }
.fc-example-item b { display: block; color: var(--fc-navy-2); font-weight: 600; }
.fc-example-item small { display: block; max-width: 26rem; color: var(--fc-muted); font-size: 0.82rem; white-space: normal; }

/* ---------- two-column module layout ---------- */
.fc-module-grid { display: grid; grid-template-columns: minmax(24rem, 2fr) minmax(0, 3fr); gap: 1.2rem; align-items: start; }
.fc-module--stacked .fc-module-grid { grid-template-columns: minmax(0, 1fr); }
.fc-module-inputs { min-width: 0; }
.fc-module-results { min-width: 0; padding: 1rem 1.2rem 1.2rem; background: #fff; border: 1px solid var(--fc-rule); border-top: 3px solid var(--fc-orange);
    border-radius: var(--fc-radius); box-shadow: var(--fc-shadow); }
@media (min-width: 1200px) {
    /* Results stay in view while the inputs scroll (side-by-side layout only). */
    .fc-module:not(.fc-module--stacked) .fc-module-results { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
}
@media (max-width: 1199.98px) { .fc-module-grid { grid-template-columns: minmax(0, 1fr); } }
.fc-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; min-height: 14rem; color: var(--fc-muted); text-align: center; }
.fc-empty p { margin: 0; font-size: 1.02rem; }

.fc-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1rem; }
.fc-actions > .mud-button-root { flex: 1 1 10rem; }

/* ---------- results ---------- */
.fc-results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.8rem; }
.fc-results-head h2 { margin: 0; color: var(--fc-navy); font-size: 1.25rem; font-weight: 700; }
.fc-result-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 0.4rem 1.6rem; align-items: start; }
.fc-result-block { margin: 0 0 1.1rem; min-width: 0; }
.fc-result-block h3 { margin: 0 0 0.3rem; color: var(--fc-muted); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.fc-result-table { width: 100%; border-collapse: collapse; }
.fc-result-table th { padding: 0.42rem 0.3rem 0.42rem 0; border-bottom: 1px solid var(--fc-rule); color: var(--fc-ink); font-size: 0.93rem; font-weight: 400; text-align: left; }
.fc-result-table td { padding: 0.42rem 0.3rem; border-bottom: 1px solid var(--fc-rule); white-space: nowrap; }
.fc-result-table td.fc-num { color: var(--fc-navy); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.fc-result-table td.fc-unit { width: 1%; padding-right: 0; color: var(--fc-muted); font-size: 0.88rem; }
.fc-result-table tr.fc-emphasis th { font-weight: 600; }
.fc-result-table tr.fc-emphasis td.fc-num { font-size: 1.08rem; color: var(--fc-cta); }
.fc-result-table tr:hover > * { background: color-mix(in srgb, var(--fc-bg) 60%, transparent); }

/* Wide tables in results (part load, row by row, stages): plain, scrollable */
.fc-data-table { width: 100%; overflow-x: auto; margin: 0 0 1.1rem; }
.fc-data-table table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.fc-data-table th { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--fc-rule); color: var(--fc-muted); font-weight: 500; text-align: right; white-space: nowrap; }
.fc-data-table th:first-child, .fc-data-table td:first-child { text-align: left; }
.fc-data-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--fc-rule); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ---------- notices ---------- */
.fc-notice { margin: 0 0 0.8rem; padding: 0.6rem 0.85rem; background: #fff; border: 1px solid var(--fc-rule); border-left: 4px solid var(--fc-rule);
    border-radius: var(--fc-radius-s, 8px); font-size: 0.93rem; }
.fc-notice ul { margin: 0; padding-left: 1.1rem; }
.fc-notice--info { border-left-color: var(--fc-navy-2); }
.fc-notice--ok { border-left-color: #1e7f4f; }
.fc-notice--warning { border-left-color: #a2600a; background: color-mix(in srgb, #a2600a 5%, #fff); }
.fc-notice--error { border-left-color: #b3261e; background: color-mix(in srgb, #b3261e 5%, #fff); color: #8c1d18; }

/* ---------- print: the calculation without the site around it ---------- */
@media print {
    .fc-header, .fc-footer, .app-nav, .fc-module-toolbar, .fc-actions, .fc-units { display: none !important; }
    .fc-module-grid { display: block; }
    .fc-module-results { position: static; max-height: none; box-shadow: none; }
}
.fc-result-columns > .fc-wide { grid-column: 1 / -1; }
/* Section heading inside the results (e.g. Economiser, Air heater under a boiler): spans the whole results grid. */
.fc-section { grid-column: 1 / -1; margin: 0.6rem 0 0.5rem; padding-top: 0.6rem; border-top: 1px solid var(--fc-rule); color: var(--fc-navy);
    font-size: 1.05rem; font-weight: 700; }
