/* The one base for BidTruss app views: square, flat and bordered, in both themes.
   Every value is a palette token from web.appearance.startup.js, so light and dark differ only there.
   Element defaults sit inside :where() at zero specificity so any view class can still adjust them;
   this file loads after app.css and bidtruss-product.css so the shared classes are defined once, here.
   View <style> blocks own layout only: grid columns, widths and spacing between their own parts. */

:root {
	--bt-control-height: 44px;
	--bt-control-pad: 12px;
	--bt-field-width: 28rem;
	--bt-field-width-short: 12rem;
	--bt-field-width-notes: 44rem;
	--bt-gap: 16px;
	--bt-panel-pad: 20px;
	--bt-font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* Page */
.ui-view {
	box-sizing: border-box;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-content: start;
	gap: var(--bt-gap);
	width: 100%;
	min-width: 0;
	margin: 0 auto;
	padding: 24px clamp(16px, 3vw, 24px) 48px;
	color: var(--ui-shell-text);
	font: 15px/1.5 var(--bt-font);
	text-align: left;
}
:where(.ui-view) *, :where(.ui-view) *::before, :where(.ui-view) *::after { box-sizing: border-box; }
/* View state wins over every grid and flex rule below. */
.ui-view [hidden] { display: none !important; }
.guided__steps { display: flex; flex-wrap: wrap; gap: var(--bt-gap); margin-block: var(--bt-gap); align-items: end; }
.guided__steps [aria-current="step"] { outline: 2px solid var(--ui-product-accent); outline-offset: -2px; }
.guided__steps, .guided__body { min-width: 0; grid-column: 1 / -1; }
.guided__body > section { display: grid; gap: var(--bt-gap); }
.guided__body > [hidden] { display: none !important; }
.guided__dialog { width: min(680px, calc(100vw - 32px)); }
.guided__dialog label { display: grid; gap: 4px; margin-block: 8px; }
.concrete-draw-dialog { width: min(1100px, calc(100vw - 24px)); }
.concrete-draw canvas { width: 100%; height: min(40dvh, 500px); display: block; touch-action: none; }
.concrete-draw input { max-width: 160px; }

:where(.ui-view) :is(h1, h2, h3, h4) { margin: 0; color: var(--ui-shell-heading); font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
:where(.ui-view) h1, .ui-view__title { font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; }
:where(.ui-view) h2 { font-size: 18px; line-height: 1.3; }
:where(.ui-view) h3 { font-size: 16px; line-height: 1.35; }
:where(.ui-view) p { margin: 0; max-width: 80ch; }
:where(.ui-view) :is(ul, ol) { margin: 0; padding-left: 20px; }
:where(.ui-view) a { color: var(--ui-product-accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:where(.ui-view) a:hover { text-decoration-thickness: 2px; }
:where(.ui-view) output { display: block; color: var(--ui-shell-muted); font-size: 14px; overflow-wrap: anywhere; }
:where(.ui-view) code { font: 13px/1.5 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
:where(.ui-view) pre { margin: 0; padding: 12px; max-width: 100%; overflow: auto; border: 1px solid var(--ui-shell-border); background: var(--ui-panel-alt); font: 13px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
:where(.ui-view) pre:empty { display: none; }

/* Links back to related pages sit in one row above the title. */
.ui-view__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; font-size: 14px; }
.ui-view__nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* Surfaces: a panel or card is one flat bordered box. */
.ui-panel, .ui-card {
	box-sizing: border-box;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-content: start;
	gap: var(--bt-gap);
	min-width: 0;
	padding: var(--bt-panel-pad);
	border: 1px solid var(--ui-shell-border);
	border-radius: 0;
	background: var(--ui-shell-panel);
	color: var(--ui-shell-text);
	box-shadow: none;
}

/* Sections inside a surface are separated by a rule, not by another box. */
:where(.ui-view) :is(details, fieldset) { min-width: 0; margin: 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--ui-shell-border); }
:where(.ui-view) fieldset { display: grid; gap: 12px; }
:where(.ui-view) details > * + * { margin-top: 12px; }
:where(.ui-view) summary { display: flex; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; }
:where(.ui-view) legend { float: left; width: 100%; padding: 0 0 12px; font-weight: 600; }
:where(.ui-view) legend + * { clear: left; }

/* Fields stay readable on wide screens; Aaron explicitly rejects full-screen-width inputs.
   Labels stack their text above the control; a checkbox label is one row. */
:where(.ui-view) form { display: grid; gap: 12px; min-width: 0; max-width: min(100%, var(--bt-field-width-notes)); margin: 0; }
:where(.ui-view) label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; font-size: 14px; font-weight: 500; }
:where(.ui-view) > label { max-width: var(--bt-field-width); }
:where(.ui-view) label:has(> input:is([type=checkbox], [type=radio])) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 44px; font-weight: 400; }
/* A checkbox that switches on its own field puts that field on the next line, full width. */
:where(.ui-view) label:has(> input:is([type=checkbox], [type=radio])) > :is(input:not([type=checkbox], [type=radio]), select) { flex: 1 1 100%; }

/* Text boxes, selects and text areas share one box: same height, border, fill and type. */
:where(.ui-view) :is(input:not([type=checkbox], [type=radio], [type=color], [type=file], [type=range], [type=hidden]), select, textarea), .form-control {
	box-sizing: border-box;
	display: block;
	width: 100%;
	min-width: 0;
	max-width: min(100%, var(--bt-field-width));
	height: var(--bt-control-height);
	margin: 0;
	padding: 0 var(--bt-control-pad);
	border: 1px solid var(--ui-input-border);
	border-radius: 0;
	background-color: var(--ui-input-bg);
	color: var(--ui-shell-text);
	box-shadow: none;
	font: 15px/1.4 var(--bt-font);
}
:where(.ui-view) input[type=search] { -webkit-appearance: none; appearance: none; }
:where(.ui-view) input:is([type=number], [type=date], [type=datetime-local], [type=time], [type=month], [type=week], [inputmode=decimal], [inputmode=numeric]), input.form-control:is([type=number], [type=date], [type=datetime-local], [type=time], [type=month], [type=week], [inputmode=decimal], [inputmode=numeric]) { max-width: min(100%, var(--bt-field-width-short)); }
:where(.ui-view) textarea, textarea.form-control { max-width: min(100%, var(--bt-field-width-notes)); height: auto; min-height: 96px; padding: 10px var(--bt-control-pad); resize: vertical; }
:where(.ui-view) select, select.form-control {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 36px;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	cursor: pointer;
}
/* BT1103660: a select's chosen words wrap instead of being cut off, where the browser can (Chromium's base-select, on the box
   alone: the list it opens stays the device's own). The box grows a line at a time from its usual height; the arrow is still
   the one above. Elsewhere a select keeps one line. */
@supports (appearance: base-select) {
	:where(.ui-view) select:not([multiple], [size], [hidden]), select.form-control:not([multiple], [size], [hidden]) {
		appearance: base-select;
		/* A block, not base-select's own flex box: its words then wrap within the box at any width, where a flex item would
		   not shrink below its longest word. One line of 21 px sits in the middle of 44 px. */
		display: block;
		height: auto;
		min-height: var(--bt-control-height);
		padding-block: 10px;
		white-space: normal;
		overflow-wrap: break-word;
		text-align: start;
	}
	:where(.ui-view) select::picker-icon, select.form-control::picker-icon { display: none; }
	:where(.ui-view) td select:not([multiple], [size]), :where(.ui-view) td select.form-control:not([multiple], [size]) { min-height: 36px; padding-block: 6px; }
}
:where(.ui-view) :is(input, select, textarea)::placeholder { color: var(--ui-shell-muted); opacity: 1; }
:where(.ui-view) :is(input, select, textarea):hover:not(:disabled, [readonly]) { border-color: var(--ui-shell-text); }
:where(.ui-view) :is(input, select, textarea, .form-control):focus { outline: 2px solid var(--ui-product-accent); outline-offset: -1px; border-color: var(--ui-product-accent); }
:where(.ui-view) :is(input, select, textarea):is(:disabled, [readonly]) { background-color: var(--ui-panel-alt); color: var(--ui-shell-muted); cursor: not-allowed; }
:where(.ui-view) input:is([type=checkbox], [type=radio]) { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--ui-product-accent); cursor: pointer; }
:where(.ui-view) input[type=color] { width: var(--bt-control-height); height: var(--bt-control-height); padding: 4px; border: 1px solid var(--ui-input-border); border-radius: 0; background: var(--ui-input-bg); cursor: pointer; }
:where(.ui-view) input[type=file], input[type=file].form-control { display: block; width: 100%; max-width: min(100%, var(--bt-field-width)); height: auto; padding: 0; border: 0; background: none; color: var(--ui-shell-muted); font: 14px/1.4 var(--bt-font); }
:where(.ui-view) input[type=file]::file-selector-button { height: var(--bt-control-height); margin: 0 12px 0 0; padding: 0 16px; border: 1px solid var(--ui-input-border); border-radius: 0; background: var(--ui-shell-panel); color: var(--ui-shell-text); font: 600 14px/1 var(--bt-font); cursor: pointer; }
:where(.ui-view) input[type=file]::file-selector-button:hover { background: var(--ui-panel-alt); border-color: var(--ui-shell-text); }

/* Buttons: one square, bordered shape. Primary is filled with the accent; everything else is plain.
   The legacy size classes are listed so older views that use them alone get the same shape. */
.btn, .btn-primary, .btn-secondary, .btn-sm, .btn-lg {
	box-sizing: border-box;
	display: inline-flex;
	flex: none;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	justify-self: start;
	gap: 8px;
	width: auto;
	max-width: 100%;
	height: auto;
	min-height: var(--bt-control-height);
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--ui-input-border);
	border-radius: 0;
	background: var(--ui-shell-panel);
	color: var(--ui-shell-text);
	box-shadow: none;
	filter: none;
	font: 600 14px/1.25 var(--bt-font);
	text-align: center;
	text-decoration: none;
	white-space: normal;
	cursor: pointer;
}
.btn:hover, .btn-secondary:hover, .btn-sm:hover, .btn-lg:hover { background: var(--ui-panel-alt); border-color: var(--ui-shell-text); color: var(--ui-shell-text); filter: none; }
.btn-primary { background: var(--ui-product-accent); border-color: var(--ui-product-accent); color: var(--ui-product-on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--ui-product-accent) 82%, var(--ui-shell-text)); border-color: color-mix(in srgb, var(--ui-product-accent) 82%, var(--ui-shell-text)); color: var(--ui-product-on-accent); }
.btn-sm { padding: 0 12px; }
:is(.btn, .btn-primary, .btn-secondary, .btn-sm, .btn-lg):is(:disabled, [aria-disabled=true]) { opacity: 0.45; cursor: not-allowed; }
:is(.btn, .btn-primary, .btn-secondary, .btn-sm, .btn-lg):is(:disabled, [aria-disabled=true]):hover { background: var(--ui-shell-panel); border-color: var(--ui-input-border); }
.btn-primary:is(:disabled, [aria-disabled=true]):hover { background: var(--ui-product-accent); border-color: var(--ui-product-accent); }
:is(.btn, .btn-primary, .btn-secondary):focus-visible { outline: 2px solid var(--ui-product-accent) !important; outline-offset: 2px; }
/* A hidden file input inside a label styled as a button keeps the label's shape. */
label:is(.btn, .btn-primary, .btn-secondary) { display: inline-flex; font-weight: 600; }
/* A row of actions wraps instead of squeezing. */
.ui-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Tables: square cells divided by rules, a filled header and tabular numbers. */
:where(.ui-view) table { width: 100%; border-collapse: collapse; border: 1px solid var(--ui-shell-border); background: var(--ui-shell-panel); font-size: 14px; font-variant-numeric: tabular-nums; }
:where(.ui-view) :is(th, td) { padding: 8px 12px; border-bottom: 1px solid var(--ui-shell-border); text-align: left; vertical-align: middle; }
:where(.ui-view) th { background: var(--ui-table-header-bg); color: var(--ui-shell-heading); font-size: 13px; font-weight: 600; white-space: nowrap; }
:where(.ui-view) tbody tr:hover { background: var(--ui-table-row-stripe); }
:where(.ui-view) td :is(.btn, .btn-secondary, .btn-primary) { min-height: 36px; padding: 0 12px; }
:where(.ui-view) td :is(input:not([type=checkbox], [type=radio]), select) { height: 36px; }
@supports (appearance: base-select) { :where(.ui-view) td select:not([multiple], [size]) { height: auto; } }

@media (max-width: 760px) {
	.ui-view { padding-top: 16px; gap: 12px; }
	:where(.ui-view) h1, .ui-view__title { font-size: 24px; }
	.ui-panel, .ui-card { padding: 16px; }
}
/* BT0005200: on a phone a data table scrolls sideways inside its own box with its first column pinned, so the page
   never scrolls sideways. Tables that restack into rows on a phone (the bids list, the estimate worksheet) keep their own rules. */
@media (max-width: 760px) {
	.ui-view table:not(.estimates__table):not(.bids table) { display: block; max-width: 100%; overflow-x: auto; }
	.ui-view table:not(.estimates__table):not(.bids table) tr > :first-child { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--ui-shell-panel); }
	.ui-view table:not(.estimates__table):not(.bids table) tr > th:first-child { background: var(--ui-table-header-bg); }
}
@media (forced-colors: active) {
	.btn, .btn-primary, .btn-secondary, .ui-panel, .ui-card { border-color: CanvasText; }
}

/* BT0005100: how a company bids, asked at creation and changed by the owner under Company. */
.bt-company-kind { min-width: 0; margin: 0; padding: 0; border: 0; }
.bt-company-kind legend { margin: 0; padding-bottom: 8px; font-size: 16px; font-weight: 600; color: var(--ui-shell-heading); }
.bt-company-kind__choices { display: grid; gap: 8px; max-width: var(--bt-field-width-notes); }
/* Above the shared radio-label rule, which wraps the text under the radio on a phone. */
.bt-company-kind .bt-company-kind__choice { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 12px; min-height: 44px; padding: 12px; border: 1px solid var(--ui-shell-border); border-radius: var(--ui-radius-small); background: var(--ui-shell-panel); color: var(--ui-shell-text); cursor: pointer; }
.bt-company-kind__choice:has(input:checked) { border-color: var(--ui-product-accent); box-shadow: inset 0 0 0 1px var(--ui-product-accent); }
.bt-company-kind__choice:has(input:focus-visible) { outline: 2px solid var(--ui-product-accent); outline-offset: 2px; }
.bt-company-kind__choice input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ui-product-accent); }
.bt-company-kind__text { display: grid; flex: 1 1 auto; gap: 2px; min-width: 0; }
.bt-company-kind__text span { color: var(--ui-shell-muted); font-size: 14px; }
.bt-company-kind__later { margin: 8px 0 0; color: var(--ui-shell-muted); font-size: 14px; }

/* BT1200800: a project's details and status editor (web.ui.frags.register), on the Bids home and Project defaults. */
.register__form { display: grid; gap: 8px; margin-bottom: 16px; }
.register__form h3 { margin: 0; font-size: 16px; }
.register__grid { display: grid; gap: 8px 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.register__field { display: grid; gap: 4px; min-width: 0; }
.register__field[hidden] { display: none; }
.register__field .form-control { min-height: 44px; }
.register__form .btn { min-height: 44px; justify-self: start; }
.register__hint, .register__current { margin: 0; color: var(--ui-shell-muted); font-size: 14px; }
.register__current { color: var(--ui-shell-text); font-weight: 600; }
.register__status:empty { display: none; }
/* BT1200900: the directory page, the register's customer picker and a quote's supplier contact. */
.register__client { grid-column: 1 / -1; display: grid; gap: 8px; min-width: 0; margin: 0; padding: 8px 12px; border: 1px solid var(--ui-shell-border); }
.register__client legend { width: auto; margin: 0; padding: 0 4px; font-size: 14px; font-weight: 600; }
.register__linked { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.register__client .btn, .contacts__actions .btn, .contacts__form .btn, .contacts__add > summary, [data-contacts-more], [data-quote-pin] .btn { min-height: 44px; }
.contacts__list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.contacts__list:empty { display: none; }
.contacts__item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--ui-shell-border); }
.contacts__item[data-archived="1"] > .contacts__name { color: var(--ui-shell-muted); }
.contacts__name { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; font-weight: 600; text-align: left; }
button.contacts__name { display: flex; justify-content: flex-start; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ui-shell-text); text-decoration: underline; }
.contacts__meta { color: var(--ui-shell-muted); font-size: 14px; overflow-wrap: anywhere; }
.contacts__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.contacts__panel { flex: 1 1 100%; display: grid; gap: 12px; padding-top: 8px; border-top: 1px solid var(--ui-shell-border); }
.contacts__groups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: start; }
.contacts__group { display: grid; gap: 8px; min-width: 0; }
.contacts__group h4 { margin: 0; font-size: 16px; }
.contacts__form { flex: 1 1 100%; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.contacts__form .btn, .contacts__form .contacts__uses { grid-column: 1 / -1; justify-self: start; }
.contacts__field { display: grid; gap: 4px; min-width: 0; }
.contacts__field .form-control { min-height: 44px; }
.contacts__check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; }
.contacts__uses { display: flex; flex-wrap: wrap; gap: 0 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.contacts__uses legend { width: 100%; margin: 0; font-size: 14px; font-weight: 600; }
.contacts__hint { margin: 0; color: var(--ui-shell-muted); font-size: 14px; }
.contacts__add > summary { display: inline-flex; align-items: center; list-style: none; cursor: pointer; }
.contacts__add > summary::-webkit-details-marker { display: none; }
.contacts__add[open] > summary { margin-bottom: 8px; }
.contacts__mapping { display: grid; gap: 8px 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.contacts__scroll { max-width: 100%; overflow-x: auto; }
.contacts__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.contacts__table th, .contacts__table td { padding: 6px 8px; border-bottom: 1px solid var(--ui-shell-border); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.contacts__table select { min-width: 10rem; min-height: 44px; }
.contacts__pinned, .contacts__done { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
[data-quote-pin] { display: grid; gap: 8px; }
[data-quote-pin][hidden] { display: none; }
[data-quote-pin] h5 { margin: 0; font-size: 15px; }
/* BT1103010: a bid starts from its plans. */
.bids__drop { display: grid; gap: 8px; padding: var(--bt-panel-pad); border: 2px dashed var(--ui-shell-border); border-radius: 8px; }
.bids__drop[hidden] { display: none; }
.bids__drop--over { border-color: currentColor; background: var(--ui-shell-hover, rgba(0, 0, 0, .04)); }
.bids__drop-title { margin: 0; font-size: 20px; }
.bids__drop-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bids__drop .takeoff__hint { margin: 0; }
.bids__defaults[hidden] { display: none; }
.bids__defaults p { margin: 0; }
@media (hover: none) { .bids__drop-hint { display: none; } }
@media (min-width: 761px) {
	.bids__new .bids__form { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; }
	.bids__new .bids__form > [data-takeoff-project-zone] { grid-column: 1 / -1; order: 2; margin: 0; }
}
.takeoff__drop-strip { display: grid; gap: 6px; padding: 8px 12px; border: 1px solid var(--ui-shell-border); border-radius: 6px; background: var(--ui-shell-panel); }
.takeoff__drop-strip[hidden] { display: none; }
.takeoff__main.takeoff-drawing__stage > .takeoff__drop-strip { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 39; width: min(560px, calc(100% - 16px)); box-sizing: border-box; }
/* With a sheet open the strip keeps to a corner, clear of the scale prompt at the top and the zoom buttons. */
/* BT1103640: clear of the zoom buttons, however wide their words are (Plans measures them into --takeoff-zoom-width). */
.takeoff__main.takeoff-drawing__stage > .takeoff__drop-strip--corner { top: auto; bottom: max(28px, var(--takeoff-feedback, 0px)); left: 8px; transform: none; width: min(420px, calc(100% - var(--takeoff-zoom-width, 184px) - 24px)); }
@media (max-width: 760px) { .takeoff__main.takeoff-drawing__stage > .takeoff__drop-strip--corner { bottom: calc(max(28px, var(--takeoff-feedback, 0px)) + 48px); width: calc(100% - 16px); } }
.takeoff__drop-strip .takeoff__status:empty { display: none; }
.takeoff__drop-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.takeoff__drop-progress, .takeoff__drop-notes { margin: 0; }
.takeoff__drop-progress:empty { display: none; }
.takeoff__drop-notes { padding: 0; list-style: none; }
.takeoff__drop-notes[hidden] { display: none; }
.takeoff__drop-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* BT1103060: the plan scan's ask, progress and receipt, a card like the drop strip's. */
.takeoff__scan { display: grid; gap: 6px; padding: 8px 12px; border: 1px solid var(--ui-shell-border); border-radius: 6px; background: var(--ui-shell-panel); overflow-wrap: anywhere; }
.takeoff__scan[hidden] { display: none; }
.takeoff__scan h3 { margin: 0; font-size: 1rem; }
.takeoff__scan p { margin: 0; }
.takeoff__scan > .btn { justify-self: start; }
/* On Plans it stands in the plan scan panels' column (BT1103160, takeoff/view.html), placed clear of the plan's controls. */
.takeoff__filter { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-weight: normal; }
.takeoff__check { display: flex; align-items: center; gap: 6px; }
.takeoff__drop-actions:empty { display: none; }
.takeoff__drop-rename { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.takeoff__drop-rename input { flex: 1 1 12rem; min-width: 0; }

/* BT3100100: the lead's outcome reminder on the Bids home and in the register. */
.bids__badge { display: inline-block; padding: 0 8px; border: 1px solid currentColor; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.register__nudge { margin: 0; padding: 8px 12px; border-left: 4px solid currentColor; font-weight: 600; }

/* BT1102990: measured work on the Overview and Costs. */
.measured__list { display: grid; gap: var(--ui-space-2,8px); margin: var(--ui-space-2,8px) 0; padding: 0; list-style: none; }
.measured__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--ui-space-1,4px) var(--ui-space-3,12px); min-width: 0; overflow-wrap: anywhere; }
.measured__row small { color: var(--ui-shell-muted); }
/* BT1103130: the running total from the plans, what is still missing, and the button's review. */
.measured__total { margin: var(--ui-space-2,8px) 0 0; overflow-wrap: anywhere; }
.measured__plans { min-width: 0; overflow-wrap: anywhere; }
.measured__plans p { margin: var(--ui-space-1,4px) 0; }
.measured__missing { display: grid; gap: var(--ui-space-1,4px); margin: 0 0 var(--ui-space-2,8px); padding-inline-start: var(--ui-space-4,16px); }
.measured__missing small { display: block; color: var(--ui-shell-muted); }
.measured__missing ul { display: grid; gap: var(--ui-space-1,4px); margin: var(--ui-space-1,4px) 0 0; padding-inline-start: var(--ui-space-4,16px); }
/* BT1103290: each item's reason under its line, and the type buttons of one with no concrete type. */
.measured__gap { overflow-wrap: anywhere; }
/* BT1103300: "To finish this bid" (look A): grouped by the page where each gap is fixed, the reason under its record, and a
   44 px Go to it. The same warning color outlines a gap's own field on its page, with the reason under it. */
.gaps { min-width: 0; margin: var(--ui-space-2,8px) 0; overflow-wrap: anywhere; }
.gaps h3 { margin: 0 0 var(--ui-space-1,4px); font-size: 1.05rem; }
.gaps__count { margin: 0 0 var(--ui-space-2,8px); color: var(--ui-shell-muted); }
.gaps__page { display: flex; justify-content: space-between; gap: var(--ui-space-2,8px); margin: var(--ui-space-3,12px) 0 var(--ui-space-1,4px); font-size: .95rem; font-weight: 600; }
.gaps__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ui-shell-border); }
.gaps__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ui-space-2,8px) var(--ui-space-3,12px); padding: var(--ui-space-2,8px) 0; border-bottom: 1px solid var(--ui-shell-border); }
.gaps__what { display: flex; flex-direction: column; flex: 1 1 14rem; min-width: 0; }
.gaps__reason { color: var(--ui-warning); }
.gaps__go { min-height: 44px; }
.gap-control { outline: 2px solid var(--ui-warning); outline-offset: 2px; }
/* BT1103650: a new bid's first step on Mix and Forms. */
.mix__first, .forms__first { margin: var(--ui-space-2,8px) 0; font-weight: 600; }
/* A table row takes no outline in every browser, so a gap's row is drawn on its cells. */
tr.gap-control { outline: none; }
tr.gap-control > td { box-shadow: inset 0 2px var(--ui-warning), inset 0 -2px var(--ui-warning); }
tr.gap-control > td:first-child { box-shadow: inset 2px 0 var(--ui-warning), inset 0 2px var(--ui-warning), inset 0 -2px var(--ui-warning); }
tr.gap-control > td:last-child { box-shadow: inset -2px 0 var(--ui-warning), inset 0 2px var(--ui-warning), inset 0 -2px var(--ui-warning); }
td.gap-control { outline-offset: -2px; }
.gap-reason { display: flex; gap: 6px; align-items: baseline; margin-top: 6px; color: var(--ui-warning); }
/* A reason under a member in Concrete's list, a reading or a price on Concrete scope takes its own line. */
.concrete__list > .gap-reason, .plan-facts__row > .gap-reason, .condition-drafts__row > .gap-reason { flex: 1 0 100%; grid-column: 1 / -1; margin: 4px 0 0; }
.gap-reason::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 50%; font-size: 12px; font-weight: 700; }
.measured__gap > span { margin-inline-end: var(--ui-space-1,4px); }
.measured__pick { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--ui-space-1,4px) var(--ui-space-2,8px); margin-inline-end: var(--ui-space-2,8px); }
.measured__pick .btn { min-height: 32px; }
.measured__gap-status:empty { display: none; }
.takeoff__pricing-why { margin: 0 0 var(--ui-space-2,8px); }
.takeoff__pricing-why p { margin: 0; }
/* BT1103310: under a condition on Plans, what its measurements are in Concrete. */
.takeoff__concrete-mark { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--ui-space-2,8px); margin: 0; overflow-wrap: anywhere; }
.takeoff__concrete-mark[hidden] { display: none; }
.takeoff__concrete-waiting { color: var(--ui-shell-muted); }
.measured__make { margin: var(--ui-space-2,8px) 0; }
.measured__review { display: grid; gap: var(--ui-space-1,4px); padding: var(--ui-space-2,8px) var(--ui-space-3,12px); border: 1px solid var(--ui-shell-border, currentColor); border-radius: 6px; }
.measured__review p { margin: 0; }
.measured__actions { display: flex; flex-wrap: wrap; gap: var(--ui-space-2,8px); margin-top: var(--ui-space-1,4px); }
/* BT1104600: Make the quote, on Plans' Estimate panel and the Estimate page: the press and what it does, what it is doing now, and
   what to fix first, drawn as "To finish this bid" is. */
.makequote { display: grid; gap: var(--ui-space-1,4px); min-width: 0; overflow-wrap: anywhere; }
.makequote[hidden] { display: none; }
.makequote__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ui-space-1,4px) var(--ui-space-3,12px); min-width: 0; }
.makequote__button { min-height: 44px; }
.makequote__help { flex: 1 1 14rem; min-width: 0; color: var(--ui-shell-muted); font-size: 13px; line-height: 1.35; }
.makequote__status, .makequote__note { margin: 0; }
.makequote__status:empty { display: none; }
.makequote__note { color: var(--ui-warning); }
.makequote__note[hidden], .makequote .gaps[hidden] { display: none; }
.makequote .gaps { margin: var(--ui-space-1,4px) 0 0; }
/* On Plans it sits right under the Estimate's total box, which stays about 100 px (BT1103980). */
.takeoff__estimate + .makequote { margin: -4px 0 12px; }
