/* Roof Layout Planner (pages/roof-layout-planner.php). Loaded on that page only.
   Notes: .claude/comment.md, "roof-layout-planner.css". No box-shadow (owner). */
#roof-layout-planner .rlp-vehicle-line{font-size:16px;margin:0 0 10px}
#roof-layout-planner .rlp-note{background:var(--sky,#eaf6ff);border:1px solid #b9dcf5;border-radius:8px;padding:8px 12px;font-size:14px;margin:0 0 12px}
#roof-layout-planner .rlp-hint{color:var(--muted,#61707d);font-size:13px;margin:6px 0}
.rlp-app{position:relative;font-size:14px}

/* add buttons */
.rlp-toolbar{display:flex;flex-wrap:wrap;gap:10px 18px;margin:0 0 12px;padding:12px;border:1px solid var(--line,#dce5ec);border-radius:10px;background:var(--surface,#f4f7f9)}
.rlp-add-group{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.rlp-add-label{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted,#61707d);width:100%;font-weight:600}
.rlp-add{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;border:1px solid #c9d4dd;border-radius:17px;background:#fff;box-shadow:none;color:var(--ink,#0b1b2a);font-size:13px;font-weight:600;cursor:pointer;line-height:1;letter-spacing:0;text-transform:none;white-space:nowrap}
.rlp-add:hover,.rlp-add:focus-visible{border-color:var(--blue,#0871bf);color:var(--blue,#0871bf)}
.rlp-add::before{content:"+";font-weight:700;color:var(--blue,#0871bf)}
.rlp-add .rlp-swatch{display:none}

.rlp-swatch{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:6px;vertical-align:-1px;border:1px solid rgba(0,0,0,.25)}
.rlp-sw-bar{background:#2b2b2b}.rlp-sw-deck{background:#a0703f}.rlp-sw-fan{background:#ececec}.rlp-sw-hatch{background:#aad7f0}
.rlp-sw-aircon{background:#f4f4f4}.rlp-sw-conduit{background:#5b8fb9}.rlp-sw-solar{background:#1d2a44}.rlp-sw-tent{background:#6b7b3a}
.rlp-sw-box{background:#262626}.rlp-sw-boards{background:#e67e22}.rlp-sw-sport{background:#1fa2a8}.rlp-sw-wheel{background:#1e1e1e;border-radius:50%}
.rlp-sw-dish{background:#f7f7f7}.rlp-sw-antenna{background:#111;border-radius:50%}.rlp-sw-lightbar{background:#ffd23f}.rlp-sw-awning{background:#9aa3ad}

/* measurements */
.rlp-meas{border:1px solid var(--line,#dce5ec);border-radius:10px;margin:0 0 12px;background:#fff}
.rlp-meas summary{cursor:pointer;padding:10px 14px;font-weight:600}
.rlp-meas-body{padding:0 14px 14px}
.rlp-meas-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px 14px;margin:8px 0}
.rlp-meas-grid label{display:flex;flex-direction:column;gap:4px;font-size:13px;margin:0}
.rlp-meas-grid label.is-missing span::after{content:" *";color:#c0392b}
.rlp-meas-grid label.is-missing input{border-color:#e0a24a}
.rlp-app input[type=number],.rlp-app input[type=text],.rlp-modal input[type=number],.rlp-modal input[type=text],.rlp-modal select{height:38px;padding:0 10px;border:1px solid #c8c8c8;border-radius:6px;font-size:14px;background:#fff;color:var(--ink,#0b1b2a);width:100%;box-sizing:border-box}

/* warnings */
.rlp-warn-bar{margin:8px 0 0;min-height:22px}
.rlp-ok{color:#2e7d32;font-weight:600;font-size:13px}
.rlp-ok::before{content:"\2713  "}
.rlp-warns{border:1px solid #f0d78c;background:#fff7e6;border-radius:8px;padding:6px 12px}
.rlp-warns summary{cursor:pointer;font-weight:700;color:#7a5a00}
.rlp-warns ul{margin:6px 0 0;padding-left:18px}
.rlp-warns li{cursor:pointer;margin:2px 0}
.rlp-warns li:hover{text-decoration:underline}
.rlp-warns li.rlp-warn-over{color:#b3261e;cursor:default;text-decoration:none}

/* selected element bar */
.rlp-selbar{border:1px solid #b9dcf5;background:var(--sky,#eaf6ff);border-radius:8px;padding:8px 12px;margin:8px 0 0}
.rlp-sel-head{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:baseline}
.rlp-sel-head span{color:var(--ink-soft,#263848);font-size:13px}
.rlp-sel-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.rlp-sel-warn{margin:6px 0 0;padding-left:18px;color:#8a5a00}
/* the planner's own buttons: the site's .button is sized and coloured for page CTAs */
.rlp-btn{display:inline-flex;align-items:center;justify-content:center;height:34px;padding:0 14px;border:1px solid #c9d4dd;border-radius:6px;background:#fff;color:var(--ink,#0b1b2a);font:600 13px/1 var(--font-display,Helvetica,sans-serif);letter-spacing:0;text-transform:none;cursor:pointer;text-decoration:none;white-space:nowrap;box-shadow:none}
.rlp-btn:hover,.rlp-btn:focus-visible{border-color:var(--blue,#0871bf);color:var(--blue,#0871bf)}
.rlp-btn.is-primary{background:var(--blue,#0871bf);border-color:var(--blue,#0871bf);color:#fff}
.rlp-btn.is-primary:hover,.rlp-btn.is-primary:focus-visible{background:var(--blue-dark,#005a9f);border-color:var(--blue-dark,#005a9f);color:#fff}
.rlp-btn.is-danger{color:#b3261e;border-color:#e5a39e}
.rlp-btn.is-danger:hover{background:#fdecea;color:#b3261e;border-color:#b3261e}
.rlp-btn:focus-visible,.rlp-add:focus-visible{outline:2px solid var(--focus,#f4a51c);outline-offset:2px}

/* drawing */
.rlp-stage{position:relative;border:1px solid var(--line,#dce5ec);border-radius:10px;background:#fff;overflow:hidden}
.rlp-svg{display:block;width:100%;max-width:620px;margin:0 auto;height:auto;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.rlp-svg text{font-family:var(--font-display,Helvetica,sans-serif)}
.rlp-outline{fill:#eef1f4;stroke:#9aa5af;stroke-width:2;vector-effect:non-scaling-stroke}
.rlp-windscreen{fill:#5a6672}
.rlp-roof-area{fill:rgba(46,125,50,.07);stroke:#2e7d32;stroke-width:1.5;stroke-dasharray:7 5;vector-effect:non-scaling-stroke;pointer-events:none}
.rlp-dim line{stroke:#56636e;stroke-width:1;vector-effect:non-scaling-stroke}
.rlp-dim text{fill:#34414c}
.rlp-dim.is-roof line{stroke:#2e7d32}.rlp-dim.is-roof text{fill:#2e7d32}
.rlp-dim.is-spacing line{stroke:#0871bf}.rlp-dim.is-spacing text{fill:#0871bf}
.rlp-side-label{fill:#7c8994;font-weight:600;letter-spacing:.04em}
.rlp-el{cursor:move}
.rlp-app.is-readonly .rlp-el{cursor:pointer}
.rlp-shape{stroke:rgba(0,0,0,.55);stroke-width:1;vector-effect:non-scaling-stroke}
.rlp-hit{fill:transparent;stroke:none}
.rlp-slat{stroke:#6b4423;stroke-width:1.4;vector-effect:non-scaling-stroke}
.rlp-cell{stroke:rgba(255,255,255,.3);stroke-width:1;vector-effect:non-scaling-stroke}
.rlp-detail{fill:none;stroke:#7a7a7a;stroke-width:1;vector-effect:non-scaling-stroke}
.rlp-detail-light{fill:none;stroke:rgba(255,255,255,.45);stroke-width:1.2;vector-effect:non-scaling-stroke}
.rlp-detail-dark{stroke:rgba(0,0,0,.35);stroke-width:1.5;vector-effect:non-scaling-stroke}
.rlp-el-label{font-weight:600;pointer-events:none}
.rlp-el-label.on-dark{fill:#fff}.rlp-el-label.on-light{fill:#1b2733}
.rlp-el.has-warning .rlp-shape{stroke:#d48a00;stroke-width:2}
.rlp-el.is-highlight .rlp-shape{stroke:#b3261e;stroke-width:3}
.rlp-el.is-selected .rlp-shape{stroke:var(--blue,#0871bf)}
.rlp-sel-outline{fill:none;stroke:var(--blue,#0871bf);stroke-width:1.5;stroke-dasharray:5 3;vector-effect:non-scaling-stroke;pointer-events:none}
.rlp-handle{fill:#fff;stroke:var(--blue,#0871bf);stroke-width:1.5;vector-effect:non-scaling-stroke;cursor:nwse-resize}
.rlp-handle.rlp-rot{cursor:grab;fill:var(--blue,#0871bf)}
.rlp-handle[data-h^="awn"]{cursor:ew-resize}
.rlp-rot-line{stroke:var(--blue,#0871bf);stroke-width:1;vector-effect:non-scaling-stroke;pointer-events:none}
.rlp-badge{cursor:pointer}
.rlp-badge circle{stroke-width:1.5;vector-effect:non-scaling-stroke}
.rlp-badge-edit circle{fill:#fff;stroke:var(--blue,#0871bf)}
.rlp-badge-edit path{fill:var(--blue,#0871bf)}
.rlp-badge-del circle{fill:#c62828;stroke:#8e1c1c}
.rlp-badge-del path{stroke:#fff;stroke-width:2;fill:none;vector-effect:non-scaling-stroke;stroke-linecap:round}
.rlp-warn-icon{cursor:pointer}
.rlp-warn-icon path{fill:#f5b400;stroke:#7a5a00;stroke-width:1;vector-effect:non-scaling-stroke}
.rlp-warn-icon text{fill:#1b1b1b;font-weight:700;pointer-events:none}
.rlp-guide line{stroke:#0871bf;stroke-width:1;stroke-dasharray:3 3;vector-effect:non-scaling-stroke}
.rlp-guide text{fill:#0871bf;font-weight:600}

/* total weight, bottom-right of the drawing */
.rlp-weight{position:absolute;right:10px;bottom:10px;display:flex;flex-direction:column;align-items:flex-end;gap:1px;min-width:150px;padding:8px 12px;border:1px solid var(--line,#dce5ec);border-radius:8px;background:rgba(255,255,255,.93);font-size:12px;line-height:1.35;pointer-events:none}
.rlp-weight strong{font-size:20px;line-height:1.1;color:var(--ink,#0b1b2a)}
.rlp-weight-label{text-transform:uppercase;letter-spacing:.06em;font-size:10px;color:var(--muted,#61707d);font-weight:600}
.rlp-weight-sub{color:var(--ink-soft,#263848)}
.rlp-weight-meter{display:block;width:100%;height:5px;border-radius:3px;background:#e3e9ee;margin-top:4px;overflow:hidden}
.rlp-weight-meter span{display:block;height:100%;background:#2e7d32}
.rlp-weight.is-near{border-color:#f0d78c;background:rgba(255,247,230,.95)}
.rlp-weight.is-near .rlp-weight-meter span{background:#d48a00}
.rlp-weight.is-over{border-color:#e5a39e;background:rgba(253,236,234,.96)}
.rlp-weight.is-over strong,.rlp-weight.is-over .rlp-weight-sub{color:#b3261e}
.rlp-weight.is-over .rlp-weight-meter span{background:#b3261e}

/* list of elements */
.rlp-list{margin:16px 0 0}
.rlp-list h3{font-size:16px;margin:0 0 6px}
.rlp-table-wrap{overflow-x:auto;border:1px solid var(--line,#dce5ec);border-radius:10px}
.rlp-table{width:100%;border-collapse:collapse;margin:0;font-size:13px}
.rlp-table th,.rlp-table td{padding:7px 10px;border-bottom:1px solid var(--line,#dce5ec);text-align:left;vertical-align:middle;background:none}
.rlp-table thead th{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted,#61707d);background:var(--surface,#f4f7f9)}
.rlp-table tbody tr{cursor:pointer}
.rlp-table tbody tr:hover td{background:#f7fafc}
.rlp-table tbody tr.is-selected td{background:var(--sky,#eaf6ff)}
.rlp-table tfoot th,.rlp-table tfoot td{border-bottom:0;background:var(--surface,#f4f7f9);font-weight:600}
.rlp-table tfoot tr.is-over td,.rlp-table tfoot tr.is-over th{color:#b3261e;background:#fdecea}
.rlp-num{text-align:right !important;white-space:nowrap}
.rlp-empty{color:var(--muted,#61707d);text-align:center !important;padding:16px !important;cursor:default}
.rlp-layer{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted,#61707d);border:1px solid var(--line,#dce5ec);border-radius:8px;padding:0 5px;margin-left:4px}
.rlp-list-warn{color:#a86b00;font-weight:700;white-space:nowrap}

/* actions under the list */
.rlp-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:12px 0 0}
.rlp-status{font-size:12px;color:var(--muted,#61707d);margin-left:6px}
.rlp-status.is-dirty{color:#a86b00;font-weight:600}
.rlp-clear{margin-left:auto}

/* shared view banner */
.rlp-view-banner{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;border:1px solid #b9dcf5;background:var(--sky,#eaf6ff);border-radius:8px;padding:10px 14px;margin:0 0 12px}
.rlp-view-banner .button{margin-left:auto}

/* dialogs */
.rlp-modal{position:fixed;inset:0;z-index:100000;background:rgba(11,27,42,.45);display:flex;align-items:center;justify-content:center;padding:16px}
.rlp-modal-box{background:#fff;border-radius:12px;max-width:560px;width:100%;max-height:90vh;overflow:auto;padding:18px 20px;border:1px solid var(--line,#dce5ec)}
.rlp-modal-box h3{margin:0 0 12px;font-size:18px}
.rlp-modal-buttons{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-top:16px}
.rlp-form label{display:flex;flex-direction:column;gap:4px;font-size:13px;margin:0 0 10px}
.rlp-form label small{color:var(--muted,#61707d);font-size:11px}
.rlp-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
.rlp-plans ul{list-style:none;margin:0;padding:0}
.rlp-plans li{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;padding:8px 0;border-bottom:1px solid var(--line,#dce5ec)}
.rlp-plans li.is-current{background:var(--sky,#eaf6ff)}
.rlp-plan-title{font-weight:600;flex:1 1 100%}
.rlp-plan-meta{color:var(--muted,#61707d);font-size:12px;flex:1 1 auto}
.rlp-share-row{display:flex;gap:6px}
.rlp-share-row input{flex:1 1 auto}
.rlp-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--ink,#0b1b2a);color:#fff;padding:10px 16px;border-radius:8px;z-index:100001;font-size:14px;transition:opacity .5s}
.rlp-toast.is-gone{opacity:0}

/* disclaimer */
#roof-layout-planner .rlp-disclaimer{background:#fff7e6;border:1px solid #f0d78c;border-radius:8px;padding:10px 14px;margin:28px 0 0;font-size:12px;line-height:1.5;color:#5a4a1d}
#roof-layout-planner .rlp-disclaimer p{margin:0 0 4px}
#roof-layout-planner .rlp-disclaimer p:last-child{margin:0}

@media (max-width:736px){
    .rlp-toolbar{padding:10px;gap:8px}
    .rlp-add{height:32px;padding:0 10px;font-size:12px}
    .rlp-form-grid{grid-template-columns:1fr}
    /* bottom-LEFT on phones: Ozzy's launcher is fixed bottom-right of the screen and covered it */
    .rlp-weight{right:auto;left:6px;bottom:6px;min-width:0;padding:5px 8px;align-items:flex-start}
    .rlp-weight strong{font-size:15px}
    .rlp-weight-sub:last-of-type{display:none}
    .rlp-clear{margin-left:0}
}

@media print{
    #header,#footer,.oz-page-hero,.rlp-toolbar,.rlp-actions,.rlp-selbar,.rlp-meas,.rlp-change-vehicle,.rlp-view-banner .button,.rlp-ui .rlp-handle,.rlp-ui .rlp-badge,.rlp-ui .rlp-rot-line,.rlp-ui .rlp-sel-outline,.rlp-ui .rlp-guide{display:none !important}
    .rlp-stage,.rlp-table-wrap{border-color:#999}
    .rlp-warns{break-inside:avoid}
    .rlp-weight{position:static;align-items:flex-start;border:0;padding:6px 0}
}
.rlp-undo-group{margin-left:auto}
.rlp-undo-group .rlp-btn{height:32px;padding:0 10px}
.rlp-hp{position:absolute !important;left:-9999px !important;width:1px;height:1px;overflow:hidden}
.rlp-modal textarea{width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid #c8c8c8;border-radius:6px;font-size:14px;resize:vertical;background:#fff;color:var(--ink,#0b1b2a)}
.rlp-fb-error{color:#b3261e;font-size:13px;margin:4px 0 0}
.rlp-feedback-btn{border-color:var(--blue,#0871bf);color:var(--blue,#0871bf)}
.rlp-gv-body{fill:#f4f6f8;stroke:#8c98a3;stroke-width:2;vector-effect:non-scaling-stroke}
.rlp-gv-glass{fill:#4a5560;stroke:#38424b;stroke-width:1;vector-effect:non-scaling-stroke}
.rlp-gv-mirror{fill:#4a5560}
.rlp-gv-line{fill:none;stroke:#9aa5af;stroke-width:1.5;vector-effect:non-scaling-stroke}
.rlp-gv-rib{stroke:#d3dae0;stroke-width:1;vector-effect:non-scaling-stroke}
.rlp-generic-note:empty{display:none}
.rlp-rack-frame{stroke:#5f6a74;stroke-width:3;vector-effect:non-scaling-stroke}
.rlp-rack-bar{stroke:#7d8892;stroke-width:2;vector-effect:non-scaling-stroke}
.rlp-sw-rack{background:#c3cad1}
.rlp-product-link{font-weight:600;color:var(--blue,#0871bf);margin-left:auto}
/* Layout: canvas left / tools right on desktop, one column on phones (see the JS skeleton) */
.rlp-layout{display:flex;flex-direction:column}
.rlp-panel{display:contents}
.rlp-panel>.rlp-toolbar{order:1}.rlp-panel>.rlp-note{order:2}.rlp-panel>.rlp-meas{order:3}.rlp-canvas{order:4}
.rlp-panel>.rlp-selbar{order:5}.rlp-panel>.rlp-warn-bar{order:6}.rlp-panel>.rlp-list{order:7}.rlp-panel>.rlp-actions{order:8}
@media (min-width:980px){
    .rlp-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start}
    .rlp-canvas{order:0;min-width:0;position:sticky;top:128px}
    .rlp-canvas .rlp-svg{max-height:calc(100vh - 150px)}
    .rlp-panel{display:block;padding:0 4px 8px 0}
    .rlp-panel>.rlp-selbar{margin:0 0 8px}
    .rlp-panel>.rlp-warn-bar{margin:0 0 8px}
    .rlp-panel .rlp-list{margin-top:8px}
}
