/* Payism V3 website: header search box, suggestions panel (desktop) and full-screen search (phone). */

.v3-search { position: relative; flex: 1 1 auto; max-width: 640px; min-width: 0; margin: 0 auto; }
.v3-search__bar { display: flex; align-items: center; height: 48px; border-radius: var(--v3-r-12); background: var(--v3-tile); border: 1px solid var(--v3-line); transition: background .15s, border-color .15s, box-shadow .15s; }
.v3-search.is-open .v3-search__bar, .v3-search__bar:focus-within { background: #fff; border: 2px solid var(--v3-brand-600); box-shadow: var(--v3-focus); }
.v3-search__scope { position: relative; display: flex; align-items: center; height: 100%; margin: 0; border-right: 1px solid var(--v3-line-strong); }
.v3-search__scope select { appearance: none; -webkit-appearance: none; height: 100%; max-width: 120px; padding: 0 28px 0 14px; border: 0; background: transparent; font: 600 14px var(--v3-font); color: var(--v3-ink); cursor: pointer; border-radius: var(--v3-r-12) 0 0 var(--v3-r-12); }
.v3-search__scope .v3i { position: absolute; right: 8px; pointer-events: none; }
.v3-search__lens { display: none; padding-left: 14px; color: var(--v3-muted); }
.v3-search__input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 12px; font: 500 15px var(--v3-font); color: var(--v3-ink); }
.v3-search__input:focus { outline: none; }
/* The bar carries the focus ring (:focus-within); the global body.v3 :focus-visible ring drew a second, square one on the input. */
body.v3 .v3-search__input:focus-visible { outline: none; box-shadow: none; }
body.v3 .v3-search.is-full .v3-search__input:focus-visible { box-shadow: var(--v3-focus); }
.v3-search__input::-webkit-search-cancel-button { display: none; }
.v3-search__input::placeholder { color: #6B7686; }
.v3-search__clear { width: 32px; height: 32px; margin-right: 6px; border-radius: 50%; border: 0; background: var(--v3-line); color: var(--v3-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.v3-search__go { flex: none; width: 56px; height: calc(100% + 2px); margin: -1px -1px -1px 0; border: 0; border-radius: 0 var(--v3-r-12) var(--v3-r-12) 0; background: var(--v3-grad-btn); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.v3-search__back, .v3-search__cancel { display: none; }

/* panel (desktop): search width + 120, max 760 */
.v3-suggest { position: absolute; z-index: 1035; top: calc(100% + 6px); left: 0; width: min(760px, calc(100% + 120px)); max-height: min(72vh, 680px); overflow-y: auto; background: #fff; border-radius: 0 0 var(--v3-r-24) var(--v3-r-24); box-shadow: var(--v3-shadow-3); padding: 8px 8px 0; }
.v3-suggest[hidden] { display: none; }
.v3-suggest__body[aria-busy='true'] { opacity: .6; }
.v3-sg-group { padding: 8px 8px 12px; }
.v3-sg-group + .v3-sg-group { border-top: 1px solid var(--v3-line); }
.v3-sg-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 8px; }
.v3-sg-head b { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.v3-sg-link { border: 0; background: none; padding: 4px; font: 600 14px var(--v3-font); color: var(--v3-brand-600) !important; cursor: pointer; }
.v3-sg-recent { list-style: none; margin: 0 0 4px; padding: 0; }
.v3-sg-recent li { display: flex; align-items: center; }
.v3-sg-recent__go { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 8px; border-radius: var(--v3-r-8); color: var(--v3-ink) !important; font-size: 15px; }
.v3-sg-x { width: 40px; height: 40px; border: 0; background: none; color: var(--v3-muted); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.v3-sg-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 12px; border-radius: var(--v3-r-12); color: var(--v3-ink) !important; font-size: 15px; }
.v3-sg-row small { font-size: 13px; }
.v3-sg-count { margin-left: auto; color: var(--v3-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.v3-sg-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--v3-brand-100); overflow: hidden; flex: none; }
.v3-sg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.v3-sg-opt.is-active, .v3-sg-opt:hover, .v3-sg-recent__go.is-active, .v3-sg-recent__go:hover { background: var(--v3-brand-50); }
.v3-mini.is-active { box-shadow: inset 3px 0 0 var(--v3-brand-600); }
.v3-mini__name b, .v3-sg-row b { font-weight: 800; }
.v3-sg-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.v3-sg-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; border-radius: var(--v3-r-12); font-size: 13px; color: var(--v3-ink-2) !important; text-align: center; }
.v3-sg-tile__img { width: 100%; aspect-ratio: 1 / 1; border-radius: var(--v3-r-12); background: var(--v3-tile); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--v3-muted); }
.v3-sg-tile__img img { width: 82%; height: 82%; object-fit: contain; mix-blend-mode: multiply; }
.v3-sg-fix { display: flex; gap: 12px; align-items: flex-start; margin: 8px; padding: 12px 14px; border-radius: var(--v3-r-12); background: var(--v3-brand-50); font-size: 14px; }
.v3-sg-fix .v3i { color: var(--v3-brand-600); }
.v3-sg-fix .v3-sg-link { padding: 0; font-size: 13px; }
.v3-sg-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 16px 8px; gap: 6px; }
.v3-sg-empty .v3-empty__icon { width: 64px; height: 64px; margin-bottom: 6px; }
.v3-sg-empty .v3-empty__icon .v3i { width: 28px; height: 28px; }
.v3-sg-empty__title { font-size: 17px; }
.v3-sg-empty p { margin: 0 0 8px; }
.v3-suggest__foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -8px; padding: 12px 16px; background: #fff; border-top: 1px solid var(--v3-line); }
.v3-sg-all { font: 700 14px var(--v3-font); color: var(--v3-brand-600) !important; padding: 4px 6px; border-radius: var(--v3-r-8); }
.v3-sg-keys { font-size: 13px; color: var(--v3-muted); }
.v3-chip.v3-sg-opt.is-active { border-color: var(--v3-brand-600); color: var(--v3-brand-700) !important; }

/* phone: full-screen search view */
@media (max-width: 991.98px) {
    .v3-search { order: 3; flex-basis: 100%; max-width: none; }
    .v3-search__scope { display: none; }
    .v3-search__lens { display: inline-flex; }
    .v3-search__go { display: none; }
    .v3-search__bar { border-radius: var(--v3-r-12); }
    .v3-search.is-full { position: fixed; inset: 0; z-index: 1070; background: #fff; padding: 12px 16px; display: flex; flex-direction: column; margin: 0; }
    /* H8 E2E round 17: a message raised from the full-screen search (the mic is blocked, nothing heard) showed under it. */
    body.v3-search-full .payism-notify { z-index: 1080 !important; }
    .v3-search.is-full .v3-search__bar { gap: 0; background: transparent; border: 0; box-shadow: none; height: 52px; }
    .v3-search.is-full .v3-search__back { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: none; color: var(--v3-ink); margin-left: -10px; }
    .v3-search.is-full .v3-search__lens { display: none; }
    .v3-search.is-full .v3-search__input { height: 48px; border: 2px solid var(--v3-brand-600); border-radius: var(--v3-r-12); box-shadow: var(--v3-focus); padding: 0 14px; font-size: 16px; }
    .v3-search.is-full .v3-search__clear { margin-left: -42px; margin-right: 10px; }
    .v3-search.is-full .v3-search__cancel { display: inline-flex; align-items: center; height: 44px; padding: 0 0 0 12px; border: 0; background: none; font: 700 16px var(--v3-font); color: var(--v3-brand-600); }
    .v3-search.is-full .v3-suggest { position: static; width: auto; max-height: none; flex: 1; box-shadow: none; border-radius: 0; padding: 8px 0 0; }
    .v3-sg-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .v3-sg-keys { display: none; }
    .v3-suggest__foot { margin: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
    .v3-sg-all { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; border-radius: var(--v3-r-12); background: var(--v3-grad-btn); color: #fff !important; }
    body.v3-search-full { overflow: hidden; }
}
.v3-suggest__body[aria-busy='true']:empty::before { content: ''; display: block; height: 160px; margin: 8px; border-radius: var(--v3-r-12); background: linear-gradient(90deg, #E9EEF4, #F3F6FA, #E9EEF4); background-size: 200% 100%; animation: v3-sg-load 1.2s infinite; }
@keyframes v3-sg-load { to { background-position: -200% 0; } }

/* Review (home-search, 28 Oct): the full-screen phone search sits inside the sticky header's stacking
   context, so the bottom nav (z 1030) covered its last row and the "See all results" bar. */
body.v3-search-full .v3-bnav { display: none !important; }
/* Review (home-search, 28 Oct): with the retailer earnings pill the bar narrows; the placeholder ends in an ellipsis, not mid-word. */
.v3-search__input { text-overflow: ellipsis; }
