/* ==========================================================================
   Discussion / Topic – page template styles
   Overrides wpForo's topic/post view to match the pdnet design system.
   Enqueue after community.css — shares the same #wpforo-pdnet scope and
   :root tokens from effective-practice-hub.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Font Awesome fa-rotate-180 fix (FA6 dropped the utility class)
   -------------------------------------------------------------------------- */
#wpforo-pdnet .fa-rotate-180 {
  transform: rotate(180deg);
  display: inline-block;
}

/* --------------------------------------------------------------------------
   Discussion title banner variant
   -------------------------------------------------------------------------- */
.title-banner--discussion {
  text-align: left;
  padding: clamp(22px, 3.5vw, 40px) clamp(24px, 4vw, 44px);
}

/* Breadcrumb inside the banner */
.disc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 10px;
  opacity: 0.8;
}

.disc-breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.disc-breadcrumb a:hover {
  opacity: 1;
  text-decoration: underline;
  color: var(--white);
}

.disc-crumb-sep {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
}

/* Topic title inside banner */
.title-banner--discussion h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.4rem, 4vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 800;
}

/* Hide wpForo's own breadcrumb and topic title from inside the card
   since we've promoted them into the banner above */
#wpforo-pdnet .wpforo-subtop,
#wpforo-pdnet #wpforo-title {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Topic/thread header
   -------------------------------------------------------------------------- */
#wpforo-pdnet .wpforo-topic-head,
#wpforo-pdnet .wpf-topic-head {
  padding: 18px 0 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

#wpforo-pdnet h2.wpf-topic-title,
#wpforo-pdnet .wpforo-topic-title {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: var(--pd-grey-dark);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 10px;
}

/* Topic meta bar (author, date, views) */
#wpforo-pdnet .wpf-topic-meta,
#wpforo-pdnet .wpforo-topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--pd-grey);
}

#wpforo-pdnet .wpf-topic-meta a,
#wpforo-pdnet .wpforo-topic-meta a {
  color: var(--pd-blue-dark);
  text-decoration: none;
  font-weight: 600;
}

#wpforo-pdnet .wpf-topic-meta a:hover,
#wpforo-pdnet .wpforo-topic-meta a:hover {
  text-decoration: underline;
}

/* Topic status badges */
#wpforo-pdnet .wpf-topic-statuses .wpf-circle {
  background: var(--pd-purple-soft);
  color: var(--pd-purple);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   Post list container
   -------------------------------------------------------------------------- */
#wpforo-pdnet .wpforo-posts,
#wpforo-pdnet .wpf-post-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --------------------------------------------------------------------------
   Individual post cards
   -------------------------------------------------------------------------- */
#wpforo-pdnet .wpforo-post,
#wpforo-pdnet .wpf-post {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(63, 68, 72, 0.06);
}

/* First post (OP) gets a blue left accent */
#wpforo-pdnet .wpforo-post:first-child,
#wpforo-pdnet .wpf-post:first-child {
  border-left: 4px solid var(--pd-blue);
}

/* --------------------------------------------------------------------------
   Post author sidebar
   -------------------------------------------------------------------------- */
#wpforo-pdnet .wpf-post-author,
#wpforo-pdnet .wpforo-post-author {
  padding: 18px 14px;
  background: var(--pd-grey-soft);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

#wpforo-pdnet .wpf-post-author img,
#wpforo-pdnet .wpforo-post-author img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--line);
  object-fit: cover;
}

#wpforo-pdnet .wpf-author-name,
#wpforo-pdnet .wpforo-author-name,
#wpforo-pdnet .wpf-post-author .author-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pd-grey-dark);
  word-break: break-word;
}

#wpforo-pdnet .wpf-post-author a,
#wpforo-pdnet .wpforo-post-author a {
  color: var(--pd-blue-dark);
  text-decoration: none;
}

#wpforo-pdnet .wpf-post-author a:hover,
#wpforo-pdnet .wpforo-post-author a:hover {
  color: var(--pd-purple);
}

/* User group / role badge */
#wpforo-pdnet .wpf-user-group,
#wpforo-pdnet .wpforo-user-group,
#wpforo-pdnet .wpf-post-author .user-group {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pd-blue-soft);
  color: var(--pd-blue-dark);
  font-size: 0.68rem;
  font-weight: 700;
}

/* Post count / reputation */
#wpforo-pdnet .wpf-post-author .post-count,
#wpforo-pdnet .wpf-post-author .wpf-author-posts {
  font-size: 0.7rem;
  color: var(--pd-grey);
}

/* --------------------------------------------------------------------------
   Post content area
   -------------------------------------------------------------------------- */
#wpforo-pdnet .wpf-post-content,
#wpforo-pdnet .wpforo-post-content {
  padding: 18px 20px;
  min-width: 0;
}

/* Post header: date + actions */
#wpforo-pdnet .wpf-post-header,
#wpforo-pdnet .wpforo-post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

#wpforo-pdnet .wpf-post-date,
#wpforo-pdnet .wpforo-post-date {
  font-size: 0.75rem;
  color: var(--pd-grey);
  font-weight: 500;
}

#wpforo-pdnet .wpf-post-date a,
#wpforo-pdnet .wpforo-post-date a {
  color: var(--pd-grey);
  text-decoration: none;
}

#wpforo-pdnet .wpf-post-date a:hover {
  color: var(--pd-blue-dark);
}

/* Post action buttons (quote, like, report…) */
#wpforo-pdnet .wpf-post-actions,
#wpforo-pdnet .wpforo-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#wpforo-pdnet .wpf-post-actions a,
#wpforo-pdnet .wpf-post-actions button,
#wpforo-pdnet .wpforo-post-actions a,
#wpforo-pdnet .wpforo-post-actions button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--pd-grey-dark);
  font: 600 0.72rem/1 inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

#wpforo-pdnet .wpf-post-actions a:hover,
#wpforo-pdnet .wpf-post-actions button:hover,
#wpforo-pdnet .wpforo-post-actions a:hover,
#wpforo-pdnet .wpforo-post-actions button:hover {
  background: var(--pd-purple-soft);
  border-color: var(--pd-purple);
  color: var(--pd-purple);
}

/* Post body text */
#wpforo-pdnet .wpf-post-body,
#wpforo-pdnet .wpforo-post-body,
#wpforo-pdnet .wpf-post-content .post-body {
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.65;
}

#wpforo-pdnet .wpf-post-body p,
#wpforo-pdnet .wpforo-post-body p {
  margin: 0 0 0.8em;
}

#wpforo-pdnet .wpf-post-body p:last-child,
#wpforo-pdnet .wpforo-post-body p:last-child {
  margin-bottom: 0;
}

#wpforo-pdnet .wpf-post-body a,
#wpforo-pdnet .wpforo-post-body a {
  color: var(--pd-blue-dark);
  text-decoration: underline;
}

#wpforo-pdnet .wpf-post-body a:hover {
  color: var(--pd-purple);
}

/* Blockquote (quoted posts) */
#wpforo-pdnet .wpf-post-body blockquote,
#wpforo-pdnet .wpforo-post-body blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  background: var(--pd-grey-soft);
  border-left: 3px solid var(--pd-blue);
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  color: var(--pd-grey-dark);
  font-style: italic;
}

/* Code blocks */
#wpforo-pdnet .wpf-post-body pre,
#wpforo-pdnet .wpforo-post-body pre {
  background: var(--pd-grey-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.82rem;
  overflow-x: auto;
}

/* Post footer (likes, edit notice) */
#wpforo-pdnet .wpf-post-footer,
#wpforo-pdnet .wpforo-post-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--pd-grey);
}

/* Like / vote button */
#wpforo-pdnet .wpf-like-btn,
#wpforo-pdnet .wpf-vote {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--pd-grey);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

#wpforo-pdnet .wpf-like-btn:hover,
#wpforo-pdnet .wpf-vote:hover {
  background: var(--standard-orange-soft);
  color: var(--standard-orange);
  border-color: var(--standard-orange);
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
#wpforo-pdnet .wpf-pagination,
#wpforo-pdnet .wpforo-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 20px 0;
}

#wpforo-pdnet .wpf-pagination a,
#wpforo-pdnet .wpforo-pagination a,
#wpforo-pdnet .wpf-pagination span,
#wpforo-pdnet .wpforo-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--pd-grey-dark);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

#wpforo-pdnet .wpf-pagination a:hover,
#wpforo-pdnet .wpforo-pagination a:hover {
  background: var(--pd-blue-soft);
  border-color: var(--pd-blue);
  color: var(--pd-blue-dark);
}

#wpforo-pdnet .wpf-pagination .current,
#wpforo-pdnet .wpforo-pagination .current {
  background: var(--pd-blue);
  border-color: var(--pd-blue);
  color: var(--white);
}

/* --------------------------------------------------------------------------
   Reply / post form
   -------------------------------------------------------------------------- */
#wpforo-pdnet .wpforo-post-form,
#wpforo-pdnet .wpf-reply-form,
#wpforo-pdnet #wpforo-reply-form {
  margin-top: 24px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  border-top: 4px solid var(--pd-purple);
  box-shadow: 0 8px 22px rgba(63, 68, 72, 0.06);
}

#wpforo-pdnet .wpforo-post-form h3,
#wpforo-pdnet .wpforo-post-form .wpf-form-title,
#wpforo-pdnet .wpf-reply-form h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--pd-purple);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

/* Form inputs */
#wpforo-pdnet .wpforo-post-form input[type="text"],
#wpforo-pdnet .wpforo-post-form textarea,
#wpforo-pdnet .wpf-reply-form input[type="text"],
#wpforo-pdnet .wpf-reply-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s ease;
  margin-bottom: 12px;
}

#wpforo-pdnet .wpforo-post-form input[type="text"]:focus,
#wpforo-pdnet .wpforo-post-form textarea:focus,
#wpforo-pdnet .wpf-reply-form input[type="text"]:focus,
#wpforo-pdnet .wpf-reply-form textarea:focus {
  outline: 4px solid rgba(111, 45, 168, 0.18);
  border-color: var(--pd-purple);
}

/* Submit button */
#wpforo-pdnet .wpforo-post-form input[type="submit"],
#wpforo-pdnet .wpforo-post-form button[type="submit"],
#wpforo-pdnet .wpf-reply-form input[type="submit"],
#wpforo-pdnet .wpf-reply-form button[type="submit"],
#wpforo-pdnet .wpf-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 24px;
  border: none;
  border-radius: 999px;
  background: var(--pd-purple);
  color: var(--white);
  font: 800 0.9rem/1 inherit;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

#wpforo-pdnet .wpforo-post-form input[type="submit"]:hover,
#wpforo-pdnet .wpforo-post-form button[type="submit"]:hover,
#wpforo-pdnet .wpf-reply-form input[type="submit"]:hover,
#wpforo-pdnet .wpf-reply-form button[type="submit"]:hover,
#wpforo-pdnet .wpf-submit-btn:hover {
  background: var(--pd-purple-dark);
  transform: translateY(-1px);
}

/* TinyMCE toolbar area */
#wpforo-pdnet .mce-toolbar-grp,
#wpforo-pdnet .mce-top-part {
  background: var(--pd-grey-soft) !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 10px 10px 0 0;
}

#wpforo-pdnet .mce-edit-area iframe {
  border-radius: 0 0 10px 10px;
}

/* --------------------------------------------------------------------------
   "Back to forum" / navigation links
   -------------------------------------------------------------------------- */
#wpforo-pdnet .wpf-back-link,
#wpforo-pdnet .wpf-topic-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.82rem;
}

#wpforo-pdnet .wpf-back-link a,
#wpforo-pdnet .wpf-topic-nav a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--pd-blue-dark);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}

#wpforo-pdnet .wpf-back-link a:hover,
#wpforo-pdnet .wpf-topic-nav a:hover {
  background: var(--pd-blue-soft);
  border-color: var(--pd-blue);
}

/* --------------------------------------------------------------------------
   Login / register notice (for guests)
   -------------------------------------------------------------------------- */
#wpforo-pdnet .wpf-login-notice,
#wpforo-pdnet .wpf-must-login {
  padding: 16px 20px;
  background: var(--pd-purple-soft);
  border: 1px solid rgba(111, 45, 168, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--pd-purple-dark);
  text-align: center;
  margin-top: 20px;
}

#wpforo-pdnet .wpf-login-notice a,
#wpforo-pdnet .wpf-must-login a {
  color: var(--pd-purple);
  font-weight: 700;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Responsive – collapse author sidebar on mobile
   -------------------------------------------------------------------------- */
@media (max-width: 680px) {
  #wpforo-pdnet .wpforo-post,
  #wpforo-pdnet .wpf-post {
    grid-template-columns: 1fr;
  }

  #wpforo-pdnet .wpf-post-author,
  #wpforo-pdnet .wpforo-post-author {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 12px 14px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  #wpforo-pdnet .wpf-post-author img,
  #wpforo-pdnet .wpforo-post-author img {
    width: 36px;
    height: 36px;
  }
}