/* ==========================================================
   ACCEL AIR / A·TEMP — QUOTE BUILDER
   QUOTE TEMPLATES
   The two customer-facing documents — General and VEU — rebuilt from the
   supplied Word templates. Deliberately off the app palette: these pages
   sit between two sheets of company artwork.

   Part 8 of 9. Loaded by index.html in numbered order and
   CASCADES IN THAT ORDER — a rule here can be overridden by any later
   part, so keep the <link> tags in sequence and add new parts at the
   position they belong, not at the end.
   ========================================================== */
/* ══ QUOTE TEMPLATE (normal) ═══════════════════════════════════════════
   A rebuild of assets/Template_Quote_builder.docx: page 1 the supplied
   cover artwork, page 2 this builder's quote, page 3 the supplied notices.
   Deliberately NOT on the app's teal design system — this document has to
   sit between two pages of company artwork, so it borrows that artwork's
   type and greys instead: Calibri, black text, #808080 rules and table
   headers, #d7d7d7 panels. On screen each page is drawn as a sheet; in
   print each becomes a real page.
   ══════════════════════════════════════════════════════════════════════ */
.tpl-doc{--tg:#808080;--tf:#d7d7d7;
  font-family:Calibri,Carlito,'Segoe UI',Arial,sans-serif;color:#000;background:#eef1f5;
  padding:var(--s4);display:flex;flex-direction:column;gap:var(--s4)}
.tpl-page{background:#fff;box-shadow:var(--e2);width:100%;max-width:820px;margin:0 auto;
  padding:30px 34px 22px;display:flex;flex-direction:column}
.tpl-cover{padding:0;overflow:hidden}
.tpl-cover img{display:block;width:100%;height:auto}

.tpl-hd{display:block}
.tpl-hd .tpl-lockup{display:block;width:300px;max-width:62%;height:auto}
.tpl-rule{border-top:1px solid #000;margin:12px 0 6px}

.tpl-top{display:flex;gap:26px;align-items:flex-start;margin-top:18px}
.tpl-billto{flex:1 1 auto;font-style:normal;font-size:.86rem;line-height:1.55;min-width:0}
.tpl-facts{flex:0 0 46%;border-collapse:collapse;background:var(--tf)}
.tpl-facts th,.tpl-facts td{padding:4px 7px;font-size:.8rem;text-align:left;vertical-align:top}
.tpl-facts th{font-weight:700;width:78px;white-space:nowrap}

.tpl-table{width:100%;border-collapse:collapse;margin-top:14px;font-size:.78rem}
.tpl-table th{background:var(--tg);color:#fff;font-weight:700;text-align:left;
  padding:4px 6px;border:1px solid var(--tg);font-size:.76rem}
.tpl-table td{padding:4px 6px;border:1px solid var(--tg);vertical-align:top}
.tpl-table .r,.tpl-table th.r{text-align:right;white-space:nowrap}
.tpl-table .b{font-weight:700}
.tpl-table .c-sku{width:11%;white-space:nowrap}
.tpl-table .c-det{color:#5d6e80;font-size:.7rem}
.tpl-reb td{background:#f4f4f4}

.tpl-totals{width:100%;border-collapse:collapse;margin-top:7px;font-size:.78rem}
.tpl-totals th{text-align:right;font-weight:700;padding:3px 10px;border:0}
.tpl-totals td{text-align:right;padding:3px 7px;border:1px solid var(--tg);
  width:128px;white-space:nowrap}
.tpl-totals tr.g th{font-size:.92rem;font-weight:800}
.tpl-totals tr.g td{font-weight:800;font-size:.92rem}

.tpl-sec{margin-top:15px}
.tpl-sec h3{font-size:.78rem;font-weight:700;margin:0 0 4px;color:#000}
.tpl-pair{width:100%;border-collapse:collapse;font-size:.74rem}
.tpl-pair td{padding:3px 6px;border:1px solid var(--tg)}
.tpl-note{font-size:.72rem;color:#4b5a6b;margin:5px 0 0}
.tpl-notes{font-size:.76rem;line-height:1.5;margin:0;white-space:pre-wrap}
.tpl-flag{margin-top:18px;background:#fff7ed;border-left:3px solid #b45309;
  padding:9px 12px;font-size:.8rem;color:#b45309}

.tpl-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 18px;margin:0;background:var(--tf);padding:6px 9px}
.tpl-d{display:grid;grid-template-columns:minmax(112px,auto) minmax(0,1fr);
  gap:0 10px;padding:1px 0;min-width:0}
.tpl-d dt{font-size:.68rem;color:#4b5a6b;margin:0;line-height:1.45}
.tpl-d dd{font-size:.68rem;font-weight:600;margin:0;min-width:0;overflow-wrap:anywhere;line-height:1.45}

.tpl-notices{margin-top:6px}
.tn-h{margin:14px 0 4px;font-weight:700;font-size:.82rem;text-decoration:underline}
.tn-p{margin:0 0 9px;font-size:.78rem;line-height:1.5}
.tn-b{margin:10px 0 3px;font-weight:700;font-size:.78rem}
.tn-ul{margin:0 0 9px;padding-left:20px;font-size:.78rem;line-height:1.5}
.tn-tc{margin:16px 0 10px;font-weight:700;font-size:.82rem}
.tn-tc a{color:#0563c1}
.tn-call{margin:14px 0 0;font-weight:700;font-size:.82rem}

.tpl-ft{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;
  margin-top:auto;padding-top:20px}
.tpl-ft-marks{display:flex;align-items:flex-end;gap:14px;flex:0 0 auto}
.tpl-ft-marks img{height:34px;width:auto;display:block}
.tpl-ft-marks img:first-child{height:40px}
.tpl-ft-biz{text-align:right;font-size:.64rem;color:var(--tg);line-height:1.5}

/* ── VEU template ──
   Its prose pages and its own footer: no accreditation badges, the VEU
   team's contact block, and the wave band hard against the foot of the
   page the way the supplied document has it. */
.tpl-prose .tpl-notices{margin-top:14px}
.vn-h2{margin:0 0 12px;font-size:1.22rem;font-weight:700;line-height:1.28;color:#000}
.vn-h{margin:14px 0 4px;font-weight:700;font-size:.8rem}
.vn-p{margin:0 0 9px;font-size:.8rem;line-height:1.55}
.vn-b{margin:12px 0 3px;font-weight:700;font-size:.8rem}
.vn-ul{margin:0 0 9px;padding-left:20px;font-size:.8rem;line-height:1.55}
.vn-ul a{color:#0563c1}
.vn-sub{margin:3px 0;padding-left:20px;font-size:.8rem;line-height:1.5;list-style:circle}

/* The VEU footer stacks: contact block right-aligned, wave full width under
   it. The wave is artwork, not a rule, so it keeps its own aspect ratio. */
.veu-ft{display:block;padding-top:20px}
.veu-ft .tpl-ft-biz{text-align:right}
.veu-wave{display:block;width:100%;height:auto;margin-top:10px}
.tpl-doc-veu .tpl-page{padding-bottom:0}
.tpl-doc-veu .tpl-cover{padding:0}

/* In template mode the document carries its own masthead on every page, so
   the builder's header steps back to being just a control bar. */
.doc-hdr.dh-tplmode .dh-lead{display:none}   /* and with it the empty flex gap */
.doc-hdr.dh-tplmode .dh-brand,
.doc-hdr.dh-tplmode .dh-sub,
.doc-hdr.dh-tplmode .dh-title{display:none}

/* The dropdown in the document header */
 /* Close. Sits in the corner of the bar rather than in the button stack,
    because it dismisses the panel — it is not one of the quote's actions. */
/* No fill at rest: a permanently red button in the corner reads as a
   warning about the quote rather than a way out of the panel. The red
   arrives on hover, once the pointer has already committed to it, and
   deepens on press. The glyph stays legible throughout. */
.dh-x{position:absolute;top:12px;right:12px;width:34px;height:34px;
  display:grid;place-items:center;border:none;border-radius:var(--r-sm);
  background:transparent;color:rgba(255,255,255,.72);
  font-size:.95rem;font-weight:800;line-height:1;
  cursor:pointer;font-family:inherit;
  transition:background var(--t) var(--ease),color var(--t) var(--ease),
             transform var(--t) var(--ease)}
.dh-x:hover{background:var(--red);color:#fff}
.dh-x:active{background:#8e2a1f;color:#fff;transform:scale(.94)}
.dh-x:focus-visible{outline:2px solid #fff;outline-offset:2px}

/* Template picker. Two buttons, one of them unmistakably on: the active one
   inverts to a white card with dark text and a filled marker, so the choice
   survives a glance, a greyscale print-out and a colour-blind reader. */
.dh-tplpick{display:flex;gap:10px}
.dh-tplbtn{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:flex-start;
  gap:2px;text-align:left;padding:11px 14px 12px 36px;position:relative;
  border:2px solid rgba(255,255,255,.22);border-radius:var(--r);
  background:rgba(255,255,255,.08);color:rgba(255,255,255,.8);
  font-family:inherit;cursor:pointer;
  transition:background var(--t) var(--ease),border-color var(--t) var(--ease),
             color var(--t) var(--ease),box-shadow var(--t) var(--ease)}
.dh-tplbtn::before{content:'';position:absolute;left:13px;top:50%;transform:translateY(-50%);
  width:15px;height:15px;border-radius:50%;border:2px solid currentColor;box-sizing:border-box}
.dh-tplbtn:hover{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.42);
  color:#fff}
.dh-tplbtn:focus-visible{outline:2px solid #fff;outline-offset:2px}
.dh-tplbtn.on{background:#fff;border-color:#fff;color:var(--pd);
  box-shadow:0 2px 10px rgba(0,0,0,.18)}
.dh-tplbtn.on::before{background:var(--pd);box-shadow:inset 0 0 0 3px #fff}
.dh-tplname{font-weight:800;font-size:.88rem;line-height:1.2}
.dh-tplnote{font-size:.7rem;line-height:1.3;opacity:.72;overflow-wrap:anywhere}
.dh-tplbtn.on .dh-tplnote{opacity:.66}

@media (max-width:640px){
  .tpl-doc{padding:var(--s2);gap:var(--s2)}
  .tpl-page{padding:18px 16px 14px}
  .tpl-top{flex-direction:column;gap:12px}
  .tpl-facts{flex:1 1 auto;width:100%}
  .tpl-details{grid-template-columns:minmax(0,1fr)}
  .tpl-ft{flex-direction:column;align-items:flex-start}
  .tpl-ft-biz{text-align:left}
  .dh-tplbtn{padding:10px 12px 11px 34px}
}
