/* FAQ page + mock chatbot */
.faq-accordion {
  margin-top: 1rem;
}

.faq-item {
  margin-bottom: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--color-primary);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-answer {
  margin: 0;
  padding: 0 1.25rem 1rem;
  padding-top: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--color-border);
}

.faq-item[open] .faq-answer {
  padding-top: 0.75rem;
}

/* Chatbot */
.chatbot-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-bg);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.chatbot-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(245, 158, 11, 0.4);
}

.chatbot-panel {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  z-index: 998;
  width: 380px;
  max-width: calc(100vw - 2rem);
  height: 480px;
  max-height: calc(100vh - 6rem);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.96);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.chatbot-panel-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.chatbot-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.chatbot-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius);
}

.chatbot-close:hover {
  color: var(--color-text);
  background: var(--color-border);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-msg-wrap {
  display: flex;
  max-width: 90%;
}

.chat-msg-user {
  align-self: flex-end;
}

.chat-msg-user .chat-msg {
  background: var(--color-primary);
  color: var(--color-bg);
  border-radius: 1rem 1rem 0.25rem 1rem;
}

.chat-msg-bot .chat-msg {
  background: var(--color-surface-alt);
  color: var(--color-text);
  border-radius: 1rem 1rem 1rem 0.25rem;
}

.chat-msg {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
}

/* Suggestions block: clear gap after bot answer so it doesn’t run into the next prompts */
.chat-suggestions-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.chat-suggestions-block:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.chat-suggest-label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.chat-suggest-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chat-suggest-btn {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  color: var(--color-accent);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.chat-suggest-btn:hover {
  background: var(--color-surface-alt);
  border-color: var(--color-primary);
}

.chatbot-input-wrap {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.chatbot-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
}

.chatbot-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.chatbot-send {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  background: var(--color-primary);
  color: var(--color-bg);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.chatbot-send:hover {
  background: var(--color-primary-hover);
}

@media (max-width: 420px) {
  .chatbot-panel {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    bottom: 4.5rem;
  }

  .chatbot-toggle {
    right: 0.75rem;
    bottom: 1rem;
  }
}
