:root {
  --search-bg: #ffffff;
  --search-border: rgba(26, 26, 26, 0.12);
  --search-panel: #ffffff;
  --search-accent: rgba(191, 161, 129, 0.6);
}

.service-search-panel {
  width: 100%;
  max-width: 560px;
  margin-top: 0.75rem;
}

.service-search-source {
  display: none;
}

.service-search {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 0;
  background: var(--search-bg);
  border: 1px solid var(--search-border);
  box-shadow: 0 18px 40px rgba(26, 26, 26, 0.12);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0;
  background: #f5f0eb;
  border: 1px solid rgba(26, 26, 26, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.search-input-wrap:focus-within {
  border-color: var(--search-accent);
  box-shadow: 0 0 0 3px rgba(191, 161, 129, 0.22);
  transform: translateY(-1px);
}

.search-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(26, 26, 26, 0.6);
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background: rgba(26, 26, 26, 0.6);
  right: -6px;
  bottom: -4px;
  transform: rotate(45deg);
  border-radius: 999px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #1a1a1a;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
}

.search-input::placeholder {
  color: rgba(107, 100, 96, 0.7);
}

.search-clear {
  width: 28px;
  height: 28px;
  border-radius: 0;
  border: none;
  background: rgba(26, 26, 26, 0.08);
  color: #1a1a1a;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.search-clear:hover {
  background: rgba(26, 26, 26, 0.15);
}

.service-search.has-query .search-clear {
  opacity: 1;
  transform: scale(1);
}

.search-results {
  display: none;
  padding: 0.75rem;
  border-radius: 0;
  background: var(--search-panel);
  border: 1px solid var(--search-border);
  box-shadow: 0 18px 34px rgba(26, 26, 26, 0.12);
  animation: search-fade 0.25s ease;
}

.service-search.has-query .search-results {
  display: block;
}

.search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(107, 100, 96, 0.8);
  margin-bottom: 0.5rem;
}

.search-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.search-item,
.search-empty {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0;
  background: #faf8f5;
  border: 1px solid rgba(26, 26, 26, 0.08);
  color: #1a1a1a;
  text-decoration: none;
  min-height: 48px;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.search-item:hover,
.search-item:focus-visible {
  background: rgba(191, 161, 129, 0.18);
  border-color: rgba(191, 161, 129, 0.45);
  transform: translateY(-1px);
}

.search-item-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.search-item-desc {
  font-size: 0.85rem;
  color: rgba(107, 100, 96, 0.8);
}

.search-item-meta {
  font-size: 0.75rem;
  color: rgba(107, 100, 96, 0.65);
}

.search-empty {
  text-align: center;
  color: rgba(107, 100, 96, 0.75);
}

.is-filtered {
  display: none;
}

@keyframes search-fade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .service-search-panel {
    max-width: 100%;
  }

  .service-search {
    padding: 0.75rem;
  }

  .search-input {
    font-size: 0.95rem;
  }

  .search-item {
    padding: 0.75rem;
  }
}
