/* Cosa Cena v2 — search screen styles */

/* ── Close button (top-right of header, exits search) ─────────────────────── */
.search-close-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--sand-mid);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown-mid);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease;
}

.search-close-btn:active {
  background: var(--sand);
}

.search-close-btn svg {
  width: 12px;
  height: 12px;
}

/* ── Search input bar ─────────────────────────────────────────────────────── */
.search-bar {
  background: var(--white);
  padding: 12px 20px 14px;
  border-bottom: 1px solid var(--sand);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1.5px solid var(--sand-mid);
  border-radius: 24px;
  padding: 8px 14px;
  transition: border-color 0.15s ease;
}

.search-input-wrap:focus-within {
  border-color: var(--terracotta);
}

.search-input-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  color: var(--brown);
  outline: none;
  min-width: 0;
  -webkit-appearance: none; /* suppress native clear button on type="text" in Safari */
}

.search-input::placeholder {
  color: var(--muted);
}

/* ── Did you mean? suggestion ─────────────────────────────────────────────── */
.search-suggestion {
  margin-top: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.search-suggestion:hover .search-suggestion-word,
.search-suggestion:active .search-suggestion-word {
  text-decoration: underline;
}

.search-suggestion-word {
  font-weight: 600;
  color: var(--terracotta);
}

.search-clear-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.search-clear-btn svg {
  width: 14px;
  height: 14px;
}

/* ── Chips (committed search tokens) ─────────────────────────────────────── */
.search-chips {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.search-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--terracotta);
  color: var(--white);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 4px 8px 4px 11px;
  border-radius: 20px;
  cursor: default;
}

.search-chip-remove {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--white);
  opacity: 0.75;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.search-chip-remove svg {
  width: 8px;
  height: 8px;
}

/* ── Results meta line ────────────────────────────────────────────────────── */
.search-meta {
  padding: 10px 20px 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Results list ─────────────────────────────────────────────────────────── */
.search-results {
  padding: 6px 20px 20px;
}

/* ── Empty / prompt states ────────────────────────────────────────────────── */
.search-prompt {
  padding: 48px 20px;
  text-align: center;
}

.search-prompt-icon {
  font-size: 32px;
  margin-bottom: 14px;
}

.search-prompt-title {
  font-family: 'Lora', serif;
  font-size: 18px;
  color: var(--brown);
  margin-bottom: 6px;
}

.search-prompt-body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Loading state ────────────────────────────────────────────────────────── */
.search-loading {
  padding: 60px 20px;
  text-align: center;
}
