/* RJL photo visualiser - styles scoped to #rjl-viz (page: /photo-visualiser)
 * Desktop: options on the left (scroll on their own), picture on the right (stays in view).
 * Phone: picture pinned under the site header, toolbar under it, options below. */
.viz-wrap { max-width: 1440px; margin: 0 auto; padding: 28px 20px 72px; }
.sticky-quote { display: none !important; }              /* site's bottom "free report" bar would cover the tools */

#rjl-viz { --top: 148px; scroll-margin-top: 148px; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; align-items: start; color: #0b0d0f; }
#rjl-viz [hidden] { display: none !important; }

/* ---------- left: options */
#rjl-viz .viz-side { position: sticky; top: var(--top); max-height: calc(100vh - var(--top) - 16px); overflow-y: auto;
  background: #fff; border: 1px solid #ddd8cc; border-radius: 10px; overscroll-behavior: contain; }
#rjl-viz .viz-tabs { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: repeat(5, 1fr); background: #0d4482; border-radius: 10px 10px 0 0; }
#rjl-viz .viz-tabs [role="tab"] { font: inherit; font-size: .8rem; font-weight: 700; letter-spacing: .02em; color: #cdd6e0; background: none; border: 0;
  padding: 13px 2px; cursor: pointer; border-bottom: 3px solid transparent; }
#rjl-viz .viz-tabs [role="tab"][aria-selected="true"] { color: #fff; border-bottom-color: #ff7a1a; }
#rjl-viz .viz-tabs [role="tab"]:focus-visible { outline: 3px solid #ff7a1a; outline-offset: -3px; }
#rjl-viz .viz-tabpanel { padding: 18px; }
#rjl-viz .viz-h3 { font-size: .9rem; margin: 18px 0 10px; padding-top: 12px; border-top: 1px solid #ddd8cc; }
#rjl-viz .viz-h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
#rjl-viz .viz-f { display: block; margin: 0 0 14px; font-size: .85rem; font-weight: 600; }
#rjl-viz .viz-f > span { display: block; margin-bottom: 5px; }
#rjl-viz .viz-f select, #rjl-viz .viz-f input[type="number"] { width: 100%; font: inherit; font-weight: 400; padding: 9px 10px;
  border: 1px solid #b9b3a5; border-radius: 6px; background: #fff; color: #0b0d0f; }
#rjl-viz .viz-check { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; font-size: .9rem; }
#rjl-viz .viz-chk3 { display: flex; flex-wrap: wrap; gap: 0 14px; }
#rjl-viz .viz-hint-s { margin: 0 0 14px; font-size: .84rem; line-height: 1.5; color: #4a4d52; }
#rjl-viz .viz-note { margin: 12px 0 0; font-size: .78rem; color: #4a4d52; line-height: 1.5; }
#rjl-viz .viz-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; }
#rjl-viz .viz-sw { position: relative; width: 100%; aspect-ratio: 1; border-radius: 6px; border: 1px solid rgba(0,0,0,.25); cursor: pointer; padding: 0; }
#rjl-viz .viz-sw.on { outline: 3px solid #ec5c16; outline-offset: 2px; }
#rjl-viz .viz-sw:focus-visible { outline: 3px solid #ff7a1a; outline-offset: 2px; }
#rjl-viz .viz-sw-custom { background: conic-gradient(#e44, #ee4, #4e4, #4ee, #44e, #e4e, #e44); overflow: hidden; display: block; }
#rjl-viz .viz-sw-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#rjl-viz .viz-colour-name { margin: 12px 0 0; font-size: .9rem; font-weight: 700; }

/* ---------- buttons */
#rjl-viz .viz-btn { font: inherit; font-size: .86rem; font-weight: 700; padding: 9px 14px; border-radius: 6px; border: 1px solid #0d4482;
  background: #fff; color: #0d4482; cursor: pointer; min-height: 40px; white-space: nowrap; }
#rjl-viz .viz-btn:hover { background: #fbfaf6; }
#rjl-viz .viz-btn[aria-pressed="true"] { background: #0d4482; color: #fff; }
#rjl-viz .viz-btn.primary { background: #ec5c16; border-color: #ec5c16; color: #fff; }
#rjl-viz .viz-btn.primary:hover { background: #c2410c; border-color: #c2410c; }
#rjl-viz .viz-btn:disabled { opacity: .45; cursor: not-allowed; }
#rjl-viz .viz-btn:focus-visible, #rjl-viz canvas:focus-visible { outline: 3px solid #ff7a1a; outline-offset: 2px; }

/* ---------- right: picture */
#rjl-viz .viz-main { position: sticky; top: var(--top); min-width: 0; }
#rjl-viz .viz-toolbar, #rjl-viz .viz-erasebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
#rjl-viz .viz-spacer { flex: 1; }
#rjl-viz .viz-erasebar { background: #fff3ea; border: 1px solid #f3c2a3; border-radius: 8px; padding: 8px 10px; }
#rjl-viz .viz-brush { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; }
#rjl-viz .viz-erase-status { font-size: .85rem; flex-basis: 100%; }
#rjl-viz .viz-erase-status:empty { display: none; }
#rjl-viz:not(.has-photo) .viz-toolbar .viz-btn { pointer-events: none; opacity: .45; }

#rjl-viz .viz-stage { position: relative; display: flex; justify-content: center; align-items: center; min-height: 420px;
  background: #0b0d0f; border-radius: 10px; overflow: hidden; }
#rjl-viz .viz-frame { position: relative; line-height: 0; }
#rjl-viz:not(.has-photo) .viz-frame { display: none; }
#rjl-viz .viz-frame canvas, #rjl-viz #viewport { display: block; }
#rjl-viz #viewport, #rjl-viz #vizUI { position: absolute; left: 0; top: 0; }
#rjl-viz #viewport { pointer-events: none; }
#rjl-viz #viewport canvas { width: 100% !important; height: 100% !important; display: block; }
#rjl-viz #vizUI { touch-action: none; }
#rjl-viz.is-erasing #vizUI { cursor: crosshair; }
#rjl-viz .viz-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px;
  width: 100%; min-height: 420px; padding: 32px 20px; color: #fff; cursor: pointer; border: 2px dashed rgba(255,255,255,.35); border-radius: 10px; }
#rjl-viz.is-dragover .viz-drop { border-color: #ff7a1a; background: rgba(243,111,33,.08); }
#rjl-viz .viz-drop strong { font-size: 1.25rem; }
#rjl-viz .viz-drop .viz-btn { pointer-events: none; }
#rjl-viz .viz-drop small { color: rgba(255,255,255,.75); max-width: 460px; line-height: 1.5; }
#rjl-viz .viz-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
#rjl-viz .viz-hint { margin: 10px 0 0; font-size: .84rem; color: #4a4d52; line-height: 1.5; }
#rjl-viz:not(.has-photo) .viz-hint, #rjl-viz:not(.has-photo) .viz-readout { display: none; }
#rjl-viz .viz-readout { margin: 6px 0 0; font-size: .9rem; line-height: 1.5; }
#rjl-viz .viz-readout .viz-err { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 6px; background: #fdecea; color: #8a1c12; }
#rjl-viz .viz-msg { margin: 10px 0 0; padding: 10px 12px; border-radius: 6px; background: #fbfaf6; font-size: .9rem; }
#rjl-viz .viz-msg.is-error, #rjl-viz .viz-form-status.is-error { background: #fdecea; color: #8a1c12; }

/* ---------- enquiry form */
#rjl-viz .viz-panel { background: #fff; border: 1px solid #ddd8cc; border-radius: 10px; padding: 20px; }
#rjl-viz .viz-send { grid-column: 1 / -1; }
#rjl-viz .viz-send h2 { font-size: 1.3rem; margin: 0 0 6px; }
#rjl-viz .viz-send .quote-form { max-width: 760px; }
#rjl-viz .viz-choice { display: block; white-space: pre-line; font-weight: 600; font-size: .88rem; margin: 6px 0 12px; }
#rjl-viz .viz-form-status { margin: 10px 0 0; font-size: .9rem; }
#rjl-viz .viz-form-status:empty { display: none; }
#rjl-viz .viz-form-status:not(:empty) { padding: 10px 12px; border-radius: 6px; }
#rjl-viz .viz-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; font-weight: 400; line-height: 1.45; }
#rjl-viz .viz-consent input { margin-top: 3px; width: auto; }
#rjl-viz .viz-done { padding: 18px; border-radius: 8px; background: #eaf5ec; color: #12421c; }
#rjl-viz .viz-done:focus { outline: none; }
#rjl-viz.form-open .viz-main, #rjl-viz.form-open .viz-side { position: static; max-height: none; }

/* ---------- phones and small tablets */
@media (max-width: 900px) {
  .viz-wrap { padding: 16px 12px 56px; }
  #rjl-viz { --top: 104px; scroll-margin-top: 104px; grid-template-columns: 1fr; gap: 14px; }
  #rjl-viz .viz-main { order: -1; z-index: 5; background: #fbfaf6; padding-bottom: 6px; }
  #rjl-viz:not(.has-photo) .viz-main, #rjl-viz.form-open .viz-main { position: static; }
  #rjl-viz .viz-side { position: static; max-height: none; overflow: visible; }
  #rjl-viz .viz-tabs { position: static; }
  #rjl-viz .viz-toolbar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  #rjl-viz .viz-spacer { display: none; }
  #rjl-viz .viz-stage, #rjl-viz .viz-drop { min-height: 260px; }
  #rjl-viz.has-photo .viz-stage { min-height: 0; }
  #rjl-viz.has-photo .viz-main > .viz-note, #rjl-viz.has-photo .viz-hint { display: none; }
  #rjl-viz .viz-readout { font-size: .82rem; }
}

/* this page: slim hero so the tool is on the first screen */
.page-hero { min-height: 0 !important; padding-top: 34px !important; padding-bottom: 26px !important; }
.page-hero h1 { font-size: clamp(28px, 3.4vw, 46px) !important; line-height: 1.08 !important; margin-bottom: 10px !important; }
.page-hero p:not(.eyebrow) { font-size: .95rem !important; max-width: 820px; }
