/* ============================================
   SEARCH FEATURE — Dark Gold Theme
   ============================================ */

/* ── HEADER SEARCH BAR ──────────────────────────────────────────────── */
.header-search { margin-left: 1.5rem; }
.header-search-wrap { position: relative; display: flex; align-items: center; }

.header-search-icon {
  position: absolute;
  left: 0.6rem;
  width: 16px; height: 16px;
  color: rgba(232,184,122,0.4);
  pointer-events: none;
  flex-shrink: 0;
}
.header-search-input {
  background: rgba(232,184,122,0.07);
  border: 1px solid rgba(232,184,122,0.2);
  border-radius: 20px;
  color: var(--text);
  font-family: var(--font-hi);
  font-size: 0.85rem;
  height: 34px;
  padding: 0 1rem 0 2.1rem;
  width: 200px;
  transition: width 0.3s ease, background 0.2s, border-color 0.2s;
  outline: none;
}
.header-search-input::placeholder { color: rgba(232,184,122,0.35); }
.header-search-input:focus {
  background: rgba(232,184,122,0.12);
  border-color: rgba(232,184,122,0.45);
  width: 260px;
}
.header-search-input::-webkit-search-cancel-button { display: none; }

/* ── SEARCH PAGE ──────────────────────────────────────────────────── */
.search-page { max-width: 860px; margin: 0 auto; }
.search-main-bar { margin-bottom: 1.5rem; }

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
.search-icon {
  position: absolute;
  left: 1rem;
  width: 22px; height: 22px;
  color: var(--text-light);
  pointer-events: none;
}
.search-input-large {
  width: 100%;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font-hi);
  font-size: 1.25rem;
  padding: 0.85rem 3rem 0.85rem 3.25rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input-large:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(232,184,122,0.08);
}
.search-input-large::placeholder { color: var(--text-dim); opacity: 0.7; }
.search-input-large::-webkit-search-cancel-button { display: none; }

.search-clear {
  position: absolute;
  right: 0.85rem;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  transition: background 0.15s;
}
.search-clear:hover { background: var(--border-light); color: var(--text); }

/* Filter buttons */
.search-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.filter-label { color: var(--text-light); font-size: 0.85rem; margin-right: 0.25rem; }
.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  color: var(--text-light);
  cursor: pointer;
  font-family: var(--font-hi);
  font-size: 0.82rem;
  padding: 0.25rem 0.9rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-btn:hover { border-color: var(--gold-dim); color: var(--gold); }
.filter-btn.active { background: #3b0a0a; border-color: var(--border-light); color: var(--gold); }

/* Stats bar */
.search-stats {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  min-height: 1.2em;
  font-family: var(--font-en);
}

/* ── RESULT CARDS ─────────────────────────────────────────────────── */
.search-results { display: flex; flex-direction: column; gap: 0.85rem; }

.search-result-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
}
.search-result-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transform: translateY(-1px);
  border-color: var(--border-light);
}

.result-type-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-family: var(--font-en);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
  font-weight: 600;
  text-transform: uppercase;
}
.poem-badge {
  background: rgba(232,184,122,0.08);
  color: var(--gold-dim);
  border: 1px solid rgba(232,184,122,0.2);
}
.poet-badge {
  background: rgba(180,120,80,0.1);
  color: var(--gold-dim);
  border: 1px solid rgba(180,120,80,0.25);
}

.result-title  { font-size: 1.15rem; color: var(--gold); margin-bottom: 0.4rem; line-height: 1.4; }
.result-poet   { font-size: 0.88rem; color: var(--text-light); margin-bottom: 0.35rem; }
.result-form   { font-size: 0.82rem; color: var(--text-light); margin-bottom: 0.35rem; }
.result-meta   { font-size: 0.83rem; color: var(--text-light); margin-bottom: 0.25rem; font-family: var(--font-en); }
.result-themes { margin-top: 0.5rem; margin-bottom: 0.4rem; }
.result-snippet {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-top: 0.6rem;
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
  font-style: italic;
}

.search-result-card mark {
  background: rgba(232,184,122,0.15);
  color: var(--gold);
  font-weight: bold;
  border-radius: 2px;
  padding: 0 1px;
}

/* ── EMPTY / NO RESULTS ────────────────────────────────────────────── */
.search-empty, .search-no-results {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-light);
}
.search-empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.search-empty p, .search-no-results p { margin-bottom: 0.4rem; font-size: 1rem; }
.search-empty .en, .search-no-results .en { font-size: 0.9rem; opacity: 0.6; }
.hidden { display: none !important; }

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .header-search { display: none; }
  .search-input-large { font-size: 1rem; padding: 0.75rem 2.75rem 0.75rem 3rem; }
}
