/* One top bar for the whole app (owner 2026-10-19): the home page's bar — glass, rounded, inset — with its logo (the
   spinning colour ring around the mesh wheel, "Carmada" in the serif) and its tabs, the same everywhere. Values are the
   home bar's own, so moving between pages never shifts it. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500&display=swap');

.cm-appbar {
  position: relative; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  box-sizing: border-box;
  margin: 16px 12px 0; padding: 8px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  font-family: var(--type-font);
}
.cm-appbar-main { display: contents; }
/* The logo is home (no Home tab, owner 2026-10-19). Pointing at it answers subtly: a soft pill behind it, the ring a touch
   larger and quicker. The padding is cancelled by an equal negative margin, so nothing around it moves. */
.cm-brand { display: flex; gap: 10px; align-items: center; flex: none; text-decoration: none; color: inherit; cursor: pointer;
  padding: 3px 10px 3px 3px; margin: -3px -10px -3px -3px; border-radius: 999px; transition: background .2s ease; }
.cm-brand:hover { background: rgba(15, 23, 42, 0.05); }
.cm-logo { transition: transform .25s ease; }
.cm-brand:hover .cm-logo { transform: scale(1.08); }
.cm-brand:hover .cm-logo::before { animation-duration: 6s; }
.cm-brand:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; border-radius: 6px; }
.cm-logo { position: relative; width: 24px; height: 24px; flex: none; display: inline-block; }
/* Owner 2026-11-25 (logo drafts, no. 11): a crisp bright ring that touches the wheel's tyre — no blur, no white gap. */
.cm-logo::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, #2be3a6 0%, #0cc4d8 11%, #0a7bf5 24%, #2f5bff 37%, #8a4cf2 50%, #c046d6 60%, #f25588 72%, #ff8a66 82%, #c9c472 91%, #2be3a6 100%);
  animation: cm-spin 18s linear infinite;
}
.cm-logo::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #fafbfc; }
.cm-logo svg.cm-wheel { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); color: #1a1d22; z-index: 2; display: block; }
@keyframes cm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cm-logo::before { animation: none; } }
.cm-brand-name {
  font-family: "New York", ui-serif, "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 500; font-size: 22px; line-height: 27px; letter-spacing: -0.005em; color: #1a1d22;
}
/* 33px: the home bar's tallest row (its developer tabs), so every bar is the same height and centres alike. */
.cm-appnav { display: flex; align-items: center; gap: 2px; margin-left: 10px; margin-right: auto; min-height: 33px; }
/* Owner 2026-11-24 (nav review): "Sign in" / "Sign out" is an account action, not a place — it sits at the far right of
   the bar on every page; the tabs take the rest of the row so it can. */
.cm-appnav { flex: 1 1 auto; }
.cm-navlink.cm-signin, .cm-acct { margin-left: auto; }
.cm-navlink {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; cursor: pointer; text-decoration: none;
  font-family: inherit; font-size: 13px; font-weight: 500; line-height: 16px;
  color: #64748b; padding: 7px 12px; border-radius: 8px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.cm-navlink:hover { background: #f6f7fb; color: #0f172a; }
/* Colour and background only — a bolder active tab would widen it and shift the tabs after it between pages. */
.cm-navlink.is-on { background: rgba(37, 99, 235, .09); color: #2563eb; }
/* Owner 2026-11-25 (mockup static/mock/signin-pill.html): signed out, "Sign in" is a thin outlined button; signed in,
   a pill with ☰ and the shopper's initial opens a small menu (appbar-v1.js). Both fit the bar's 33px row. */
.cm-navlink.cm-signin.cm-signin-btn { border: 1px solid #cbd5e1; border-radius: 999px; padding: 7px 16px; color: #0f172a; background: #fff; }
.cm-navlink.cm-signin.cm-signin-btn:hover { border-color: #94a3b8; background: #fff; }
.cm-acct { position: relative; flex: 0 0 auto; }
.cm-acct-pill {
  display: inline-flex; align-items: center; gap: 8px; box-sizing: border-box; height: 33px;
  padding: 2px 2px 2px 10px; border: 1px solid #d9dee5; border-radius: 999px; background: #fff; color: #334155;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08); cursor: pointer; font: inherit;
}
.cm-acct-pill:hover { box-shadow: 0 2px 6px rgba(15, 23, 42, .12); }
.cm-acct-pill:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.cm-acct-av {
  width: 27px; height: 27px; border-radius: 50%; background: #2563eb; color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 600; line-height: 1;
}
.cm-acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 1000; min-width: 230px; max-width: calc(100vw - 16px);
  box-sizing: border-box; padding: 6px; background: #fff; border-radius: 14px; box-shadow: 0 10px 32px rgba(15, 23, 42, .16);
  font-size: 14px; line-height: 20px; text-align: left;
}
.cm-acct-menu[hidden] { display: none; }
.cm-acct-who { padding: 9px 12px 9px; margin-bottom: 4px; border-bottom: 1px solid #f1f5f9; color: #6b7280; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-acct-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: #0f172a; text-decoration: none; }
.cm-acct-menu a:hover, .cm-acct-menu a:focus-visible { background: #f6f7fb; outline: none; }
.cm-acct-menu a.cm-acct-out { margin-top: 4px; border-top: 1px solid #f1f5f9; border-radius: 0 0 8px 8px; color: #475569; }
/* Owner 2026-11-23: a thin divider before the owner's own links (Beta insights, Negotiation monitor). */
.cm-navsep { width: 1px; height: 16px; background: #e2e8f0; margin: 0 6px; flex: 0 0 auto; }
.cm-ready-badge { min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px;
  background: #2563eb; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.cm-ready-badge[hidden] { display: none; }
.cm-appbar-right { display: flex; gap: 8px; align-items: center; margin-left: auto; }
/* A page's own controls (the car page: ‹ Back, Save, Share, Compare, Contact) fit the same 33px row, so the bar keeps the
   home bar's height. */
.cm-appbar-right > * { box-sizing: border-box; max-height: 33px; }
@media (max-width: 720px) {
  .cm-appbar { margin: 8px 8px 0; padding: 6px 10px; }
  .cm-brand-name { font-size: 19px; }
  .cm-navlink { padding: 7px 8px; }
  /* Owner 2026-11-24 (design B): on a phone the logo and Sign in share the first row and the tabs get a row of their
     own underneath, so Sign in and every tab show without swiping. The owner's two extra links may still scroll. */
  .cm-appbar, .o3-chrome { flex-wrap: wrap; row-gap: 2px; }
  .cm-navlink.cm-signin, .cm-acct, .cm-appbar-right { order: 2; }
  .cm-navlink.cm-signin.cm-signin-btn { padding: 6px 14px; }
  .cm-appnav { order: 3; flex: 1 0 100%; margin: 0 0 0 -8px; overflow-x: auto; }
}

/* Owner 2026-10-20: every tab uses the home page's off-white. My negotiations
   was #f6f7fb, Deal X-RAY #e8ebf1, the car page #fafaf8, and a conversation sat
   on #f7f7fa with a warmer #fafaf8 panel behind the answers. This sheet loads on
   every tabbed page, so the one rule lives here; the conversation's own panels
   go transparent so the page colour shows through. */
html, body { background: #f5f5f7 !important; }
#appRoot.o3-root, #conversationHistory.conversation-history { background: transparent !important; }
/* Owner 2026-10-21: no decorative drifting blobs over the off-white — the home already hid them; Watching still showed them. */
.eh-bg { display: none !important; }
