/* explore.css — Explore tab search bar and result rows. */

/* Search / Explore UI */
.search-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 0;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.search-bar:focus-within {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.search-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.5;
  color: inherit;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: inherit;
  font-family: "Noto Sans", sans-serif;
  font-size: 14px;
  line-height: 1;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

body.light-mode .search-bar {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

body.light-mode .search-bar:focus-within {
  border-color: rgba(0, 0, 0, 0.22);
}

body.light-mode .search-input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font-family: "Noto Sans", sans-serif;
  opacity: 0;
  transform: translateY(-8px);
  animation: searchItemIn 420ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

@keyframes searchItemIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-result-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.search-result-icon svg {
  width: 18px;
  height: 18px;
}

.search-result-text {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}

.search-result-desc {
  font-size: 12px;
  opacity: 0.6;
  line-height: 1.3;
  margin-top: 2px;
}

.search-result-path {
  font-size: 11px;
  opacity: 0.4;
  font-family: "Source Code Pro", monospace;
  flex-shrink: 0;
}

.search-result-arrow {
  width: 16px;
  height: 16px;
  opacity: 0.3;
  flex-shrink: 0;
  transition: opacity 200ms ease, transform 200ms ease;
}

.search-result-item:hover .search-result-arrow {
  opacity: 0.7;
  transform: translateX(2px);
}

.search-empty {
  text-align: center;
  padding: 24px;
  opacity: 0.4;
  font-size: 13px;
}

body.light-mode .search-result-icon {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .search-result-item:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.14);
}
