/* ═══════════════════════════════════════════════════════════
   "Copy" beside a VIN (owner, Nov 14 2026) — views/partials/vinCopyButton.ejs + public/js/vinCopy.js.
   The car page's Vehicle Overview and the browse page's LIST-view cards (the owner's ask: not the grid, which hides the
   VIN line anyway, and not the map strip). Both sit on white cards in both themes (.sidebar-card and .card stay white —
   theme.css), so literal light colours, never theme tokens. ≥ 8px from the VIN text; a 44×44 tap target on phones.
═══════════════════════════════════════════════════════════ */

.vin-copy-btn,
[data-theme="dark"] .vin-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    min-width: 44px;
    margin: 0 0 0 8px;
    padding: 2px 10px;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    background: #ffffff;
    color: #1d4ed8;
    font: 600 12px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    vertical-align: middle;
    flex: 0 0 auto;
}
.vin-copy-btn:hover { background: #eef2ff; }
.vin-copy-btn:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 2px; }
.vin-copy-btn.is-copied,
[data-theme="dark"] .vin-copy-btn.is-copied { border-color: #86efac; color: #166534; background: #f0fdf4; }

/* The car page: the VIN row keeps its value and the button on one line where it fits. */
.overview-list li.ov-vin { align-items: center; padding: 10px 0 16px; } /* 16px from the row's border under the button */
.overview-list li.ov-vin .ov-val { margin-left: auto; word-break: break-all; }

/* Cards: only the browse page's list view shows it (the grid hides .card-extra; the map strip is not the owner's ask). */
.card .vin-copy-btn { display: none; }
body[data-listings-view="list"] .browse-results .card .vin-copy-btn { display: inline-flex; }
/* The button is taller than the 13px line: keep 12px from the title above and from a wrapped trim (§6.1 text gap). */
body[data-listings-view="list"] .browse-results .card-detail-line { align-items: center; row-gap: 12px; margin-top: 6px; }
.map-cards .card .vin-copy-btn { display: none !important; }

/* Phones: a full 44×44 tap target. */
@media (max-width: 600px) {
    .vin-copy-btn,
    [data-theme="dark"] .vin-copy-btn { min-height: 44px; min-width: 44px; padding: 4px 12px; }
}

/* The polite announcement ("VIN copied") and the fallback's scratch textarea: present for assistive tech / execCommand,
   invisible on screen. */
.vin-copy-live,
.vin-copy-scratch {
    position: fixed !important;
    left: -10000px !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    padding: 0 !important;
    opacity: 0;
}
