/*
  Business cards (routes/cards.js), 2026-11-12. Mine: the public card, the previews on My card and the admin seat page, and the A4 sheet of cards to print (fronts, then QR backs).
  Light only (his standing rule for what he shows). Each card takes its brand from --ink (name, main button) and --accent (top rule, line labels), set inline per card.
  The public page does not load app.css, so the card carries its own type: Arial, the same family as the brand email signatures, so card and signature match.
*/

/* The brands' own fonts, where the app holds them (lib/cards.js BRANDS fh and ft). */
@font-face { font-family: 'ZeekrHeadline'; src: url('/fonts/ZeekrHeadline-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'ZeekrText'; src: url('/fonts/ZeekrText-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'ZeekrText'; src: url('/fonts/ZeekrText-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'MazdaType'; src: url('/fonts/mazda/MazdaType_Regular.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'MazdaType'; src: url('/fonts/mazda/MazdaType_Medium.otf') format('opentype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'MazdaType'; src: url('/fonts/mazda/MazdaType_Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }

html { background: #fff; }
.bc-page { --soft: #f3eee8; margin: 0; background: #fff; color: #1d1d1f; color-scheme: light; -webkit-text-size-adjust: 100%; }
/* His notes, 13 Nov 2026: "the page should be vertically centred everything feels too high up". The wash fills the whole screen and the content sits in its middle. */
.bc-wrap { box-sizing: border-box; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 28px 18px; background: linear-gradient(180deg, var(--soft), #fff 70%); }
.bc-wrap > .bc-f { width: 100%; max-width: 560px; margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bc-missing { padding: 40px 8px; font-family: Arial, Helvetica, sans-serif; text-align: center; }
.bc-missing h1 { font-size: 24px; margin: 0 0 8px; }

/* ---------- Direction F, The printed card (his pick, 12 Nov 2026), as on the Business Card Directions mock ----------
   THE CARD IS ONE FIXED DESIGN AT EVERY SIZE. His notes, 13 Nov 2026: "the card should look the same everywhere" and "the logo sizes ... should be a ratio
   on the card to always ensure consistency". The card is a size container and everything on it is sized in cqw (per cent of the card's width), so a phone,
   a computer, the My card preview and the printed 90 x 55 mm card are the same card at different sizes. Ratios taken from the mock's desktop card (560 px). */
.bc-f { --ink: #121215; --accent: #ff5741; --soft: #f3eee8; --fh: Arial, sans-serif; --ft: Arial, sans-serif; font-family: var(--ft); text-align: center; color: #1d1d1f; }
.bc-f a { text-decoration: none; }
/* "spacing for the tap the card instuction above its too close" */
.bc-f-hint { margin: 0 0 22px; font-size: 13px; color: #7a7a80; }
.bc-f-flip { position: absolute; opacity: 0; pointer-events: none; }
.bc-f-card { display: block; position: relative; container-type: inline-size; aspect-ratio: 90 / 55; perspective: 1200px; cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent; }
.bc-card-face { position: absolute; inset: 0; box-sizing: border-box; border-radius: 2.2cqw; background: #fff; overflow: hidden; display: flex; flex-direction: column; font-family: var(--ft, Arial, Helvetica, sans-serif); color: #1d1d1f; text-align: left; }
.bc-f-card .bc-card-face { box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 14px 30px rgba(0,0,0,.12); -webkit-backface-visibility: hidden; backface-visibility: hidden; transition: transform .6s; }
.bc-card-front { padding: 4.8cqw 5.4cqw; border-top: 1cqw solid var(--accent); }
.bc-card-logo { display: block; height: 5.6cqw; width: auto; max-width: 60%; align-self: flex-start; object-fit: contain; }
.bc-card-name { margin-top: auto; font: 500 6.4cqw/1.1 var(--fh); color: var(--ink); }
.bc-card-title { font-style: normal; font-size: 3.1cqw; line-height: 1.3; color: #5a5a60; margin: .6cqw 0 2cqw; }
.bc-card-det { font-size: 2.9cqw; line-height: 1.45; color: #3a3a3d; border-top: max(1px, .18cqw) solid #e8e8ec; padding-top: 1.6cqw; overflow-wrap: anywhere; }
.bc-card-back { align-items: center; justify-content: center; gap: 2cqw; background: var(--ink); }
.bc-card-qr { display: block; width: 32cqw; height: 32cqw; padding: 1.2cqw; border-radius: 1cqw; background: #fff; box-sizing: content-box; }
.bc-card-back small { color: #fff; font-size: 2.7cqw; text-align: center; line-height: 1.4; }
.bc-f-card .bc-card-back { transform: rotateY(180deg); }
.bc-f-flip:checked + .bc-f-card .bc-card-front { transform: rotateY(180deg); }
.bc-f-flip:checked + .bc-f-card .bc-card-back { transform: rotateY(360deg); }
.bc-f-flip:focus-visible + .bc-f-card { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 2.2cqw; }
.bc-f-save { display: flex; gap: 9px; align-items: center; justify-content: center; min-height: 52px; border-radius: 999px; background: var(--ink); color: #fff !important; font-weight: 700; font-size: 16px; margin-top: 26px; }
.bc-f-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.bc-f-chips a { display: inline-flex; gap: 6px; align-items: center; min-height: 40px; box-sizing: border-box; padding: 8px 13px; border-radius: 999px; background: #fff; border: 1px solid #dcdce0; font-size: 13px; color: var(--ink); }
.bc-f svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.bc-f-chips svg { width: 16px; height: 16px; }
.bc-f-save:focus-visible, .bc-f-chips a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bc-f-foot { font-size: 12px; color: #8a8a90; margin: 18px 0 0; }
@media (prefers-reduced-motion: reduce) { .bc-f-card .bc-card-face { transition: none; } }

/* ---------- Inside the app: My card and the admin seat page ---------- */

.bc-mine { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 32px; align-items: start; margin-bottom: 40px; }
.bc-mine-preview .bc-f { background: linear-gradient(180deg, var(--soft), #fff 70%); border-radius: 20px; padding: 18px 18px 20px; border: 1px solid #ececf0; }
.bc-thumb { display: block; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin: 6px 0 8px; }
.bc-mine-preview .eyebrow { margin-bottom: 12px; }
.bc-mine-edit .panel + .panel { margin-top: 16px; }
@media (max-width: 860px) { .bc-mine { grid-template-columns: 1fr; } }

.bc-status { padding: 12px 14px; border-radius: 10px; background: #fff4e5; margin: 0 0 16px; }
.bc-status.is-live { background: #e8f5ec; }
.bc-fixed { margin: 0 0 4px; }
.bc-fixed div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; padding: 2px 0; }
.bc-fixed dt { color: #6e6e73; }
.bc-fixed dd { margin: 0; overflow-wrap: anywhere; }
.bc-link { overflow-wrap: anywhere; margin: 0 0 12px; }
.bc-share .actions { flex-wrap: wrap; }

.bc-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #ececf0; font-size: 13px; line-height: 1.6; white-space: nowrap; }
.bc-badge.is-live { background: #e3f3e8; color: #135c2c; }
.bc-badge.is-wait { background: #fff1dc; color: #7a4a00; }

.bc-admin { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 24px; align-items: start; }
.bc-admin > div > .panel + .panel { margin-top: 16px; }
.bc-qr svg { display: block; width: 100%; max-width: 260px; height: auto; margin: 0 auto 12px; }
@media (max-width: 860px) { .bc-admin { grid-template-columns: 1fr; } }

/* ---------- Cards to print: the screen card at 90 x 55 mm, 10 to an A4 sheet, a page of fronts then a page of QR backs ---------- */

.bc-print-bar { box-sizing: border-box; max-width: 210mm; margin: 16px auto; padding: 12px 16px; font: 14px/1.5 Arial, Helvetica, sans-serif; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.bc-print-bar p { margin: 0; flex: 1 1 280px; }
.bc-print-btn { font: 700 15px Arial, Helvetica, sans-serif; padding: 10px 22px; border-radius: 999px; border: 0; background: #121215; color: #fff; cursor: pointer; }
.bc-sheets { padding-bottom: 32px; }
.bc-sheet { box-sizing: border-box; width: 210mm; height: 297mm; margin: 0 auto 24px; padding: 11mm 15mm; background: #fff; display: grid; grid-template-columns: repeat(2, 90mm); grid-template-rows: repeat(5, 55mm); box-shadow: 0 8px 24px rgba(0,0,0,.08); break-after: page; overflow: hidden; }
/* Each card is its own size container, so the faces use the same cqw ratios as the card on screen. A hairline marks where to cut. */
.bc-print-card { position: relative; container-type: inline-size; width: 90mm; height: 55mm; outline: .1mm solid #d6d6db; outline-offset: -.05mm; }
.bc-print-card .bc-card-face { border-radius: 0; }
.bc-print-card.is-empty { outline: none; }
.bc-card-qr svg { display: block; width: 100%; height: 100%; }
@page { size: A4; margin: 0; }
@media print {
  html, .bc-page { background: #fff; }
  .bc-print-bar { display: none; }
  .bc-sheet { margin: 0; box-shadow: none; }
  .bc-print-card .bc-card-face { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* 2026-11-19. Mine. A brand with no logo yet sets its name in its headline font at the logo's height; Share your card sits under the card in the left column;
   the holder's address fieldset, suburb, state and postcode on one row (stacked on a phone). */
.bc-card-wordmark { height: auto; font-family: var(--fh); font-weight: 700; font-size: 4.4cqw; line-height: 1.1; letter-spacing: .02em; color: var(--ink); text-transform: uppercase; }
.bc-mine-preview .panel { margin-top: 16px; }
.bc-mine-preview .bc-share .actions { flex-wrap: wrap; }
.bc-addr { border: 1px solid #ececf0; border-radius: 12px; padding: 12px 14px 4px; margin: 0 0 16px; min-width: 0; }
.bc-addr legend { font-weight: 600; padding: 0 6px; }
.bc-addr-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 520px) { .bc-addr-row { grid-template-columns: 1fr; } }
.bc-addr > .hint { margin-bottom: 14px; }
