:root {
  --bg-color: #f6f7f9;
  --text-color: #1a1a1e;
  --text-secondary: #5a5a62;
  --primary: #007aff;
  --header-bg: #007aff;
  --card-bg: #ffffff;
  --border-color: #e4e4e9;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

header {
  background: var(--header-bg);
  padding: 25px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

header h1 {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  letter-spacing: -0.5px;
}

.cd-faq {
  max-width: 800px;
  margin: 0 auto;
  padding: 10px 15px;
}

/* Scrollable top categories */
.cd-faq-categories {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 10px;
  padding: 15px 0;
  margin: 0 0 20px 0;
  list-style: none;
  scrollbar-width: none; /* Firefox */
  position: sticky;
  top: 0;
  background: var(--bg-color);
  z-index: 100;
}

.cd-faq-categories::-webkit-scrollbar {
  display: none; /* Safari/Chrome */
}

.cd-faq-categories a {
  display: inline-block;
  white-space: nowrap;
  padding: 10px 20px;
  background: #e9e9f0;
  color: var(--text-secondary);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cd-faq-categories a.selected,
.cd-faq-categories a:hover {
  background: var(--primary);
  color: #fff;
}

/* FAQ Items */
.cd-faq-items {
  padding-bottom: 40px;
}

.cd-faq-group {
  margin: 0 0 30px 0;
  padding: 0;
  list-style: none;
}

.cd-faq-title h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0 0 15px 5px;
  letter-spacing: -0.3px;
  text-transform: uppercase;
}

.cd-faq-group > li:not(.cd-faq-title) {
  background: var(--card-bg);
  margin-bottom: 12px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.cd-faq-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cd-faq-trigger::after {
  content: '';
  display: block;
  min-width: 10px;
  height: 10px;
  margin-inline-start: 15px; /* Supports RTL naturally */
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.content-visible .cd-faq-trigger::after {
  transform: rotate(225deg);
}

.cd-faq-content {
  display: none;
  padding: 0 20px 20px 20px;
}

.content-visible .cd-faq-content {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.cd-faq-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.cd-faq-content a {
  color: var(--primary);
  text-decoration: underline;
}

.cd-close-panel {
  display: none !important;
}
