/* "Ask anything else?" — Apple-style in-panel chat (2026-09-20).
   iMessage language: blue user bubbles, gray bot bubbles, the three-dot
   typing indicator, a signature light-gray field with a blue circle send
   button, input at the bottom like a real chat. Flat colors, hairlines,
   no gradients, no heavy shadows.
   The item itself stays a plain .faq-list details, identical to its
   siblings: nothing here touches the details or summary. */
.faq-ask-chat {
  max-width: none;
  /* Fill the FAQ card end to end — no dead space on the right. */
  margin: -7px 0 30px;
  display: flex;
  flex-direction: column;
}
.faq-ask-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.faq-ask-thread:empty {
  margin-bottom: 0;
}
/* User question: blue bubble, right. */
.faq-ask-q {
  align-self: flex-end;
  max-width: min(82%, 560px);
  margin: 0;
  padding: 9px 16px;
  border-radius: 19px;
  border-bottom-right-radius: 5px;
  background: #0071e3;
  color: #fff;
  font-size: 16px;
  line-height: 1.45;
  animation: faq-ask-in 0.25s ease-out;
}
/* Bot answer: gray bubble, left. */
.faq-ask-a {
  align-self: flex-start;
  max-width: min(88%, 640px);
  padding: 11px 17px;
  border-radius: 19px;
  border-bottom-left-radius: 5px;
  background: #f5f5f7;
  animation: faq-ask-in 0.25s ease-out;
}
/* Beats .faq-list details p (0,2,1 vs 0,1,2). */
.faq-list .faq-ask-a p {
  margin: 0 0 8px;
  color: #1d1d1f;
  font-size: 16px;
  line-height: 1.5;
}
.faq-list .faq-ask-a p:last-child {
  margin-bottom: 0;
}
.faq-list .faq-ask-a a {
  color: #0071e3;
}
/* Typing indicator: three dots in a gray bubble. */
.faq-ask-row {
  font-size: 16px;
  line-height: 1.5;
}
.faq-ask-loading {
  align-self: flex-start;
  padding: 14px 18px;
  border-radius: 19px;
  border-bottom-left-radius: 5px;
  background: #f5f5f7;
}
.faq-ask-dots {
  display: inline-flex;
  gap: 5px;
}
.faq-ask-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8e8e93;
  animation: faq-dot 1.2s infinite ease-in-out;
}
.faq-ask-dots i:nth-child(2) { animation-delay: 0.15s; }
.faq-ask-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes faq-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
/* Failure: quiet centered note, not a bubble. */
.faq-ask-error {
  align-self: center;
  padding: 4px 0;
  color: #6e6e73;
  font-size: 14px;
  text-align: center;
}
/* Input row: gray field + blue circle send, like iMessage. */
.faq-ask-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.faq-ask-form input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 24px;
  background: #f5f5f7;
  color: #1d1d1f;
  font-size: 16px;
  outline: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-ask-form input::placeholder {
  color: #86868b;
}
.faq-ask-form input:focus {
  background: #fff;
  border-color: #d2d2d7;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}
.faq-ask-form input:disabled {
  opacity: 0.6;
}
.faq-ask-form button {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #0071e3;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}
.faq-ask-form button:hover:not(:disabled) {
  background: #0077ed;
}
.faq-ask-form button:active:not(:disabled) {
  transform: scale(0.93);
}
.faq-ask-form button:disabled {
  background: #e8e8ed;
  color: #aeaeb2;
  cursor: default;
}
.faq-ask-form button svg {
  width: 18px;
  height: 18px;
  display: block;
}
/* Gentle entrance for new bubbles. */
@keyframes faq-ask-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 640px) {
  .faq-ask-chat { margin: -7px 0 30px; }
  .faq-ask-q { max-width: 88%; }
  .faq-ask-a { max-width: 94%; }
  .faq-ask-form input { font-size: 16px; }
  .faq-ask-q,
  .faq-list .faq-ask-a p,
  .faq-ask-row { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .faq-ask-dots i,
  .faq-ask-q,
  .faq-ask-a { animation: none; }
}
