/**
 * Single Post Styles – card feel (design ref: extra files), current markup.
 * Scope: body.single only. No !important.
 */

/* ===== CARD TOKENS (single only – match dashboard) ===== */
body.single {
  /* Page background: match account dashboard */
  --dfl-single-page-bg: #f8f8f8;
  --dfl-single-panel-bg: #ffffff;
  /* Panel: match dfl-card (dashboard) – shadow-led, subtle border */
  --dfl-single-panel-border: 1px solid rgba(0, 0, 0, 0.08);
  --dfl-single-panel-radius: 12px;
  --dfl-single-panel-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  /* Single gap: even, tight (keep 12px) */
  --dfl-single-gap: 12px;
}

/* ===== 1) LAYOUT + PAGE BACKGROUND ===== */
body.single .dfl-category.dfl-single {
  padding: var(--dfl-single-gap);
  background: var(--dfl-single-page-bg);
}

body.single .dfl-category__wrap {
  gap: var(--dfl-single-gap);
}

body.single .dfl-category__main {
  max-width: 100%;
}

/* Align main and sidebar tops: GP .inside-article has padding: 40px, so main content
   starts 40px down. Push sidebar down by the same amount so first panels align. */
body.single .dfl-category__sidebar {
  margin-top: 40px;
}
/* Fill the 40px gap above the sidebar with white to match main column (gap is outside sidebar box) */
body.single .dfl-category__sidebar::before {
  content: '';
  display: block;
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--dfl-single-panel-bg);
}

/* ===== POST HEADER PANEL (card feel) ===== */
body.single .dfl-single__header {
  margin-bottom: var(--dfl-single-gap);
  padding: var(--dfl-space-24);
  background: var(--dfl-single-panel-bg);
  border: var(--dfl-single-panel-border);
  border-radius: var(--dfl-single-panel-radius);
  box-shadow: var(--dfl-single-panel-shadow);
}

body.single .dfl-single__header .entry-header {
  margin-bottom: 0;
}

/* Title: match dashboard hierarchy (dfl-dash-title scale) */
body.single .dfl-single__header .entry-title {
  margin: 0 0 var(--dfl-space-24);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--dfl-dark);
}

body.single .dfl-single-cats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--dfl-space-8);
  align-items: center;
  margin: 0 0 var(--dfl-space-12);
}

body.single .dfl-single-cats__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--dfl-space-8) var(--dfl-space-12);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: var(--dfl-blue);
  color: var(--dfl-white);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

body.single .dfl-single-cats__link:hover {
  background: var(--dfl-red);
  color: var(--dfl-white);
}

/* Meta line: author (accent) + date + reading time – old single design */
body.single .dfl-single__metaLine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--dfl-space-12);
  margin-bottom: var(--dfl-space-8);
  padding-bottom: var(--dfl-space-8);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 14px;
  color: var(--dfl-dark);
}

body.single .dfl-single__authorMeta {
  display: inline-flex;
  align-items: center;
  gap: var(--dfl-space-8);
}

body.single .dfl-single__authorAvatar {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
}

body.single .dfl-single__authorAvatar .avatar {
  display: block;
  width: 32px;
  height: 32px;
}

body.single .dfl-single__authorName {
  color: var(--dfl-red);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}

body.single .dfl-single__authorName:hover {
  color: var(--dfl-blue);
}

body.single .dfl-single__date {
  opacity: 0.85;
  font-size: 15px;
}

body.single .dfl-single__readingTime {
  opacity: 0.75;
}

/* ===== UTILITY BAR (Like / Save / Share) ===== */
body.single .dfl-single__utilityBar {
  display: inline-flex;
  align-items: center;
  gap: var(--dfl-space-8);
  margin-top: 0;
}

/* Like: secondary button (dashboard dfl-btn style) */
body.single .dfl-like-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  cursor: pointer;
  color: var(--dfl-blue);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s ease, border-color 0.2s ease, background-color 0.2s ease;
}

body.single .dfl-like-toggle svg {
  fill: none;
  stroke: var(--dfl-blue);
}

body.single .dfl-like-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(41, 128, 185, 0.35);
  background: rgba(41, 128, 185, 0.08);
}

body.single .dfl-like-toggle.is-liked svg {
  fill: var(--dfl-blue);
  stroke: var(--dfl-blue);
}

/* Hide count when 0 (no lonely "0") */
body.single .dfl-like-count.dfl-like-count--zero {
  display: none;
}

body.single .dfl-like-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--dfl-dark);
  margin-left: 2px;
}

/* Save / Share: secondary buttons (dashboard dfl-btn style) */
body.single .dfl-single__actionBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  color: var(--dfl-dark);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background-color 0.2s ease;
}

body.single .dfl-single__actionBtn:hover {
  transform: translateY(-1px);
  border-color: rgba(41, 128, 185, 0.35);
  background: rgba(41, 128, 185, 0.08);
  color: var(--dfl-blue);
}

/* ===== FEATURED IMAGE (subtle panel) ===== */
body.single .dfl-category__main .featured-image.page-header-image-single {
  margin-bottom: var(--dfl-single-gap);
  max-width: 70ch;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--dfl-single-panel-radius);
  border: var(--dfl-single-panel-border);
  background: var(--dfl-single-panel-bg);
  box-shadow: var(--dfl-single-panel-shadow);
}

body.single .dfl-category__main .featured-image.page-header-image-single img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== ARTICLE BODY PANEL (publication typography) ===== */
body.single .dfl-category__main .entry-content {
  max-width: 70ch;
  margin-bottom: var(--dfl-single-gap);
  padding: var(--dfl-space-24);
  background: var(--dfl-single-panel-bg);
  border: var(--dfl-single-panel-border);
  border-radius: var(--dfl-single-panel-radius);
  box-shadow: var(--dfl-single-panel-shadow);
  font-size: 19px;
  line-height: 1.8;
}

body.single .dfl-category__main .entry-content p {
  margin-bottom: var(--dfl-space-24);
}

body.single .dfl-category__main .entry-content h2 {
  margin-top: var(--dfl-space-32);
  margin-bottom: var(--dfl-space-12);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}

body.single .dfl-category__main .entry-content h3 {
  margin-top: var(--dfl-space-24);
  margin-bottom: var(--dfl-space-8);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
}

body.single .dfl-category__main .entry-content blockquote {
  margin: var(--dfl-space-24) 0;
  padding: var(--dfl-space-12) var(--dfl-space-24);
  border-left: 3px solid var(--dfl-blue);
  background: rgba(41, 128, 185, 0.05);
  font-style: italic;
  font-size: 1.02em;
  color: var(--dfl-dark);
}

body.single .dfl-category__main .entry-content blockquote p:last-child {
  margin-bottom: 0;
}

body.single .dfl-category__main .entry-content ul,
body.single .dfl-category__main .entry-content ol {
  margin: var(--dfl-space-24) 0;
  padding-left: 1.5em;
}

body.single .dfl-category__main .entry-content li {
  margin-bottom: var(--dfl-space-12);
}

body.single .dfl-category__main .entry-content ul {
  list-style-type: disc;
}

body.single .dfl-category__main .entry-content ol {
  list-style-type: decimal;
}

/* ===== SIDEBAR (subtle panels – current sidebar kept) ===== */
body.single .dfl-single-sidebar__module {
  margin-bottom: var(--dfl-single-gap);
  padding: var(--dfl-space-24);
  background: var(--dfl-single-panel-bg);
  border: var(--dfl-single-panel-border);
  border-radius: var(--dfl-single-panel-radius);
  box-shadow: var(--dfl-single-panel-shadow);
}

body.single .dfl-single-sidebar__module:first-child {
  margin-top: 0;
}

/* Sidebar section headings: blue = links/secondary (dashboard .dfl-h2 + blue) */
body.single .dfl-single-sidebar__module .dfl-sidebar__heading {
  margin: 0 0 var(--dfl-space-12);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--dfl-blue);
}

body.single .dfl-single-sidebar__sectionTitle {
  display: none;
}

body.single .dfl-category__sidebar .widget {
  margin-bottom: var(--dfl-single-gap);
  padding: var(--dfl-space-24);
  background: var(--dfl-single-panel-bg);
  border: var(--dfl-single-panel-border);
  border-radius: var(--dfl-single-panel-radius);
  box-shadow: var(--dfl-single-panel-shadow);
}

body.single .dfl-category__sidebar .widget .widget-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--dfl-blue);
}

body.single .dfl-category__sidebar .widget ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.single .dfl-category__sidebar .widget li {
  margin: 0 0 var(--dfl-space-12);
  padding: 0 0 var(--dfl-space-12);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.single .dfl-category__sidebar .widget li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

body.single .dfl-single-sidebar__module--reading .dfl-sidebar__list {
  margin: 0;
}

body.single .dfl-single-sidebar__module--reading .dfl-sidebar__listItem {
  padding-bottom: var(--dfl-space-12);
  margin-bottom: var(--dfl-space-12);
}

body.single .dfl-single-sidebar__module--reading .dfl-sidebar__listLink {
  white-space: normal;
  line-height: 1.35;
}

body.single .dfl-single-sidebar__module--reading .dfl-sidebar__date {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.75;
}

/* Get the Report: primary button (dashboard dfl-btn--primary) */
body.single .dfl-single-sidebar__module .dfl-sidebar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: var(--dfl-red);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

body.single .dfl-single-sidebar__module .dfl-sidebar__btn:hover {
  background: var(--dfl-blue);
  color: #fff;
  transform: translateY(-1px);
}

body.single .dfl-single-sidebar__bullets {
  margin: var(--dfl-space-12) 0 0;
  padding-left: 18px;
}

body.single .dfl-single-sidebar__bullets li {
  margin: 0 0 var(--dfl-space-8);
}

/* ===== COMMENTS PANEL (dfl-comments markup from extra files) ===== */
body.single .comments-area.dfl-comments {
  margin-top: var(--dfl-single-gap);
  margin-bottom: 0;
  padding: var(--dfl-space-24);
  background: var(--dfl-single-panel-bg);
  border: var(--dfl-single-panel-border);
  border-radius: var(--dfl-single-panel-radius);
  box-shadow: var(--dfl-single-panel-shadow);
}

/* Comments section title: match dashboard section heading (dfl-h2) */
body.single .dfl-comments .dfl-comments-title {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--dfl-dark);
}

body.single .dfl-comments .comment-reply-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
}

body.single .dfl-comments .comment-form-comment {
  margin-bottom: var(--dfl-space-12);
}

body.single .dfl-comments .comment-form-comment textarea {
  min-height: 100px;
  padding: var(--dfl-space-12);
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
}

body.single .dfl-comments .comment-form input[type="text"],
body.single .dfl-comments .comment-form input[type="email"],
body.single .dfl-comments .comment-form input[type="url"] {
  margin-bottom: var(--dfl-space-12);
  padding: var(--dfl-space-8) var(--dfl-space-12);
  font-size: 16px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
}

body.single .dfl-comments .comment-form .form-submit {
  margin-top: var(--dfl-space-16);
  margin-bottom: var(--dfl-space-24);
}

/* Post Comment: primary button (dashboard dfl-btn--primary) */
body.single .dfl-comments .comment-form input[type="submit"] {
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: var(--dfl-red);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

body.single .dfl-comments .comment-form input[type="submit"]:hover {
  background: var(--dfl-blue);
  color: #fff;
  transform: translateY(-1px);
}

body.single .dfl-comments .dfl-comment-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.single .dfl-comments .dfl-comment-list > li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0 0 var(--dfl-space-16);
  margin: 0 0 var(--dfl-space-16);
}

body.single .dfl-comments .dfl-comment-list > li:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

body.single .dfl-comments .dfl-comment-wrap {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--dfl-space-16);
  align-items: start;
}

body.single .dfl-comments .dfl-comment-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: block;
}

body.single .dfl-comments .dfl-comment-meta {
  display: flex;
  align-items: center;
  gap: var(--dfl-space-12);
  flex-wrap: wrap;
  margin: 0 0 var(--dfl-space-8);
}

body.single .dfl-comments .dfl-comment-author a {
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--dfl-red);
}

body.single .dfl-comments .dfl-role-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 4px;
  background: rgba(41, 128, 185, 0.12);
  color: var(--dfl-blue);
}

body.single .dfl-comments .dfl-role-badge--administrator {
  background: rgba(231, 76, 60, 0.12);
  color: var(--dfl-red);
}

body.single .dfl-comments .dfl-comment-date {
  color: rgba(0, 0, 0, 0.55);
  font-size: 14px;
}

body.single .dfl-comments .dfl-comment-text {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 var(--dfl-space-12);
}

body.single .dfl-comments .dfl-comment-actions {
  display: flex;
  align-items: center;
  gap: var(--dfl-space-16);
}

body.single .dfl-comments .comment-reply-link {
  color: var(--dfl-blue);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

body.single .dfl-comments .comment-reply-link:hover {
  color: var(--dfl-red);
}

/* Comment like button (extra files design) */
body.single .dfl-comments .dfl-like-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  line-height: 1;
  color: rgba(41, 128, 185, 0.55);
}

body.single .dfl-comments .dfl-like-btn:hover {
  color: var(--dfl-blue);
}

body.single .dfl-comments .dfl-like-btn svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

body.single .dfl-comments .dfl-like-btn[aria-pressed="true"] {
  color: var(--dfl-blue);
}

body.single .dfl-comments .dfl-like-icon--off {
  display: inline-flex;
}

body.single .dfl-comments .dfl-like-icon--on {
  display: none;
}

body.single .dfl-comments .dfl-like-btn[aria-pressed="true"] .dfl-like-icon--off {
  display: none;
}

body.single .dfl-comments .dfl-like-btn[aria-pressed="true"] .dfl-like-icon--on {
  display: inline-flex;
}

body.single .dfl-comments .dfl-like-count {
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: rgba(0, 0, 0, 0.65);
}

body.single .dfl-comments .children {
  margin: var(--dfl-space-20) 0 0 64px;
  padding: 0 0 0 var(--dfl-space-16);
  list-style: none;
  border-left: 2px solid rgba(0, 0, 0, 0.08);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  body.single .dfl-single-sidebar__sectionTitle {
    display: block;
    margin: 0 0 var(--dfl-space-12);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dfl-blue);
  }
}

@media (max-width: 768px) {
  body.single .dfl-single__metaLine {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--dfl-space-8);
  }

  body.single .dfl-single__utilityBar {
    flex-wrap: wrap;
  }

  body.single .dfl-single__actionBtn {
    min-height: 40px;
  }

  body.single .dfl-category__main .entry-content {
    font-size: 18px;
    padding: var(--dfl-space-16);
  }

  body.single .dfl-single__header {
    padding: var(--dfl-space-16);
  }

  body.single .comments-area.dfl-comments {
    padding: var(--dfl-space-16);
  }

  body.single .dfl-comments .dfl-comment-wrap {
    grid-template-columns: 40px 1fr;
    gap: var(--dfl-space-12);
  }

  body.single .dfl-comments .dfl-comment-avatar img {
    width: 40px;
    height: 40px;
  }

  body.single .dfl-comments .children {
    margin-left: 52px;
  }

  body.single .dfl-single-cats {
    margin-bottom: var(--dfl-space-8);
  }

  body.single .dfl-single-cats__link {
    padding: var(--dfl-space-8) var(--dfl-space-12);
    font-size: 13px;
  }

  body.single .dfl-single-sidebar__module .dfl-sidebar__btn {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: var(--dfl-space-12);
    text-align: center;
  }
}
