/* ===== YOICHI DISH SEARCH COMPONENT ===== */
.dish-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.dish-search-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line, #c8dde8);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.25s ease;
  color: var(--text-soft, #6f6455);
}
.dish-search-btn:hover {
  background: #e8f1f8;
  color: var(--primary, #7EB8D8);
  border-color: rgba(126,184,216,0.4);
}
.dish-search-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(43, 36, 27, 0.55);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.search-overlay.active {
  display: flex;
  opacity: 1;
}
.search-modal {
  width: min(680px, calc(100% - 32px));
  max-height: 72vh;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(12px);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.search-overlay.active .search-modal {
  transform: translateY(0);
}

/* Search Input Bar */
.search-input-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line, #c8dde8);
}
.search-input-bar svg {
  width: 22px;
  height: 22px;
  fill: var(--primary, #7EB8D8);
  flex-shrink: 0;
}
.search-input-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.15rem;
  font-family: inherit;
  color: var(--text, #2b241b);
  background: transparent;
}
.search-input-bar input::placeholder {
  color: var(--text-soft, #6f6455);
  opacity: 0.7;
}
.search-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line, #c8dde8);
  background: #f0f7fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-soft, #6f6455);
  flex-shrink: 0;
  transition: 0.2s ease;
}
.search-close-btn:hover {
  background: #e8f1f8;
  color: var(--primary, #7EB8D8);
}

/* Results Area */
.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  scrollbar-width: thin;
}
.search-results::-webkit-scrollbar { width: 6px; }
.search-results::-webkit-scrollbar-thumb { background: #dfc79b; border-radius: 999px; }

/* No results */
.search-no-results {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-soft, #6f6455);
}
.search-no-results .emoji {
  font-size: 2.4rem;
  margin-bottom: 12px;
}
.search-no-results p {
  margin: 0;
  font-size: 1.05rem;
}

/* Initial state */
.search-initial {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-soft, #6f6455);
}
.search-initial .emoji {
  font-size: 2rem;
  margin-bottom: 10px;
}
.search-initial p {
  margin: 0;
  font-size: 0.95rem;
}

/* Result Cards */
.dish-result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.dish-result-card {
  display: flex;
  gap: 16px;
  padding: 14px;
  border-radius: 20px;
  background: var(--surface-alt, #f0f7fb);
  border: 1px solid rgba(200,221,232,0.6);
  cursor: pointer;
  transition: 0.25s ease;
  text-decoration: none;
  color: inherit;
}
.dish-result-card:hover {
  background: #fff;
  box-shadow: 0 8px 24px rgba(126,184,216,0.14);
  transform: translateY(-2px);
  border-color: rgba(126,184,216,0.3);
}
.dish-result-img {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eee;
}
.dish-result-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.dish-result-name {
  font-family: "Noto Serif TC", "Space Grotesk", serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}
.dish-result-cat {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(126,184,216,0.12);
  color: var(--primary, #7EB8D8);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 4px;
  width: fit-content;
}
.dish-result-desc {
  margin: 0;
  color: var(--text-soft, #6f6455);
  font-size: 0.88rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Highlight matched text */
.highlight {
  background: rgba(232,93,58,0.15);
  color: var(--accent, #e85d3a);
  border-radius: 3px;
  padding: 0 1px;
}

/* Result count bar */
.search-count {
  padding: 8px 14px 12px;
  font-size: 0.85rem;
  color: var(--text-soft, #6f6455);
  font-weight: 500;
  border-bottom: 1px solid rgba(200,221,232,0.4);
}

/* Keyboard hint */
.search-kbd-hint {
  text-align: center;
  padding: 10px;
  font-size: 0.78rem;
  color: var(--text-soft, #6f6455);
  border-top: 1px solid rgba(200,221,232,0.4);
  opacity: 0.7;
}
.search-kbd-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  font-family: inherit;
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 640px) {
  .search-overlay { padding-top: 6vh; }
  .search-modal { border-radius: 22px; }
  .dish-result-img { width: 64px; height: 64px; }
  .dish-result-name { font-size: 1rem; }
  .search-input-bar { padding: 14px 18px; }
}
