﻿/* "Find a service" (Views/Shared/_ServiceFinder.cshtml, js/serviceFinder.js): inside "All solutions" on a service line's page,
   the field between the section's head and its tree. The field and suggestions like the FAQ search, and a list of matches
   that opens over the page under the field. */
.find-band {
  position: relative;
  z-index: 6;
  padding: 0 0 4.8rem;
}
.find-band__inner {
  display: flex;
  justify-content: center;
}
.svc-find__label--hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.svc-find {
  --hero-cyan: #00c2cb;
  --hero-navy: #0e2a38;
  --hero-line: #d4eff1;
}
.svc-find {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 52rem;
  margin-top: 3.2rem;
}
.svc-find[hidden],
.svc-find [hidden] {
  display: none !important;
}
.svc-find__label {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.55;
  text-transform: uppercase;
  color: #5a7380;
}
.svc-find__field {
  position: relative;
}
.svc-find__icon {
  position: absolute;
  top: 2.8rem;
  left: 2rem;
  display: flex;
  color: var(--hero-navy);
  transform: translateY(-50%);
  pointer-events: none;
}
.svc-find__input {
  display: block;
  width: 100%;
  height: 5.6rem;
  padding: 0 5.6rem 0 5.2rem;
  border: 1px solid rgba(0, 194, 203, 0.35);
  border-radius: 999px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background: #ffffff;
  box-shadow: 0 1.2rem 2.8rem -2rem rgba(14, 42, 56, 0.35);
  font-family: inherit;
  font-size: 1.6rem;
  color: var(--hero-navy);
  caret-color: var(--hero-cyan);
}
.svc-find__input::placeholder {
  color: #5a7380;
  opacity: 1;
}
.svc-find__input:focus {
  border-color: var(--hero-cyan);
  box-shadow: 0 0 0 3px rgba(0, 194, 203, 0.14);
}
.svc-find__input::-webkit-search-cancel-button {
  display: none;
  -webkit-appearance: none;
}
.svc-find__clear {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border: 0;
  border-radius: 50%;
  background: #e6f9fa;
  color: var(--hero-navy);
  cursor: pointer;
}
.svc-find__clear:hover,
.svc-find__clear:focus-visible {
  background: #d2f3f5;
}
.svc-find__hints {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}
.svc-find__hints-label {
  font-size: 1.4rem;
  font-weight: 600;
  color: #5a7380;
}
.svc-find__hint {
  flex: none;
  padding: 0.5rem 1.3rem;
  border: 1px solid var(--hero-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 2.2rem;
  color: var(--hero-navy);
  cursor: pointer;
}
.svc-find__hint:hover,
.svc-find__hint:focus-visible,
.svc-find__hint.is-active {
  border-color: var(--hero-cyan);
  background: #e6f9fa;
}
/* Under the open list the suggestions are out of reach anyway; on phones their row runs wider than the list */
.svc-find.is-open .svc-find__hints {
  visibility: hidden;
}
.svc-find__panel {
  position: absolute;
  top: calc(100% + 0.8rem);
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  max-height: min(64vh, 60rem);
  overflow: auto;
  padding: 0.8rem;
  border: 1px solid var(--hero-line);
  border-radius: 2rem;
  background: #ffffff;
  box-shadow: 0 2.4rem 5rem -2.4rem rgba(14, 42, 56, 0.45);
}
.svc-find__head {
  padding: 0.6rem 1.2rem 0.8rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.55;
  text-transform: uppercase;
  color: #5a7380;
}
html[lang=ja] .svc-find__head,
html[lang=ja] .svc-find__label {
  letter-spacing: 0.04em;
}
.svc-find__list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* A result: its link (icon, name, summary), then where it sits, its category a link of its own */
.svc-find__item > .svc-find__path {
  display: block;
  margin: -0.8rem 1.2rem 0.6rem 6rem;
}
.svc-find__category {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #9fe3e7;
  text-underline-offset: 0.3rem;
}
.svc-find__category:hover,
.svc-find__category:focus-visible {
  color: var(--hero-navy);
  text-decoration-color: var(--hero-cyan);
}
.svc-find__link {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.6rem 1.2rem;
  padding: 1.2rem;
  border-radius: 1.4rem;
  color: var(--hero-navy);
  text-decoration: none;
  transition: background-color 0.15s;
}
.svc-find__link:hover,
.svc-find__link:focus-visible {
  outline: none;
  background: #f0fbfc;
  color: var(--hero-navy);
}
.svc-find__link:focus-visible {
  box-shadow: inset 0 0 0 2px var(--hero-cyan);
}
.svc-find__line {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 1.1rem;
  background: #e6f9fa;
  color: var(--hero-navy);
}
.svc-find__body {
  display: flex;
  flex: 1 1 calc(100% - 4.8rem);
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.svc-find__name {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.4;
}
.svc-find__path {
  overflow: hidden;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #5a7380;
}
.svc-find__eg {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  font-size: 1.35rem;
  line-height: 1.5;
  color: #3e5662;
}
.svc-find__mark {
  padding: 0 0.1rem;
  border-radius: 0.3rem;
  background: #c9f1f4;
  color: inherit;
}
.svc-find__empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1.4rem 1.4rem 1.6rem;
}
.svc-find__empty-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--hero-navy);
}
.svc-find__empty > span {
  font-size: 1.45rem;
  line-height: 1.55;
  color: #3e5662;
}
.svc-find__ask {
  min-height: 4.6rem;
  margin-top: 0.4rem;
  font-size: 1.5rem;
  font-weight: 800;
}
/* Phones: the suggestions swipe on one row */
@media (max-width: 767px) {
  .svc-find {
    max-width: none;
    margin-top: 2.4rem;
  }
  .svc-find__icon {
    top: 2.6rem;
    left: 1.8rem;
  }
  .svc-find__input {
    height: 5.2rem;
    padding: 0 5.2rem 0 4.8rem;
  }
  .svc-find__clear {
    width: 3.6rem;
    height: 3.6rem;
  }
  .svc-find__hints {
    flex-wrap: nowrap;
    margin: 0 -1.6rem;
    padding: 0 1.6rem 0.2rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .svc-find__hints::-webkit-scrollbar {
    display: none;
  }
  .svc-find__hints-label {
    flex: none;
  }
  .svc-find__hint {
    min-height: 3.6rem;
  }
  .svc-find__panel {
    padding: 0.6rem;
    border-radius: 1.6rem;
  }
  .svc-find__link {
    gap: 0.6rem 1rem;
    padding: 1rem;
  }
  .svc-find__line {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 1rem;
  }
  .svc-find__body {
    flex-basis: calc(100% - 4.2rem);
  }
  .svc-find__item > .svc-find__path {
    margin: -0.6rem 1rem 0.6rem 5.2rem;
  }
  .svc-find__name {
    font-size: 1.5rem;
  }
  .svc-find__ask {
    align-self: stretch;
  }
}

/* The field large: the finder is there to be used */
.find-band .svc-find {
  width: 100%;
  max-width: 84rem;
  margin-top: 0;
  gap: 1.4rem;
}
.find-band .svc-find__label {
  font-size: 1.4rem;
  text-align: center;
}
.find-band .svc-find__icon {
  top: 3.4rem;
  left: 2.6rem;
}
.find-band .svc-find__input {
  height: 6.8rem;
  padding: 0 6.4rem 0 6.4rem;
  border-width: 2px;
  border-color: rgba(0, 194, 203, 0.5);
  font-size: 1.9rem;
  box-shadow: 0 1.8rem 3.6rem -2.4rem rgba(14, 42, 56, 0.45);
}
.find-band .svc-find__clear {
  top: 1.2rem;
  right: 1.2rem;
  width: 4.4rem;
  height: 4.4rem;
}
.find-band .svc-find__hints {
  justify-content: center;
}
@media (max-width: 767px) {
  .find-band {
    padding: 0 0 3.2rem;
  }
  .find-band .svc-find__icon {
    top: 2.9rem;
    left: 2rem;
  }
  .find-band .svc-find__input {
    height: 5.8rem;
    padding: 0 5.6rem 0 5.4rem;
    font-size: 1.7rem;
  }
  .find-band .svc-find__clear {
    top: 0.9rem;
    right: 0.9rem;
    width: 4rem;
    height: 4rem;
  }
  /* The rail runs to the screen's edges: its bleed matches the container's 1.5rem gutter */
  .find-band .svc-find__hints {
    justify-content: flex-start;
    margin: 0 -1.5rem;
    padding: 0 1.5rem 0.2rem;
  }
  /* The floating buttons would cover the end of the results on a short screen */
  body:has(.svc-find.is-open) .sticky-cta,
  body:has(.svc-find.is-open) .back-to-top {
    opacity: 0;
    visibility: hidden;
  }
}
