/* Keragres mini UI brandbook v1: Roboto inherited, blue actions, white surfaces. */

.kg-search-anchor { position: relative; }
.kg-search[hidden], .kg-search [hidden], [data-kg-native-search][hidden] { display: none !important; }
.kg-search { color: #333; background: #fff; border: 1px solid #ebebeb; border-radius: 5px; font: inherit; text-align: left; }
.kg-search--panel { position: absolute; z-index: 60; top: 100%; left: 0; right: 0; margin-top: 6px; max-height: min(70vh, 620px); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.kg-search--page { width: min(100% - 30px, 1200px); margin: 20px auto; }
.kg-search .kg-search__status { margin: 0; padding: 12px 14px; font-size: 14px; line-height: 1.45; background: #f7f7f7; }
.kg-search .kg-search__list { margin: 0; padding: 0; list-style: none; }
.kg-search .kg-search__item { margin: 0; padding: 0; list-style: none; border-top: 1px solid #ebebeb; }
.kg-search .kg-search__product { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 76px; color: #333; text-decoration: none; }
.kg-search .kg-search__product:hover, .kg-search .kg-search__product[aria-selected="true"] { background: #f7f7f7; color: #305d85; }
.kg-search .kg-search__image { display: block; width: 56px; height: 56px; flex: 0 0 56px; object-fit: contain; background: #fff; }
.kg-search .kg-search__text { min-width: 0; overflow-wrap: anywhere; }
.kg-search .kg-search__title { display: block; font-size: 15px; font-weight: 500; line-height: 1.4; }
.kg-search .kg-search__meta { display: block; color: #555; font-size: 12px; line-height: 1.5; margin-top: 3px; }
.kg-search .kg-search__actions { display: flex; gap: 8px 14px; padding: 10px 14px; align-items: center; flex-wrap: wrap; border-top: 1px solid #ebebeb; }
.kg-search .kg-search__action { display: inline-block; padding: 10px 0; color: #3e77aa; font-size: 14px; line-height: 1.4; text-decoration: underline; }
.kg-search > .kg-search__action { margin: 0 14px; }
.kg-search .kg-search__action:hover { color: #305d85; }
.kg-search .kg-search__close { font: inherit; font-size: 14px; color: #3e77aa; background: #fff; border: 1px solid #ebebeb; border-radius: 5px; min-height: 42px; padding: 8px 12px; cursor: pointer; margin-left: auto; }
.kg-search a:focus-visible, .kg-search button:focus-visible { outline: 2px solid #3e77aa; outline-offset: -2px; }
@media (max-width: 767px) {
  .kg-search--panel { max-height: 65vh; max-height: 65dvh; }
  .kg-search .kg-search__product { gap: 8px; padding: 9px 10px; }
  .kg-search .kg-search__title { font-size: 14px; }
}

/* UX002: only the candidate list scrolls; the action remains in the panel frame. */
.kg-search--panel { display: flex; flex-direction: column; max-height: var(--kg-panel-height, min(65vh, 480px)); max-width: calc(100vw - 24px); overflow: visible; box-sizing: border-box; }
.kg-search--panel .kg-search__status { flex: 0 0 auto; padding: 8px 12px; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.kg-search--panel .kg-search__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.kg-search--panel .kg-search__actions { flex: 0 0 auto; margin: 0; padding: 6px 12px; gap: 6px; flex-wrap: nowrap; background: #fff; border-radius: 0 0 5px 5px; }
.kg-search--panel .kg-search__actions .kg-search__action { flex: 1; min-width: 0; padding: 9px 0; font-weight: 500; }
.kg-search--panel .kg-search__close { flex: 0 0 32px; min-height: 32px; padding: 2px; border: 0; font-size: 22px; color: #555; }
.kg-search--panel .kg-search__product { padding: 8px 12px; gap: 10px; min-height: 72px; }
.kg-search--panel .kg-search__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.kg-search--panel .kg-search__meta { font-size: 11px; line-height: 1.35; }
.kg-search .kg-search__examples { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 10px 12px; overflow-y: auto; min-height: 0; }
.kg-search .kg-search__example { font: inherit; text-align: left; border: 1px solid #ebebeb; background: #fff; border-radius: 5px; padding: 8px; cursor: pointer; min-width: 0; color: #333; }
.kg-search .kg-search__example-query { display: block; margin-top: 3px; color: #3e77aa; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.kg-search .kg-search__example:hover { background: #f7f7f7; border-color: #3e77aa; }
.kg-search .kg-search__example:focus-visible { outline: 2px solid #3e77aa; outline-offset: 1px; }
/* Preserve native H1 and breadcrumbs. Hide only native results after verified success. */
[data-kg-native-search].kg-search-enhanced .section--products,
[data-kg-native-search].kg-search-enhanced .section--empty,
[data-kg-native-search].kg-search-enhanced .section--pagination { display: none !important; }
