/* ============================================================
   wiki-common.css — Shared wiki page styles
   Used by: worldmap, items, monsters
   Depends on: common.css (CSS variables)
   ============================================================ */

/* ─── Search bar ─────────────────────────────────────────────── */
.wiki-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.wiki-search-bar input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border 0.2s;
}
.wiki-search-bar input:focus {
  border-color: var(--gold);
}
.wiki-search-bar select {
  padding: 8px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.8rem;
}

/* ─── Filter buttons (pill group) ────────────────────────────── */
.wiki-filter-btns {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.wiki-filter-btn {
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.2s;
}
.wiki-filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.wiki-filter-btn.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  font-weight: 600;
}

/* ─── Pagination ─────────────────────────────────────────────── */
.wiki-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}
.wiki-pagination button {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.wiki-pagination button:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.wiki-pagination button.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}
.wiki-pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ─── Stats table (2-column, alternating rows) ───────────────── */
.wiki-stats-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.wiki-stats-table th {
  text-align: left;
  padding: 6px 10px;
  font-size: 0.7rem;
  color: var(--text3);
  text-transform: uppercase;
  background: var(--bg3);
}
.wiki-stats-table td {
  text-align: left;
  padding: 6px 10px;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(48,54,61,0.3);
}
.wiki-stats-table tr:nth-child(even) td {
  background: rgba(28,35,51,0.3);
}

/* ─── Section title ──────────────────────────────────────────── */
.wiki-section-title {
  color: var(--gold2);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 16px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
}

/* Type badges (solid background) */
.badge-town    { background: rgba(63,185,80,0.2);   color: var(--green); }
.badge-field   { background: rgba(88,166,255,0.2);  color: var(--blue); }
.badge-dungeon { background: rgba(248,81,73,0.2);   color: var(--red); }
.badge-normal  { background: rgba(139,148,158,0.2); color: var(--text2); }
.badge-miniboss{ background: rgba(188,140,255,0.2); color: var(--purple); }
.badge-mvp     { background: rgba(212,168,67,0.25); color: var(--gold2); font-weight: 700; }

/* Zone badges (outline style) */
.badge-safezone {
  background: transparent;
  border: 1px solid var(--green);
  color: var(--green);
}
.badge-pk {
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
}

/* ─── Monster mini (inline sprite + name + level) ────────────── */
.wiki-monster-mini {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px;
  background: var(--bg3);
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}
.wiki-monster-mini:hover {
  border-color: var(--gold);
}
.wiki-monster-mini img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.wiki-monster-mini span {
  font-size: 0.65rem;
  color: var(--text2);
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* ─── Drop rate bar ──────────────────────────────────────────── */
.drop-rate-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.drop-rate-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--bg4);
  border-radius: 3px;
  overflow: hidden;
  min-width: 40px;
}
.drop-rate-fill {
  height: 6px;
  border-radius: 3px;
  background: var(--gold);
  min-width: 2px;
}
.drop-rate-val {
  font-size: 0.72rem;
  color: var(--text2);
  min-width: 50px;
}
