/* Quote location controls keep their own readable surfaces in either app theme. */
html body #view-builder #lines .line.section .line-top{position:relative}
html body #view-builder #lines .line.section button.quote-section-location{
  grid-area:location;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-width:0;min-height:34px;margin:0;padding:6px 10px;border:1px solid #b6cbd8;
  border-radius:6px;background:#f8fbfd;color:#163a52;font:600 12px/1.3 var(--bb-body,system-ui);
  box-shadow:0 1px 1px #00000014;cursor:pointer;white-space:nowrap;
}
html body #view-builder #lines .line.section button.quote-section-location:hover,
html body #view-builder #lines .line.section button.quote-section-location[aria-expanded="true"]{
  background:#deedf6;border-color:#8db1c7;color:#102d42;
}
html body #view-builder #lines .line.section .quote-location-editor{
  grid-column:1/-1;grid-row:2;min-width:0;padding:14px;margin:5px 0 2px;
  border:1px solid #bacdd9;border-radius:8px;background:#f3f7fa;color:#153449;
  font:400 13px/1.5 var(--bb-body,system-ui);text-align:left;
}
html body #view-builder #lines .line.section .quote-location-editor>p{margin:0 0 10px;color:#3a5669;font:inherit}
html body #view-builder #lines .line.section .quote-location-editor .quote-location-controls{
  margin:0;padding:0;border:0;background:transparent;color:#153449;
}
html body #view-builder #lines .line.section .quote-location-editor legend{
  margin:0 0 8px;padding:0;background:transparent;color:#153449;font-size:13px;font-weight:700;
}
html body #view-builder #lines .line.section .quote-location-editor .quote-location-grid{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;
}
html body #view-builder #lines .line.section .quote-location-editor .client-copy-field{
  display:grid;gap:6px;margin:0 0 10px;color:#153449;font:600 12px/1.5 var(--bb-body,system-ui);
}
html body #view-builder #lines .line.section .quote-location-editor :is(input,select){
  display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:44px;
  padding:9px 10px;border:1px solid #93adbf!important;border-radius:6px;
  background:#ffffff!important;color:#153449!important;font:400 16px/1.4 var(--bb-body,system-ui);
  color-scheme:light;box-shadow:none;
}
html body #view-builder #lines .line.section .quote-location-editor .quote-location-validation{
  margin:2px 0 10px;color:#a42d14;font-size:12px;font-weight:600;
}
html body #view-builder #lines .line.section .quote-location-editor .quote-location-validation:empty{display:none}
html body #view-builder #lines .line.section .quote-location-actions{display:flex;justify-content:flex-end;margin-top:4px}
html body #view-builder #lines .line.section button.quote-location-accept{
  display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:9px 15px;
  border:1px solid #104b3c;border-radius:6px;background:#155d4b;color:#fff;font:650 13px/1.4 var(--bb-body,system-ui);cursor:pointer;
}
html body #view-builder #lines .line.section button.quote-location-accept:hover{background:#104b3c}
html body #view-builder #lines .line.section .section-factor-inline{
  display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;max-width:100%;
  margin:0;padding:0;background:transparent;color:inherit;white-space:nowrap;
  font:500 11px/1.4 var(--bb-body,system-ui);
}
html body #view-builder #lines .line.section .section-factor-inline .location-factor-readout{font:inherit;color:inherit}
html body #view-builder #lines .line.section .section-factor-inline.is-missing .location-factor-readout{
  padding:2px 5px;border-radius:4px;background:#fff0c2;color:#6b3d00;
}
html body #view-builder #lines .line.section .section-factor-inline .location-factor-edit,
html body #view-builder #lines .line.section .section-factor-inline .location-factor-edit[open]{
  display:block;position:static;flex:none;margin:0;padding:0;border:0;
}
html body #view-builder #lines .line.section .section-factor-inline .location-factor-edit>summary{
  display:flex;align-items:center;justify-content:center;width:34px;min-height:34px;margin:0;padding:0;
  border:1px solid #b6cbd8;border-radius:5px;background:#f8fbfd;color:#163a52;
  font:400 16px/1 var(--bb-body,system-ui)!important;list-style:none;cursor:pointer;
}
html body #view-builder #lines .line.section .section-factor-inline .location-factor-edit>summary::-webkit-details-marker{display:none}
html body #view-builder #lines .line.section .section-factor-inline .location-factor-panel{
  position:absolute;right:8px;top:calc(100% - 2px);z-index:8;box-sizing:border-box;
  display:grid;gap:8px;width:min(310px,calc(100% - 16px));padding:14px;border:1px solid #bacdd9;
  border-radius:8px;background:#f8fbfd;color:#153449;box-shadow:0 10px 24px #102d4230;
  white-space:normal;text-align:left;font:400 13px/1.5 var(--bb-body,system-ui);
}
html body #view-builder #lines .line.section .location-factor-panel :is(label,small){display:block;color:#153449;font:inherit}
html body #view-builder #lines .line.section .location-factor-panel label{font-weight:650}
html body #view-builder #lines .line.section .location-factor-panel small{font-size:12px;color:#3a5669}
html body #view-builder #lines .line.section .location-factor-panel select{
  box-sizing:border-box;width:100%;max-width:100%;min-height:44px;padding:8px;
  border:1px solid #93adbf!important;border-radius:5px;background:#fff!important;color:#153449!important;
  color-scheme:light;font:400 16px/1.4 var(--bb-body,system-ui);
}
html body #view-builder #lines .line.section :is(.quote-section-location,.quote-location-accept,.location-factor-edit>summary):focus-visible,
html body #view-builder #lines .line.section :is(.quote-location-editor,.location-factor-panel) :is(input,select):focus-visible{
  outline:3px solid #3aa3d5;outline-offset:2px;
}
@media(max-width:680px){
  html body #view-builder #lines .line.section button.quote-section-location{width:34px;padding:0;gap:1px}
  html body #view-builder #lines .line.section button.quote-section-location .quote-location-label,
  html body #view-builder #lines .line.section .section-factor-inline .factor-multiplier{display:none}
}
@media(max-width:480px){
  html body #view-builder #lines .line.section .quote-location-editor{padding:12px}
  html body #view-builder #lines .line.section .quote-location-editor .quote-location-grid{gap:8px}
}
