/* diary/ask.css — 問問過去的我 styles, owned by fe-ask. Deliberately quiet/secondary:
 * the diary below is the hero. Tokens come from diary.css :root (台灣風土 palette). */

.ask { margin: 2px 0 18px; }

/* ---- the single quiet input ---------------------------------------------------------------- */
.askForm { display: flex; align-items: center; gap: 8px; }

.askInput {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.92rem;
}
.askInput::placeholder { color: var(--faint); font-family: var(--kai); letter-spacing: 0.03em; }
.askInput:focus { outline: none; border-color: var(--brand); }

.askBtn {
  flex: none;
  min-width: 40px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--kai);
  font-size: 0.95rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.askBtn:hover { color: var(--brand); border-color: var(--brand); }
.askBtn:active { transform: scale(0.96); }

.askBusy .askInput,
.askBusy .askBtn { opacity: 0.55; cursor: default; }

/* ---- answer block ---------------------------------------------------------------------------- */
.askOut {
  margin-top: 10px;
  padding: 10px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.6);   /* --surface, washed — sits back from the diary cards */
  font-size: 0.9rem;
}

.askQ {
  color: var(--faint);
  font-family: var(--kai);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.askQ::before { content: "你問："; }

.askAnswer { color: var(--text); line-height: 1.65; white-space: pre-wrap; }
.askAnswer.askPending { color: var(--muted); animation: askThink 1.4s ease-in-out infinite; }

@keyframes askThink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---- citation chips 「來自 M/D →」 ------------------------------------------------------------- */
.askCites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.askCites:empty { display: none; }

.askCite {
  min-height: 30px;
  padding: 3px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--link);
  font-family: var(--sans);
  font-size: 0.8rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.askCite:hover { color: var(--text); border-color: var(--brand); }
.askCite:active { transform: scale(0.96); }

@media (prefers-reduced-motion: reduce) {
  .askBtn, .askCite { transition: none; }
  .askBtn:active, .askCite:active { transform: none; }
  .askAnswer.askPending { animation: none; }
}
