.sc-live-search-wrap {
  position: relative;
  width: 100%;
}

.sc-live-search-form {
  position: relative;
  z-index: 2;
}

.sc-live-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  background: #ffffff;
  color: #111;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  z-index: 1000;
  max-height: 70vh;
  overflow-y: auto;
}

.sc-live-search-inner {
  padding: 10px;
}

.sc-live-search-group + .sc-live-search-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(5, 30, 114, 0.08);
}

.sc-live-search-group-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #051e72;
  margin: 0 0 8px;
  padding: 0 6px;
}

.sc-live-search-group-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sc-live-search-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #111;
  transition: background 0.18s ease;
}

.sc-live-search-item:hover {
  background: #f3f6fc;
  color: #111;
}

.sc-live-search-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sc-live-search-title {
  font-weight: 700;
  line-height: 1.3;
}

.sc-live-search-excerpt {
  font-size: 13px;
  line-height: 1.4;
  color: #555;
  margin-top: 2px;
}

.sc-live-search-badge {
  flex: 0 0 auto;
  display: inline-block;
  min-width: 56px;
  text-align: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.sc-live-search-badge.sc-type-yada_wiki {
  background: #051e72;
  color: #fff;
}

.sc-live-search-badge.sc-type-post {
  background: #a60304;
  color: #fff;
}

.sc-live-search-badge.sc-type-sonic_event {
  background: #feeb4a;
  color: #051e72;
}

.sc-live-search-badge.sc-type-topic,
.sc-live-search-badge.sc-type-forum,
.sc-live-search-badge.sc-type-reply {
  background: #e7edf8;
  color: #051e72;
}

.sc-live-search-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(5, 30, 114, 0.08);
}

.sc-live-search-view-all {
  width: 100%;
  border: none;
  background: #051e72;
  color: #fff;
  font-weight: 800;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.sc-live-search-view-all:hover {
  background: #0a2d95;
}

.sc-live-search-empty {
  padding: 14px;
  font-size: 14px;
  color: #555;
}

.mobile-search .sc-live-search-results {
  top: calc(100% + 8px);
}

.sc-live-search-item.is-active,
.sc-live-search-item:hover {
  background: #f3f6fc;
  color: #111;
}

.sc-live-search-view-all.is-active,
.sc-live-search-view-all:hover {
  background: #0a2d95;
}

.sc-live-search-view-all.is-active {
  outline: 2px solid rgba(254, 235, 74, 0.65);
  outline-offset: 2px;
}

.sc-live-search-mark {
  background: rgba(254, 235, 74, 0.55);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}

@media (max-width: 959px) {
  .sc-live-search-results {
    max-height: 50vh;
  }

  .sc-live-search-item {
    padding: 9px;
  }

  .sc-live-search-title {
    font-size: 14px;
  }

  .sc-live-search-excerpt {
    font-size: 12px;
  }
}


/* Sonic City Unified Search v5.0.1 result types */
.sc-live-search-badge.sc-type-shop_item{color:#fff;background:#d77900}
.sc-live-search-badge.sc-type-sonic_music_archive,.sc-live-search-badge.sc-type-music_album{color:#fff;background:#7135c5}
.sc-live-search-badge.sc-type-sonic_video_archive,.sc-live-search-badge.sc-type-video{color:#fff;background:#126f8d}
.sc-live-search-badge.sc-type-sonic_art_archive,.sc-live-search-badge.sc-type-artwork{color:#fff;background:#a12b75}

/* Sonic City Unified Search v5.0.8
   Mobile header search input text correction.
   The header field uses type="search", while the legacy rule only targeted type="text". */
.mobile-search input[type="search"],
.mobile-search .sc-live-search-form input[type="search"] {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff !important;
}

.mobile-search input[type="search"]::placeholder,
.mobile-search .sc-live-search-form input[type="search"]::placeholder {
  color: rgba(255,255,255,.7) !important;
  -webkit-text-fill-color: rgba(255,255,255,.7) !important;
  opacity: 1 !important;
}

.mobile-search input[type="search"]:-webkit-autofill,
.mobile-search input[type="search"]:-webkit-autofill:hover,
.mobile-search input[type="search"]:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff !important;
  transition: background-color 9999s ease-out 0s;
}
