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

.arth-search-modal[hidden],
.arth-search-all[hidden],
.arth-search-clear[hidden],
.arth-search-more[hidden],
.arth-search-filter[hidden] {
  display: none;
}

.arth-search-modal {
  position: fixed;
  inset: 0;
  z-index: 300000;
  display: grid;
  place-items: center;
}

.arth-search-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 22, 37, .72);
}

.arth-search-dialog {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(620px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  padding: 26px 28px 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .28);
  color: #243f59;
}

.arth-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.arth-search-title,
.arth-search-page h1 {
  margin: 0;
  color: #203c58;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 600;
}

.arth-search-close,
.arth-search-clear {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.arth-search-clear::before,
.arth-search-clear::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #59748e;
  content: '';
}

.arth-search-clear::before { transform: translate(-50%, -50%) rotate(45deg); }
.arth-search-clear::after { transform: translate(-50%, -50%) rotate(-45deg); }
.arth-search-close span {
  display: block;
  color: #59748e;
  font-size: 28px;
  font-weight: 300;
  line-height: 32px;
}
.arth-search-close:hover,
.arth-search-close:focus-visible,
.arth-search-clear:hover,
.arth-search-clear:focus-visible { background: #eef7fe; }

.arth-search-form,
.arth-search-page-form {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 22px;
}

.arth-search-input,
.arth-search-page-form input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px 48px 10px 42px;
  border: 1px solid #84b8ea;
  border-radius: 6px;
  outline: 0;
  color: #203c58;
  background: #fff;
  font: inherit;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.arth-search-input::-webkit-search-cancel-button,
.arth-search-input::-webkit-search-decoration,
.arth-search-page-form input::-webkit-search-cancel-button,
.arth-search-page-form input::-webkit-search-decoration {
  display: none;
  -webkit-appearance: none;
  appearance: none;
}

.arth-search-input::-ms-clear,
.arth-search-page-form input::-ms-clear {
  display: none;
}

.arth-search-input:focus,
.arth-search-page-form input:focus {
  border-color: #2d8ae8;
  box-shadow: 0 0 0 3px rgba(45, 138, 232, .16);
}

.arth-search-icon {
  position: absolute;
  z-index: 1;
  left: 15px;
  width: 14px;
  height: 14px;
  border: 1.8px solid #5f82a3;
  border-radius: 50%;
  pointer-events: none;
}

.arth-search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 2px;
  transform: rotate(45deg);
  border-radius: 2px;
  background: #5f82a3;
  content: '';
}

.arth-search-clear {
  position: absolute;
  right: 0;
  background: radial-gradient(circle at center, #aebdca 0 6px, transparent 6.5px);
}

.arth-search-clear::before,
.arth-search-clear::after {
  width: 8px;
  height: 1.5px;
  background: #fff;
}

.arth-search-clear:hover,
.arth-search-clear:focus-visible {
  background: radial-gradient(circle at center, #8fa8ba 0 6px, transparent 6.5px);
}

.arth-search-results,
.arth-search-page-results {
  margin-top: 18px;
}

.arth-search-group-title {
  margin: 18px 0 4px;
  color: #7c97ad;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.arth-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  padding: 12px 2px;
  border-top: 1px solid #e4edf4;
  color: #237fd7;
  text-decoration: none;
  transition: background-color .18s ease, padding .18s ease;
}

.arth-search-result:hover,
.arth-search-result:focus-visible {
  padding-right: 8px;
  padding-left: 8px;
  background: #f4faff;
}

.arth-search-result-content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.arth-search-result-content strong {
  color: #237fd7;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
}

.arth-search-result-content span {
  overflow: hidden;
  color: #8195a6;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arth-search-result-arrow {
  flex: 0 0 auto;
  color: #2d8ae8;
  font-size: 22px;
  line-height: 1;
}

.arth-search-all {
  display: block;
  margin: 12px -28px 0;
  padding: 15px 28px 18px;
  color: #237fd7;
  background: #eef8ff;
  font-size: 13px;
  text-decoration: none;
}

.arth-search-empty,
.arth-search-loading,
.arth-search-error {
  margin: 22px 0;
  color: #71879a;
  font-size: 14px;
  line-height: 1.5;
}

.arth-search-error { color: #9b4e4e; }

.arth-search-page {
  padding: 205px 0 110px;
}

.arth-search-page > .wrp {
  box-sizing: border-box;
  width: min(760px, calc(100% - 36px));
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
}

.arth-search-page-header {
  position: static;
  margin-bottom: 26px;
}

.searchbut.arth-search-active {
  background-color: #dceefe !important;
}

.arth-search-page-summary {
  margin: 8px 0 0;
  color: #8095a7;
  font-size: 14px;
}

.arth-search-page-form {
  max-width: 760px;
  margin-top: 0;
}

.arth-search-page-form button {
  position: absolute;
  right: 5px;
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: #2d8ae8;
  cursor: pointer;
  font: inherit;
}

.arth-search-filters {
  display: flex;
  gap: 8px;
  margin: 18px 0 30px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.arth-search-filter {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 0;
  border-radius: 18px;
  color: #617b91;
  background: #edf2f6;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
}

.arth-search-filter.is-active,
.arth-search-filter:hover,
.arth-search-filter:focus-visible {
  color: #fff;
  background: #2d8ae8;
}

.arth-search-page-results {
  max-width: 760px;
}

.arth-search-page-results .arth-search-result {
  min-height: 70px;
}

.arth-search-more {
  display: block;
  min-height: 42px;
  margin: 24px auto 0;
  padding: 8px 20px;
  border: 0;
  border-radius: 22px;
  color: #237fd7;
  background: #eef8ff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.arth-search-more:disabled {
  opacity: .55;
  cursor: wait;
}

@media (max-width: 650px) {
  .arth-search-modal { place-items: stretch; }
  .arth-search-dialog {
    width: 100%;
    max-height: none;
    height: 100%;
    padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
    border-radius: 0;
  }
  .arth-search-title { font-size: 22px; }
  .arth-search-results { overflow-y: auto; max-height: calc(100vh - 190px); }
  .arth-search-result { min-height: 68px; padding: 13px 0; }
  .arth-search-result-content span { white-space: normal; }
  .arth-search-all { margin-right: -18px; margin-left: -18px; padding-right: 18px; padding-left: 18px; }
  .arth-search-page { padding: 90px 0 70px; }
  .arth-search-page h1 { font-size: 24px; }
  .arth-search-page-form button { display: none; }
  .arth-search-page-form input { padding-right: 16px; }
  .arth-search-page-results .arth-search-result { min-height: 72px; }
}

@media (min-width: 651px) and (max-width: 767px) {
  .arth-search-modal {
    box-sizing: border-box;
    place-items: center;
    padding: 16px;
  }

  .arth-search-dialog {
    width: min(620px, 100%);
    height: auto;
    max-height: min(760px, calc(100dvh - 32px));
    padding: 26px 28px 0;
    border-radius: 8px;
  }

  .arth-search-title { font-size: 26px; }
  .arth-search-results { max-height: calc(100dvh - 220px); }
  .arth-search-all { margin-right: -28px; margin-left: -28px; padding-right: 28px; padding-left: 28px; }
  .arth-search-page { padding: 90px 0 70px; }
  .arth-search-page h1 { font-size: 24px; }
  .arth-search-page-form button { display: none; }
  .arth-search-page-form input { padding-right: 16px; }
  .arth-search-page-results .arth-search-result { min-height: 72px; }
}

@media (min-width: 1020px) {
  .arth-search-page > .wrp {
    width: clamp(760px, 80vw, 1400px);
    max-width: 1400px;
  }

  .arth-search-page-form,
  .arth-search-page-results {
    width: 100%;
    max-width: none;
  }
}

@media (min-width: 1601px) {
  .arth-search-page[data-arth-search-page] > .wrp {
    width: clamp(760px, 80vw, 1400px) !important;
    max-width: 1400px !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }
}
