/* ═══════════════════════════════════════════════
   psych-qa.css  —  Psychologist Q&A Plugin
═══════════════════════════════════════════════ */

#pqa-root {
  --sage:        #7a9e87;
  --sage-light:  #b8d4c0;
  --sage-dark:   #4e7060;
  --cream:       #faf7f2;
  --warm-white:  #fff9f2;
  --ink:         #1e2a22;
  --muted:       #6b7c72;
  --border:      #dde8e0;
  --gold:        #c9a84c;

  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  max-width: 840px;
  margin: 0 auto;
  padding: 20px 0 60px;
}

/* ─── Form Card ─── */
.pqa-form-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 60px;
  position: relative;
}
.pqa-form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sage), var(--gold));
  border-radius: 16px 16px 0 0;
}

/* ─── Typography ─── */
.pqa-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
}
.pqa-section-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.65;
}

/* ─── Privacy note ─── */
.pqa-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: #edf5f0;
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 26px;
  font-size: 13px;
  color: var(--sage-dark);
  line-height: 1.55;
}
.pqa-privacy-note svg { flex-shrink: 0; margin-top: 1px; }

/* ─── Fields ─── */
.pqa-field { margin-bottom: 18px; }
.pqa-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.pqa-field label span { color: var(--muted); font-weight: 400; }
.pqa-field input,
.pqa-field textarea,
.pqa-field select {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
}
.pqa-field input:focus,
.pqa-field textarea:focus,
.pqa-field select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(122,158,135,.15);
}
.pqa-field textarea { min-height: 120px; }

.pqa-char-count {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  margin-top: 4px;
}

/* ─── Submit row ─── */
.pqa-submit-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.pqa-btn-submit {
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .2s, transform .15s;
}
.pqa-btn-submit:hover  { background: var(--sage-dark); transform: translateY(-1px); }
.pqa-btn-submit:active { transform: translateY(0); }
.pqa-btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.pqa-submit-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* ─── Messages ─── */
.pqa-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13px;
  margin-top: 12px;
}
.pqa-success {
  background: #edf5f0;
  border: 1px solid var(--sage-light);
  color: var(--sage-dark);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  margin-top: 14px;
  align-items: center;
  gap: 10px;
  line-height: 1.5;
}
.pqa-success.visible {
  display: flex;
}

/* ─── Feed header ─── */
.pqa-feed-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.pqa-feed-count {
  font-size: 13px;
  color: var(--muted);
  background: var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  white-space: nowrap;
}

/* ─── Filter bar ─── */
.pqa-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.pqa-filter-btn {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 15px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}
.pqa-filter-btn.active,
.pqa-filter-btn:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ─── Q&A cards ─── */
.pqa-qa-list { display: flex; flex-direction: column; gap: 16px; }

.pqa-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.pqa-card:hover { box-shadow: 0 4px 18px rgba(30,42,34,.07); }

.pqa-question {
  padding: 26px 28px 18px;
  cursor: pointer;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.pqa-q-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pqa-q-body { flex: 1; min-width: 0; }
.pqa-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.pqa-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  background: var(--border);
  color: var(--sage-dark);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}
.pqa-date { font-size: 12px; color: var(--muted); }
.pqa-q-text {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 9px;
}
.pqa-toggle {
  font-size: 13px;
  color: var(--sage);
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  user-select: none;
}
.pqa-toggle svg { transition: transform .25s; }
.pqa-card.open .pqa-toggle svg { transform: rotate(180deg); }

/* ─── Answer panel ─── */
.pqa-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.pqa-card.open .pqa-answer { max-height: 800px; }

.pqa-answer-inner {
  border-top: 1px solid var(--border);
  padding: 22px 28px 26px 76px;
}
.pqa-answer-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.pqa-badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
.pqa-badge-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
}
.pqa-a-text {
  font-size: 15px;
  line-height: 1.8;
  color: #3a4d42;
  font-weight: 300;
  margin: 0 0 12px;
}
.pqa-a-sig {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

/* ─── Empty state ─── */
.pqa-empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
}
.pqa-empty svg { opacity: .35; display: block; margin: 0 auto 12px; }
.pqa-empty p { font-size: 15px; margin: 0; }

/* ─── Responsive ─── */
@media (max-width: 580px) {
  .pqa-form-card { padding: 26px 18px; }
  .pqa-question  { padding: 20px 18px 14px; gap: 12px; }
  .pqa-answer-inner { padding: 16px 18px 22px; }
  .pqa-q-icon { width: 28px; height: 28px; font-size: 15px; }
  .pqa-feed-header { flex-direction: column; align-items: flex-start; }
}
