/* CV Mojo app: the little popups behind the dashboard's score and review chips (2026-10-29), with app-chipinfo.js.
   The chips are buttons (.db-chip-btn, drawn by app.js continueCard) and keep their .cvm-status colours. The popup
   hangs under the chip row; while it is open the card is marked .cvi-open so it can overflow and sit above the
   cards below it (.db-continue clips its overflow otherwise). */

.db-chip-row { position: relative; }
.db-chip-btn { gap: 5px; margin: 0; font-family: inherit; border: 0; cursor: pointer; transition: box-shadow .15s ease, transform .15s ease; }
.db-chip-btn svg { flex: none; margin: 0 -2px 0 1px; opacity: .72; }
.db-chip-btn:hover, .db-chip-btn[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px currentColor; }
.db-chip-btn:hover svg, .db-chip-btn[aria-expanded="true"] svg { opacity: 1; }
.db-chip-btn:focus-visible { outline: 3px solid var(--navy, #1E2A5A); outline-offset: 2px; }
.db-card.cvi-open { z-index: 6; overflow: visible !important; }

.cvi-pop { position: absolute; z-index: 30; left: 0; top: calc(100% + 12px); width: min(380px, 100%); padding: 18px 20px 16px; font-size: 14px; line-height: 1.5; color: var(--text, #1D1A26); text-align: left; white-space: normal; background: var(--paper, #FFFDF8); border-radius: 20px; box-shadow: var(--shadow-lg, 0 16px 36px rgba(30, 42, 90, .12)), 0 0 0 1px rgba(30, 42, 90, .06); animation: cvi-in .16s ease-out; }
.cvi-pop::before { content: ''; position: absolute; top: -7px; left: calc(var(--cvi-x, 30px) - 8px); width: 16px; height: 16px; background: inherit; border-radius: 3px; box-shadow: -1px -1px 0 0 rgba(30, 42, 90, .06); transform: rotate(45deg); }
.cvi-pop:focus { outline: none; }
.cvi-pop:focus-visible { outline: 3px solid var(--navy, #1E2A5A); outline-offset: 2px; }
@keyframes cvi-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .cvi-pop { animation: none; } }

.cvi-x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; color: var(--muted, #5D5869); background: none; border: 0; border-radius: 50%; cursor: pointer; }
.cvi-x:hover { color: var(--navy, #1E2A5A); background: var(--mist, #F7EEDA); }
.cvi-x:focus-visible { outline: 3px solid var(--navy, #1E2A5A); outline-offset: 1px; }

.cvi-body { display: grid; gap: 10px; }
.cvi-body > * { margin: 0; }
.cvi-k { display: flex; align-items: baseline; gap: 6px; padding-right: 34px; font-size: 16px; font-weight: 900; color: var(--navy, #1E2A5A); }
.cvi-k b { font-family: var(--v-display, 'Arial Narrow', sans-serif); font-size: 34px; font-weight: 400; line-height: .8; letter-spacing: .01em; }
.cvi-k span { font-size: 13px; font-weight: 800; color: var(--muted, #5D5869); }
.cvi-quiet { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--muted, #5D5869); }
.cvi-quiet svg { flex: none; margin-top: 3px; }
.cvi-h { margin-top: 2px !important; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #5D5869); }

/* Recent scans: date, score, how it moved */
.cvi-scans { display: grid; gap: 0; padding: 0; list-style: none; }
.cvi-scans li { display: grid; grid-template-columns: minmax(74px, auto) 34px 1fr; align-items: baseline; gap: 10px; padding: 6px 0; border-top: 1.5px solid var(--line, #EDE4CB); }
.cvi-scans li:first-child { border-top: 0; padding-top: 0; }
.cvi-scans b { font-size: 16px; font-weight: 900; color: var(--navy, #1E2A5A); }
.cvi-when { font-size: 13px; color: var(--muted, #5D5869); }
.cvi-up, .cvi-down, .cvi-same { font-size: 13px; font-weight: 800; }
.cvi-up { color: var(--teal-t, #13705F); }
.cvi-down { color: var(--tang-t, #B34A00); }
.cvi-same { font-weight: 700; color: var(--muted, #5D5869); }
.cvi-was b { color: var(--muted, #5D5869); }

/* Community Score: the verdicts so far */
.cvi-votes { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }

/* Latest reviews: who, what they said, when, and a link to it */
.cvi-rvs { display: grid; gap: 0; padding: 0; list-style: none; }
.cvi-rv { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1.5px solid var(--line, #EDE4CB); }
.cvi-rv:first-child { border-top: 0; padding-top: 2px; }
.cvi-rv .ap-av { width: 32px; height: 32px; font-size: 13px; }
.cvi-rv-text { display: grid; flex: 1; min-width: 0; gap: 1px; }
.cvi-rv-text > span:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.cvi-rv-text b { overflow: hidden; max-width: 100%; font-weight: 900; color: var(--navy, #1E2A5A); text-overflow: ellipsis; white-space: nowrap; }
.cvi-rv-go { flex: none; font-size: 13px; font-weight: 800; color: #273D97; text-decoration: underline; text-underline-offset: 3px; }
.cvi-link { display: inline-flex; align-items: center; gap: 4px; justify-self: start; font-weight: 800; color: #273D97; text-decoration: underline; text-underline-offset: 3px; }
.cvi-rv-go:hover, .cvi-link:hover { color: var(--navy, #1E2A5A); }
.cvi-rv-go:focus-visible, .cvi-link:focus-visible { outline: 3px solid var(--navy, #1E2A5A); outline-offset: 2px; border-radius: 4px; }
.cvi-btn { justify-self: start; }

/* The review a link pointed to, on the CV's Reviews tab (app-cv.js ?review=) */
.cvp-review.is-picked { box-shadow: 0 0 0 3px var(--sun, #FFC93C), var(--shadow, 0 10px 26px rgba(30, 42, 90, .09)) !important; transition: box-shadow .4s ease; }

@media (max-width: 520px) {
  .cvi-pop { width: 100%; padding: 16px 16px 14px; }
  .cvi-rv { flex-wrap: wrap; }
  .cvi-rv-go { margin-left: 42px; }
}
