/* ==========================================================
   ACCEL AIR / A·TEMP — QUOTE BUILDER
   QUOTE DOCUMENT PANEL
   The modal the rep reviews a quote in: its control bar (close, template
   picker), the action bar at its foot, and the site photo appendix.
   The printed documents themselves are part 08.

   Part 5 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 DOCUMENT MODAL
   ══════════════════════════════════════════════════════════ */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:100;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:28px 14px}
.modal-inner{width:100%;max-width:900px;margin:0 auto;background:#fff;border-radius:10px;box-shadow:0 20px 60px rgba(0,0,0,.3);overflow:hidden}
.doc-hdr{position:relative;background:var(--pd);padding:18px clamp(16px,3vw,24px) 20px;
  display:flex;flex-direction:column;gap:12px}
.doc-hdr>div{min-width:0}
.doc-hdr .dh-brand{font-weight:900;font-size:1.2rem;color:#fff;line-height:1}
.doc-hdr .dh-brand .brand-logo{height:calc(30px * var(--logo-scale,1))}
.doc-hdr .dh-brand .brand-word{font-size:1.2rem}
.doc-hdr .dh-brand .brand-word span{color:var(--pa)}
.doc-hdr .dh-sub{font-size:.73rem;color:rgba(255,255,255,.6);margin-top:3px;overflow-wrap:anywhere}
.doc-hdr .dh-title{font-weight:800;font-size:.85rem;color:rgba(255,255,255,.85);margin-top:7px}
.doc-hdr .dh-date{color:rgba(255,255,255,.72);font-size:.82rem;padding-right:46px}
.doc-hdr .dh-close,.doc-actionbar .dh-close{display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.15);
  border:none;color:#fff;padding:8px 16px;border-radius:var(--r-sm);cursor:pointer;
  font-family:inherit;font-weight:700;white-space:nowrap;
  transition:background var(--t) var(--ease),filter var(--t) var(--ease)}
.doc-hdr .dh-close:hover,.doc-actionbar .dh-close:hover{background:rgba(255,255,255,.26)}
/* The header actions stack on desktop and wrap into a row on narrow screens */
/* Print and Email sit at the foot of the document rather than the head, so
   the rep meets them having read the quote. Deliberately not sticky: the
   point is that they are the end of the page, not a permanent fixture. */
.doc-actionbar{background:var(--pd);padding:16px clamp(16px,3vw,24px);
  display:flex;flex-direction:column;gap:10px}
.doc-actionbar .dh-actions{display:flex;gap:10px}
.doc-actionbar .dh-actions .dh-close{flex:1 1 0;justify-content:center;
  padding:13px 14px;font-size:.88rem}
/* Email Quote is the accent action — every click sends a fresh email */
.doc-hdr .dh-mail,.doc-actionbar .dh-mail{background:var(--pa);color:#fff}
.doc-hdr .dh-mail:hover,.doc-actionbar .dh-mail:hover{background:var(--pa);filter:brightness(1.08)}
.doc-hdr .dh-mail:disabled,.doc-actionbar .dh-mail:disabled{opacity:.6;cursor:progress;filter:none}
/* Send feedback — lives under the buttons, never printed */
.dh-status{font-size:.76rem;font-weight:700;line-height:1.45;color:rgba(255,255,255,.75)}
.dh-status:empty{display:none}
.dh-status.is-ok{color:#8ef0b4}
.dh-status.is-err{color:#ffc1b8}
.dh-status.is-busy{color:rgba(255,255,255,.8)}
.doc-body{padding:24px clamp(16px,3vw,28px)}
.doc-meta{display:grid;grid-template-columns:minmax(88px,auto) minmax(0,1fr) minmax(88px,auto) minmax(0,1fr);gap:4px 24px;margin-bottom:18px;font-size:.83rem;border-bottom:1px solid var(--line);padding-bottom:14px}
.doc-meta dt{color:#6b7785;margin:0}
.doc-meta dd{margin:0;font-weight:600;overflow-wrap:anywhere}
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin-bottom:16px}
.doc-table{width:100%;min-width:520px;border-collapse:collapse;font-size:.87rem}
.doc-table th{background:var(--p);color:#fff;padding:9px 10px;text-align:left;font-weight:700;font-size:.77rem;letter-spacing:.5px}
.doc-table th.r{text-align:right}
.doc-table td{padding:8px 10px;border-bottom:1px solid #f0f4f8}
.doc-table td.r{text-align:right;white-space:nowrap}
.doc-table tr:nth-child(even){background:#fafbfc}
.doc-table tr.veu-row{background:#f0fdf4}
.doc-table tr.promo-row{background:#fffbf0}
.doc-table tfoot tr{border-top:2px solid var(--p)}
.doc-table tfoot td{font-weight:700;padding:9px 10px}
.doc-table tfoot tr.grand{background:var(--p);color:#fff}
.doc-flag{background:var(--amberBg);border-left:3px solid var(--amber);padding:10px 14px;font-size:.83rem;color:var(--amber);margin-bottom:14px;border-radius:0 8px 8px 0}
.doc-notes{background:#f8f8f8;border-left:3px solid #ccc;padding:10px 14px;font-size:.85rem;color:#445;white-space:pre-wrap;border-radius:0 8px 8px 0;overflow-wrap:anywhere}
.doc-footer{font-size:.72rem;color:#6b7785;margin-top:22px;line-height:1.6}
/* Accreditations and business identity. A notch larger and darker than the
   terms paragraph above it, because these are credentials a customer may want
   to act on — verify the VEU provider, check the ARC authorisation — not
   conditions limiting the offer. */
.doc-credit{margin-top:12px;padding-top:10px;border-top:1px solid var(--line);
  font-size:.76rem;color:#4b5a6b;line-height:1.7}
.doc-credit strong{color:var(--ink);font-weight:800}

/* ══ SITE PHOTO APPENDIX (quote document) ══════════════════
   Rendered by renderDocPhotos(). Only slots holding an upload reach the DOM,
   so there is nothing here to hide when a slot is empty. */
.doc-photos{margin-top:22px;padding-top:16px;border-top:2px solid var(--p)}
.doc-photos .dp-title{font-weight:800;font-size:.95rem;color:var(--pd);margin-bottom:12px;
  display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.doc-photos .dp-count{font-weight:600;font-size:.72rem;color:#6b7785}
.doc-photos .dp-sec{margin-bottom:16px;break-inside:avoid;page-break-inside:avoid}
.doc-photos .dp-head{margin:0 0 7px;font-size:.82rem;font-weight:700;color:#1d2733;
  background:var(--bg);border-left:3px solid var(--p);border-radius:0 6px 6px 0;padding:6px 10px;
  display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.doc-photos .dp-n{font-weight:600;font-size:.7rem;color:#6b7785;white-space:nowrap}
.doc-photos .dp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
.doc-photos .dp-fig{margin:0;border:1px solid var(--line);border-radius:8px;overflow:hidden;
  background:#fff;break-inside:avoid;page-break-inside:avoid}
.doc-photos .dp-fig img{display:block;width:100%;height:190px;object-fit:cover;background:#f4f7fa}
/* Non-image uploads have no object URL to draw — name them instead */
.doc-photos .dp-file{height:190px;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:4px;padding:12px;text-align:center;font-size:.78rem;font-weight:700;color:#4b5a6b;background:#f4f7fa;
  overflow-wrap:anywhere}
.doc-photos .dp-file span{font-weight:600;font-size:.68rem;color:#8a97a5}
.doc-photos figcaption{font-size:.68rem;color:#6b7785;padding:5px 8px;border-top:1px solid var(--line);
  overflow-wrap:anywhere;line-height:1.35}

/* empty state */
.empty-state{text-align:center;color:#bbb;padding:24px 0;font-size:.87rem}
/* Outlet type radio */
.outlet-type-row{display:flex;gap:8px;margin-bottom:10px;flex-wrap:wrap}
.outlet-type-btn{flex:1 1 150px;border:2px solid var(--line);border-radius:8px;padding:9px;text-align:center;cursor:pointer;font-size:.82rem;font-weight:600;color:#556;background:#fff}
.outlet-type-btn.on{border-color:var(--p);background:var(--bg);color:var(--pd)}
/* Selection summary */
.sel-summary{font-size:.8rem;color:var(--p);font-weight:700;margin-top:8px}
.opt-pill{border:1.5px solid var(--line);border-radius:99px;padding:7px 15px;font-size:.8rem;font-weight:600;color:#667;cursor:pointer;background:#fff;transition:all .12s;white-space:nowrap}
.opt-pill.on{background:var(--p);border-color:var(--p);color:#fff}
/* The pills, cards and package rows are focusable divs — make the ring obvious */
.opt-pill:focus-visible,.sys-card:focus-visible,.multi-pkg:focus-visible,
.disc-item:focus-visible,.outlet-type-btn:focus-visible,.ci-head:focus-visible{
  outline:2px solid var(--p);outline-offset:2px}
.note-flag{background:#fffbf0;border:1px solid #fde68a;border-radius:7px;padding:7px 10px;font-size:.74rem;color:var(--amber);margin-top:6px}
