.stw-algolia-search {
  width: 100%;
}

body.stw-algolia-search--active {
  overflow: hidden;
}

.stw-algolia-search__controls {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.stw-algolia-search__autocomplete {
  flex: 1;
  min-width: 0;
  position: relative;
}

.stw-algolia-search__autocomplete::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background: #717182;
  mask: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.16667 15.8333C12.8486 15.8333 15.8333 12.8486 15.8333 9.16667C15.8333 5.48477 12.8486 2.5 9.16667 2.5C5.48477 2.5 2.5 5.48477 2.5 9.16667C2.5 12.8486 5.48477 15.8333 9.16667 15.8333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/><path d="M17.5 17.5001L13.9166 13.9167" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></svg>')
    center/contain no-repeat;
  -webkit-mask: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.16667 15.8333C12.8486 15.8333 15.8333 12.8486 15.8333 9.16667C15.8333 5.48477 12.8486 2.5 9.16667 2.5C5.48477 2.5 2.5 5.48477 2.5 9.16667C2.5 12.8486 5.48477 15.8333 9.16667 15.8333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/><path d="M17.5 17.5001L13.9166 13.9167" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></svg>')
    center/contain no-repeat;
  position: absolute;
  top: calc(50% - 10px);
  left: 16px;
  z-index: 2;
  pointer-events: none;
}

.stw-algolia-search__input {
  border: none !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #131828 !important;
  height: 56px !important;
  line-height: 56px;
  width: 100%;
  padding: 0 52px 0 48px !important;
  font-family: "Inter", Sans-serif;
  font-weight: 400;
  font-size: 14px;
}

.stw-algolia-search__input::placeholder {
  color: #13182880 !important;
}

.stw-algolia-search__input--active {
  background: #F3F3F5 !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.stw-algolia-search__input--active ~ .stw-algolia-search__panel {
  top: 100%;
}

.stw-algolia-search__reset-btn {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  box-shadow: none;
  border: none;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #131828 !important;
  z-index: 2;
}

.stw-algolia-search__reset-btn::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background: #fff;
  mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M504.6 148.5C515.9 134.9 514.1 114.7 500.5 103.4C486.9 92.1 466.7 93.9 455.4 107.5L320 270L184.6 107.5C173.3 93.9 153.1 92.1 139.5 103.4C125.9 114.7 124.1 134.9 135.4 148.5L278.3 320L135.4 491.5C124.1 505.1 125.9 525.3 139.5 536.6C153.1 547.9 173.3 546.1 184.6 532.5L320 370L455.4 532.5C466.7 546.1 486.9 547.9 500.5 536.6C514.1 525.3 515.9 505.1 504.6 491.5L361.7 320L504.6 148.5z"/></svg>')
    center/contain no-repeat;
  -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M504.6 148.5C515.9 134.9 514.1 114.7 500.5 103.4C486.9 92.1 466.7 93.9 455.4 107.5L320 270L184.6 107.5C173.3 93.9 153.1 92.1 139.5 103.4C125.9 114.7 124.1 134.9 135.4 148.5L278.3 320L135.4 491.5C124.1 505.1 125.9 525.3 139.5 536.6C153.1 547.9 173.3 546.1 184.6 532.5L320 370L455.4 532.5C466.7 546.1 486.9 547.9 500.5 536.6C514.1 525.3 515.9 505.1 504.6 491.5L361.7 320L504.6 148.5z"/></svg>')
    center/contain no-repeat;
}

.stw-algolia-search__reset-btn:hover {
  opacity: 0.8;
}

.stw-algolia-search__reset-btn--hidden {
  visibility: hidden;
  pointer-events: none;
}

.stw-algolia-search__panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border: 1px solid #edf0f3;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  background: #fff;
  z-index: 20;
  max-height: 420px;
  overflow: auto;
}

.stw-algolia-search__post-type {
  border: 1px solid #d5d7dc;
  border-radius: 8px;
  background: #fff;
  color: #1a1a1a;
  min-height: 44px;
  padding: 10px 14px;
  width: 180px;
}

.stw-algolia-search__post-type[hidden] {
  display: none !important;
}

.stw-algolia-search__footer[hidden] {
  display: none !important;
}

.stw-tutorials-content {
  position: relative;
}

.stw-algolia-search__thumb {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  background: #F3F3F5;
  border: 4px solid #F3F3F5 !important;
  border-radius: 10px !important;
}

.stw-algolia-search__content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stw-algolia-search__title {
  font-weight: 600;
  line-height: 1.3;
  color: #111827;
}

.stw-algolia-search__excerpt {
  font-size: 0.92rem;
  line-height: 1.4;
  color: #4b5563;
}

.stw-algolia-search__item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  border-bottom: 1px solid #edf0f3;
  padding: 0 24px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  min-height: 92px;
  align-items: center;
  text-decoration: none !important;
}

.stw-algolia-search__item:last-child {
  border-bottom: 0;
}

.stw-algolia-search__item.is-active,
.stw-algolia-search__item:hover {
  background: #F3F3F5;
}

.stw-algolia-search__badge {
  white-space: nowrap;
  font-family: "Inter", Sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 26px;
  color: #000000;
  padding: 0 13px;
  border-style: solid;
  border-width: 1px;
  border-radius: 50px;
  align-self: center;
}

.stw-algolia-search__badge--tutorial {
  background-color: #f3e8ff;
  border-color: #e9d4ff;
}

.stw-algolia-search__badge--blog {
  background-color: #e8efff;
  border-color: #bdd1ff;
}

.stw-algolia-search__state {
  border-radius: 10px;
  color: #6b7280;
  padding: 14px;
}

.stw-algolia-search em {
  font-style: normal;
  background: #fff4bf;
}

@media (max-width: 767px) {
  .stw-algolia-search__controls {
    flex-direction: column;
  }

  .stw-algolia-search__autocomplete,
  .stw-algolia-search__post-type {
    width: 100%;
  }

  .stw-algolia-search__autocomplete::before {
    left: 8px;
  }

  .stw-algolia-search__input {
    border-radius: 6px !important;
    height: 40px !important;
    line-height: 40px;
    padding-left: 32px !important;
    padding-right: 36px !important;
  }

  .stw-algolia-search__input--active {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  .stw-algolia-search__reset-btn {
    right: 8px;
  }

  .stw-algolia-search__item {
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: flex-start;
    gap: 8px 12px;
    padding: 12px 12px;
  }

  .stw-algolia-search__thumb {
    width: 46px;
    height: 46px;
  }

  .stw-algolia-search__badge {
    grid-column: 2;
    justify-self: start;
    margin-top: 2px;
  }
}

/* Footer */
.stw-algolia-search__footer {
  position: absolute;
  width: 100%;
  top: 0;
  z-index: 3;
  display: block;
  background: #F9F9F9;
  border-top: 1px solid #E5E5E5;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  box-shadow: 0px 25px 50px -12px #00000040;
  height: 50px;  
  font-family: Inter;
  font-weight: 400;
  font-size: 12px;
  line-height: 18px; 
}


@media (max-width: 767px) {
  .stw-algolia-search__footer {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    height: 40px;
  }
}

.stw-algolia-search__footer-left {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 24px;
  gap: 16px;
}

.stw-algolia-search__kbd-group {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  top: -1px;
}

.stw-tutorials-content.stw-tutorials-content--search-active::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: rgba(0, 0, 0, .8);
}

.stw-algolia-search__footer .stw-algolia-search__kbd {
  height: 26px;
  display: inline-flex;
  min-width: 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid #E5E5E5;
  background: #fff;
  border-radius: 4px;
}

.stw-algolia-search__footer .stw-algolia-search__kbd span {
  padding: 0 8px;
}

.stw-algolia-search__footer .stw-algolia-search__kbd svg {
  max-width: 16px;
}

.stw-algolia-search__footer .stw-algolia-search__kbd svg path {
  fill: #717182;
}

.stw-algolia-search__footer .stw-algolia-search__kbd-group span {
  color: #717182;
}

