/* Project estimate, materials and file controls. */
.bench-grid > .estimate-workspace {
  --workspace-ink:#301036;
  --workspace-primary:#6e177f;
  --workspace-tint:#f5edf9;
  --workspace-focus:#833199;
  --workspace-line:#d9c6df;
  display:grid;
  grid-template-columns:minmax(0,2.04fr) minmax(0,1fr);
  grid-template-areas:"bill bill" "finishes files" "catalog files";
  align-items:start;
  gap:clamp(14px,1.55vw,22px);
  color:var(--workspace-ink);
}
.estimate-workspace :focus-visible {outline-color:var(--workspace-focus)}
.estimate-workspace .paper {
  margin:0;
  padding:clamp(15px,1.75vw,27px);
  border:1px solid var(--workspace-line);
  border-radius:13px;
  background:white;
}
.estimate-workspace #bill {grid-area:bill}
.estimate-workspace .finish-inspector {grid-area:finishes}
.estimate-workspace #catalog-options {grid-area:catalog}
.estimate-workspace #project-files {grid-area:files;align-self:stretch}
.estimate-workspace .paper h2,.estimate-workspace #bill h2,.estimate-disclosure-title {
  margin:0 0 13px;
  font:750 clamp(1.48rem,2.35vw,2.34rem)/1.14 system-ui,sans-serif;
  letter-spacing:-.045em;
}
.estimate-overview {display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.08fr) minmax(0,1.4fr);align-items:center;gap:clamp(16px,2vw,29px)}
.estimate-workspace #price {
  min-width:0;
  padding:14px clamp(11px,1.55vw,22px);
  border-radius:10px;
  background:#f1e5f8;
  color:var(--workspace-ink);
  font:790 clamp(1.8rem,3.1vw,3.05rem)/1.08 system-ui,sans-serif;
  letter-spacing:-.054em;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}
.estimate-workspace #price:empty {display:none}
.estimate-workspace #bill-breakdown {
  align-items:baseline;
  margin:0;
  gap:0 12px;
  color:var(--workspace-ink);
  font-size:clamp(.88rem,1.15vw,1rem);
}
.estimate-workspace #bill-breakdown > * {min-width:0;padding:7px 0;margin:0;border-bottom:1px solid #ece1ef}
.estimate-workspace #bill-breakdown dd {white-space:nowrap}
.estimate-workspace #bill-breakdown > :nth-last-child(-n+2) {border-bottom:0}
.estimate-workspace #price-caption {margin:10px 0 0;color:#645269}
.estimate-workspace #price-caption:empty {display:none}
.estimate-actions,.project-file-actions {margin:0;display:grid;gap:10px}
.estimate-actions {grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}
.estimate-icon {display:block;width:21px;height:21px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;color:#641671}
#workbench .estimate-workspace .estimate-actions button,#workbench .estimate-workspace .project-file-actions button {
  display:flex;align-items:center;justify-content:center;gap:10px;
  border:1px solid #bd9cc9;border-radius:9px;
  padding:8px 12px;min-height:46px;
  background:#fff;color:var(--workspace-primary);
  font-weight:700;line-height:1.25;text-align:left;
}
#workbench .estimate-workspace .estimate-actions button:hover:not(:disabled),#workbench .estimate-workspace .project-file-actions button:hover:not(:disabled){background:#f5edf9;border-color:var(--workspace-focus)}
.estimate-details {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px;margin-top:19px}
.estimate-details > button {
  min-height:44px;display:flex;align-items:center;gap:10px;text-align:left;
  padding:9px 13px;font-weight:700;cursor:pointer;list-style:none
}
.estimate-disclosure summary::-webkit-details-marker {display:none}
.estimate-disclosure > summary {display:grid;align-items:center;list-style:none}
.estimate-disclosure > summary::after {
  content:"";width:8px;height:8px;margin-right:3px;
  border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translateY(-2px)
}
.estimate-disclosure[open] > summary::after {transform:rotate(225deg) translateY(-1px)}
.estimate-details > button {width:100%;min-width:0;border:1px solid #e2d2e8;border-radius:9px;color:#30123e;background:#f5edf8}
.estimate-details > button:hover {background:#eee0f4}
.estimate-details > button::after {content:"↗";margin-left:auto;color:#652079;font-size:1.05rem}
.estimate-dialog {
  box-sizing:border-box;width:min(740px,calc(100vw - 24px));max-width:none;max-height:min(86dvh,850px);
  overflow:auto;overscroll-behavior:contain;padding:0;border:1px solid #ded0e5;border-radius:16px;
  color:#30123e;background:#fff;box-shadow:0 20px 65px #28133145
}
.estimate-dialog::backdrop {background:#25172875}
.estimate-dialog > header {
  position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;align-items:center;gap:10px;
  padding:8px 16px;background:#faf6fc;border-bottom:1px solid #e2d2e8
}
.estimate-dialog > header h3 {margin:0;font-size:clamp(1.06rem,3vw,1.35rem);line-height:1.2}
.estimate-dialog > header button {width:44px;height:44px;margin:0;padding:0;font-size:1.45rem}
.estimate-dialog-content {padding:clamp(12px,3vw,22px);overflow-wrap:anywhere}
.estimate-dialog-content > :first-child {margin-top:0}
.estimate-dialog-content > :last-child {margin-bottom:0}
.estimate-disclosure > summary {grid-template-columns:minmax(0,1fr) auto;gap:7px;padding:0;font-weight:500}
.estimate-disclosure > summary::after {grid-column:2;grid-row:1}
.estimate-disclosure-title {margin:0}
.estimate-disclosure-hint,#draft-state {grid-column:1/-1}
.estimate-disclosure-hint {display:none;font-size:.83rem;color:#645269}
#draft-state {
  display:block;margin:1px 0 0;padding:9px 11px;border-radius:8px;
  background:#f1e5f8;color:#54345f;line-height:1.4;font-size:.85rem;
}
#draft-state:empty {display:none}
.estimate-file-help {margin:10px 0 0;color:#54345f;font-size:.85rem}
.project-file-actions {margin-top:12px}
#workbench .estimate-workspace .project-file-actions button {justify-content:flex-start;width:100%;margin:0}
.estimate-workspace #materials-fields {margin-top:15px;gap:9px}
.estimate-workspace #materials-fields label {grid-template-columns:minmax(105px,.34fr) minmax(0,1fr);align-items:center;gap:10px;color:var(--workspace-ink);font-weight:640}
.estimate-workspace #materials-fields select {border-color:#cbb6d3;border-radius:8px;background:#fff;font-size:16px;font-weight:500}
.estimate-workspace #services input {accent-color:var(--workspace-primary)}
.estimate-workspace .finish-surface {border-radius:10px;box-shadow:none}
.estimate-workspace .finish-surface img {aspect-ratio:1.56}
.estimate-workspace #finish-samples button {border-radius:8px;color:var(--workspace-ink);font-size:clamp(.95rem,1.45vw,1.24rem);font-weight:700}
.estimate-workspace #finish-samples [aria-pressed=true] .finish-surface::after {background:var(--workspace-primary)}
.estimate-workspace #finish-samples button:hover .finish-surface {outline-color:var(--workspace-focus)}
.estimate-workspace .finish-inspector > a {color:var(--workspace-primary)}
.estimate-workspace :is(#bill,#catalog-options,#project-files,#finish-title) {scroll-margin-top:14px}
@media (max-width:1120px) and (min-width:761px) {
  .estimate-overview {grid-template-columns:minmax(0,.86fr) minmax(0,1.2fr)}
  .estimate-actions {grid-column:1/-1}
}
@media (max-width:760px) {
  #workbench #mobile-pdf {background:#6e177f;border-color:#6e177f;color:white}
  #workbench #mobile-pdf:hover:not(:disabled) {background:#571266;color:white}
  .bench-grid > .estimate-workspace {grid-template-columns:minmax(0,1fr);grid-template-areas:"bill" "finishes" "catalog" "files";gap:13px}
  .estimate-workspace .paper {padding:13px}
  .estimate-workspace .paper h2,.estimate-workspace #bill h2,.estimate-disclosure-title {font-size:1.45rem;line-height:1.13;margin:0 0 11px}
  .estimate-disclosure-title {margin:0}
  .estimate-overview,.estimate-actions,.estimate-details {grid-template-columns:minmax(0,1fr);gap:9px}
  .estimate-workspace #price {padding:10px 11px;font-size:clamp(1.43rem,6.2vw,1.95rem)}
  .estimate-workspace #bill-breakdown {font-size:.88rem}
  .estimate-workspace #bill-breakdown > * {padding:4px 0}
  .estimate-details {margin-top:13px}
  .estimate-details > button {padding:8px 9px;min-height:44px;font-size:.89rem}
  .estimate-details .estimate-icon {width:18px;height:18px}
  .estimate-disclosure-hint {display:block}
  .estimate-workspace #materials-fields label {grid-template-columns:minmax(0,1fr);gap:4px}
  .estimate-workspace .finish-surface img {aspect-ratio:1.35}
  .estimate-workspace .finish-inspector > a {min-height:44px}
}
