/* TrellisCart FAQ — Public Accordion Styles */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Fraunces:ital,wght@0,400;1,400&display=swap');

.tcfaq-wrap {
  --tcfaq-accent: #2d6a4f;
  --tcfaq-accent-l: #52b788;
  --tcfaq-accent-p: #d8f3dc;
  --tcfaq-bg: #ffffff;
  --tcfaq-bg-alt: #f9fafb;
  --tcfaq-border: #e5e7eb;
  --tcfaq-text: #1c1c1c;
  --tcfaq-muted: #6b7280;
  --tcfaq-faint: #9ca3af;
  --tcfaq-shadow: 0 1px 3px rgba(0,0,0,.08);
  --tcfaq-shadow-lg: 0 4px 16px rgba(0,0,0,.10);
  --tcfaq-radius: 10px;
  --tcfaq-font: 'DM Sans', system-ui, sans-serif;
  --tcfaq-font-head: 'Fraunces', Georgia, serif;
  font-family: var(--tcfaq-font);
  color: var(--tcfaq-text);
  max-width: 820px;
  margin: 0 auto;
}

/* Dark theme */
.tcfaq-dark {
  --tcfaq-bg: #141824;
  --tcfaq-bg-alt: #1e2535;
  --tcfaq-border: #2a3040;
  --tcfaq-text: #e2e8f0;
  --tcfaq-muted: #94a3b8;
  --tcfaq-faint: #64748b;
  --tcfaq-shadow: 0 1px 3px rgba(0,0,0,.3);
  --tcfaq-shadow-lg: 0 4px 20px rgba(0,0,0,.4);
}

/* ── SEARCH ── */
.tcfaq-search-wrap {
  margin-bottom: 28px;
}
.tcfaq-search-inner {
  position: relative;
  display: flex;
  align-items: center;
}
.tcfaq-search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--tcfaq-faint);
  pointer-events: none;
  flex-shrink: 0;
}
.tcfaq-search {
  width: 100%;
  padding: 13px 42px 13px 44px;
  font-family: var(--tcfaq-font);
  font-size: 15px;
  background: var(--tcfaq-bg);
  color: var(--tcfaq-text);
  border: 1.5px solid var(--tcfaq-border);
  border-radius: 50px;
  outline: none;
  box-shadow: var(--tcfaq-shadow);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.tcfaq-search:focus {
  border-color: var(--tcfaq-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tcfaq-accent) 15%, transparent);
}
.tcfaq-search::placeholder { color: var(--tcfaq-faint); }
.tcfaq-search::-webkit-search-cancel-button { display: none; }
.tcfaq-search-clear {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--tcfaq-faint);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 4px;
  display: none;
  transition: color .12s;
}
.tcfaq-search-clear:hover { color: var(--tcfaq-text); }
.tcfaq-search-clear.visible { display: block; }
.tcfaq-search-count {
  font-size: 13px;
  color: var(--tcfaq-muted);
  margin-top: 8px;
  padding-left: 16px;
  min-height: 18px;
}

/* ── CATEGORY TABS ── */
.tcfaq-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 4px;
}
.tcfaq-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--tcfaq-bg);
  border: 1.5px solid var(--tcfaq-border);
  border-radius: 50px;
  font-family: var(--tcfaq-font);
  font-size: 13px;
  font-weight: 500;
  color: var(--tcfaq-muted);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.tcfaq-cat-tab:hover {
  border-color: var(--tcfaq-accent);
  color: var(--tcfaq-accent);
  background: color-mix(in srgb, var(--tcfaq-accent) 5%, var(--tcfaq-bg));
}
.tcfaq-cat-tab.active {
  background: var(--tcfaq-accent);
  border-color: var(--tcfaq-accent);
  color: #fff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--tcfaq-accent) 35%, transparent);
}
.tcfaq-cat-icon { font-size: 14px; }
.tcfaq-cat-count {
  background: rgba(255,255,255,.22);
  color: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}
.tcfaq-cat-tab:not(.active) .tcfaq-cat-count {
  background: var(--tcfaq-bg-alt);
  color: var(--tcfaq-faint);
}

/* ── SECTION ── */
.tcfaq-section {
  margin-bottom: 36px;
}
.tcfaq-section[hidden] { display: none; }
.tcfaq-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.tcfaq-section-icon { font-size: 20px; }
.tcfaq-section-title {
  font-family: var(--tcfaq-font-head);
  font-size: 20px;
  font-weight: 400;
  color: var(--tcfaq-text);
  margin: 0;
  border: none;
  padding: 0;
}
.tcfaq-section-title em { color: var(--tcfaq-accent); font-style: italic; }

/* ── LIST ── */
.tcfaq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── ACCORDION ITEM ── */
.tcfaq-item {
  background: var(--tcfaq-bg);
  border: 1.5px solid var(--tcfaq-border);
  border-radius: var(--tcfaq-radius);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.tcfaq-item:hover {
  border-color: color-mix(in srgb, var(--tcfaq-accent) 40%, var(--tcfaq-border));
}
.tcfaq-item.open {
  border-color: var(--tcfaq-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tcfaq-accent) 10%, transparent);
}
.tcfaq-item[hidden] { display: none; }
.tcfaq-item.tcfaq-highlight .tcfaq-q-text mark {
  background: color-mix(in srgb, var(--tcfaq-accent) 20%, transparent);
  color: inherit;
  border-radius: 2px;
}

/* Question button */
.tcfaq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--tcfaq-font);
  font-size: 15px;
  font-weight: 500;
  color: var(--tcfaq-text);
  line-height: 1.4;
  transition: background .12s;
}
.tcfaq-question:hover { background: var(--tcfaq-bg-alt); }
.tcfaq-item.open .tcfaq-question { background: color-mix(in srgb, var(--tcfaq-accent) 6%, var(--tcfaq-bg)); }
.tcfaq-q-text { flex: 1; }
.tcfaq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--tcfaq-faint);
  transition: transform .25s cubic-bezier(.4,0,.2,1), color .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tcfaq-chevron svg { width: 20px; height: 20px; }
.tcfaq-item.open .tcfaq-chevron {
  transform: rotate(180deg);
  color: var(--tcfaq-accent);
}

/* Answer panel */
.tcfaq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s cubic-bezier(.4,0,.2,1);
}
.tcfaq-answer:not([hidden]) { max-height: 2000px; }
.tcfaq-answer-inner {
  padding: 0 18px 18px;
  border-top: 1px solid var(--tcfaq-border);
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--tcfaq-muted);
}
.tcfaq-answer-inner p { margin: 12px 0 0; }
.tcfaq-answer-inner p:first-child { margin-top: 14px; }
.tcfaq-answer-inner ul, .tcfaq-answer-inner ol { margin: 10px 0 0 20px; }
.tcfaq-answer-inner li { margin-bottom: 4px; }
.tcfaq-answer-inner strong { color: var(--tcfaq-text); font-weight: 600; }
.tcfaq-answer-inner em { color: var(--tcfaq-accent); font-style: italic; }
.tcfaq-answer-inner a { color: var(--tcfaq-accent); }
.tcfaq-answer-inner a:hover { text-decoration: underline; }

/* ── NO RESULTS ── */
.tcfaq-no-results {
  text-align: center;
  padding: 48px 20px;
  color: var(--tcfaq-muted);
}
.tcfaq-no-results[hidden] { display: none; }
.tcfaq-no-results-icon { font-size: 40px; margin-bottom: 12px; }
.tcfaq-no-results p { font-size: 14px; margin: 0; }
.tcfaq-clear-link {
  background: none;
  border: none;
  color: var(--tcfaq-accent);
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .tcfaq-cat-tabs { gap: 6px; }
  .tcfaq-cat-tab { font-size: 12px; padding: 6px 12px; }
  .tcfaq-question { font-size: 14px; padding: 14px 14px; }
  .tcfaq-answer-inner { font-size: 14px; padding: 0 14px 14px; }
  .tcfaq-section-title { font-size: 18px; }
}

/* ── ENTRY ANIMATIONS ── */
@keyframes tcfaq-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tcfaq-item {
  animation: tcfaq-fade-in .25s ease both;
}
.tcfaq-item:nth-child(1)  { animation-delay: .03s; }
.tcfaq-item:nth-child(2)  { animation-delay: .06s; }
.tcfaq-item:nth-child(3)  { animation-delay: .09s; }
.tcfaq-item:nth-child(4)  { animation-delay: .12s; }
.tcfaq-item:nth-child(5)  { animation-delay: .15s; }
.tcfaq-item:nth-child(n+6) { animation-delay: .18s; }
