/* HOLiUS 0716 central search surface. Only portal search forms opt-in. */
form[data-holius-suggest]{position:relative}
.holius-suggest-popover,[data-home-suggest-panel]{color:var(--theme-text,var(--text-main,var(--holius-search-fallback-canvas-light)))}
.holius-suggest-popover{position:absolute;inset-inline:0;top:calc(100% + 4px);z-index:40;border:1px solid var(--theme-border,var(--holius-search-fallback-border-dark));border-radius:14px;background:var(--theme-surface,var(--holius-search-fallback-canvas-dark));box-shadow:0 10px 32px var(--holius-search-fallback-shadow-soft);max-height:min(48dvh,370px);overflow:auto;padding:6px}
.search-results-input-wrap{position:relative}
.search-results-input-wrap>.holius-suggest-popover{top:calc(100% + 4px)}
.holius-suggest-popover[hidden],[data-home-suggest-panel][hidden]{display:none}
.holius-suggest-options{display:grid;gap:3px;min-width:0}
.holius-suggest-option{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:46px;text-align:start;padding:10px 12px;border:0;border-radius:9px;background:transparent;color:inherit;font-size:14px;cursor:pointer}
.holius-suggest-option small{flex:none;font-size:11px;color:var(--theme-muted,var(--holius-search-fallback-muted-dark))}
.holius-suggest-name{min-width:0;overflow-wrap:anywhere}
.holius-suggest-option:is(:hover,.is-active,:focus-visible){background:var(--theme-surface-2,var(--holius-search-fallback-hover-neutral));outline:2px solid transparent}
.holius-suggest-option:focus-visible{outline-color:var(--theme-accent,var(--holius-search-fallback-accent-green))}
.holius-voice-confirm{box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;color:var(--theme-text,var(--holius-search-fallback-ink-dark));border:1px solid var(--theme-border,var(--holius-search-fallback-border-medium));border-radius:20px;background:var(--theme-surface,var(--holius-search-fallback-white));width:min(92vw,460px);max-height:calc(100dvh - 36px);padding:var(--hl-ui-modal-inset,var(--holius-space-6,24px));box-shadow:0 22px 65px var(--holius-search-fallback-shadow-strong)}
.holius-voice-confirm::backdrop{background:var(--holius-search-fallback-backdrop-strong)}
.holius-voice-confirm h2{font-size:20px;line-height:1.4;margin:0 0 8px}
.holius-voice-confirm p{font-size:14px;line-height:1.5;color:var(--theme-muted,var(--holius-search-fallback-muted-medium));margin:0 0 14px}
.holius-voice-confirm input{display:block;width:100%;box-sizing:border-box;height:48px;padding:10px 12px;font-size:16px;color:var(--theme-text,var(--holius-search-fallback-ink-dark));border:1px solid var(--theme-border,var(--holius-search-fallback-border-light));border-radius:10px;background:var(--theme-input,var(--theme-surface,var(--holius-search-fallback-white)))}
.holius-voice-confirm-actions{display:flex;gap:var(--hl-ui-action-gap,var(--holius-space-2,8px));margin-top:16px;flex-wrap:wrap}
.holius-voice-confirm button{flex:1;min-width:88px;min-height:var(--hl-ui-tap-target,44px);border:1px solid var(--theme-border,var(--holius-search-fallback-border-light));border-radius:10px;padding:9px;color:var(--theme-text,var(--holius-search-fallback-ink-dark));background:var(--theme-surface-2,var(--holius-search-fallback-canvas-light));cursor:pointer;font-weight:600}
.holius-voice-confirm button[type=submit]{background:var(--theme-accent,var(--holius-search-fallback-accent-green));color:var(--holius-search-fallback-white);border-color:transparent}
.holius-voice-confirm :focus-visible{outline:2px solid var(--theme-accent,var(--holius-search-fallback-accent-green));outline-offset:3px}
@media(max-width:600px){.holius-suggest-popover{max-height:min(38dvh,300px)}.hh-global-search .holius-suggest-popover{min-width:min(90vw,350px)}.holius-voice-confirm{padding:var(--hl-ui-modal-inset-compact,18px)}}

.hh-global-search-voice{flex:0 0 auto;display:inline-grid;place-items:center;width:44px;min-width:44px;min-height:44px;padding:4px;border:0;background:transparent;color:var(--theme-text,var(--holius-search-fallback-border-pale));border-radius:50%;font-size:18px;cursor:pointer}
.hh-global-search-voice.is-listening{color:var(--theme-accent,var(--holius-search-fallback-accent-green))}
.hh-global-search-voice:focus-visible{outline:2px solid var(--theme-accent,var(--holius-search-fallback-accent-green));outline-offset:2px}

/* Global mobile search entry: existing global search field is hidden at <=760px. */
.hh-global-search-entry{display:none;align-items:center;justify-content:center;width:44px;min-width:44px;min-height:44px;color:var(--theme-text,var(--holius-search-fallback-white));text-decoration:none;border-radius:50%}
.hh-global-search-entry svg{width:23px;height:23px}
.hh-global-search-entry:focus-visible{outline:2px solid var(--theme-accent,var(--holius-search-fallback-accent-green));outline-offset:3px}
@media(max-width:760px){.hh-global-search-entry{display:inline-flex}}

/* 0726: suggestions must be visually separate from every underlying label/card. */
form[data-holius-suggest].is-suggest-open { position:relative; z-index:80; overflow:visible; }
.hh-global-header .hh-global-search.is-suggest-open { z-index:100; }
.search-results-section .search-results-form.is-suggest-open { z-index:100; overflow:visible; }
[data-search-overlay] .search-overlay-bar.is-suggest-open { position:relative; z-index:30; isolation:isolate; overflow:visible; }
.holius-suggest-popover,
[data-search-overlay] [data-home-suggest-panel] {
  box-sizing:border-box;
  position:absolute;
  opacity:1;
  isolation:isolate;
  z-index:100;
  mix-blend-mode:normal;
  /* Canvas under themed tint is always opaque, including translucent themes. */
  background-color:Canvas;
  background-image:linear-gradient(var(--theme-surface,transparent),var(--theme-surface,transparent));
  color:var(--theme-text,CanvasText);
  border:1px solid var(--theme-border,var(--holius-search-fallback-muted-zinc));
  box-shadow:0 18px 45px var(--holius-search-fallback-shadow-medium),0 4px 14px var(--holius-search-fallback-shadow-minor);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.holius-suggest-popover .holius-suggest-option,
[data-search-overlay] [data-home-suggest-panel] .holius-suggest-option {
  position:relative;
  z-index:1;
  background:transparent;
  opacity:1;
  min-height:46px;
}
.holius-suggest-popover .holius-suggest-option:is(:hover,.is-active,:focus-visible),
[data-search-overlay] [data-home-suggest-panel] .holius-suggest-option:is(:hover,.is-active,:focus-visible) {
  background:var(--theme-accent-2,var(--holius-search-fallback-shadow-slate));
}
@media(max-width:760px){
  .search-results-section .search-results-form.is-suggest-open{isolation:isolate;}
  .holius-suggest-popover{max-height:min(42dvh,340px);overflow-y:auto;overscroll-behavior:contain;}
}

/* 0901: position Bible search suggestions beneath the verse query, not the edition filters. */
.bible-unified-control{position:relative}
.bible-direct-search-control>.holius-suggest-popover{top:calc(100% + 4px);inset-inline:0;min-width:0}

/* 0956: one shared autocomplete scrollport; no generated home bundle changes.
 * The search-now row is separate; show up to 24 recommendations via internal scrolling.
 * Prefer about five to six suggestions on mobile where the viewport allows.
 * Clamp by visualViewport on keyboard open; never force document scrolling. */
.holius-suggest-popover,
[data-search-overlay] [data-home-suggest-panel] {
  max-height:min(580px, 68dvh, var(--hl-suggest-viewport-height, 580px));
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
}
@media (max-width:760px) {
  .holius-suggest-popover,
  [data-search-overlay] [data-home-suggest-panel] {
    max-height:min(350px, 56dvh, var(--hl-suggest-viewport-height, 350px));
  }
}

/* 0963: catalogued search-channel choices and recent-search single remove. */
.holius-suggest-option:has(.holius-suggest-name) { touch-action: manipulation; }
.holius-suggest-option[data-search-channel] { min-height:44px; }
.search-recent-row { width:100%; display:flex; align-items:center; min-width:0; gap:4px; }
.search-recent-term { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:start; }
.search-recent-remove { flex:0 0 44px; width:44px; height:44px; min-height:44px; border:0; border-radius:9px; background:transparent; color:var(--theme-muted,var(--holius-search-fallback-border-medium)); font-size:22px; cursor:pointer; }
.search-recent-remove:is(:hover,:focus-visible) { background:var(--theme-surface-2,var(--holius-search-fallback-hover-low)); color:var(--theme-text,var(--holius-search-fallback-ink-dark)); outline:2px solid var(--theme-accent,var(--holius-search-fallback-accent-forest)); outline-offset:1px; }
.search-recent-undo { margin-block:8px; display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:14px; color:var(--theme-text,var(--holius-search-fallback-ink-dark)); }
.search-recent-undo[hidden] { display:none; }
.search-recent-undo button { min-height:44px; border:1px solid var(--theme-border,var(--holius-search-fallback-border-light)); border-radius:9px; background:var(--theme-surface,var(--holius-search-fallback-white)); color:inherit; padding-inline:12px; }

/* 0964: restore provider-tabs navigation and compact recent-search chips. */
.home-search-hub > .search-provider-native,
.search-overlay-isolated .search-provider-overlay-native {
  display:block;
  visibility:visible;
}
/* Home mode menus follow their native hidden state; the overlay legacy picker remains suppressed. */
.home-search-hub > .search-provider-native > .search-mode-picker[hidden],
.search-overlay-isolated .search-provider-overlay-native > .search-mode-picker {
  display:none ;
}
.home-search-hub .search-provider-tabs,
.search-overlay-isolated .search-provider-tabs {
  display:flex;flex-wrap:nowrap;justify-content:flex-start;
  width:100%;min-height:44px;gap:6px;
  overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scroll-padding-inline:12px;
}
.home-search-hub .search-provider-tabs label,
.search-overlay-isolated .search-provider-tabs label {flex:0 0 auto;min-height:44px;}
.home-search-hub .search-provider-tabs input:focus-visible+label,
.search-overlay-isolated .search-provider-tabs input:focus-visible+label {
  outline:2px solid var(--theme-accent,var(--holius-search-fallback-accent-forest));outline-offset:-3px;
}
/* Suggestions follow the engine selector in normal overlay flow, never cover the tabs. */
[data-search-overlay] .search-overlay-content > [data-home-suggest-panel] {
  position:relative;inset:auto;left:auto;right:auto;top:auto;
  width:100%;margin:6px 0 12px;padding:6px;
  max-height:min(45dvh,var(--hl-suggest-viewport-height,380px));
  overflow-y:auto;border-radius:12px;
  z-index:1;
}
[data-search-overlay] .search-overlay-content {scrollbar-gutter:stable;}
.search-chip-list {display:flex;flex-flow:row wrap;align-items:flex-start;gap:8px;}
.search-chip-list .search-recent-row {
  display:inline-flex;flex:0 1 auto;width:auto;max-width:100%;min-width:0;
  border:1px solid var(--theme-border,var(--holius-search-fallback-border-light));
  background:var(--theme-surface,var(--bg-surface,var(--holius-search-fallback-white)));
  border-radius:var(--theme-radius-button,999px);gap:0;overflow:hidden;
}
.search-chip-list .search-recent-row .search-recent-term {
  display:block;flex:0 1 auto;width:auto;max-width:min(180px,55vw);
  min-width:0;min-height:44px;padding:8px 4px 8px 12px;
  border:0;background:transparent;border-radius:0;
  white-space:nowrap;text-overflow:ellipsis;overflow:hidden;
  text-align:start;font-size:14px;color:var(--theme-text,var(--holius-search-fallback-ink-dark));
}
.search-chip-list .search-recent-row .search-recent-remove {
  flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;
  margin:0;padding:0;border:0;border-radius:0;background:transparent;
  font-size:20px;line-height:1;
}
.search-chip-list .search-recent-row :is(.search-recent-term,.search-recent-remove):focus-visible {
  outline:2px solid var(--theme-accent,var(--holius-search-fallback-accent-forest));outline-offset:-3px;
}
@media(max-width:390px) {
  .search-chip-list .search-recent-row .search-recent-term {max-width:130px;padding-left:10px;}
  [data-search-overlay] .search-overlay-content > [data-home-suggest-panel] {max-height:min(37dvh,var(--hl-suggest-viewport-height,300px));}
}

/* 0965: Modern Soft Clean mobile-first search overlay. The separate engine
 * tabs, search routes, 30 editorial suggestions and recent-search semantics
 * are unchanged. Scoped to the shared fullscreen overlay only; no new bundle. */
.search-overlay-isolated .search-overlay-bar {
  border-bottom:1px solid var(--theme-border,var(--holius-search-fallback-border-gray));
  padding-block:8px;
}
.search-overlay-isolated .search-overlay-form {
  border:1px solid var(--theme-border,var(--holius-search-fallback-placeholder-gray));
  box-shadow:none;
  background:var(--theme-input,var(--theme-surface,var(--holius-search-fallback-white)));
}
.search-overlay-isolated .search-overlay-form:focus-within {
  border-color:var(--theme-accent,var(--holius-search-fallback-accent-forest));
  box-shadow:0 0 0 2px var(--theme-accent,var(--holius-search-fallback-accent-forest));
}
.search-overlay-isolated .search-overlay-content {
  padding-top:10px;
  padding-bottom:max(20px,env(safe-area-inset-bottom,0px));
}
.search-overlay-isolated .search-provider-stage {margin-bottom:0;}
.search-overlay-isolated .search-provider-tabs {gap:4px;min-height:44px;}
.search-overlay-isolated .search-provider-tabs label {
  min-height:44px;padding-inline:10px;font-size:var(--type-body-sm-size,.875rem);
}
.search-overlay-isolated .search-provider-tabs label::after {
  bottom:1px;left:10px;right:10px;
}
/* The suggestion list is a second scrollport, not a popup over engine tabs.
 * A row is 46px. Cap to whole rows so the last item isn't visually sliced. */
.search-overlay-isolated .search-overlay-content > [data-home-suggest-panel] {
  box-sizing:border-box;
  margin:4px 0 12px;
  padding:6px;
  border-radius:12px;
  max-height:min(382px,var(--hl-suggest-viewport-height,380px));
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  box-shadow:0 4px 14px var(--holius-search-fallback-shadow-minimal);
}
.search-overlay-isolated [data-home-suggest-list] {display:grid;gap:0;}
.search-overlay-isolated [data-home-suggest-list] .holius-suggest-option {
  box-sizing:border-box;
  min-height:46px;height:46px;
  padding:0 10px;
  border-radius:8px;
  font-size:14px;
  line-height:1.35;
}
.search-overlay-isolated [data-home-suggest-list] .holius-suggest-name {
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.search-overlay-isolated [data-home-suggest-list] .holius-suggest-option small {
  font-size:12px;
}
.search-overlay-isolated [data-home-suggest-list] .holius-suggest-option[data-search-channel] small {
  min-width:24px;text-align:center;font-size:18px;
}
.search-overlay-isolated .search-overlay-recent {margin-top:4px;}
.search-overlay-isolated .search-section-head {margin:0 0 8px;min-height:44px;}
.search-overlay-isolated .search-section-head h2 {font-size:15px;}
.search-overlay-isolated .search-section-head button {
  min-height:44px;min-width:44px;padding:0 4px;font-size:14px;
}
.search-overlay-isolated .search-chip-list {gap:6px;align-items:start;}
.search-overlay-isolated .search-chip-list .search-recent-row {
  border-radius:12px;
  border:1px solid var(--theme-border,var(--holius-search-fallback-border-gray));
  min-height:44px;
}
.search-overlay-isolated .search-chip-list .search-recent-row .search-recent-term {
  min-height:44px;padding:6px 2px 6px 10px;
  font-size:14px;line-height:1.4;
}
.search-overlay-isolated .search-chip-list .search-recent-row .search-recent-remove {
  min-width:44px;width:44px;height:44px;min-height:44px;
  font-size:18px;
}
.search-overlay-isolated :is(.search-overlay-back,.search-overlay-voice,.search-overlay-submit):focus-visible,
.search-overlay-isolated .search-provider-tabs input:focus-visible+label,
.search-overlay-isolated .search-chip-list button:focus-visible {
  outline:2px solid var(--theme-accent,var(--holius-search-fallback-accent-forest));
  outline-offset:2px;
}
@media(max-width:760px){
  .search-overlay-isolated .search-overlay-content {padding-top:8px;}
  .search-overlay-isolated .search-overlay-content > [data-home-suggest-panel] {
    max-height:min(290px,var(--hl-suggest-viewport-height,288px));
  }
}
@media(max-width:359px){
  .search-overlay-isolated .search-overlay-content > [data-home-suggest-panel] {
    max-height:min(244px,var(--hl-suggest-viewport-height,242px));
  }
  .search-overlay-isolated .search-provider-tabs label {padding-inline:8px;}
  .search-overlay-isolated .search-chip-list .search-recent-row .search-recent-term {max-width:120px;}
}
@media(prefers-reduced-motion:reduce){
  .search-overlay-isolated .search-overlay-content > [data-home-suggest-panel] {scroll-behavior:auto;}
}

/* 0966 — Search keyboard-safe layout and typed-content hierarchy (R110).
 * Preserve engine radios, 30 approved suggestions and recent-chip actions.
 * No changes to the generated shared/home CSS bundles or service boundaries. */
.search-overlay-isolated .search-overlay-shell {
  min-height:0;
  height:var(--hl-overlay-vh,100dvh);
  max-height:100dvh;
}
.search-overlay-isolated .search-overlay-content {
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-height:0;
  gap:0;
  overflow-y:auto;
  scrollbar-gutter:auto;
}
.search-overlay-isolated .search-provider-overlay-native {flex:0 0 auto;}
.search-overlay-isolated .search-overlay-content > [data-home-suggest-panel] {
  flex:0 1 auto;
  min-height:0;
  margin:4px 0 8px;
  padding:6px;
  overflow-y:auto;
  scrollbar-width:none;
  box-shadow:none;
  border:1px solid var(--theme-border,var(--holius-search-fallback-border-gray));
  background:var(--theme-surface,var(--bg-surface,var(--holius-search-fallback-white)));
}
.search-overlay-isolated .search-overlay-content > [data-home-suggest-panel]::-webkit-scrollbar {display:none;}
.search-overlay-isolated [data-home-suggest-list] {
  display:block;
}
.search-overlay-isolated .holius-suggest-group {margin:0;padding:0;min-width:0;}
.search-overlay-isolated .holius-suggest-heading {
  display:flex;align-items:center;
  height:28px;min-height:28px;
  padding:0 10px;
  font-size:12px;line-height:1.3;
  font-weight:600;
  letter-spacing:0;
  color:var(--theme-muted,var(--holius-search-fallback-ink-muted));
  user-select:none;
}
.search-overlay-isolated .holius-suggest-group[data-group="suggestion"] {
  border-top:1px solid var(--theme-border,var(--holius-search-fallback-border-gray));
  padding-top:3px;
}
.search-overlay-isolated [data-home-suggest-list] .holius-suggest-option small {
  color:var(--theme-muted,var(--holius-search-fallback-ink-muted));
}
.search-overlay-isolated [data-home-suggest-list] .holius-suggest-option[data-search-channel] small {
  color:var(--theme-muted,var(--holius-search-fallback-ink-muted));
  font-size:17px;
}
.search-overlay-isolated .search-overlay-form {
  border-color:var(--theme-border,var(--holius-search-fallback-border-sage));
  box-shadow:none;
  transition:border-color .14s ease;
}
.search-overlay-isolated .search-overlay-form:focus-within {
  border-color:var(--theme-accent,var(--holius-search-fallback-accent-forest));
  box-shadow:0 0 0 1px var(--theme-accent,var(--holius-search-fallback-accent-forest));
}
.search-overlay-isolated .search-overlay-recent {flex:0 0 auto;min-width:0;margin:4px 0 0;}
.search-overlay-isolated .search-chip-list {min-width:0;}
/* On virtual-keyboard resize show a COMPLETE row of recent chips, horizontally.
 * No cut-off chips under the Android keyboard and no loss of delete/undo. */
@media(max-width:760px){
  .search-overlay-isolated.is-keyboard-constrained .search-overlay-content {
    overflow:hidden;
  }
  .search-overlay-isolated.is-keyboard-constrained .search-overlay-content > [data-home-suggest-panel] {
    flex:1 1 auto;
    min-height:0;
    margin-bottom:4px;
  }
  .search-overlay-isolated.is-keyboard-constrained .search-overlay-recent {
    flex:0 0 auto;
    padding-bottom:max(2px,env(safe-area-inset-bottom,0px));
  }
  .search-overlay-isolated.is-keyboard-constrained .search-section-head {min-height:36px;margin-bottom:2px;}
  .search-overlay-isolated.is-keyboard-constrained .search-chip-list {
    display:flex;flex-flow:row nowrap;gap:6px;
    overflow-x:auto;overflow-y:hidden;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
    scroll-padding-inline:4px;
  }
  .search-overlay-isolated.is-keyboard-constrained .search-chip-list::-webkit-scrollbar {display:none;}
  .search-overlay-isolated.is-keyboard-constrained .search-recent-row {flex:0 0 auto;max-width:75vw;}
}
@media(prefers-reduced-motion:reduce){
  .search-overlay-isolated .search-overlay-form {transition:none;}
}

/* Keyboard on a short visual viewport: preserve at least one complete
 * autocomplete option; keep tabs and recent-search actions reachable by
 * scrolling only the dialog content, never the document. The viewport class
 * is owned by search-suggest-shared-0716.js (visualViewport, not CSS vh). */
@media (max-width:760px){
  .search-overlay-isolated.is-short-viewport .search-overlay-content {
    overflow-y:auto;
    overscroll-behavior-y:contain;
  }
  .search-overlay-isolated.is-short-viewport .search-overlay-content > [data-home-suggest-panel] {
    flex:0 0 auto;
    min-height:96px;
    max-height:138px;
  }
}
