/* TaTasque — PRINT A PLAN (public/plan-print/plan-print.js + plan-form.js). Prefix .thpp-. App tokens only (--card, --ink, --muted, --accent, --line, --err).
 * Copyright Rapid Surveys Pty Ltd. */
.thpp-ctl[hidden] { display:none !important; }
/* the map tool itself is maptools.css's square (THMapTools adopts every top-left control) */
.thpp-tag { white-space:nowrap; }
.thpp-tag span { display:inline-block; transform:translateY(-100%); margin-top:-4px; padding:2px 8px; background:#9e8c5b; color:#fff; font:600 12px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; border-radius:4px 4px 4px 0; }
/* The print panel (PRINTFRAME): a FLOATING panel (THFloatPanels 'printplan') — bottom right of the map, compact, dragged by its heading, folds to the heading;
   on a phone a bottom sheet above the view bar. The map and the frame stay in view. */
.thpp-bar { position:absolute; right:10px; bottom:24px; z-index:1001; width:min(340px, calc(100% - 20px)); box-sizing:border-box; display:flex; flex-direction:column;
  background:var(--card, #fff); color:var(--ink, #111); border:1px solid var(--line, #d1d5db); border-radius:12px; box-shadow:0 4px 16px rgba(20,28,40,.25);
  font:14px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; max-height:calc(100% - 44px); }
.thpp-bar.thpp-moved { right:auto; bottom:auto; }
.thpp-phead { display:flex; align-items:center; gap:6px; padding:4px 6px 4px 12px; cursor:grab; touch-action:none; border-bottom:1px solid var(--line, #e5e7eb); flex:none; }
.thpp-dragging .thpp-phead { cursor:grabbing; } .thpp-dragging { user-select:none; }
.thpp-phead .thpp-h { flex:1 1 auto; margin:0; font-size:15px; }
.thpp-phead button { width:36px; min-width:36px; height:36px; min-height:36px; padding:0; border:1px solid var(--line, #d1d5db); border-radius:8px; background:var(--bg, #f6f7f9); color:var(--ink, #111); font:600 16px/1 system-ui, sans-serif; cursor:pointer; }
.thpp-pbody { padding:8px 12px 10px; overflow-y:auto; overscroll-behavior:contain; min-height:0; }
.thpp-mini .thpp-pbody { display:none; } .thpp-mini .thpp-phead { border-bottom:0; }
.thpp-handle span { display:flex; align-items:center; justify-content:center; width:44px; height:44px; margin:0; border-radius:50%; background:#9e8c5b; color:#fff; font:600 22px/1 system-ui, sans-serif; cursor:move; box-shadow:0 1px 6px rgba(0,0,0,.35); touch-action:none; }
.thpp-frame { cursor:move; touch-action:none; }
@media (max-width: 767px) {   /* a phone: a bottom sheet, compact, above the view bar */
  .thpp-bar { left:0; right:0; bottom:76px; width:auto; border-radius:12px 12px 0 0; max-height:44%; }
  .thpp-phead { cursor:default; } .thpp-phead button { width:44px; height:44px; }
  .thpp-hint { display:none; }
  .thpp-pbody { padding:6px 10px 8px; }
  .thpp-btns { padding:6px 10px 8px; } .thpp-btns button { flex:1; } .thpp-btns .thpp-x { display:none; } }
.thpp-row { display:grid; grid-template-columns:1fr 1fr; align-items:end; gap:6px 10px; }
.thpp-row label { min-width:0; } .thpp-row select { width:100%; }
.thpp-row label:has([data-pp="scale"]), .thpp-logo-pick { grid-column:1 / -1; }
.thpp-row label { display:flex; flex-direction:column; gap:2px; font-size:12px; color:var(--muted, #6b7280); }
.thpp-row select { min-height:36px; font-size:14px; color:var(--ink, #111); background:var(--card, #fff); border:1px solid var(--line, #d1d5db); border-radius:6px; padding:0 6px; }
/* ROUND 26: the second row — Logo (PP1), Underneath (PP2), Plan form on portrait (PP5) */
.thpp-more { margin-top:6px; } .thpp-logo-pick { min-width:0; } .thpp-logo-pick select { width:100%; }
.thpp-row label[hidden] { display:none; }
.thpp-fname { grid-column:1 / -1; } .thpp-row input[data-pp="fname"] { width:100%; min-height:36px; font-size:14px; color:var(--ink, #111); background:var(--card, #fff); border:1px solid var(--line, #d1d5db); border-radius:6px; padding:0 8px; box-sizing:border-box; }
.thpp-hint { margin:6px 0 0; font-size:12px; color:var(--muted, #6b7280); }
.thpp-msg { margin:6px 0 0; font-weight:600; } .thpp-msg.thpp-bad { color:var(--err, #b91c1c); }
.thpp-btns { display:flex; gap:8px; justify-content:flex-end; margin:0; padding:8px 12px 10px; border-top:1px solid var(--line, #e5e7eb); flex:none; }
.thpp-mini .thpp-btns { display:none; }
/* the app's base styles make every button full-width and every h2 small caps (core.css) — this module's own look */
.thpp-pbody button, .thpp-ov button { width:auto; margin:0; font-size:14px; }
.thpp-ov h2 { font-size:18px; color:var(--ink, #111); text-transform:none; letter-spacing:0; margin:0; }
.thpp-btns button, .thpp-b { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:0 14px; border-radius:8px; border:1px solid var(--line, #d1d5db); background:var(--card, #fff); color:var(--ink, #111); font:600 14px/1 inherit; cursor:pointer; }
.thpp-btns .thpp-go, .thpp-b.thpp-primary { background:#9e8c5b; border-color:#9e8c5b; color:#fff; }
.thpp-btns button:disabled, .thpp-b:disabled { opacity:.55; cursor:default; }
/* ── the PLAN FORM screen (company settings) ── */
.thpp-ov { position:fixed; inset:0; z-index:3000; background:rgba(15,20,30,.45); display:flex; align-items:flex-start; justify-content:center; overflow:auto; padding:16px; box-sizing:border-box; }
.thpp-card { background:var(--card, #fff); color:var(--ink, #111); border-radius:12px; width:min(1080px, 100%); box-shadow:0 10px 40px rgba(0,0,0,.3); font:14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.thpp-head { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid var(--line, #e5e7eb); }
.thpp-head h2 { margin:0; font-size:18px; }
.thpp-ov .thpp-xx { padding:0; background:none; color:inherit; }
.thpp-xx { border:0; background:none; font-size:20px; min-width:44px; min-height:44px; cursor:pointer; color:inherit; }
.thpp-body { padding:12px 16px 16px; display:grid; grid-template-columns:minmax(0, 1fr) 300px; gap:16px; }
@media (max-width: 860px) { .thpp-body { grid-template-columns:minmax(0, 1fr); } }
.thpp-lede { margin:0 0 10px; color:var(--muted, #4b5563); }
.thpp-sec { border:1px solid var(--line, #e5e7eb); border-radius:10px; padding:10px 12px; margin-bottom:12px; }
.thpp-sec h3 { margin:0 0 8px; font-size:15px; }
.thpp-logo { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.thpp-logo img { max-height:56px; max-width:200px; object-fit:contain; border:1px solid var(--line, #e5e7eb); border-radius:6px; padding:4px; background:#fff; }
.thpp-dim { color:var(--muted, #6b7280); font-size:12px; }
.thpp-rowc { border:1px solid var(--line, #e5e7eb); border-radius:8px; padding:8px; margin-bottom:8px; }
.thpp-rowh { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:6px; }
.thpp-rowh b { margin-right:auto; }
.thpp-cell { display:grid; grid-template-columns:110px minmax(0,1fr) minmax(0,1.3fr) 70px 36px; gap:6px; align-items:center; margin-bottom:4px; }
@media (max-width: 560px) { .thpp-cell { grid-template-columns:1fr 1fr; } }
.thpp-linew { min-width:0; }
.thpp-linew .au-lw > input { width:100%; box-sizing:border-box; }
.thpp-linew .au-lerr { display:block; margin-top:2px; }
@media (max-width: 560px) { .thpp-linew { grid-column:1 / -1; } }
.thpp-cell select, .thpp-cell input, .thpp-rowh select { min-height:34px; font-size:13px; border:1px solid var(--line, #d1d5db); border-radius:6px; padding:0 6px; background:var(--card, #fff); color:var(--ink, #111); min-width:0; }
.thpp-ov .thpp-ib { padding:0; font-weight:600; }
.thpp-ib { min-width:34px; min-height:34px; border:1px solid var(--line, #d1d5db); border-radius:6px; background:var(--card, #fff); color:var(--ink, #111); cursor:pointer; }
.thpp-ib:disabled { opacity:.4; }
.thpp-add { margin-top:2px; }
.thpp-prev { position:sticky; top:8px; align-self:start; }
.thpp-prev svg { width:100%; height:auto; border:1px solid var(--line, #d1d5db); background:#fff; border-radius:4px; }
.thpp-err { color:var(--err, #b91c1c); font-weight:600; margin:6px 0 0; }
.thpp-foot { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; padding:0 16px 16px; }
/* ── ROUND 27 PPLOGO: the title block on screen with its empty boxes shown (public/plan-print/title-block.js; namespace .thpp-tb) — screen only ── */
.thpp-tbm:empty { display:none; } .thpp-tbm { margin-top:6px; }
.thpp-tb { border:1px solid var(--line, #d1d5db); border-radius:8px; padding:6px 10px; background:var(--card, #fff); color:var(--ink, #111); font:13px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.thpp-tb summary { cursor:pointer; min-height:32px; display:flex; align-items:center; font-weight:600; }
.thpp-tb-n { color:#b45309; margin-left:4px; }
.thpp-tb-body { display:flex; gap:12px; align-items:flex-start; padding:6px 0 4px; }
.thpp-tb-pic { flex:0 0 120px; } .thpp-tb-pic svg { display:block; width:100%; height:auto; max-height:260px; border:1px solid var(--line, #d1d5db); border-radius:4px; background:#fff; }
.thpp-tb-side { flex:1 1 auto; min-width:0; }
.thpp-tb-list { list-style:none; margin:0 0 6px; padding:0; }
.thpp-tb-list li { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 10px; padding:5px 0; border-bottom:1px dashed var(--line, #e5e7eb); }
.thpp-tb-list li > span:first-child { flex:1 1 160px; min-width:0; }
.thpp-tb .thpp-b { min-height:40px; font-size:14px; } .thpp-tb label.thpp-b { cursor:pointer; }
.thpp-tb-in { display:flex; flex-direction:column; gap:3px; flex:1 1 200px; } .thpp-tb-in input, .thpp-tb-in textarea { font:14px/1.3 inherit; border:1px solid var(--line, #d1d5db); border-radius:6px; padding:6px; min-height:36px; box-sizing:border-box; width:100%; color:var(--ink, #111); background:var(--card, #fff); }
.thpp-tb-boxes li { align-items:flex-end; } .thpp-tb-boxes .thpp-tb-in { flex:1 1 220px; } .thpp-tb-boxes textarea { resize:vertical; } .thpp-tb-btns[hidden], .thpp-tb-boxes [hidden] { display:none; }
.thpp-tb-btns { display:flex; gap:6px; }
.thpp-tb-msg { margin:4px 0; font-weight:600; } .thpp-tb-msg.thpp-bad { color:var(--err, #b91c1c); }
.thpp-tb-fb { margin:4px 0; }
.thpp-tb-prob { list-style:none; margin:4px 0; padding:0; color:var(--err, #b91c1c); font-size:13px; } .thpp-tb-prob li { padding:2px 0; }
/* the bar sits on the bottom edge of the map: opened title block = taller bar → it scrolls inside itself, never off the top */
@media (max-width: 560px) { .thpp-tb-body { flex-direction:column; } .thpp-tb-side { order:-1; } .thpp-tb-pic { flex:none; width:100%; max-width:150px; } }
.tr-pv-pptb { margin-top:12px; }
/* LIVE LABELS in the frame (labels at true print size; drag one to place it) */
.thpp-labs { position:absolute; left:0; top:0; width:100%; height:100%; z-index:450; pointer-events:none; overflow:hidden; }
.thpp-lab { pointer-events:all; cursor:grab; outline:none; } .thpp-lab:focus-visible .thpp-box { stroke:#9e8c5b; }
.thpp-lab-drag { cursor:grabbing; }
.thpp-lead { stroke:#1b2430; } .thpp-box { fill:#fff; stroke:#1b2430; }
.thpp-lab text { fill:#1b2430; font-family:Helvetica, Arial, sans-serif; user-select:none; pointer-events:none; }
.thpp-labrow { display:flex; align-items:center; gap:6px; margin-top:8px; flex-wrap:wrap; }
.thpp-labrow[hidden] { display:none; }
.thpp-labh { font-size:12px; color:var(--muted, #6b7280); margin-right:2px; }
.thpp-labrow output { min-width:44px; text-align:center; font-weight:600; }
.thpp-labrow button { min-width:36px; min-height:36px; padding:0 10px; border:1px solid var(--line, #d1d5db); border-radius:8px; background:var(--bg, #f6f7f9); color:var(--ink, #111); cursor:pointer; }
.thpp-labrow .thpp-reset { margin-left:auto; font-size:13px; }
.thpp-incl { margin:6px 0 0; font-size:12px; color:var(--muted, #6b7280); }
@media (max-width: 767px) { .thpp-labrow button { min-width:44px; min-height:44px; } }
