/* ============================================================
   DP ARTICLE STYLES — dp-article.css
   Enqueue via functions.php on target CPTs
   ============================================================ */

/* ── Meta bar ───────────────────────────────────────────── */

.dp-meta-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 0;
}

.dp-meta-author {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.dp-meta-author:hover .dp-meta-name {
  color: #5f43b2;
}

.dp-meta-avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  object-fit: cover;
}

.dp-meta-author-info {
  display: flex;
  flex-direction: column;
}

.dp-meta-dates {
  display: flex;
  gap: 32px;
}

.dp-meta-date-item {
  display: flex;
  flex-direction: column;
}

.dp-meta-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 400;
}

.dp-meta-name,
.dp-meta-value {
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

/* ── Article content scope ──────────────────────────────── */

.dp-content {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: #1a1a1a;
  max-width: 100%;
}

/* ── Typography ─────────────────────────────────────────── */

.dp-content h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.25;
  color: #111;
  margin: 3rem 0 1rem;
  padding-top: 0.25rem;
}

.dp-content h2 em {
  font-style: normal;
  color: #5F43B2;
}

.dp-content h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  color: #111;
  margin: 2.25rem 0 0.75rem;
}

.dp-content p {
  margin: 0 0 1.25rem;
  color: #333;
}

.dp-content strong {
  font-weight: 600;
  color: #111;
}

.dp-content em {
  font-style: italic;
}

.dp-content a {
  color: #5F43B2;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.dp-content a:hover {
  color: #4a33a0;
}

.dp-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

/* ── Answer box ─────────────────────────────────────────── */

.dp-answer-box {
  background: #f5f3ff;
  border-left: 3px solid #5F43B2;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 0 0 1.75rem;
}

.dp-answer-box p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: #3b2e8a;
  line-height: 1.6;
}

/* ── Definition box ─────────────────────────────────────── */

.dp-definition {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px 24px;
  margin: 0 0 2rem;
}

.dp-definition-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  margin: 0 0 6px;
}

.dp-definition p {
  margin: 0;
  font-size: 15px;
  color: #374151;
}

/* ── Table of Contents ──────────────────────────────────── */

.dp-toc {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin: 0 0 2.5rem;
  overflow: hidden;
}

.dp-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
}

.dp-toc-header:hover {
  background: #f3f4f6;
}

.dp-toc-title {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.dp-toc-icon {
  width: 18px;
  height: 18px;
  color: #9ca3af;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.dp-toc.open .dp-toc-icon {
  transform: rotate(180deg);
}

.dp-toc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.dp-toc.open .dp-toc-body {
  max-height: 1000px;
}

.dp-toc-inner {
  padding: 16px 20px 20px;
  border-top: 1px solid #e5e7eb;
}

/* Reset all list styles inside TOC */
.dp-toc ol,
.dp-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Top-level items */
.dp-toc > .dp-toc-body > .dp-toc-inner > ol {
  counter-reset: toc-main;
}

.dp-toc > .dp-toc-body > .dp-toc-inner > ol > li {
  counter-increment: toc-main;
  margin-bottom: 10px;
}

.dp-toc > .dp-toc-body > .dp-toc-inner > ol > li:last-child {
  margin-bottom: 0;
}

/* Top-level link row */
.dp-toc > .dp-toc-body > .dp-toc-inner > ol > li > a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  text-decoration: none;
  line-height: 1.5;
}

.dp-toc > .dp-toc-body > .dp-toc-inner > ol > li > a::before {
  content: counter(toc-main);
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  min-width: 14px;
  flex-shrink: 0;
}

.dp-toc > .dp-toc-body > .dp-toc-inner > ol > li > a:hover {
  color: #5F43B2;
}

/* Sub-list */
.dp-toc-sub {
  counter-reset: toc-sub;
  margin: 6px 0 0 24px !important;
}

.dp-toc-sub > li {
  counter-increment: toc-sub;
  margin-bottom: 5px;
}

.dp-toc-sub > li:last-child {
  margin-bottom: 0;
}

.dp-toc-sub > li > a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  color: #6b7280;
  text-decoration: none;
  line-height: 1.5;
}

.dp-toc-sub > li > a::before {
  content: counter(toc-sub, lower-alpha);
  font-size: 10px;
  font-weight: 600;
  color: #d1d5db;
  min-width: 12px;
  flex-shrink: 0;
}

.dp-toc-sub > li > a:hover {
  color: #5F43B2;
}

/* ── Simple table ───────────────────────────────────────── */

.dp-table-wrap {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.dp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.dp-table thead tr {
  background: #f9fafb;
}

.dp-table th {
  padding: 12px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

/* First column — row label styling */
.dp-table td:first-child {
  font-weight: 600;
  color: #111;
  white-space: nowrap;
  background: #fafafa;
  border-right: 1px solid #f0f0f0;
  padding: 14px 18px;
}

.dp-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  vertical-align: top;
  line-height: 1.5;
}

.dp-table tr:last-child td {
  border-bottom: none;
}

.dp-table tbody tr:hover td {
  background: #f9fafb;
}

.dp-table tbody tr:hover td:first-child {
  background: #f3f4f6;
}

/* ── Multi-column compare table ─────────────────────────── */

.dp-compare-scroll {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  margin: 0 0 1rem;
}

.dp-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 620px;
}

.dp-compare-table thead tr {
  background: #f9fafb;
}

.dp-compare-table th {
  padding: 14px 18px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.dp-compare-table th.col-donna {
  background: #f5f3ff;
  color: #5F43B2;
  position: relative;
}

.dp-compare-table th.col-donna::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #5F43B2;
}

.dp-compare-table td:first-child {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  background: #fafafa;
  white-space: nowrap;
  border-right: 1px solid #f0f0f0;
  padding: 13px 18px;
}

.dp-compare-table td {
  padding: 13px 18px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  vertical-align: top;
  line-height: 1.5;
}

.dp-compare-table tr:last-child td {
  border-bottom: none;
}

.dp-compare-table td.col-donna {
  background: #faf8ff;
  color: #3b2e8a;
  font-weight: 500;
}

.dp-compare-table tbody tr:hover td {
  background: #f9fafb;
}

.dp-compare-table tbody tr:hover td.col-donna {
  background: #f3f0ff;
}

.dp-compare-caption {
  font-size: 12px;
  color: #9ca3af;
  margin: 8px 0 2rem;
  font-style: italic;
  line-height: 1.5;
}

/* ── Yes/No/Partial badges ──────────────────────────────── */

.dp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
}

.dp-badge-yes     { color: #16a34a; }
.dp-badge-no      { color: #dc2626; }
.dp-badge-partial { color: #d97706; }

.dp-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── FAQ ────────────────────────────────────────────────── */

.dp-faq {
  margin: 0 0 2.5rem;
}

.dp-faq-item {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.dp-faq-item[open] {
  border-color: #c4b5fd;
  background: #fff;
}

.dp-faq-item[open] .dp-faq-question {
  border-bottom: 1px solid #ede9fe;
}

.dp-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
  color: #111;
  line-height: 1.4;
  user-select: none;
}

.dp-faq-question::-webkit-details-marker { display: none; }

/* Text takes all space, icon stays right */
.dp-faq-question span:first-child {
  flex: 1;
}

.dp-faq-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  background: #ede9fe;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.2s ease;
}

.dp-faq-icon svg {
  width: 12px;
  height: 12px;
  color: #5F43B2;
}

.dp-faq-item[open] .dp-faq-icon {
  background: #5F43B2;
  transform: rotate(180deg);
}

.dp-faq-item[open] .dp-faq-icon svg {
  color: #fff;
}

.dp-faq-answer {
  padding: 14px 18px 16px;
}

.dp-faq-answer p {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.7;
}

/* ── CTA buttons ────────────────────────────────────────── */

.dp-btn {
  display: inline-block;
  background: #5F43B2;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 6px;
  margin: 0.25rem 0 1.75rem;
  transition: background 0.15s ease;
  line-height: 1;
}

.dp-btn:hover {
  background: #4a33a0 !important;
  color: #fff !important;
}

.dp-btn-ghost {
  background: transparent;
  color: #5F43B2 !important;
  border: 1.5px solid #5F43B2;
  padding: 10px 20px;
}

.dp-btn-ghost:hover {
  background: #f5f3ff !important;
  color: #5F43B2 !important;
}

/* ── Callout / pull quote ───────────────────────────────── */

.dp-callout {
  border-left: 3px solid #e5e7eb;
  padding: 4px 20px;
  margin: 0 0 1.5rem;
}

.dp-callout p {
  margin: 0;
  font-size: 15px;
  font-style: italic;
  color: #6b7280;
}

/* ── Section break ──────────────────────────────────────── */

.dp-section-break {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2.5rem 0 2rem;
}

.dp-section-break::before,
.dp-section-break::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 767px) {

  .dp-meta-bar    { gap: 20px; }
  .dp-meta-dates  { gap: 20px; }
  .dp-meta-label  { font-size: 11px; }
  .dp-meta-name,
  .dp-meta-value  { font-size: 13px; }

  .dp-content h2  { font-size: 24px; }
  .dp-content h3  { font-size: 18px; }
  .dp-content p   { font-size: 15px; }

  .dp-toc-header  { padding: 13px 16px; }
  .dp-toc-inner   { padding: 14px 16px 18px; }

  .dp-table th,
  .dp-table td    { padding: 11px 13px; }

  .dp-answer-box  { padding: 14px 16px; }
  .dp-definition  { padding: 16px; }

  .dp-faq-question { padding: 13px 14px; font-size: 13px; }
  .dp-faq-answer   { padding: 12px 14px 14px; }
}