/* 🏢 The company band (company-band.js) and the "🏢 Full Company Record" link
 * on the portal's company card. One file for both, loaded by app.html,
 * record.html and company-record.html — so styles.css (shared by nine pages)
 * did not need a new stamp for a feature that touches three.
 *
 * 👁 Every state here is carried by an icon AND words — 📍 / 👤, "✓ showing",
 * "⚠" — never by colour alone. */

/* ── the band ───────────────────────────────────────────────────────────── */
/* flex: none — it sits at the top of .rec, a 100dvh flex column, so the record
   below simply gets that much less height and scrolls inside itself as ever. */
.cb-band {
  flex: none; position: relative; z-index: 30;
  background: var(--card); border-bottom: 2px solid var(--accent);
}
/* The company on the left gives way first (its lines end in "…"), so at
   GetBookedUp's usual ~1000px the boxes stay on ONE row. Narrower than that the
   boxes wrap as a group, never one box at a time. */
.cb-band__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 14px; padding: 8px 12px;
}
.cb-picks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
/* 🔴 Inside GetBookedUp the top ~16px of the frame is under the Marketers
   Toolkit bar (see .rec-framed .rec-titlebar in record.css). The band is now
   the top row, so the padding moves up to it and the title bar goes back to
   its own 7px. */
.rec-framed .cb-band__row { padding-top: 24px; }
.rec-framed.cb-has-band .rec-titlebar { padding-top: 7px; }

.cb-id { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 200px; }
.cb-id__ico { font-size: 20px; line-height: 1; }
.cb-id__text { min-width: 0; overflow: hidden; }
/* "Weldricks Pharmacy › 📍 Hatfield - Manor" — both halves shrink to an
   ellipsis rather than wrap, so the band stays one line tall. */
.cb-id__title { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.cb-id__name,
.cb-id__member {
  flex: 0 1 auto; min-width: 0;
  font-weight: 700; font-size: 16px; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
a.cb-id__name:hover { text-decoration: underline; }
.cb-id__sep { color: var(--ink-soft); font-weight: 400; }

/* While the band is up, its 🔍 Find another customer replaces the record
   bar's own — one per screen. */
.cb-has-band #recSearch { display: none; }
.cb-id__sub {
  font-size: 13px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.cb-pick { position: relative; }
.cb-pick__label {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.cb-pick__q {
  width: clamp(150px, 17vw, 240px);
  padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-weight: 400; background: var(--card); color: var(--ink);
}
.cb-pick__q:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.cb-list {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 40;
  width: 340px; max-width: 90vw; max-height: 60vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}
.cb-opt {
  display: block; width: 100%; text-align: left;
  padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: var(--ink); text-decoration: none; font: inherit; cursor: pointer;
}
.cb-opt:last-child { border-bottom: 0; }
.cb-opt:hover, .cb-opt:focus { background: #eef6fb; outline: 2px solid var(--accent); outline-offset: -2px; }
.cb-opt__name { display: block; font-weight: 600; font-size: 14px; }
.cb-opt__sub { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 1px; }
.cb-opt.is-current { background: #f2f7fb; }
.cb-more { font-weight: 600; color: var(--accent); }
.cb-note { margin: 0; padding: 8px 12px; font-size: 13px; color: var(--ink-soft); }

.cb-find { white-space: nowrap; }

.cb-viewing {
  padding: 5px 12px; font-size: 13px; color: var(--ink);
  background: #eef6fb; border-top: 1px solid #d6e4ee;
}
.cb-viewing--warn { background: #fdf0e6; border-top-color: #f0cba8; }

@media print {
  .cb-pick, .cb-find { display: none !important; }
}

/* ── the company overview page (company-record.html) ───────────────────── */
/* ✏️ The company's boxes are record.css's .rec-f (29 Oct 2026). The website
   box keeps a small ↗ beside it, so the site still opens from here. */
.cr-boxwith { display: flex; align-items: center; gap: 6px; }
.cr-web { flex: none; text-decoration: none; font-weight: 700; color: var(--accent); padding: 2px 6px; border-radius: 6px; }
.cr-web:hover { background: var(--pill); }
/* "✓ Company details saved." — a line, not a pop-up; gone at the next keystroke. */
.cr-saved { margin: 10px 0 0; font-size: 14px; color: var(--ink); }
/* "Open this site's full record ↗" is a link dressed as a button — no
   underline, or it reads as a text link (Allan's screenshot, 29 Oct). */
.cr-open { text-decoration: none; }
.cr-member { padding: 9px 0; border-bottom: 1px solid var(--line); }
.cr-member:last-child { border-bottom: 0; }
.cr-member__name { font-weight: 600; color: var(--accent); text-decoration: none; }
.cr-member__name:hover { text-decoration: underline; }
.cr-member__sub { font-size: 13px; color: var(--ink-soft); margin-top: 1px; }
/* 🏢 Head Office tag on the Company Record's site rows — the icon and the words carry it. */
.cr-ho-tag {
  display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 8px;
  border-radius: 999px; font-size: 12px; font-weight: 700; background: #e8f1f7; color: var(--ink);
}

/* 🏢 "⭐ Make Head Office" — a chip you can press, on a site's own record
   (record.js paintHeadOfficeChip, 30 Oct 2026). Looks like the chips beside it,
   with a pointer and a darker edge on hover so it reads as a button. */
.rec-chip--action { cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; }
.rec-chip--action:hover { border-color: #8f9aa7; background: var(--pill); }
.rec-chip--action:disabled { cursor: progress; opacity: .7; }

/* 📅 The company's Visits tab (29 Oct 2026): whose visit it is opens their
   record in a new tab; "Show 10 older" sits under the list. */
/* Beside the date, as big and bold as it (Allan, 29 Oct). */
.cr-visit-who { font-size: 16px; font-weight: 700; color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.cr-visit-who:hover { text-decoration: underline; }
/* 🔎 The quick look's frame (company-record.js openLook): the whole window,
   see-through, above the guide panel, and out of sight — not clickable, not
   reachable with Tab — until the record's own box is on screen in it. */
.cr-look-frame {
  position: fixed; inset: 0; width: 100%; height: 100%; border: 0; margin: 0;
  background: transparent; z-index: 10000; visibility: hidden;
}
.cr-look-frame--open { visibility: visible; }
.cr-more { padding: 6px 0 10px; }
/* 🏢 First 25, search and Load 25 more (company-list-pager.js). A display rule
   beats the hidden attribute, so each of these is forced out. */
[data-pager-row][hidden] { display: none !important; }
[data-pager-morewrap][hidden] { display: none !important; }
[data-pager-none][hidden] { display: none !important; }
.cx-find[hidden] { display: none !important; }
.cx-find {
  display: block; width: 100%; box-sizing: border-box; min-height: 44px; margin: 8px 0;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  /* 16px, or a phone zooms the whole page in when the box is pressed. */
  font: inherit; font-size: 16px; background: var(--card); color: var(--ink);
}
.cx-find:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.cx-find::placeholder { color: var(--ink); opacity: .8; }
.rec-col-log > .cx-find { width: calc(100% - 22px); margin: 8px 11px 0; flex: none; }
[data-pager-more] { min-height: 44px; }
@media print {
  [data-pager-row][data-pager-past] { display: block !important; }
  .cx-find, [data-pager-morewrap] { display: none !important; }
}
/* 🧾 The company's Invoices tab leads with what is owed — big enough to read
   at a glance, and "overdue" said in words, not colour alone. */
.cr-owed { margin: 2px 0 12px; font-size: 17px; }
.cr-owed__late { color: var(--warn); }
/* ✅ "Update GetBookedUp from Xero" — the report's bar, at the top of the list.
   Its ask and answer reuse the page's own ask box (.cr-bill-choose). */
.cr-xerobar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 12px; padding: 10px 12px; font-size: 14px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; background: #f3f8fc;
}
.cr-xero-list { margin: 0 0 8px; padding-left: 20px; }
.cr-inv-flag { color: var(--warn); font-weight: 600; }
/* 🛠 Which job(s) an invoice was for, each with 🛠 Open job ↗ (6 Nov 2026). */
.cr-invjobs { display: grid; gap: 6px; margin: 4px 0; }
.cr-invjob { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; color: var(--ink); }
/* ✉ Chase's answer, beside its button — a refusal is read where it was pressed. */
.cr-row-msg { align-self: center; font-size: 14px; font-weight: 600; }

/* 📄 Statement — the button(s) under "Owed", and the paper itself. The paper is
   the Sign-off sheet's (record.css .rec-sos), so it prints alone through that
   sheet's own print rule; it is only made wider here for its table. Always
   black on white, on screen too, as it will be on paper. */
.cr-stmt-bar { display: grid; gap: 6px; margin: 0 0 12px; }
.cr-stmt-one { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cr-stmt-made { font-size: 14px; color: var(--ink-soft); }
.cr-stmt .rec-sos__dialog { max-width: 920px; }
.cr-stmt-msg { margin: 6px 0 0; font-size: 14px; font-weight: 600; min-height: 1.2em; }
.cr-stmt__paper { margin: 8px 0 16px; padding: 18px 20px; background: #fff; color: #111418; font-size: 14px; border: 1px solid #dfe5ec; border-radius: 6px; }
.cr-stmt__letterhead { display: flex; align-items: flex-start; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid #111418; }
.cr-stmt__logo { max-height: 64px; max-width: 160px; object-fit: contain; }
.cr-stmt__from { flex: 1; line-height: 1.45; }
.cr-stmt__heading { text-align: right; }
.cr-stmt__heading h2 { margin: 0; font-size: 26px; letter-spacing: .02em; }
.cr-stmt__heading p { margin: 2px 0 0; color: #4a5260; }
.cr-stmt__to { margin: 14px 0; line-height: 1.45; }
.cr-stmt__lbl { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #4a5260; }
.cr-stmt__table { width: 100%; border-collapse: collapse; }
.cr-stmt__table th, .cr-stmt__table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #dfe5ec; vertical-align: top; }
.cr-stmt__table th { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: #4a5260; }
/* Two classes, so it beats the cells' text-align: left above. */
.cr-stmt__table .cr-stmt__num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cr-stmt__late { color: #b54708; font-weight: 700; }
.cr-stmt__pay a { color: #006aac; }
.cr-stmt__bands { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.cr-stmt__band { border: 1px solid #c9d1db; border-radius: 6px; padding: 4px 8px; font-size: 13px; }
.cr-stmt__total { margin: 14px 0 0; font-size: 18px; text-align: right; }
.cr-stmt__foot { margin: 16px 0 0; font-size: 13px; color: #4a5260; }
@media print {
  body.rec-printing .cr-stmt__paper { margin: 0; border: 0; padding: 0; }
  body.rec-printing .cr-stmt .rec-sos__body { padding: 0; }
}

/* 💷 Invoicing, set on the Company Record (29 Oct 2026). */
.cr-bill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 10px; }
.cr-bill-lbl { min-width: 128px; font-size: 14px; font-weight: 600; }
/* 📄 Invoice terms: the heading on its own line, the box under it — inline, the
   box sat up beside the heading's last line (Allan, 1 Nov 2026). */
.cr-add-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cr-terms .cr-bill-lbl { display: block; margin: 10px 0 6px; }
.cr-terms .rec-sms__text { display: block; margin: 0 0 8px; }
/* The chosen one says so with a ✓ AND a stronger edge — never colour alone. */
.cr-bill-opt.is-on {
  border-color: var(--accent); background: #e8f1f7; font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.cr-bill-opt.is-on::before { content: '✓ '; }
.cr-bill-to { font: inherit; font-size: 14px; padding: 5px 8px; border: 1px solid #8f9aa7; border-radius: 6px; background: var(--card); min-width: 240px; max-width: 100%; }
.cr-bill-warn { margin: 0 0 10px; font-size: 14px; color: var(--ink); }
.cr-bill-choose { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 6px; background: #fffaf5; font-size: 14px; }
.cr-bill-choose p { margin: 0 0 8px; }
.cr-bill-btns { display: flex; flex-wrap: wrap; gap: 8px; }
/* 💷 Price list card — the shared box (company-pricelist-ui.js, its look in
   styles.css) inside a record card: the card's own heading replaces the box's,
   and the box drops the divider it carries under the panel's Invoicing. */
.cr-pricelist .company-pricelist { margin: 0; padding-top: 0; border-top: 0; }
.cr-pricelist .company-pricelist > .company-list-title { display: none; }
/* The record's buttons are the compact size (btn-sm), not the panel's tall ones. */
.cr-pricelist .company-pricelist .btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-pricelist .company-pricelist .btn-row .btn { width: auto; min-height: 36px; padding: 6px 14px; font-size: 14px; }
.cr-po { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; font-size: 14px; cursor: pointer; }
.cr-po input { width: 18px; height: 18px; flex: none; }
.cr-bill-msg { display: block; margin: 0; }
.cr-bill-msg:empty { display: none; }

/* ── the portal's company card: "🏢 Full Company Record" ──────────────────
   The pinned copy on the OPEN card. Same loud treatment as the contact's
   "👤 Full Contact Record" (styles.css, .top-links [data-act-record]) — weight
   and a heavy border, never hue. Its own hook on purpose: placeTopLinks()
   sweeps [data-act-record] out of .card-sticky. The result-tile copy reuses
   .card-links .card-link-record as it is. */
.card.is-selected .card-sticky .top-links [data-company-record-pin] {
  border: 3px solid var(--ink);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.card.is-selected .card-sticky .top-links [data-company-record-pin]:active {
  background: var(--ink);
  color: #fff;
}

/* 📨 Quotes go to — the shared box (company-quotes-to-ui.js), on the company
   card and on the Full Company Record (price-list Stage 4, 31 Oct 2026). The
   chosen option is .company-bill-opt.is-on: a border AND a tint, never colour alone. */
.company-quotesto { margin: 14px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.company-quotesto-line, .company-quotesto-msg { font-size: 14px; line-height: 1.45; color: var(--ink); }
.company-quotesto-line { margin-bottom: 8px; }
.company-quotesto .company-billing-warn { display: block; margin-bottom: 8px; }
.company-quotesto-person { margin-top: 10px; display: grid; gap: 6px; }
.company-quotesto-person[hidden] { display: none; }
.company-quotesto-select { min-height: 44px; font-size: 15px; max-width: 100%; }
.company-quotesto .btn-row { margin-top: 10px; }
.company-quotesto-msg { margin-top: 6px; font-weight: 600; }
.company-quotesto-msg:empty { display: none; }
.cr-quotesto .company-quotesto { margin: 0; padding-top: 0; border-top: 0; }
.cr-quotesto .company-quotesto > .company-list-title { display: none; }
.cr-quotesto .company-quotesto .btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-quotesto .company-quotesto .btn-row .btn { width: auto; min-height: 36px; padding: 6px 14px; font-size: 14px; }