/* Most selectors have zero specificity. Exceptions use :is() only for documented legacy conflicts. */

:where(:root) {
  --mobile-search-border: #eef0f3;
}

:where(.index-desktop-search-row.hidden) {
  display: none;
}

:where(.index-desktop-search-row) {
  justify-content: flex-start;
}

@media (min-width: 80rem) {
  :where(.index-desktop-search-row.xl\:flex) {
    display: flex;
  }

  :where(.mob-search-bar.xl\:hidden) {
    display: none;
  }
}

:where(.search-icon.text-base) {
  font-size: 1rem;
  line-height: 1.5rem;
}

:where(.search-icon.text-lg) {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

:where(.mob-search-bar .text-sm) {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
:where(.search-pill) {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem;
  border: 0.0938rem solid var(--brand-600, #ff5722);
  border-radius: 6.1875rem;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

:where(.search-pill:hover) {
  border-color: var(--brand-600, #ff5722);
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, .06);
}

:where(.search-pill.active) {
  border-color: var(--brand-600, #ff5722);
  box-shadow: 0 0.125rem 0.5rem color-mix(in srgb, var(--brand-600, #ff5722) 10%, transparent);
  cursor: default;
}

:where(.index-desktop-search-row) {
  align-items: center;
  gap: 1.25rem;
}

:where(.index-desktop-search-links) {
  display: inline-flex;
  align-items: center;
  flex: 1 1 60%;
  min-width: 0;
  gap: 1.25rem;
  color: #374151;
  font-size: var(--ht-type-body);
  font-weight: 400;
  white-space: nowrap;
}

:where(.index-desktop-search-links a) {
  color: inherit;
  text-decoration: none;
  transition: color .15s;
}

:where(.index-desktop-search-links .index-ai-quick-link) {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

:where(.index-desktop-search-links .index-service-link) {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Must beat public/assets/css/custom.css `.fi { display: inline-block; }` for service icons. */
:is(.index-service-link .fi) {
  display: inline-flex;
}

:where(.index-desktop-search-links .index-service-link svg),
:where(.index-desktop-search-links .index-service-link .fi) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: color-mix(in srgb, var(--brand-600, #ff5722) 62%, white);
}

:where(.index-desktop-search-links .index-ai-quick-link svg),
:where(.index-desktop-search-links .index-ai-quick-link .fi) {
  flex-shrink: 0;
  color: color-mix(in srgb, var(--brand-600, #ff5722) 62%, white);
  animation: ai-sparkle 2.2s ease-in-out infinite;
  transform-origin: center;
}

:where(.index-desktop-search-links a + a)::before {
  content: '|';
  display: inline-block;
  margin: 0 1.25rem 0 0;
  color: #e5e7eb;
}

:where(.index-desktop-search-links a:hover) {
  color: var(--brand-600, #ff5722);
}

:where(.search-trigger-btn),
:where(.mob-search-trigger-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: inherit;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  color: inherit;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

:where(.search-input) {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--ht-text-base);
  color: #374151;
  background: transparent;
  font-family: inherit;
  min-width: 0;
  padding: 0;
  margin: 0;
  line-height: 1.5;
  height: 1.5em;
  display: block;
}

:where(.search-input)::placeholder {
  font-size: inherit;
  color: #6b7280;
  opacity: 1;
}

:where(.search-pill.active .search-input) {
  cursor: text;
}

:where(.search-ai-btn) {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  align-self: center;
  margin-left: auto;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: 6.1875rem;
  flex-shrink: 0;
  background-color: var(--brand-600, #ff5722);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .42) 0%, rgba(255, 255, 255, 0) 100%);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-600, #ff5722) 65%, white) 0%, var(--brand-600, #ff5722) 100%);
  color: #fff;
  font-size: var(--ht-text-sm);
  font-weight: 600;
  line-height: 1;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s;
  white-space: nowrap;
}

:where(.search-ai-btn:hover) {
  opacity: .85;
  color: #fff;
}

:where(.search-ai-btn svg),
:where(.search-ai-btn .fi) {
  animation: ai-sparkle 2.2s ease-in-out infinite;
  transform-origin: center;
}

@keyframes ai-sparkle {

  0%,
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }

  30% {
    opacity: .4;
    transform: scale(.7) rotate(22deg);
  }

  60% {
    opacity: .7;
    transform: scale(.9) rotate(-12deg);
  }
}

:where(.search-suggestions) {
  position: absolute;
  top: calc(100% + 0.375rem);
  left: 0;
  right: 0;
  background: #fff;
  border: 0.0625rem solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1.75rem rgba(0, 0, 0, .12);
  z-index: 500;
  overflow: hidden;
  display: none;
}

:where(.search-suggestions.show) {
  display: block;
}

:where(.search-status) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:where(.sugg-label) {
  font-size: var(--ht-type-label);
  font-weight: 600;
  color: #9ca3af;
  padding: 0.625rem 0.875rem 0.25rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

:where(.sugg-item) {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5625rem 0.875rem;
  color: #374151;
  font-size: var(--ht-type-meta);
  text-decoration: none;
  transition: background .1s;
}

:where(.sugg-history-row) {
  justify-content: space-between;
}

:where(.sugg-history-link) {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

:where(.sugg-item:hover),
:where(.sugg-item.is-active),
:where(.sugg-history-row:has(.sugg-history-link.is-active)) {
  background: #f9fafb;
  color: var(--brand-600, #ff5722);
}

:where(.sugg-icon) {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 0.5rem;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #9ca3af;
}

:where(.sugg-empty) {
  padding: 0.875rem;
  --empty-state-color: #9ca3af;
  font-size: var(--ht-type-meta);
}

:where(.sugg-hist-text) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:where(.sugg-del) {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  font-size: var(--ht-text-md);
  border-radius: 50%;
  transition: color .1s, background .1s;
  padding: 0;
  line-height: 1;
  font-family: inherit;
}

:where(.sugg-del:hover) {
  color: #6b7280;
  background: #f3f4f6;
}

:where(.sugg-clear-wrap) {
  padding: 0.5rem 0.875rem;
  border-top: 0.0625rem solid #f3f4f6;
}

:where(.sugg-clear-btn) {
  width: 100%;
  padding: 0.4375rem 0;
  font-size: var(--ht-type-meta);
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color .1s;
}

:where(.sugg-clear-btn:hover) {
  color: #6b7280;
}

:where(#mob-search-overlay) {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
}

:where(#mob-search-overlay.open) {
  transform: translateY(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {

  :where(.search-pill),
:where(.search-ai-btn),
:where(.sugg-item),
:where(.sugg-del),
:where(.sugg-clear-btn),
:where(#mob-search-overlay),
:where(.mob-search-pill) {
    transition: none;
  }

  :where(.search-ai-btn svg),
:where(.search-ai-btn .fi) {
    animation: none;
  }

  :where(.index-desktop-search-links .index-ai-quick-link svg),
:where(.index-desktop-search-links .index-ai-quick-link .fi) {
    animation: none;
  }
}

:where(.search-wrapper) {
  flex: 0 1 40%;
  width: auto;
  min-width: 0;
  position: relative;
}



:is(.search-icon.fi) {

  /*  Must beat public/assets/css/custom.css `.fi { display: inline-block; }` for search icons.  */
  display: block;
}

:where(.search-icon) {
  flex-shrink: 0;
  color: color-mix(in srgb, var(--brand-600, #ff5722) 62%, white);
}

:where(.search-icon.fi-rr-search) {
  color: var(--brand-600, #ff5722);
}

:where(.search-ai-btn .search-icon) {
  color: #fff;
}

:where(.search-placeholder) {
  flex: 1;
  font-size: var(--ht-text-base);
  color: #6b7280;
}
:where(.mob-search-header) {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  flex-shrink: 0;
  border-bottom: 0.0625rem solid #f3f4f6;
}

:where(.mob-search-input-wrap) {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.875rem;
  padding: 0 0.875rem;
  border: 0.0625rem solid #e5e7eb;
  border-radius: 6.1875rem;
  background: #fff;
  box-sizing: border-box;
}

:where(.mob-search-input) {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: none;
  outline: none;
  font-size: var(--ht-text-base);
  color: #374151;
  background: transparent;
  font-family: inherit;
}

:where(.mob-search-input)::placeholder {
  font-size: inherit;
  color: #6b7280;
  opacity: 1;
}

:where(.mob-search-close) {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  font-size: var(--ht-text-base);
  font-weight: 500;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
}

:where(.mob-search-results) {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Migrated from public/assets/css/index.css; consumer overrides retain precedence. */
:where(.mob-area-btn) {
  display: inline-flex;
  align-self: center;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: auto;
  max-width: 6.25rem;
  flex-shrink: 0;
  padding: 0.375rem 0.875rem;
  min-height: 2.75rem;
  background: rgba(255, 255, 255, 0.7);
  border: 0.0625rem solid var(--mobile-search-border);
  border-radius: 8px;
  box-shadow: none;
  font-size: var(--ht-text-base);
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
  font-family: inherit;
  white-space: nowrap;
  min-width: 4.5rem;
  overflow: hidden;
  user-select: none;
}

:where(.mob-area-btn:hover) {
  background: #e5e7eb;
  color: #111827;
}

:where(.mob-area-btn[aria-expanded="true"]) {
  color: #374151;
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--mobile-search-border);
  font-weight: 600;
}

:where(.page-main-home .mob-area-btn),
:where(.page-main-home .mob-area-btn[aria-expanded="true"]) {
  color: #374151;
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--mobile-search-border);
  font-weight: 500;
}

:where(.mob-area-btn svg) {
  flex-shrink: 0;
}

:where(.mob-area-btn .filter-btn-text) {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:where(.page-main-home .mob-area-btn) {
  max-width: none;
  min-width: 7rem;
  padding-right: 0.625rem;
  padding-left: 0.625rem;
}


:where(.mob-search-bar) {
  display: none;
  align-items: stretch;
  gap: 0.5rem;
  padding-top: 0;
}

@media (max-width:79.9375rem) {
:where(.mob-search-bar) {
    display: flex;
  }
}

:where(.mob-search-pill) {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex: 1;
  min-width: 0;
  min-height: 2.875rem;
  padding: 0 0.25rem 0 0.875rem;
  border: 0.0625rem solid var(--mobile-search-border);
  border-radius: 6.1875rem;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
  transition: background .18s, border-color .18s, box-shadow .18s;
  overflow: hidden;
  box-sizing: border-box;
}

:where(.mob-search-trigger-btn) {
  flex: 1;
  justify-content: flex-start;
  min-width: 0;
  text-align: left;
}

:where(.mob-search-pill:hover) {
  background: #fff;
  border-color: #e5e7eb;
}

:where(.mob-search-pill .search-ai-btn) {
  height: 2.375rem;
  min-height: 2.375rem;
  padding: 0 0.625rem;
  border-radius: 6.1875rem;
}

:where(.mob-search-pill .search-icon) {
  flex-shrink: 0;
}

:where(.mob-search-trigger-btn .search-icon),
:where(.mob-search-input-wrap > .search-icon) {
  color: #9ca3af;
}

:where(.mob-search-pill .search-placeholder) {
  flex: 1;
  min-width: 0;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
