/*
 * Live-search dropdown — popover under the header search input that
 * filters buylist items as the seller types.
 *
 * Anchored to the .col-3 parent (which already has position:relative)
 * so `right:0` puts the panel's right edge under the input's right
 * edge. `left:20px` matches the input's margin-left (see header.php).
 *
 * Kept namespace-scoped under .ls-* so nothing here can accidentally
 * hit unrelated CSS on the site.
 */

.ls-panel {
    position: absolute;
    top: 100%;
    left: 20px;
    /* Fixed 565px width — deliberately allowed to bleed past the
       search column's right edge on narrower lg viewports. The
       panel's z-index (9999) puts it over the category dropdown
       column while open; outside-click / Escape / Enter-submit
       all close it, so the overlap is transient. */
    width: 565px;
    margin-top: 6px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    max-height: 70vh;
    overflow-y: auto;
    display: none;
}
.ls-panel.ls-open { display: block; }

.ls-status {
    padding: 12px 14px;
    font-size: 0.82rem;
    color: #777;
    text-align: center;
}
.ls-status.ls-error { color: #b71c1c; }

.ls-row {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #f2f0ec;
    align-items: flex-start;
    /* .ls-row is an <a> — strip default link styling so it renders
       like a row, not a hyperlink. Cursor stays the default anchor
       pointer so users get the "clickable" affordance. */
    text-decoration: none;
    color: inherit;
    transition: background 0.1s;
}
.ls-row:hover  { background: #fbfaf7; text-decoration: none; color: inherit; }
.ls-row:focus  { outline: 2px solid rgba(196, 35, 23, 0.35); outline-offset: -2px; }
/* Text-decoration cascades through descendants of a hovered anchor
   by default — including chip labels + prices, which then all appear
   underlined on row hover. Explicitly re-set to none on every child
   so the underline stays off, no matter how deep the DOM. */
.ls-row *,
.ls-row:hover *,
.ls-row:focus * { text-decoration: none; }
.ls-row:last-child { border-bottom: none; }
.ls-row.ls-stale { opacity: 0.55; }

.ls-thumb {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #f5f5f5 center/cover no-repeat;
    border: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 1.2rem;
    overflow: hidden;
}

.ls-body {
    flex: 1 1 auto;
    min-width: 0;
}

.ls-title-line {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.ls-title {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.92rem;
    line-height: 1.2;
}
.ls-cat-chip {
    font-size: 0.68rem;
    padding: 1px 7px;
    background: #eef1f4;
    color: #5a6270;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
}
.ls-top-dollar {
    font-size: 0.66rem;
    padding: 1px 7px;
    background: #fff4d1;
    color: #7a5c0a;
    border: 1px solid #f0dc95;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
}
.ls-partner-chip {
    font-size: 0.66rem;
    padding: 1px 7px;
    background: #eee7f7;
    color: #5b3a99;
    border-radius: 10px;
    font-weight: 600;
}

.ls-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.ls-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 14px;
    font-size: 0.78rem;
    color: #333;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    user-select: none;
}
.ls-chip:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}
.ls-chip:active { transform: translateY(1px); }
.ls-chip[disabled],
.ls-chip.ls-chip-busy {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}
.ls-chip-label { font-weight: 600; }
.ls-chip-price { color: #2a7a2a; font-weight: 600; }
.ls-chip-badge {
    background: rgb(196, 35, 23);
    color: #fff;
    font-size: 0.64rem;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 700;
}
.ls-chip-plus {
    color: #4f43ae;
    font-weight: 700;
    font-size: 0.9rem;
    margin-left: 1px;
}

.ls-footer {
    padding: 6px 12px;
    font-size: 0.68rem;
    color: #888;
    text-align: right;
    border-top: 1px solid #f2f0ec;
}

/* View-all row sits between the results and the timing footer.
   Full-width click target, obvious call-to-action colour so
   sellers who don't know about the Enter shortcut can still get to
   the full results page. */
.ls-view-all {
    display: block;
    width: 100%;
    padding: 10px 12px;
    text-align: center;
    background: #fbfaf7;
    border: none;
    border-top: 1px solid #f2f0ec;
    color: rgb(196, 35, 23);
    font-weight: 600;
    font-size: 0.86rem;
    cursor: pointer;
    transition: background 0.12s;
}
.ls-view-all:hover { background: #f4f1eb; }
.ls-view-all:focus { outline: 2px solid rgba(196, 35, 23, 0.35); outline-offset: -2px; }

/* --- Mobile variant --------------------------------------------------
 * Panel injected as a natural block sibling of the mobile search form
 * (inside .mobilesearch). No absolute/fixed positioning — the panel
 * flows with the page, which behaves cleanly when the virtual
 * keyboard opens (iOS shifts fixed elements around unpredictably).
 * Overrides the desktop `position:absolute; width:565px` rules so the
 * panel spans the full mobile viewport.
 */
.ls-panel-mobile {
    position: static;
    width: auto;
    left: auto;
    right: auto;
    margin: 8px 0 16px 0;
    max-height: none;
    border-radius: 8px;
}
.ls-panel-mobile.ls-open { display: block; }

.ls-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f6f2;
    border-bottom: 1px solid #eee7d7;
    border-radius: 8px 8px 0 0;
}
.ls-mobile-header-label {
    font-size: 0.82rem;
    color: #5a5147;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ls-mobile-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0 6px;
    color: #7a6f65;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 8px;
}
.ls-mobile-close:hover  { color: rgb(196, 35, 23); }
.ls-mobile-close:focus  { outline: 2px solid rgba(196, 35, 23, 0.35); border-radius: 4px; }
