/* Website editor (website.php). Reuses the estimate Documents editor look (assets/estimate.css: .est-doc-ed, .est-block,
   .est-switch, .est-tools, .est-bar, .gauge, .est-help), so every block editor looks the same. Only what is new is here:
   the preview frame and its width switch, the block option rows, the picture picker and Ask Sprout. Nothing wraps. */
.stats.est-bar.web-check { position: static; margin: 0 0 6px; }
.web-check .stat { cursor: pointer; }
.web-fix { margin: 0 0 8px; }
/* Page Check checklist: the house green fly-out box (.hint-body) opened from a gauge; Pass / Fix are the house pills.
   Names stay one line; the explanation is a sentence and flows (under the name on phones). */
.web-check .stat:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.web-checklist { margin: 0 0 8px; }
.web-checklist > p { margin: 6px 0 0; }
.web-chk-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.web-chk-top b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.web-chk-top button { flex: none; }
.web-chk { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.web-chk li { display: grid; grid-template-columns: auto minmax(0, max-content) minmax(0, 1fr); align-items: baseline; column-gap: 8px; min-width: 0; }
.web-chk li > b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .web-chk li { grid-template-columns: auto minmax(0, 1fr); } .web-chk li > .muted { grid-column: 2; } }
.web-bar > [data-save-label] { margin-left: auto; }
.web-bar > [data-status] { flex: none; }
.web-sprout > input[data-sprout-ask] { flex: 1 1 260px; min-width: 160px; height: 32px; min-height: 32px; margin: 0; }
.web-sprout .web-rw { display: inline-flex; gap: 6px; flex: none; }
.web-sprout .web-ai { font-size: .78rem; }
.web-tabs { margin: 0 0 10px; }
.web-ed { grid-template-columns: minmax(360px, 460px) minmax(0, 1fr); }
.web-prev { padding: 8px; }
.web-frame-wrap { position: relative; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; margin: 0 auto; }
.web-frame { display: block; border: 0; background: #fff; transform-origin: 0 0; width: 1280px; height: 900px; }
.web-ed .est-block.is-sel { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.web-ed .est-block-name .badge { margin-left: 6px; vertical-align: 1px; }
.web-opts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 0 8px 10px; min-width: 0; }
.web-ed > *, .web-blocks, .web-blocks > li, .web-opts > label { min-width: 0; }
.web-opts > label { display: flex; flex-direction: column; gap: 3px; font-size: .8rem; margin: 0; }
.web-opts input, .web-opts textarea, .web-opts select { margin: 0; }
.web-opts .web-row { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.web-opts .web-row::-webkit-scrollbar { display: none; }
.web-opts .web-row > * { flex: none; white-space: nowrap; }
.web-opts .web-row select { width: auto; height: 30px; min-height: 30px; padding: 0 26px 0 8px; font-size: .8rem; }
.web-opts .web-row label.check { margin: 0; font-size: .8rem; }
.web-pick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.web-pick::-webkit-scrollbar { display: none; }
.web-pick button { flex: none; width: 76px; height: 48px; min-height: 48px; padding: 0; border-radius: 6px; overflow: hidden; border: 2px solid transparent; background: var(--paper); }
.web-pick button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.web-pick button.on { border-color: var(--blue); }
.web-pick button.web-up, .web-pick button.web-none { font-size: .72rem; color: var(--ink); white-space: normal; line-height: 1.1; border: 1px dashed var(--line); }
.web-ids { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 2px 10px; max-height: 180px; overflow: auto; font-size: .8rem; }
.web-ids label.check { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.web-qa { display: grid; gap: 4px; border-left: 3px solid var(--line); padding-left: 8px; }
.web-qa .web-row button { width: 28px; height: 28px; min-height: 28px; padding: 0; }
.web-addr { display: flex; align-items: center; gap: 2px; min-width: 0; }
.web-addr .muted { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.web-addr input { flex: 1 1 auto; min-width: 60px; }
.web-add { margin-bottom: 10px; }
.web-add input[name="title"] { flex: 0 1 auto; min-width: 120px; } /* gives way before the row would slide sideways (rules check, 820 wide) */
.web-add select { flex: 0 1 auto; min-width: 0; text-overflow: ellipsis; }
.web-add > button { flex: none; }
.web-add input { width: 200px; height: 32px; min-height: 32px; margin: 0; padding-top: 0; padding-bottom: 0; }
.web-add select { width: auto; height: 32px; min-height: 32px; margin: 0; padding-top: 0; padding-bottom: 0; line-height: 30px; } /* toolbar height: the house 9px padding clipped the text (same as .est-tools > select[data-est-copy]) */
.web-pages td.web-order { white-space: nowrap; }
.web-pages td.web-order form { display: inline-flex; gap: 4px; margin: 0; }
.web-pages td.web-order button { width: 30px; height: 30px; min-height: 30px; padding: 0; }
.web-set h2 { margin-top: 18px; }
.web-set h2:first-of-type { margin-top: 0; }
.web-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.web-pics label { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.web-pics img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.web-code { font: 12.5px/1.5 ui-monospace, Menlo, Consolas, monospace; width: 100%; }
.web-adv summary { cursor: pointer; font-weight: 600; margin: 14px 0 6px; }
@media (max-width: 1100px) { .web-ed { grid-template-columns: minmax(0, 1fr); } .web-ed .est-doc-tabs { display: inline-flex; } }
@media (max-width: 800px) {
  .web-sprout > input[data-sprout-ask] { flex-basis: 180px; }
  .web-sprout .web-ai { display: none; }
  .web-add input { width: 140px; }
}
@media (min-width: 801px) and (max-width: 1100px) {
  .web-ed[data-tab="edit"] .est-doc-prev, .web-ed[data-tab="preview"] .est-doc-side { display: none; }
}

/* Phones: the block row keeps one line. Remove moves into the open block, Live is said in the line under the name */
@media (max-width: 520px) {
  .web-blocks .est-block-head .grip, .web-blocks .est-block-head .web-x, .web-blocks .web-live { display: none; }
  .web-blocks .est-block-head > button { width: 30px; min-width: 30px; padding: 0; }
  .web-bar .web-widths, .web-bar > [data-status], .web-bar > [data-save-label] { display: none; }
  .web-bar > [data-publish] { margin-left: auto; }
}

/* Website pages: alerts (weather, saved, errors) push the page down instead of floating over the first card.
   This file loads only on website.php, so other pages keep the house floating toasts. */
.content > .notices:not(:empty) { position: static; height: auto; padding-bottom: 4px; }
.content > .notices:not(:empty) > .toast:first-child { margin-top: 12px; }
/* Phones: the Add Page bar keeps its button on screen; the name box and starter list share what is left */
@media (max-width: 520px) {
  .web-add input[name="title"] { flex: 1 1 0; width: auto; min-width: 0; }
  .web-add select { flex: 0 1 auto; min-width: 0; max-width: 42%; text-overflow: ellipsis; }
  .web-add > button { flex: none; }
}

/* Style panel (website.php?view=style): settings left, live Home preview right; one column under 1100px */
.web-style-ed { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.web-style-ed > * { min-width: 0; }
.web-style h2 { margin-top: 14px; }
.web-style h2:first-of-type { margin-top: 0; }
.web-color { display: flex; align-items: center; gap: 10px; padding: 4px 0; flex-wrap: nowrap; }
.web-color label.check { flex: 1 1 auto; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.web-color input[type="color"] { flex: none; width: 44px; height: 32px; min-height: 32px; padding: 2px; margin: 0; border-radius: 6px; }
.web-color input[type="color"]:disabled { opacity: .45; }
.web-color .muted { flex: none; font-size: .75rem; white-space: nowrap; }
.web-style .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.web-tpls { flex-wrap: nowrap; }
.web-style-btns { flex-wrap: nowrap; } /* Save Style, Undo, Reset: one line at every width */
.web-style-prev { position: sticky; top: 12px; overflow: hidden; }
@media (max-width: 1100px) { .web-style-ed { grid-template-columns: minmax(0, 1fr); } .web-style-prev { position: static; } }
@media (max-width: 520px) { .web-style .form-grid { grid-template-columns: minmax(0, 1fr); } }

/* Build My Site: template cards with a tiny drawn page */
.web-tpl-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 10px; }
.web-tpl { position: relative; cursor: pointer; margin: 0; min-width: 0; }
.web-tpl input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.web-tpl > span { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 10px; border: 1px solid var(--line, #dfe2e6); border-radius: 8px; background: var(--card, #fff); }
.web-tpl input:checked + span { border-color: var(--brand, #1E90FF); box-shadow: inset 0 0 0 2px var(--brand, #1E90FF); }
.web-tpl input:focus-visible + span { outline: 2px solid var(--brand, #1E90FF); outline-offset: 2px; }
.web-tpl small { color: var(--muted, #667); font-size: .75rem; line-height: 1.3; }
.web-tpl i { display: grid; gap: 3px; height: 52px; margin-bottom: 4px; border-radius: 4px; overflow: hidden; background: #f3f4f6; padding: 4px; }
.web-tpl i em { display: block; border-radius: 2px; background: #cfd5dc; }
.web-tpl-classic i { grid-template-rows: 2fr 1fr 1fr; } .web-tpl-classic i em:first-child { background: #4b5563; }
.web-tpl-bold i { grid-template-rows: 2.4fr 1fr .8fr; border-radius: 9px; } .web-tpl-bold i em:first-child { background: var(--brand, #1E90FF); border-radius: 7px; } .web-tpl-bold i em:nth-child(2) { background: #e5e7eb; }
.web-tpl-simple i { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; border-radius: 0; } .web-tpl-simple i em { border-radius: 0; background: #e5e7eb; } .web-tpl-simple i em:nth-child(2) { background: #9ca3af; grid-row: span 2; }
@media (max-width: 520px) { .web-tpl-row { grid-template-columns: minmax(0, 1fr); } .web-tpl > span { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 10px; } .web-tpl i { grid-row: span 2; height: 44px; margin: 0; } }
.web-cap input { width: 90px; display: inline-block; margin-left: 6px; }

/* An open Block's look choices: Look, Layout, Align, Width, Space in a tidy grid (3 across, 2 on phones) */
.web-looks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.web-looks select { width: 100%; min-width: 0; height: 30px; min-height: 30px; padding: 0 22px 0 8px; font-size: .78rem; margin: 0; text-overflow: ellipsis; }
@media (max-width: 520px) { .web-looks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  /* Phones: the color's name gets its own line so it never cuts off; the swatch and note sit under it */
  .web-color { display: grid; grid-template-columns: 44px 1fr; row-gap: 4px; }
  .web-color label.check { grid-column: 1 / -1; overflow: visible; white-space: normal; }
}

/* Website > Add Page on small phones (Oct 17, 2026, nothing cut off): the page name gets its own line, then
   Start from and Add Page share the next one. */
@media (max-width: 430px) {
  .web-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .web-add input[name="title"] { grid-column: 1 / -1; width: 100%; }
  .web-add select { max-width: none; width: 100%; }
}
/* Sales story (plans/sales-story.md): filler slot name under a picker, the block Anchor box, Settings > Image Slots rows */
.web-slot { width: 100%; margin-top: 6px; }
.web-anchor { width: 150px; min-width: 0; }
.web-slots { display: grid; gap: 8px; margin-bottom: 12px; }
.web-slot-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; align-items: center; }
.web-slot-row select { min-width: 0; }
