.tgx-live-search {
  position: relative;
}

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

.tgx-search-leading-icon,
.tgx-search-leading-icon-wrap {
  position: absolute;
  left: 14px;
  top: 50%;
  bottom: auto;
  z-index: 2;
  color: #64748B;
  transform: translateY(-50%);
  pointer-events: none;
}

.tgx-search-leading-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.tgx-search-leading-icon-wrap svg {
  width: 18px;
  height: 18px;
}

.tgx-search-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 14px;
  line-height: 1.4;
  padding: 0 44px 0 42px;
  outline: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.tgx-search-input::-webkit-search-cancel-button {
  display: none;
}

.tgx-search-input::placeholder {
  color: #94A3B8;
}

.tgx-search-input:focus {
  border-color: rgba(37, 99, 235, .55);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.tgx-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  color: #64748B;
  background: #F1F5F9;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color .16s ease, background .16s ease;
}

.tgx-search-clear:hover,
.tgx-search-clear:focus-visible {
  color: #0F172A;
  background: #E2E8F0;
  outline: none;
}

.tgx-live-search .hidden {
  display: none !important;
}

.tgx-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 80;
  max-height: min(420px, 70vh);
  overflow-y: auto;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  background: #FFFFFF;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
  padding: 8px;
}

#desktop-search-root .tgx-search-results {
  left: auto;
  right: 0;
  width: min(360px, calc(100vw - 32px));
}

.tgx-search-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  border-radius: 14px;
  padding: 10px;
  color: #0F172A;
  text-decoration: none;
  outline: none;
  transition: background .16s ease, transform .16s ease;
}

.tgx-search-item:hover,
.tgx-search-item:focus-visible,
.tgx-search-item.is-active {
  background: #F1F5F9;
}

.tgx-search-item:active {
  transform: translateY(1px);
}

.tgx-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  color: #2563EB;
  background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(6, 182, 212, .12));
}

.tgx-search-title {
  display: -webkit-box;
  color: #0F172A;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tgx-search-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: #64748B;
  font-size: 12px;
  line-height: 1.35;
}

.tgx-search-excerpt {
  display: -webkit-box;
  margin-top: 4px;
  color: #475569;
  font-size: 12.5px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tgx-search-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #EFF6FF;
  color: #2563EB;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 4px 7px;
}

.tgx-search-empty,
.tgx-search-loading,
.tgx-search-error {
  padding: 14px;
  color: #64748B;
  font-size: 14px;
  line-height: 1.5;
}

.tgx-search-error {
  color: #B45309;
}

@media (max-width: 640px) {
  .tgx-search-input {
    min-height: 44px;
    font-size: 14px;
  }

  .tgx-search-results {
    max-height: min(360px, 62vh);
    border-radius: 16px;
  }

  .tgx-search-title {
    font-size: 13.5px;
  }
}
