/* Header search mode adapted from PresuCart: the dock only opens it. */
.app-header { transition: height 160ms ease; }
.app-header:has(.app-header-search-row) { height: calc(136px + env(safe-area-inset-top)); }
.app-header-search-row {
  width: min(calc(100% - 28px), var(--content-inner-max-width));
  margin: -2px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}
.inspection-search-field {
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 5px 9px 5px 11px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.38);
  background: var(--surface);
  box-shadow: 0 9px 22px rgba(15,23,42,.16);
}
.inspection-search-icon, .inspection-search-clear { display:grid; place-items:center; }
.inspection-search-icon { color: var(--accent); }
.inspection-search-icon svg, .inspection-search-clear svg, .dock-search-icon svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2.3; stroke-linecap:round; stroke-linejoin:round; }
.inspection-search-field input {
  min-width:0; width:100%; border:0; outline:0; padding:0; background:transparent;
  color:var(--text); -webkit-text-fill-color:var(--text); caret-color:var(--accent);
  font:inherit; font-size:.96rem; font-weight:700;
}
.inspection-search-field input::-webkit-search-cancel-button { display:none; }
.inspection-search-clear { width:36px; height:36px; border:0; border-radius:50%; background:var(--surface-soft); color:var(--muted); padding:0; }
.inspection-search-close { min-width:48px; height:44px; border:0; padding:0 4px; background:transparent; color:#fff; font:inherit; font-size:.8rem; font-weight:850; }
.inspection-search-results {
  position:fixed;
  z-index:48;
  top:calc(var(--app-visual-top, 0px) + var(--app-header-offset, calc(136px + env(safe-area-inset-top))));
  left:50%; transform:translateX(-50%);
  width:min(100%, var(--content-max-width));
  height:max(120px, calc(var(--app-visual-height, 100dvh) - var(--app-header-offset, 136px) - var(--app-visual-top, 0px)));
  box-sizing:border-box;
  padding:16px 14px calc(24px + env(safe-area-inset-bottom));
  overflow-x:hidden; overflow-y:auto; -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain; touch-action:pan-y;
  background:var(--surface-shell, var(--background));
  display:grid; align-content:start; gap:12px;
}
.inspection-search-results.is-empty { overflow-y:hidden; touch-action:none; }
.inspection-search-empty { min-height:42vh; display:grid; place-content:center; justify-items:center; text-align:center; color:var(--muted); padding:24px; }
.inspection-search-empty strong { color:var(--text); font-size:1.08rem; }
.inspection-search-empty p { max-width:17rem; margin:10px 0 0; }
html.inspection-search-open, body.inspection-search-open {
  overflow:hidden;
  overflow-x:hidden;
  overscroll-behavior:none;
  max-width:100%;
}
body.inspection-search-open {
  position:fixed;
  inset-inline:0;
  width:100%;
  max-width:100%;
}
body.inspection-search-open .view { visibility:hidden; }
.dock-search-icon { width:24px; height:24px; display:grid; place-items:center; }
