.tab-search-form {
  display: flex;
  position: relative;
  width: 38px;
  height: 38px;
  margin: 0 0 0 auto;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color, #ccc) !important;
  border-radius: 999px;
  background: var(--bg-container-small, #fff);
  overflow: hidden;
  cursor: text;
  flex-shrink: 0;
}

.tab-search-form.expanded,
.tab-search-form:focus-within {
  width: min(250px, 40vw);
  border: 1px solid var(--primary, #d4af37) !important;
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.15);
}

.tab-search-form .bx-search {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  pointer-events: none;
}

.tab-search-form .search-button {
  position: absolute;
  top: 50%;
  left: 8px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  margin: 0;
  padding: 0;
  cursor: pointer;
  border: none;
  outline: none !important;
  background: none;
  z-index: 2;
}

.tab-search-form .search-button svg {
  width: 20px;
  height: 20px;
  fill: var(--text-color, #5a6674);
}

.tab-search-form .search-input {
  position: absolute;
  font-size: 14px;
  top: 0;
  left: 36px;
  width: calc(100% - 46px);
  height: 100%;
  color: var(--text-color);
  border: none;
  outline: none;
  background: transparent;
  appearance: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tab-search-form.expanded .search-input,
.tab-search-form:focus-within .search-input {
  opacity: 1;
}

@media (max-width: 600px) {
  .tab-search-form {
    order: -1;
  }

  .tab-search-form.expanded,
  .tab-search-form:focus-within {
    width: 100%;
  }
}
