/* Measure-and-quote planner: its own styles, so the feature lifts out with planner.js. */

/* drawing: fine line, the site's blue for the work, ink for walls */
.plan-svg { width: 100%; height: 100%; display: block; font-family: var(--sans, system-ui, sans-serif); }
.plan-svg * { vector-effect: non-scaling-stroke; }
.plan-svg .p-floorfill { fill: #fbfaf8; stroke: #d9d4cc; stroke-width: 1; stroke-dasharray: 4 4; }
.plan-svg .p-wallfill { fill: #2a3036; stroke: none; }
.plan-svg .p-swing { fill: none; stroke: #8b939b; stroke-width: 1; stroke-dasharray: 3 3; }
.plan-svg .p-bench { fill: #eef5fa; stroke: #22679d; stroke-width: 1.6; }
.plan-svg .p-island { fill: #e3eff7; }
.plan-svg .p-module { stroke: #5c9bcb; stroke-width: 1; }
.plan-svg .p-overhang { stroke: #5c9bcb; stroke-width: 1; stroke-dasharray: 5 4; }
.plan-svg .p-sink, .plan-svg .p-cook, .plan-svg .p-tall { fill: #fff; stroke: #22679d; stroke-width: 1.3; }
.plan-svg .p-bowl { fill: #f4f8fb; stroke: #22679d; stroke-width: 1; rx: 40; }
.plan-svg .p-burner { fill: none; stroke: #22679d; stroke-width: 1.1; }
.plan-svg .p-x { stroke: #8fb8d8; stroke-width: 1; }
.plan-svg .p-stool { fill: #fff; stroke: #8b939b; stroke-width: 1.1; }
.plan-svg .p-dimline, .plan-svg .p-ext { stroke: #15191d; stroke-width: 1; }
.plan-svg .p-ext { stroke: #8b939b; }
.plan-svg .p-tick { stroke: #15191d; stroke-width: 1.8; }
.plan-svg text { fill: #15191d; }
.plan-svg .p-dimtext { font-weight: 650; paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }
.plan-svg .p-label, .plan-svg .p-tag { fill: #22679d; font-weight: 650; letter-spacing: .08em; }
.plan-svg .p-tag--bg { paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.plan-svg .p-note { fill: #565d64; letter-spacing: .1em; font-weight: 600; }
/* elevations */
.plan-svg .p-ground { stroke: #15191d; stroke-width: 2; }
.plan-svg .p-unit { fill: #f3f8fb; stroke: #22679d; stroke-width: 1.6; }
.plan-svg .p-kick { fill: #dfe6ec; stroke: #22679d; stroke-width: 1; }
.plan-svg .p-top { fill: #cfe1ee; stroke: #22679d; stroke-width: 1.6; }
.plan-svg .p-panel { stroke: #22679d; stroke-width: 1.2; }
.plan-svg .p-inset { fill: none; stroke: #8fb8d8; stroke-width: 1; }
.plan-svg .p-handle { stroke: #15191d; stroke-width: 2.2; stroke-linecap: round; }
.plan-svg .p-basin, .plan-svg .p-tub { fill: #fff; stroke: #22679d; stroke-width: 1.3; }
.plan-svg .p-tap { stroke: #15191d; stroke-width: 2; stroke-linecap: round; }
.plan-svg .p-mirror, .plan-svg .p-screen { fill: #eef3f7; stroke: #22679d; stroke-width: 1.3; }
.plan-svg .p-screen { fill: #2a3036; }
.plan-svg .p-glint { stroke: #fff; stroke-width: 2; }
.plan-svg .p-void { fill: #fff; stroke: #22679d; stroke-width: 1; stroke-dasharray: 5 4; }
.plan-svg .p-washer { fill: #fff; stroke: #8b939b; stroke-width: 1.3; }
.plan-svg .p-shelf { stroke: #5c9bcb; stroke-width: 1.1; }
.plan-svg .p-rail { stroke: #15191d; stroke-width: 1.6; }
.plan-svg .p-hanger { fill: none; stroke: #8b939b; stroke-width: 1; }
@media (prefers-reduced-motion: no-preference) {
  .plan-svg.is-fresh .p-cab, .plan-svg.is-fresh .p-fix { animation: plan-in .5s cubic-bezier(.2,.7,.2,1) both; }
  .plan-svg.is-fresh .p-dim, .plan-svg.is-fresh .p-txt { animation: plan-in .5s .12s cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes plan-in { from { opacity: .15; } to { opacity: 1; } }

/* layout */
.planner { background: var(--stone, #efece7); }
.planner__grid { display: grid; gap: 0; }
@media (min-width: 980px) { .planner__grid { grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; } }
.planner__drawing { position: sticky; top: 68px; z-index: 5; background: var(--stone, #efece7); padding: 10px 0 10px; margin-inline: calc(var(--gut, 16px) * -1); padding-inline: var(--gut, 16px); }
@media (min-width: 980px) { .planner__drawing { top: 92px; margin: 0; padding: 0; } }
.planner__sheet { position: relative; background: #fff; border: 1px solid var(--line, #d9d4cc); aspect-ratio: 16 / 10; }
@media (min-width: 980px) { .planner__sheet { aspect-ratio: 4 / 3.2; } }
@media (max-width: 979px) {
  .planner__sheet { aspect-ratio: auto; height: min(27svh, 56vw); min-height: 170px; }
  .planner__drawing { padding-top: 6px; padding-bottom: 6px; box-shadow: 0 12px 18px -16px rgba(15,24,32,.35); }
  .planner__readout { margin-top: 6px; }
  .planner__readout div { padding: 5px 8px; }
  .planner__readout dt { font-size: .6rem; }
  .planner__readout dd { font-size: .82rem; }
  .planner__titleblock { font-size: .58rem; }
  .planner__titleblock span { padding: 3px 7px; }
}
.planner__sheet::after { content: ""; position: absolute; inset: 8px; border: 1px solid #ebe7e1; pointer-events: none; }
.planner__titleblock {
  position: absolute; right: 0; bottom: 0; display: flex; border-top: 1px solid var(--line, #d9d4cc); border-left: 1px solid var(--line, #d9d4cc);
  background: #fff; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: #565d64; z-index: 1;
}
.planner__titleblock span { padding: 5px 9px; }
.planner__titleblock span + span { border-left: 1px solid var(--line, #d9d4cc); }
.planner__titleblock b { color: #15191d; font-weight: 650; }
@media (max-width: 520px) { .planner__titleblock .tb-scale { display: none; } }
.planner__readout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 8px 0 0; background: var(--line, #d9d4cc); border: 1px solid var(--line, #d9d4cc); }
.planner__readout div { background: #fff; padding: 8px 10px; }
.planner__readout dt { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: #565d64; }
.planner__readout dd { margin: 2px 0 0; font-weight: 650; font-size: .92rem; }
.planner__caveat { font-size: .78rem; color: #565d64; margin: 8px 0 0; }
@media (max-width: 979px) { .planner__caveat { display: none; } }

.planner__steps { padding-top: 8px; }
.pstep { border: 0; margin: 0; padding: 22px 0; border-top: 1px solid var(--line, #d9d4cc); min-width: 0; }
.pstep:first-child { border-top: 0; }
.pstep[hidden] { display: none; }
.pstep legend, .pstep .plegend { display: flex; align-items: baseline; gap: 10px; padding: 0; margin-bottom: 12px; font-family: var(--serif, Georgia, serif); font-size: 1.28rem; line-height: 1.2; }
.pstep legend i, .pstep .plegend i { font: 650 .72rem/1 var(--sans, system-ui); letter-spacing: .14em; color: #22679d; font-style: normal; }
.pstep .hint { font-size: .85rem; color: #565d64; margin: -4px 0 12px; }
.chips-in { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-in[hidden], .pl-sub[hidden], [data-size][hidden] { display: none !important; }
.pchip { position: relative; }
.pchip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pchip span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; background: #fff; border: 1px solid var(--line, #d9d4cc);
  border-radius: 2px; font-weight: 600; font-size: .92rem; color: #2a3036; transition: border-color .2s, box-shadow .2s, color .2s;
}
.pchip input:checked + span { border-color: #22679d; color: #22679d; box-shadow: inset 0 0 0 1px #22679d; }
.pchip input:focus-visible + span { outline: 2px solid #00b2e6; outline-offset: 2px; }
.pchip:hover span { border-color: #15191d; }
.pchip--shape span { flex-direction: column; justify-content: center; min-width: 78px; min-height: 86px; padding: 8px 10px; font-size: .8rem; }
.pchip--shape svg { width: 40px; height: 40px; }
.pchip--shape svg path { fill: none; stroke: currentColor; stroke-width: 2; }
.pchip input[type="checkbox"] + span::before { content: ""; width: 14px; height: 14px; border: 1px solid currentColor; border-radius: 1px; flex: none; }
.pchip input[type="checkbox"]:checked + span::before { background: #22679d; box-shadow: inset 0 0 0 2px #fff; border-color: #22679d; }

.psize { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 10px 0; }
.psize + .psize { border-top: 1px dashed var(--line, #d9d4cc); }
.psize label { font-weight: 600; font-size: .92rem; }
.psize output { font-weight: 650; font-variant-numeric: tabular-nums; color: #22679d; min-width: 4.2em; text-align: right; }
.psize .prow { grid-column: 1 / -1; display: grid; grid-template-columns: 44px 1fr 44px; gap: 8px; align-items: center; }
.psize button { width: 44px; height: 44px; border: 1px solid var(--line, #d9d4cc); background: #fff; border-radius: 2px; font-size: 1.15rem; cursor: pointer; }
.psize button:hover { border-color: #15191d; }
.psize input[type="range"] { width: 100%; accent-color: #22679d; height: 32px; }
.psize.is-unsure input[type="range"] { opacity: .45; }
.pl-unsure { margin-top: 10px; }

.planner__brief { background: #fff; border: 1px solid var(--line, #d9d4cc); padding: 14px 16px; font-size: .95rem; margin: 0 0 16px; }
.planner__brief b { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: #22679d; margin-bottom: 6px; }

/* without script the tool can't draw: the form alone still works */
html:not(.js) .planner__drawing, html:not(.js) .pstep--tool { display: none; }
.planner__nojs { display: none; }
html:not(.js) .planner__nojs { display: block; }
