/* Search-only styles; load after the site's theme. Frequent keyboard actions never animate. */
body:has(> .site-search-dialog[open]) { overflow: hidden; }
.site-search-target { outline: 2px solid #315f8c; outline-offset: 4px; scroll-margin-top: 140px; }
.aloha-brand.site-search-header {
  display: flex;
  align-items: center;
  gap: 16px;
}
.aloha-brand.site-search-header .aloha-brand-mark { flex-shrink: 0; }
.aloha-brand.site-search-header .aloha-brand-copy { flex: 1 1 auto; min-width: 0; }
.aloha-brand.site-search-header h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aloha-brand.site-search-header .aloha-brand-actions { margin-left: 0; }
.aloha-brand.site-search-header .site-search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 260px;
  min-width: 200px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #8a9bae;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  color: #edf3fa;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: none;
}
.site-search-trigger svg { flex-shrink: 0; pointer-events: none; }
.site-search-trigger-label { flex: 1; white-space: nowrap; }
.site-search-shortcut {
  border: 1px solid #8296ad;
  border-radius: 4px;
  padding: 1px 4px;
  color: #edf3fa;
  font: inherit;
  font-size: 11px;
  white-space: nowrap;
}
.site-search-dialog,
.site-search-dialog *,
.site-search-notice,
.site-search-notice * { box-sizing: border-box; }
.site-search-dialog {
  position: fixed;
  inset: 0;
  width: min(640px, calc(100vw - 32px));
  max-width: none;
  height: fit-content;
  max-height: calc(100dvh - 48px);
  margin: clamp(16px, 9vh, 96px) auto auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ccd7e3;
  border-radius: 16px;
  background: #fff;
  color: #23343c;
  box-shadow: 0 24px 80px rgba(10, 28, 46, .26);
  font-family: inherit;
  text-align: left;
  color-scheme: light;
  overscroll-behavior: contain;
  animation: none;
  transition: none;
}
.site-search-dialog::backdrop { background: rgba(13, 30, 47, .44); }
.site-search-dialog:not([open]) { display: none; }
.site-search-panel {
  display: flex;
  flex-direction: column;
  max-height: min(720px, calc(100dvh - clamp(16px, 9vh, 96px) - 24px));
  padding: 16px;
  gap: 12px;
}
.site-search-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.site-search-heading h2 { margin: 0; color: #23343c; font-size: 17px; line-height: 1.4; font-weight: 650; }
.site-search-close,
.site-search-notice-button {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid #d4dee9;
  border-radius: 8px;
  padding: 8px 12px;
  color: #274e75;
  background: #f5f7fa;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  touch-action: manipulation;
  transition: none;
}
.site-search-dialog .site-search-input {
  display: block;
  flex-shrink: 0;
  width: 100%;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #8ca2ba;
  border-radius: 9px;
  background: #fff;
  color: #152f40;
  font: inherit;
  font-size: 16px; /* Avoid iOS input zoom. */
  line-height: 1.5;
  box-shadow: none;
  transition: none;
}
.site-search-input::placeholder { color: #657787; opacity: 1; }
.site-search-results {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 -4px;
  padding: 3px 4px;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-behavior: auto;
}
.site-search-option {
  display: block;
  min-height: 72px;
  margin: 0 0 4px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #23343c;
  background: #fff;
  cursor: pointer;
  touch-action: manipulation;
}
.site-search-option[aria-selected="true"] { background: #eaf0f7; border-color: #b8cce0; }
.site-search-result-top { display: flex; min-width: 0; }
.site-search-result-title { color: #153b60; font-size: 15px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.site-search-result-path,
.site-search-result-description { display: block; margin-top: 3px; font-size: 12px; line-height: 1.5; color: #506476; overflow-wrap: anywhere; }
.site-search-result-description { font-size: 13px; color: #52636d; }
.site-search-quick { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; font-size: 14px; line-height: 1.6; flex-shrink: 0; }
.site-search-quick-label { color: #596b73; font-size: 13px; }
.site-search-quick a { color: #274e75; font-weight: 600; text-decoration: none; }
.site-search-quick a:hover { text-decoration: underline; }
.site-search-empty { margin: 0; padding: 32px 12px; color: #52636d; font-size: 14px; text-align: center; line-height: 1.7; }
.site-search-help { margin: 0; padding-top: 10px; border-top: 1px solid #e0e6ed; color: #596b73; font-size: 12px; line-height: 1.6; flex-shrink: 0; }
.site-search-notice {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 10px 12px 10px 16px;
  border: 1px solid #c5d3e1;
  border-radius: 12px;
  background: #fff;
  color: #23343c;
  box-shadow: 0 8px 28px rgba(16, 43, 60, .18);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
}
.site-search-notice-text { min-width: 0; overflow-wrap: anywhere; }
.site-search-notice-button { flex-shrink: 0; }
.site-search-dialog [hidden],
.site-search-notice[hidden],
.site-search-notice [hidden] { display: none !important; }
.site-search-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}
.site-search-dialog :focus-visible,
.site-search-notice:focus-visible,
.site-search-notice :focus-visible { outline: 2px solid #315f8c; outline-offset: 2px; }
.aloha-brand.site-search-header .site-search-trigger:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .aloha-brand.site-search-header .site-search-trigger:hover { background: rgba(255, 255, 255, .16); }
  .site-search-close:hover,
  .site-search-notice-button:hover { background: #eaf0f7; }
}
.aloha-brand.site-search-header .site-search-trigger:active,
.site-search-close:active,
.site-search-notice-button:active { transform: scale(.98); }
.site-search-option:active { background: #dce7f3; }
@media (max-width: 900px) {
  .aloha-brand.site-search-header { gap: 10px; }
  .aloha-brand.site-search-header .site-search-trigger { min-width: 44px; width: 44px; height: 44px; flex: 0 0 44px; justify-content: center; padding: 0; }
  .site-search-trigger-label,
  .site-search-shortcut { display: none; }
}
@media (max-width: 600px) {
  .aloha-brand.site-search-header { gap: 7px; padding-inline: 12px; }
  .aloha-brand.site-search-header .aloha-brand-mark { width: 38px; height: 38px; }
  .aloha-brand.site-search-header h1 { white-space: normal; overflow-wrap: anywhere; font-size: clamp(16px, 4.4vw, 20px); }
  .aloha-brand.site-search-header .stamp { overflow-wrap: anywhere; white-space: normal; }
  .site-search-dialog { width: calc(100vw - 16px); margin-top: max(8px, env(safe-area-inset-top)); border-radius: 12px; max-height: calc(100dvh - 16px); }
  .site-search-panel { max-height: calc(100dvh - 24px - env(safe-area-inset-top)); padding: 12px; gap: 10px; }
  .site-search-result-description { font-size: 12px; }
  .site-search-help { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .aloha-brand.site-search-header .site-search-trigger:active,
  .site-search-close:active,
  .site-search-notice-button:active { transform: none; }
}
@media (forced-colors: active) {
  .site-search-option[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
}
@media print {
  .site-search-trigger,
  .site-search-dialog,
  .site-search-notice { display: none !important; }
  .site-search-target { outline: none; }
}
