/* === Stardew Valley Item Lookup === */

:root {
  --fx: #4a8fb5;          /* lookup blue */
  --fx-dark: #2f6a8a;
  --fx-bg: #e6f1f7;
  --gold: #d9a93a;
}

main { max-width: 860px; }

/* --- Search --- */
.fx-search {
  width: 100%;
  padding: 0.8rem 1rem;
  margin-bottom: 0.9rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  font: inherit;
  font-size: 1.02rem;
  background: var(--card);
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.fx-search:focus { outline: none; border-color: var(--fx); }

.fx-suggest { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem; }
.fx-chip {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
}
.fx-chip:hover { border-color: var(--fx); color: var(--fx-dark); background: var(--fx-bg); transform: none; }
.fx-chip.picked { border-color: var(--fx); background: var(--fx-bg); color: var(--fx-dark); }
.fx-suggest-label { align-self: center; font-size: 0.84rem; color: var(--muted); font-weight: 600; margin-right: 0.15rem; }

/* --- Result head --- */
.fx-head { margin: 0 0 1rem; }
.fx-name {
  margin: 0;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  font-size: 1.9rem;
  color: var(--fx-dark);
}
.fx-roles { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; }
.fx-role {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--fx-dark);
  background: var(--fx-bg);
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
}

/* --- Facet cards --- */
.fx-facet {
  margin-bottom: 0.7rem;
  padding: 0.8rem 1rem 0.85rem;
  background: var(--card);
  border: 2px solid var(--border);
  border-left: 5px solid var(--fx);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.fx-facet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.fx-facet-title {
  margin: 0;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--fx-dark);
}
.fx-goto {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--fx);
  text-decoration: none;
  white-space: nowrap;
}
.fx-goto:hover { text-decoration: underline; }

.fx-rows { display: flex; flex-direction: column; gap: 0.3rem; }
.fx-row { font-size: 0.93rem; line-height: 1.45; }
.fx-row b { color: var(--ink); }
.fx-dim { color: var(--muted); }
.fx-val { font-weight: 800; color: var(--fx-dark); }

/* price pills */
.fx-prices { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.15rem; }
.fx-price {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.16rem 0.55rem;
  border-radius: 8px;
  border: 2px solid var(--border);
  color: var(--ink);
  background: var(--card);
}
.fx-price span { color: var(--muted); font-weight: 600; margin-right: 0.25rem; }

/* gift tiers */
.fx-tier { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: baseline; }
.fx-tier-name { font-size: 0.76rem; font-weight: 800; padding: 0.1rem 0.5rem; border-radius: 999px; white-space: nowrap; }
.t-love { background: #ffe0ea; color: #a3325a; }
.t-like { background: #e4f4dd; color: #40702f; }
.t-dislike { background: #fdeedd; color: #96541b; }
.t-hate { background: #fbdcdc; color: #963232; }
.t-neutral { background: #ececf3; color: #5c5c6e; }

.fx-empty { color: var(--muted); padding: 1.4rem 0; text-align: center; }
@media (max-width: 520px) {
  .fx-name { font-size: 1.55rem; }
}

/* ==== Dark mode: re-tint the local palette (same approach as the other pages) ==== */
html.dark {
  --fx-bg: rgba(74, 143, 181, 0.20);
  --fx-dark: #8ec6e4;
  --fx: #5fa3c7;
  --gold: #e6c25c;
}
/* Gift tier chips are hardcoded light pastels — re-tint for dark surfaces. */
html.dark .t-love    { background: rgba(214, 51, 108, 0.22); color: #f3a9c4; }
html.dark .t-like    { background: rgba(90, 158, 75, 0.22);  color: #a8d998; }
html.dark .t-dislike { background: rgba(200, 120, 40, 0.22); color: #e8b782; }
html.dark .t-hate    { background: rgba(200, 60, 60, 0.22);  color: #ee9d9d; }
html.dark .t-neutral { background: rgba(140, 140, 165, 0.22); color: #c3c3d2; }
