/* The stage (editor/stage.js): the customer's page in a browser frame, in the site's own colours and letters, on
   Overzicht and in the editor. "Voorbeeld" hides every editing mark, so the page reads as the site; "Telefoon" draws
   it at a phone's width. Mobile first; the frame never makes the screen scroll sideways. */
.stage { margin: 0 0 18px; }
.stage-frame { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-lift); overflow: hidden; transition: max-width .3s ease; }
.stage-frame.is-phone { max-width: 400px; margin: 0 auto; border-radius: 28px; border-width: 8px; border-color: var(--ink); }
.stage-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--mist); border-bottom: 1px solid var(--line); }
.stage-frame.is-phone .stage-bar { justify-content: center; }
.stage-dots { display: inline-flex; gap: 5px; flex: none; }
.stage-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.stage-dots span:first-child { background: #ff914d; }
.stage-frame.is-phone .stage-dots { display: none; }
.stage-address { flex: 1; min-width: 0; padding: 3px 12px; border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 13px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The page in the site's look: its background, text colour and letters; headings in its primary colour; buttons in
   its accent. Without a look the dashboard's neutral page stays. */
.site-canvas { --site-primary: var(--ink); --site-accent: var(--orange); --site-background: #ffffff; --site-text: #2f2f2f;
  --site-heading: var(--brand-font); --site-body: var(--brand-font); --skeleton-ink: var(--site-text);
  padding: 16px; background: var(--site-background); color: var(--site-text); font-family: var(--site-body); }
.site-canvas .page-editor { margin: 0; }
.site-canvas h1, .site-canvas h2, .site-canvas h3, .site-canvas .as-heading { color: var(--site-primary); font-family: var(--site-heading); }
.site-canvas h1.editable-heading { font-size: clamp(26px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.01em; }
.site-canvas .editable { color: inherit; border-color: color-mix(in srgb, var(--site-text) 35%, transparent); }
.site-canvas .editable.is-editing { background: var(--site-background); }
.site-canvas .editable.fake-button { background: var(--site-accent); border-color: var(--site-accent); color: #ffffff; border-radius: 999px; }
.site-canvas .edit-block { background: transparent; border-color: color-mix(in srgb, var(--site-text) 14%, transparent); }
.site-canvas .card-item, .site-canvas .faq-item { border-color: color-mix(in srgb, var(--site-text) 14%, transparent); }
.site-canvas .save-status .muted, .site-canvas .block-name { color: color-mix(in srgb, var(--site-text) 65%, transparent); }
.site-canvas a { color: var(--site-primary); }
@media (min-width: 700px) { .site-canvas { padding: 28px 36px; } }

/* "Voorbeeld" and the picture on Overzicht: no dashed lines, no block bars, no "+ Voeg hier toe", no hints; the
   blocks as sections of the site. */
.stage.is-preview .editable, .stage.is-picture .editable { border-color: transparent; cursor: default; }
.stage.is-preview .editable:not(.fake-button), .stage.is-picture .editable:not(.fake-button) { padding-left: 0; padding-right: 0; }
.stage.is-preview .block-bar, .stage.is-preview .add-here, .stage.is-preview .edit-bar, .stage.is-preview .save-status, .stage.is-preview .more,
.stage.is-picture .block-bar, .stage.is-picture .add-here, .stage.is-picture .edit-bar, .stage.is-picture .save-status, .stage.is-picture .more,
.stage.is-preview .edit-block > button, .stage.is-picture .edit-block > button, .stage.is-preview .button-edit > button, .stage.is-picture .button-edit > button { display: none; }
/* Every control of the editor goes too; only the page's own buttons (drawn as .editable) stay. */
.stage.is-preview .page-editor button:not(.editable), .stage.is-picture .page-editor button:not(.editable) { display: none; }
.stage.is-preview .edit-block, .stage.is-picture .edit-block { border-color: transparent; padding-left: 0; padding-right: 0; }
.stage.is-preview .editable .placeholder, .stage.is-picture .editable .placeholder { display: none; }
/* The picture on Overzicht: the top of the page, fading out, with "Bewerk je site" over it. */
.stage.is-picture .site-canvas { max-height: 420px; min-height: 180px; overflow: hidden; position: relative; }
.stage.is-picture .site-canvas::after { content: ''; position: absolute; inset: auto 0 0; height: 80px; background: linear-gradient(transparent, var(--site-background)); }
/* Under the page, in the frame: the way into the editor. */
.stage-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; padding: 16px; background: var(--mist); border-top: 1px solid var(--line); }
.stage-cta p { margin: 0; color: var(--muted); }
.stage-cta button.primary { min-height: 48px; padding: 10px 26px; font-size: 17px; box-shadow: var(--shadow-lift); }
.stage-cta button.secondary { min-height: 48px; }
.stage.is-picture .stage-frame { cursor: pointer; }
@media (prefers-reduced-motion: no-preference) {
  .stage.is-picture .stage-frame { transition: transform .2s, box-shadow .2s; }
  .stage.is-picture .stage-frame:hover { transform: translateY(-2px); }
}

/* The editor: the switches and the pages above the stage; Buddy and his help beside it on a laptop. */
.editor-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.editor-tools .segmented { margin: 0; }
.page-tabs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 8px; margin: 0 0 6px; scrollbar-width: thin; }
.page-tabs button { flex: none; min-height: 46px; padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.page-tabs button[aria-current="page"] { border: 2px solid var(--orange); background: var(--orange-soft); color: var(--ink); }
/* Buddy's strip above the stage: his face, one line of help, and "Verbeter mijn pagina". */
@media (width < 700px) { .page-tabs { margin-bottom: 2px; } }
/* The editor takes the whole width beside the menu and Buddy: the stage is the screen. */
body[data-screen='paginas'] main { max-width: none; }

/* "Volgende stappen" on Overzicht: small, each step folded until opened. */
.next-steps h2 { margin-top: 0; }
.next-steps details { border-top: 1px solid var(--line); }
.next-steps details:first-of-type { border-top: 0; }
.next-steps summary { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; }
.next-steps summary::-webkit-details-marker { display: none; }
.next-steps summary::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--orange); transform: rotate(14deg); flex: none; }
.next-steps details[open] summary::before { background: var(--ok); }
.next-steps .card { box-shadow: none; border: 0; padding: 0 0 12px; margin: 0; }

/* The canvas (the overseer's work order of 7 November 2026, after the owner and the walkthrough's finding 25): a page
   open in the editor. One toolbar, a line of help, then the page as wide as there is room, Laptop or Telefoon in its frame's bar. On a
   laptop the menu folds away (body[data-canvas], editor/editor.js) and Buddy takes the full height beside the page; the
   editing marks stay quiet until the pointer or the focus is on a block. A phone keeps them in view: there is no hover. */
.canvas-toolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 8px; }
.canvas-toolbar .page-tabs { flex: 1 1 16rem; min-width: 0; margin: 0; padding: 2px; flex-wrap: wrap; overflow: visible; }
/* A long page title is cut off, its whole name in the button's tooltip (finding 37). */
.page-tabs button { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.canvas-toolbar .editor-tools { margin: 0; gap: 8px 12px; }
@media (min-width: 1101px) {
  body[data-canvas] .layout, body[data-canvas][data-buddy] .layout { grid-template-columns: minmax(0, 1fr) 420px; }
  body[data-canvas][data-buddy="minimised"] .layout, body[data-canvas][data-buddy="closed"] .layout { grid-template-columns: minmax(0, 1fr); }
  body[data-canvas] #tabs { display: none; }
  body[data-canvas] main { max-width: none; padding: 12px 24px 32px; }
  body[data-canvas] .stage-frame:not(.is-phone) { max-width: 1280px; margin: 0 auto; }
  body[data-canvas] aside#buddy { height: 100vh; }
  body[data-canvas] .edit-block.is-hero.is-beeld .photo img { max-height: 520px; aspect-ratio: 16 / 9; }
}
.canvas-hint { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 10px; }
.canvas-hint p { flex: 1 1 16rem; margin: 0; }
.canvas-hint button { margin-left: auto; min-height: 44px; }
/* Laptop or Telefoon in the frame's bar, at its end. */
.stage-tools { flex: none; }
.stage-tools .segmented { margin: 0; }
@media (min-width: 1101px) and (hover: hover) and (pointer: fine) {
  /* A block's bar floats at its top right and the "+ Voeg hier toe" in the strip between two blocks: the page reads as
     the site, and they show where the pointer or the focus is. */
  body[data-canvas] .stage:not(.is-preview) .edit-block { position: relative; border-color: transparent; transition: border-color .15s; }
  body[data-canvas] .stage:not(.is-preview) .edit-block:hover, body[data-canvas] .stage:not(.is-preview) .edit-block:focus-within { border-color: color-mix(in srgb, var(--site-text) 22%, transparent); }
  body[data-canvas] .stage:not(.is-preview) .block-bar { position: absolute; top: 6px; right: 6px; z-index: 3; flex-wrap: nowrap; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--panel); box-shadow: var(--shadow); opacity: 0; transition: opacity .15s; }
  body[data-canvas] .stage:not(.is-preview) .block-bar .block-name { flex: none; padding: 0 6px; }
  body[data-canvas] .stage:not(.is-preview) .edit-block:hover .block-bar, body[data-canvas] .stage:not(.is-preview) .edit-block:focus-within .block-bar { opacity: 1; }
  /* While a text in the block is open, its bar steps aside: it would cover what is typed. */
  body[data-canvas] .stage:not(.is-preview) .edit-block:has(.is-editing) .block-bar { opacity: 0; pointer-events: none; }
  body[data-canvas] .stage:not(.is-preview) .add-here { position: relative; z-index: 2; width: max-content; margin: 0 auto; padding: 0 18px; border-style: solid; border-radius: 999px; background: var(--panel); opacity: 0; transition: opacity .15s; }
  body[data-canvas] .stage:not(.is-preview) .add-here:hover, body[data-canvas] .stage:not(.is-preview) .add-here:focus-visible { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-canvas] .add-here, body[data-canvas] .edit-block, body[data-canvas] .block-bar { transition: none; }
}
