.msh-search-trigger {
  --msh-blue: #4e93c8;
  --msh-dark: #2f6fae;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  border-radius: 999px;
  line-height: 0;
  vertical-align: middle;
}

.msh-search-trigger svg {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}

.msh-search-trigger:hover,
.msh-search-trigger:focus-visible {
  color: var(--msh-dark, #2f6fae);
  background: rgba(78, 147, 200, 0.12);
  outline: none;
}

.msh-search-trigger__label,
.msh-search-overlay .screen-reader-text,
.msh-search-page .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.msh-search-overlay {
  --msh-blue: #4e93c8;
  --msh-dark: #2f6fae;
  --msh-coral: #ff9f6b;
  --msh-sky: #eaf8ff;
  --msh-text: #334155;
  position: fixed;
  inset: 0;
  z-index: 100050;
  font-family: "Nunito Sans", sans-serif;
  color: var(--msh-text);
}

.msh-search-overlay[hidden] {
  display: none !important;
}

.msh-search-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 40, 72, 0.55);
}

.msh-search-overlay__dialog {
  position: relative;
  z-index: 1;
  width: min(42rem, calc(100vw - 1.5rem));
  max-height: min(84vh, 40rem);
  margin: 10vh auto 0;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(47, 111, 174, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.msh-search-overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 8px;
}

.msh-search-overlay__title {
  margin: 0;
  font: 700 1.25rem/1.15 Quicksand, sans-serif;
  color: var(--msh-dark);
}

.msh-search-overlay__close {
  border: 0;
  background: transparent;
  color: var(--msh-dark);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  width: 2.25rem;
  height: 2.25rem;
}

.msh-search-overlay__form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 8px;
  padding: 8px 10px 8px 12px;
  border: 2px solid var(--msh-blue);
  border-radius: 16px;
  background: #fff;
}

.msh-search-overlay__icon {
  color: var(--msh-blue);
  display: flex;
}

.msh-search-overlay__input {
  flex: 1;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 1.0625rem;
  min-width: 0;
  background: transparent;
}

.msh-search-overlay__submit {
  border: 0;
  border-radius: 12px;
  background: var(--msh-coral);
  color: #fff;
  font: 700 14px/1 Quicksand, sans-serif;
  padding: 10px 14px;
  cursor: pointer;
}

.msh-search-overlay__status {
  margin: 0 16px 8px;
  font-size: 0.9375rem;
  color: #64748b;
}

.msh-search-overlay__results {
  flex: 1;
  overflow: auto;
  padding: 0 8px 8px;
}

.msh-search-overlay__all {
  display: block;
  margin: 0 16px 16px;
  text-align: center;
  font: 700 14px/1.4 Quicksand, sans-serif;
  color: var(--msh-dark);
}

.msh-search-overlay__all[hidden] {
  display: none !important;
}

.msh-search-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.msh-search-item + .msh-search-item {
  border-top: 1px solid var(--msh-sky);
}

.msh-search-item__link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
}

.msh-search-item__link:hover,
.msh-search-item__link:focus-visible {
  background: var(--msh-sky);
  outline: none;
}

.msh-search-item__thumb {
  flex: 0 0 4.5rem;
  width: 4.5rem;
  height: 3.25rem;
  border-radius: 10px;
  overflow: hidden;
  background: var(--msh-sky);
}

.msh-search-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.msh-search-item__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.msh-search-item__type {
  font: 700 0.75rem/1 Quicksand, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--msh-blue);
}

.msh-search-item__title {
  font: 700 1.0625rem/1.25 Quicksand, sans-serif;
  color: var(--msh-dark);
}

.msh-search-item__excerpt {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: #64748b;
}

.msh-search-empty {
  margin: 8px 16px 16px;
  color: #64748b;
}

.msh-search-page {
  --msh-blue: #4e93c8;
  --msh-dark: #2f6fae;
  --msh-coral: #ff9f6b;
  --msh-sky: #eaf8ff;
  font-family: "Nunito Sans", sans-serif;
}

.msh-search-page__form {
  display: flex;
  gap: 8px;
  margin: 0 0 1.25rem;
}

.msh-search-page__input {
  flex: 1;
  border: 2px solid var(--msh-blue);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  min-width: 0;
}

.msh-search-page__submit {
  border: 0;
  border-radius: 16px;
  background: var(--msh-coral);
  color: #fff;
  font: 700 15px/1 Quicksand, sans-serif;
  padding: 0 18px;
  cursor: pointer;
}

.msh-search-page__count,
.msh-search-page__hint {
  color: #64748b;
  margin: 0 0 1rem;
}

.msh-search-list--page .msh-search-item__link {
  padding: 14px 4px;
}

.msh-search-list--page .msh-search-item__thumb {
  flex-basis: 6rem;
  width: 6rem;
  height: 4.25rem;
}

body.msh-search-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .msh-search-overlay__dialog {
    width: 100%;
    max-height: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
  }

  .msh-search-overlay__submit {
    padding: 10px 12px;
  }

  .msh-search-page__form {
    flex-direction: column;
  }

  .msh-search-page__submit {
    padding: 14px 18px;
  }
}
