/* Scoped header search history and suggestion states. */
.doshop-search-wrapper .doshop-search-bar { position: relative; overflow: visible; }
.doshop-search-wrapper .doshop-live-results { width: 100%; color: var(--theme-text); max-height: min(420px, 65dvh); }
.doshop-search-wrapper .live-search-results-body { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.search-history-heading { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 10px; font-weight: 700; font-size: 13px; }
.search-history-clear, .search-history-remove { border: 0; background: transparent; color: var(--theme-text-muted); cursor: pointer; }
.search-history-clear { font-size: 12px; text-decoration: underline; }
.search-history-row { display: flex; align-items: center; padding-inline-end: 8px; }
.search-history-link { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; padding: 12px 18px; color: inherit !important; }
.search-history-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-history-link i { color: var(--theme-text-subtle); }
.search-history-remove { flex: 0 0 40px; min-height: 40px; font-size: 24px; border-radius: var(--theme-radius-md); }
.search-history-message { padding: 12px 18px; margin: 0; font-size: 13px; line-height: 1.6; color: var(--theme-text-muted); }
.search-history-privacy { display: block; padding: 12px 18px; font-size: 11px; color: var(--theme-text-muted); border-top: 1px solid var(--theme-border); }
.search-product-result { display: flex; align-items: center; gap: 12px; padding: 12px 18px; color: inherit !important; }
.search-product-image { width: 48px; height: 48px; object-fit: contain; border-radius: var(--theme-radius-sm); }
.search-product-info { display: grid; gap: 3px; min-width: 0; }
.doshop-live-results a:focus-visible, .doshop-live-results button:focus-visible { outline: 2px solid var(--theme-accent); outline-offset: -2px; background: var(--theme-accent-soft); }
.search-history-remove:hover { background: var(--theme-accent-soft); color: var(--theme-accent-strong); }
[data-theme="dark"] .doshop-live-results a:hover, [data-theme="dark"] .doshop-live-results a:focus-visible, [data-theme="dark"] .doshop-live-results button:focus-visible, [data-theme="dark"] .search-history-remove:hover { background: var(--theme-surface-muted); color: var(--theme-text-strong); }
@media (max-width: 575.98px) { .doshop-search-wrapper .doshop-live-results { max-height: 55dvh; } }


/* Voice search mic (shown only with browser speech support; the listening panel is voice-search.css).
   It sits left of the camera; the clear button, spinner and text padding shift only while it shows. */
.doshop-voice-btn[hidden] { display: none !important; }
.doshop-voice-btn {
    position: absolute; top: 0; bottom: 0; right: 8px; margin-block: auto;
    width: 32px; height: 32px; min-width: 32px; min-height: 32px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%; background: transparent; color: var(--theme-text-muted);
    font-size: 15px; cursor: pointer; z-index: 3; transform: none; transition: color .15s;
}
.doshop-voice-btn::before { content: ""; position: absolute; inset: 0; margin: auto; width: 32px; height: 32px; border-radius: 50%; background: transparent; z-index: -1; transition: background .15s; }
.doshop-voice-btn:hover { color: var(--theme-text-strong); }
.doshop-voice-btn:hover::before { background: var(--theme-hover); }
.doshop-voice-btn:active { transform: none; }
.doshop-voice-btn:focus { box-shadow: none; }
.doshop-voice-btn:focus:not(:focus-visible) { outline: none; }
.doshop-input-wrap .doshop-voice-btn:focus-visible { outline: 2px solid var(--theme-accent); outline-offset: -3px; }
.doshop-input-wrap:has(> .doshop-image-search-btn:not([hidden])) > .doshop-voice-btn { right: 44px; }
.doshop-input-wrap:has(> .doshop-voice-btn:not([hidden])):has(> .doshop-image-search-btn:not([hidden])) .doshop-search-input.amz-search-input { padding-right: 112px !important; }
.doshop-input-wrap:has(> .doshop-voice-btn:not([hidden])):has(> .doshop-image-search-btn:not([hidden])) > .live-search-clear-btn { right: 80px !important; }
.doshop-input-wrap:has(> .doshop-voice-btn:not([hidden])):has(> .doshop-image-search-btn:not([hidden])) > .live-search-spinner { right: 108px !important; }
/* Phones: a 44px tap target (the visible circle stays 32px). */
@media (max-width: 767.98px) {
    .doshop-voice-btn { right: 0; width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
    .doshop-input-wrap .doshop-voice-btn:focus-visible { outline-offset: -7px; }
    .doshop-input-wrap:has(> .doshop-image-search-btn:not([hidden])) > .doshop-voice-btn { right: 40px; }
    .doshop-input-wrap:has(> .doshop-voice-btn:not([hidden])):has(> .doshop-image-search-btn:not([hidden])) .doshop-search-input.amz-search-input { padding-right: 116px !important; }
    .doshop-input-wrap:has(> .doshop-voice-btn:not([hidden])):has(> .doshop-image-search-btn:not([hidden])) > .live-search-clear-btn { right: 86px !important; }
    .doshop-input-wrap:has(> .doshop-voice-btn:not([hidden])):has(> .doshop-image-search-btn:not([hidden])) > .live-search-spinner { right: 114px !important; }
}

/* Phones: header-v2.css clips the pill-shaped bar (overflow: hidden), which also hid the
   suggestions dropdown under it. Round the inner pieces instead and let the dropdown out. */
@media (max-width: 767.98px) {
    .doshop-search-wrapper .doshop-search-bar.amz-search-bar { overflow: visible !important; }
    .doshop-search-wrapper .doshop-input-wrap { border-radius: var(--theme-radius-pill) 0 0 var(--theme-radius-pill); }
    .doshop-search-wrapper .doshop-search-btn.amz-search-btn { border-radius: 0 var(--theme-radius-pill) var(--theme-radius-pill) 0 !important; }
    /* The square field ring was clipped before; ring the whole pill instead. */
    .doshop-search-wrapper .doshop-search-bar .doshop-search-input.amz-search-input:focus-visible { outline: none !important; box-shadow: none !important; }
    .doshop-search-wrapper .doshop-search-bar.amz-search-bar:has(.doshop-search-input:focus-visible) { box-shadow: 0 0 0 3px var(--theme-focus) !important; }
}
