/* Canin — walk-in vendor bits on the product page.
   Scoped to the ov-* prefix and loaded through the $page_styles hook, so
   style.css and product-modern.css stay untouched. */

/* ---------------------------------------------------------- freshness pill
   How long ago the shop last confirmed this number. A walk-in shop has no
   crawler, so without this the buyer cannot tell a price set yesterday from
   one set in the spring. */
.ov-fresh {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
    line-height: 1.7;
}
.ov-fresh::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.ov-fresh--fresh   { background: #e6f7ee; color: #0f8a4a; }
.ov-fresh--ok      { background: #edf4ff; color: #1677ff; }
.ov-fresh--stale   { background: #fff6e0; color: #9c6500; }
.ov-fresh--expired { background: #fdeaea; color: #c02626; }
.ov-fresh--unknown { background: #f1f1f1; color: #777; }

/* Kept for older markup: nothing renders .ov-callonly any more. An unconfirmed
   price now keeps its number and gains .pd-stale-note below, because hiding the
   figure removed the one thing a comparison page is for. */
.ov-callonly {
    display: inline-block;
    background: #fff6e0;
    color: #9c6500;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    padding: 5px 10px;
    line-height: 1.7;
}

/* The warning that replaced hiding. Sits under the price on both the online and
   the walk-in vendor rows, full width so it never squeezes the number. */
.pd-stale-note {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 8px 0 0;
    padding: 8px 11px;
    background: #fdeaea;
    border: 1px solid #f7c7c7;
    border-radius: 10px;
    color: #c02626;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.9;
}

.pd-stale-note::before {
    content: "!";
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #c02626;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.ov-hours {
    font-size: 11px;
    color: #5a6b82;
    white-space: nowrap;
}

/* ------------------------------------------------------- revealed contact */
.ov-panel {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding: 12px 14px;
    background: #f4f8ff;
    border: 1px dashed #1677ff;
    border-radius: 10px;
    font-size: 13px;
}
.ov-panel[hidden] { display: none; }

.ov-dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px 14px;
    margin: 0;
}
.ov-dl dt { color: #5a6b82; font-size: 11.5px; }
.ov-dl dd { margin: 0; font-weight: 700; color: #0b2545; }
.ov-dl dd a { color: #1677ff; text-decoration: none; }
.ov-dl dd a:hover { text-decoration: underline; }

.ov-map {
    display: inline-block;
    margin-top: 9px;
    font-size: 12px;
    font-weight: 700;
    color: #1677ff;
    text-decoration: none;
}
.ov-map::before { content: "📍 "; }

.ov-err { color: #c02626; font-weight: 700; font-size: 12.5px; }

@media (max-width: 560px) {
    .ov-dl { grid-template-columns: 1fr; gap: 2px; }
    .ov-dl dt { margin-top: 6px; }
}

/* ── vendor panel: price editing, search-first add, offer detail ──────────
   Appended for the walk-in vendor feature. Only the ov- and vp- prefixes are
   used here, so nothing else on the page can be reached. */

.vp-price-input {
    width: 130px;
    max-width: 100%;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    direction: ltr;
    text-align: left;
    padding: 6px 9px;
    border: 1px solid #e3edfb;
    border-radius: 8px;
}
.vp-stock-input {
    font-family: inherit;
    font-size: 12.5px;
    padding: 5px 8px;
    border: 1px solid #e3edfb;
    border-radius: 8px;
}
.vp-locked { opacity: .55; font-size: 12px; margin-right: 4px; }

.vp-saverow {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding: 13px 16px;
    background: #fff;
    border: 1px solid #e3edfb;
    border-radius: 12px;
    box-shadow: 0 -4px 18px rgba(11, 37, 69, .07);
}
.vp-saverow span { font-size: 12px; color: #5a6b82; }
.vp-save {
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    background: #1677ff;
    border: 0;
    border-radius: 9px;
    padding: 10px 22px;
    cursor: pointer;
}

/* the stale-price nudge: a shop whose prices have not moved should be able to
   say so in one click, not be pushed into inventing edits */
.vp-stalebar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: #fff6e0;
    border: 1px solid #f0d9a8;
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 16px;
    font-size: 12.5px;
    line-height: 1.9;
    color: #7a5a10;
}
.vp-stalebar b { color: #8a6100; }
.vp-stalebar form { margin: 0; margin-right: auto; }
.vp-stalebar button {
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    background: #b8860b;
    border: 0;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
}

/* ---- offer detail page ---- */
.vp-box {
    background: #fff;
    border: 1px solid #e3edfb;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 16px;
}
.vp-box--danger { border-color: #f3c9c9; }
.vp-box h2 { margin: 0 0 5px; font-size: 16px; }
.vp-box h3 { margin: 16px 0 6px; font-size: 13.5px; color: #1677ff; }
.vp-lead { font-size: 12.5px; color: #5a6b82; margin: 0 0 14px; line-height: 1.9; }
.vp-lock {
    background: #f4f8ff;
    border-right: 3px solid #1677ff;
    border-radius: 0 9px 9px 0;
    padding: 10px 13px;
    font-size: 12.5px;
    line-height: 1.9;
    color: #3c536e;
}
.vp-alert { border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.vp-alert.is-ok  { background: #e6f7ee; color: #0f8a4a; }
.vp-alert.is-bad { background: #fdeaea; color: #c02626; }

.vp-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.vp-form label, .vp-full { display: block; font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.vp-form input, .vp-form select, .vp-form textarea {
    width: 100%;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 400;
    margin-top: 5px;
    padding: 9px 11px;
    border: 1px solid #e3edfb;
    border-radius: 9px;
}
.vp-addrow {
    font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
    background: #fff; color: #1677ff; border: 1px solid #1677ff;
    border-radius: 8px; padding: 6px 14px; margin-bottom: 14px;
}
.vp-confirm { display: flex; gap: 8px; align-items: center; font-size: 12.5px; margin-bottom: 12px; }
.vp-danger {
    font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
    color: #fff; background: #c02626; border: 0; border-radius: 9px; padding: 10px 22px;
}
.vp-back { font-size: 12.5px; font-weight: 700; color: #1677ff; text-decoration: none; }

/* ---- search-first add-product ---- */
.ovp-search { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.ovp-search input {
    flex: 1; min-width: 200px;
    font-family: inherit; font-size: 14px;
    padding: 10px 13px; border: 1px solid #e3edfb; border-radius: 10px;
}
.ovp-count { font-size: 12.5px; color: #5a6b82; margin: 0 0 10px; }
.ovp-row {
    display: flex; align-items: center; gap: 13px; flex-wrap: wrap;
    border: 1px solid #e3edfb; border-radius: 12px; padding: 11px 13px; margin-bottom: 9px;
}
.ovp-row--big { background: #fbfdff; }
.ovp-thumb {
    width: 52px; height: 52px; flex: 0 0 auto; overflow: hidden;
    border-radius: 10px; background: #edf4ff;
    display: grid; place-items: center; color: #96abc7; font-size: 11px;
}
.ovp-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ovp-info { flex: 1; min-width: 160px; }
.ovp-info b { display: block; font-size: 13.5px; }
.ovp-info small { color: #5a6b82; font-size: 11.5px; }
.ovp-have { font-size: 11.5px; font-weight: 700; color: #0f8a4a; background: #e6f7ee; border-radius: 20px; padding: 4px 11px; }
.ovp-none { font-size: 13px; color: #5a6b82; padding: 12px 0; }
.ovp-newhint, .ovp-newwarn {
    background: #fff6e0; border: 1px solid #f0d9a8; border-radius: 10px;
    padding: 11px 14px; margin-top: 16px; font-size: 12.5px; line-height: 1.9; color: #7a5a10;
}
.ovp-newwarn { margin: 0 0 16px; }
.ovp-locknote {
    background: #f4f8ff; border-right: 3px solid #1677ff; border-radius: 0 9px 9px 0;
    padding: 11px 14px; margin: 14px 0; font-size: 12.5px; line-height: 1.9; color: #3c536e;
}
