/* Da Vinci Detailing, step 4d look: "drop anything" mat + instant found panel.
   Drop-in after site.css. Uses v2-theme.css variables only. No box-shadow, filter or blur. */

/* --- the drop mat: hero of the page --- */
.dv-drop { position: relative; display: grid; place-items: center; align-content: center; gap: 6px;
  min-height: 230px; margin: 0 0 14px; padding: 30px 18px; text-align: center; cursor: pointer;
  background: var(--paper-alt); border: 1.5px dashed var(--gold-dark); outline: 1px solid var(--hairline);
  outline-offset: 5px; transition: background-color 160ms ease, border-color 160ms ease; }
.dv-drop::before { content: ""; position: absolute; inset: 6px; pointer-events: none;
  background: url("/static/dv/corner-tl.svg") left top no-repeat, url("/static/dv/corner-tr.svg") right top no-repeat,
              url("/static/dv/corner-bl.svg") left bottom no-repeat, url("/static/dv/corner-br.svg") right bottom no-repeat; }
.dv-drop:hover, .dv-drop:focus-visible, .dv-drop.dragover { background: var(--amber-bg); border-color: var(--ink); }
.dv-drop:focus-visible { outline: 2px solid var(--link); }
.dv-drop-icon { width: 64px; height: 64px; background: url("/static/dv/drop-icon.svg") center / contain no-repeat;
  transition: transform 200ms ease; }
.dv-drop.dragover .dv-drop-icon { transform: translateY(6px); }
.dv-drop-title { font-family: var(--font-display); font-size: 24px; letter-spacing: .06em; color: var(--ink); }
.dv-drop-kinds { font-size: 16px; color: var(--ink-muted); }
.dv-drop-or { font-size: 15px; color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
/* once files are in, the mat shrinks to an "add more" strip */
.dv-drop.has-files { min-height: 0; padding: 14px 18px; grid-auto-flow: column; gap: 12px; }
.dv-drop.has-files .dv-drop-icon { width: 36px; height: 36px; }
.dv-drop.has-files .dv-drop-title { font-size: 17px; }
.dv-drop.has-files .dv-drop-kinds { display: none; }

/* --- what we found: one summary line, then page tiles --- */
.dv-found-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px;
  padding: 0 0 10px; margin: 0 0 12px; border-bottom: 1px solid var(--hairline); }
.dv-found-count { font-size: 18px; }
.dv-found-price { font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--ink); }
.dv-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0 0 16px;
  padding: 0; list-style: none; }
.dv-thumb { position: relative; margin: 0; border: 1px solid var(--hairline-strong); background: var(--paper);
  padding: 4px; }
.dv-thumb img, .dv-thumb .dv-ph { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; }
.dv-thumb figcaption { display: flex; justify-content: space-between; gap: 6px; padding: 5px 2px 1px;
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); min-width: 0; }
.dv-thumb figcaption span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-kind { position: absolute; top: 8px; left: 8px; padding: 1px 6px; font-family: var(--font-mono); font-size: 11px;
  font-weight: 600; letter-spacing: .06em; color: var(--paper); background: var(--topbar-bg); }
/* space held while a page renders: a quiet ruled sheet, no spinner */
.dv-ph { background: repeating-linear-gradient(180deg, transparent 0 17px, var(--hairline) 17px 18px), var(--paper) !important; }
/* a page we can't read: question, not charged */
.dv-thumb.q { border-color: var(--amber); background: var(--amber-bg); }
.dv-thumb.q figcaption span:last-child { color: var(--amber); font-weight: 600; }
/* tiles fade in where their space already is */
.dv-thumb img { animation: dv-in 220ms ease both; }
@keyframes dv-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dv-thumb img, .dv-drop-icon { animation: none; transition: none; } }

@media (max-width: 600px) {
  .dv-drop { min-height: 190px; padding: 24px 12px; }
  .dv-drop-title { font-size: 21px; }
  .dv-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dv-found-price { font-size: 26px; }
}

/* --- Mona Lisa code button: a small framed portrait instead of the plain gold box --- */
.dv-mona { width: 54px; height: 78px; padding: 4px; border: 2px solid var(--gold-dark); border-radius: 0;
  background: var(--gold-hi); outline: 1px solid var(--gold-dark); outline-offset: 2px; box-shadow: none;
  transition: transform 160ms ease; }
.dv-mona img { border: 1px solid var(--gold-dark); }
.dv-mona:hover, .dv-mona:focus-visible { transform: translateY(-2px); }
.dv-mona:focus-visible { outline: 2px solid var(--link); }
.dv-drop.has-files::before { display: none; } /* the strip is secondary: no corner brass */

/* ==========================================================================
   Da Vinci Detailing polish (Designer 2026-12-02). Same file, after the 4d look.
   The site CSP is img-src 'self', so every image here is a file under
   /static/dv/ (data: URIs would be blocked, which is why the brand mark from
   v2-theme.css never shows today).
   ========================================================================== */

/* D1. Brand mark: Da Vinci's own sunburst with a drafting compass (not the
   Renaissance R), as a file so the CSP allows it */
.topbar .brand { display: inline-flex; align-items: center; gap: 10px; }
.topbar .brand-mark { width: 36px; height: 36px; background: url("/static/dv/brand-mark.svg") center / contain no-repeat; }

/* D2. Disabled Place order: a quiet outlined button in theme colors instead
   of the grey 50%-opacity block */
.dv .btn-primary:disabled { opacity: 1; background: var(--paper-alt); color: #6b5d48;
  border: 1.5px dashed var(--hairline); outline: none; cursor: not-allowed; }

/* D3. Mona Lisa code frame on phone sits in the room under the last card
   (the 90px padding from B21/B22) instead of floating over the form */
@media (max-width: 600px) {
  body { position: relative; }
  .dv-mona { position: absolute; right: 14px; bottom: 12px; width: 46px; height: 66px; }
}

/* D4. Hero: tighter, with the price line set as a brass ruled strip */
.dv-hero h1 { margin-bottom: 8px; }
.dv-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 12px 0 0;
  padding-top: 10px; border-top: 1px solid var(--hairline); }
.dv-price strong { font-family: var(--font-display); font-size: 20px; letter-spacing: .02em; }

/* D5. Step headings get a brass numeral so the two steps read as a sequence */
.dv h2 .dv-step { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 8px;
  border: 1.5px solid var(--gold-dark); outline: 1px solid var(--gold-bright, #c9a44c); outline-offset: 2px;
  font-size: 15px; vertical-align: 2px; background: var(--paper); }

/* D5b. Headline breaks evenly instead of leaving one word alone */
.dv-drop-title { text-wrap: balance; max-width: 30ch; }

/* D6. Primary button press feedback */
.dv .btn { transition: background-color .15s, transform .08s; }
.dv .btn:active:not(:disabled) { transform: translateY(1px); }

/* D7. Ready view: proof tiles get the same paper frame as the found tiles */
.dv-proofs a { padding: 4px; background: var(--paper); border: 1px solid var(--hairline-strong, #a8956d); }
.dv-proofs a:hover { border-color: var(--gold-dark); }

@media (prefers-reduced-motion: reduce) { .dv .btn { transition: none; } }

/* Da Vinci only: the margin gear drawn whole, scaled to fit the empty margin
   right of the 760px column, instead of the Renaissance crop (520x380 window
   over 640-tall art). Load after dv.css. Overrides v2-theme.css body::after. */
body::after {
  --gw: min(340px, calc((100vw - 760px) / 2 - 56px));
  top: 118px;
  right: calc(((100vw - 760px) / 2 - var(--gw)) / 2);
  width: var(--gw);
  height: auto;
  aspect-ratio: 520 / 640;
  background-size: contain;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.24; /* smaller drawing, thinner strokes: a touch darker than Renaissance .16 */
}
/* No margin to draw in: leave it out rather than tuck it under the card */
@media (max-width: 1199px) { body::after { display: none; } }
