/*
 * ==============================================================================
 * General Site Overrides
 * ==============================================================================
 */

/*
 * Aggressive override to remove all borders, backgrounds, and box shadows from
 * the main content containers that might be applying the border.
 * IMPORTANT: Removed the 'margin: 0 !important' from this global rule to prevent
 * the site from shifting left.
 */
#layout-type-1,
#wrapper,
#content,
.content-middle,
.region-content,
#block-danland-forum-main-block,
#block-danland-forum-main-block > .content {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/*
 * ==============================================================================
 * Forum Threading - Main Forum Listing Page (/forum)
 * ==============================================================================
 */

/*
 * New container to wrap the entire forum content for proper centering and
 * styling without affecting the rest of the site layout.
 */
.forum-wrapper {
    /* Set a max-width and use margin: 0 auto to center the entire forum block */
    max-width: 1000px; /* Adjust this value as needed for your design */
    margin: 0 auto;
    padding: 0 15px; /* Add some horizontal padding for smaller screens */
}


/* Target the forum cards wrapper */
.forum-cards-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important; /* Set gap to 0 to make border-top work as a separator */
    margin: 0 !important;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    overflow: hidden; /* This is important to contain the rounded corners */
}

/* Style the forum cards - clean design */
.forum-card 
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: none !important; /* This is the key change to remove the border from individual cards */
    border-radius: 0 !important;
    padding: 20px !important;
    position: relative !important;
    overflow: hidden !important;
    margin-bottom: 0 !important; /* Reset margin */
}

/* Add a subtle separator between the cards */
.forum-card + .forum-card {
  border-top: 1px solid #f0f0f0 !important;
}

/* Forum card header - now a banner across the top */
.forum-card-header {
    display: block !important;
    margin-bottom: 16px !important;
    width: 100% !important;
}

/* Forum banner styling - replaces the icon */
.forum-icon {
    width: 100% !important;
    height: 80px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    margin-bottom: 16px !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Remove emoji icons - you can add images instead */
.forum-icon::before {
    display: none !important;
}

/* Ensure forum-icon has proper dimensions and remove any background color */
.forum-icon {
    width: 100%;
    height: 120px; /* Adjust height as needed */
    background-color: transparent !important; /* Remove any solid background */
    border-radius: 8px; /* Optional: match your design */
}

/* Style for forum card background images */
.forum-card:nth-child(1) .forum-icon {
    background-image: url('https://civilsimian.com/sites/default/files/2025-08/forum-banner4_1.png') !important;
    background-color: white !important;
}

.forum-card:nth-child(2) .forum-icon {
    background-image: url('https://civilsimian.com/sites/default/files/2025-08/forum-banner1.png') !important;
    background-color: white !important;
}

.forum-card:nth-child(3) .forum-icon {
    background-image: url('https://civilsimian.com/sites/default/files/2025-08/forum-banner2.png') !important;
    background-color: white !important;
}

.forum-card:nth-child(4) .forum-icon {
    background-image: url('https://civilsimian.com/sites/default/files/2025-08/forum-banner3.png') !important;
    background-color: white !important;
}

/* Fallback: If the images don't load, show a subtle background instead of purple */
.forum-icon {
    background-color: #f5f5f5 !important;
}

/* Forum title styling - now below the banner */
.forum-card-title {
    margin: 0 0 12px 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

.forum-card-title a {
    color: #4a5568 !important;
    text-decoration: none !important;
}

.forum-card-title a:hover {
    color: #0073aa !important;
}

/* Forum description styling */
.forum-description {
    margin: 12px 0 !important;
    color: #718096 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.forum-description p {
    margin: 0 !important;
}

/* Forum stats styling */
.forum-card-stats {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    margin-top: 16px !important;
    padding-top: 16px !important;
    border-top: 1px solid #f0f0f0 !important;
    font-size: 13px !important;
}

.stat-item {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.stat-label {
    color: #a0aec0 !important;
    font-weight: 500 !important;
}

.stat-value {
    color: #4a5568 !important;
    font-weight: 600 !important;
}

/* Last post special styling */
.last-post .stat-value {
    color: #718096 !important;
    font-weight: normal !important;
}

.last-post .stat-value a {
    color: #4299e1 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.last-post .stat-value a:hover {
    text-decoration: underline !important;
}

/* Make /forum cards float — target the real IDs/classes on the page */
#block-danland-forum-main-block .content .forum-cards-wrapper {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
}

/* Individual floating cards */
#block-danland-forum-main-block .forum-cards-wrapper > .forum-card {
  background: #fff !important;
  border: 1px solid #ccc !important;
  border-radius: 12px !important;
  padding: 20px !important;
  margin: 0 0 18px !important;
}

/* Kill the old between-card separator */
#block-danland-forum-main-block .forum-cards-wrapper > .forum-card + .forum-card {
  border-top: 0 !important;
}



/* Action links styling */
.action-links {
    margin-bottom: 16px !important;
    margin-top: 0 !important;
}

.action-links .button {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%) !important;
    border: none !important;
    color: white !important;
    padding: 12px 20px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.action-links .button:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%) !important;
}

/* Hide the "No forum topics found" message */
.region-content > p {
    display: none !important;
}

/*
 * ==============================================================================
 * Individual Forum Post Page Styling (/forum/*)
 * ==============================================================================
 */

/* General container for the entire post page */
.node--type-forum {
    background: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    overflow: visible;
}

/* User profile section in main post */
.profile-user-info {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 15px;
    background: #f0f4ff;
    border-bottom: 1px solid #e0e0e0;
}

.profile-member-info {
    margin: 0 !important;f0f4ff
    padding: 0 !important;
}

.profile-user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.profile-member-info .username {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* Hide the empty about me section ONLY on forum post pages */
.node--type-forum .profile-about-me {
    display: none;
}

/* Submission info (by author, time ago) */
.submitted {
    padding: 8px 15px;
    background: transparent;
    border-bottom: none;
    font-size: 12px;
    color: #666;
}

.submitted a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.submitted a:hover {
    text-decoration: underline;
}

/* Main content area of the post */
.node--type-forum .content {
    padding: 20px;
}

/* Post title */
.node--type-forum h1,
.node--type-forum .node-title,
.node--type-forum .page-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

/* If title is visually hidden by default, ensure it shows */
.node--type-forum .visually-hidden.page-title {
    position: static !important;
    clip: auto !important;
    overflow: visible !important;
    width: auto !important;
    height: auto !important;
}

/* Forum breadcrumb */
.node--type-forum .content > div:first-child {
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.node--type-forum .content > div:first-child a {
    color: #0066cc;
    text-decoration: none;
}

.node--type-forum .content > div:first-child a:hover {
    text-decoration: underline;
}

/* Main post content body */
.node--type-forum .content > div:last-of-type {
    margin-top: 15px;
    line-height: 1.6;
    color: #333;
}

.node--type-forum .content > div:last-of-type p {
    margin: 0 0 15px 0;
}

/* Comment section wrapper */
.node--type-forum section {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 20px;
}

.node--type-forum section h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

/* Comment form styling */
.comment-form {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
}

.comment-form .form-item {
    margin-bottom: 15px;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.comment-form input[type="text"],
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form .form-actions {
    margin-top: 20px;
    text-align: right;
}

.comment-form .button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 10px;
}

.comment-form .button--primary {
    background: #0066cc;
    color: white;
}

.comment-form .button--primary:hover {
    background: #0052a3;
}

.comment-form .button:not(.button--primary) {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ccc;
}

.comment-form .button:not(.button--primary):hover {
    background: #e9ecef;
}

/* Comment Threading and Hierarchy */
/* -------------------------------------------------------------------------- */

/* Base style for individual comments */
.comment {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin: 15px 0;
    overflow: hidden;
    position: relative; /* Needed for absolute positioning of thread indicators */
}

/* Threading indentation - each level gets more indent */
/* This uses Drupal's core .indented class for threading */
.indented {
    margin-left: 30px; /* Adjust this value for indentation depth */
    border-left: 3px solid #e0e0e0; /* A subtle line to show the thread */
    padding-left: 15px; /* Space between the line and the comment content */
}

/* Optional: Color the indentation border based on depth (if you use comment-level-X classes) */
.comment.comment-level-1 + .indented { /* Apply to the indented wrapper of level 1 replies */
    border-left-color: #0066cc;
}

.comment.comment-level-2 + .indented { /* Apply to the indented wrapper of level 2 replies */
    border-left-color: #28a745;
}

.comment.comment-level-3 + .indented { /* Apply to the indented wrapper of level 3 replies */
    border-left-color: #ffc107;
}

/* Reply button styling */
/* This targets the actual link elements for reply and edit */
.comment .links a { /* General link style within comment links section */
    display: inline-block;
    background-image: none !important; /* FIX: Remove any unwanted background images */
    background-color: #0066cc; /* Solid background color */
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
    border: none; /* Ensure no default button border */
}

.comment .links a:hover {
    background-color: #0052a3;
    color: white;
    text-decoration: none;
}

/* Ensure the links section has proper padding and border */
.comment .links {
    padding: 10px 15px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    display: flex; /* Use flexbox for button alignment */
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    gap: 8px; /* Space between buttons */
}

/* User info within comments (similar to main post but smaller) */
.comment .profile-user-info {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #f0f4ff;
    border-bottom: 1px solid #e0e0e0;
}

.comment .profile-user-info img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.comment .profile-member-info .username {
    font-size: 15px;
    font-weight: bold;
    color: #333;
}

/* Hide empty about me in comments */
.comment .profile-about-me {
    display: none;
}

/* Comment content body */
.comment .content {
    padding: 15px;
}

.comment .content h3 { /* Comment subject */
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: bold;
}

.comment .content h3 a {
    color: #333;
    text-decoration: none;
}

.comment .content h3 a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.comment .content p {
    margin: 0 0 10px 0;
    line-height: 1.5;
    color: #333;
}

/* Thin comment footer with submission info */
.comment-footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 8px 15px;
    font-size: 12px;
    color: #666;
}

.comment-footer .comment-submitted {
    margin: 0;
}

/* Responsive Adjustments */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .forum-wrapper {
        padding: 0 8px; /* Adjust padding for mobile */
    }

    .forum-card {
        padding: 16px !important;
    }
    
    .forum-card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    .forum-icon {
        width: 35px !important;
        height: 35px !important;
    }
    
    .forum-card-stats {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    .forum-card-title {
        font-size: 16px !important;
    }
    
    .indented {
        margin-left: 15px;
        padding-left: 10px;
    }
}

/* Remove permalink links from forum posts */
.comment .permalink,
a[href*="#comment-"],
.comment-links .permalink {
  display: none !important;
}

/* Also target if it's in a links list */
.comment .links a[href*="#comment-"] {
  display: none !important;
}

/* Corporate purple button styling for forum comments */
.comment .links a,
.comment-actions a,
.comment .button,
button[class*="comment"] {
  background: #f0f4ff !important;
  border: 1px solid #d1d5db !important;
  color: #667eea !important;
  padding: 6px 12px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: all 0.15s ease !important;
  margin-right: 6px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.025em !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.comment .links a:hover,
.comment-actions a:hover,
.comment .button:hover,
button[class*="comment"]:hover {
  background: #e0e7ff !important;
  color: #5a67d8 !important;
  border-color: #9ca3af !important;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Apply purple styling to all button types */
.comment .links a[href*="edit"],
.comment .links a[href*="delete"],
.comment .links a[href*="reply"] {
  background: #f0f4ff !important;
  color: #667eea !important;
  border-color: #d1d5db !important;
}

.comment .links a[href*="edit"]:hover,
.comment .links a[href*="delete"]:hover,
.comment .links a[href*="reply"]:hover {
  background: #e0e7ff !important;
  color: #5a67d8 !important;
  border-color: #9ca3af !important;
}

/* Style logged-out user links as simple bold hoverable text */
.comment-form .button,
.comment .button,
.button-action,
a.button {
  background: none !important;
  border: none !important;
  color: #667eea !important;
  padding: 4px 8px !important;
  border-radius: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  text-decoration: none !important;
  display: inline !important;
  margin-right: 12px !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  box-shadow: none !important;
  transition: color 0.2s ease !important;
}

.comment-form .button:hover,
.comment .button:hover,
.button-action:hover,
a.button:hover {
  background: none !important;
  color: #5a67d8 !important;
  border: none !important;
  text-decoration: underline !important;
  box-shadow: none !important;
}

/* Ensure username and time appear stacked vertically */
.profile-member-info {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  line-height: 1.2 !important;
}

.user-member-since h4.label {
  display: inline;
  font-size: 14px;
  font-weight: normal;
  margin: 0;
}

.user-member-since {
  font-size: 14px;
  color: #444;
  white-space: nowrap;
}


/* =========================
   Forum topics list (/forum/*)
   ========================= -------------------------------------------------*/

/* Wrapper + cards */
#content .forum-topics-wrapper {
  max-width: 960px;
  margin: 0 auto 24px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#content .forum-topic-card {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color .12s ease;
}
#content .forum-topic-card:hover { border-color: #ccc; }

#content .forum-topic-title { margin: 0 0 6px 0; }
#content .forum-topic-title a {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: #4a5568;
  text-decoration: none;
}

#content .forum-topic-title a:hover {
  color: #0073aa !important; /* Same hover color as your action-links */
}

#content .forum-topic-meta {
  color: #6b7280;
  font-size: 14px;
  margin: 2px 0 10px;
}
#content .forum-topic-replies { font-weight: 600; color: #374151; margin: 4px 0 2px; }
#content .forum-topic-last-reply { color: #9aa0a6; }

/* Mobile */
@media (max-width: 640px) {
  #content .forum-topic-card { padding: 14px; }
  #content .forum-topic-title a { font-size: 20px; }
}

/* =========================
   Add-topic link (action-links)
   ========================= */
/* Hide the add link on the top-level /forum */
.region-content:has(.forum-cards-wrapper) > .action-links {
  display: none !important;
}

/* Make the add link on /forum/* look like your .user-content-link bar */
.region-content:has(.forum-topics-wrapper) > .action-links {
  display: block !important;
  background: #f3f5ff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 14px 0;
  margin: 0 0 12px 0;
  text-align: center;
}

/* Reset inner list + make the link look like .view-submissions-link */
.region-content:has(.forum-topics-wrapper) > .action-links ul,
.region-content:has(.forum-topics-wrapper) > .action-links li {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.region-content:has(.forum-topics-wrapper) > .action-links a,
.region-content:has(.forum-topics-wrapper) > .action-links .button {
  display: block !important;
  color: #333 !important;
  text-decoration: none !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  text-align: center !important;
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  line-height: 1.25 !important;
  cursor: pointer;
}

.region-content:has(.forum-topics-wrapper) > .action-links a:hover {
  color: #0073aa !important;
}

/* Pull cards up tight under the bar */
.region-content:has(.forum-topics-wrapper) > .action-links + .forum-topics-wrapper {
  margin-top: 0 !important;
}

/* Forum page layout fixes-------------------------------------------------- */
.forum-topic-card .topic-card-avatar img {
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

/* Fix the large icon issue - likely a comment/discussion icon */
.topic-stat-icon {
  width: 16px !important;
  height: 16px !important;
  display: inline-block !important;
}

/* Completely remove the comment bubble SVG */
.topic-card-footer svg {
  display: none !important;
}

/* Forum topic card improvements */
.forum-topic-card {
  border: 1px solid #ccc !important;
  border-radius: 6px !important;
  padding: 15px !important;
  margin-bottom: 15px !important;
  background: white !important;
}

.topic-card-header {
  display: flex !important;
  align-items: flex-start !important;
  gap: 15px !important;
  margin-bottom: 10px !important;
}

.topic-card-meta {
  flex: 1 !important;
}

.topic-category-tag {
  background: #e9ecef !important;
  color: #6c757d !important;
  padding: 2px 8px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  display: inline-block !important;
  margin-bottom: 5px !important;
}

.topic-card-title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #333 !important;
  text-decoration: none !important;
  line-height: 1.3 !important;
  margin-bottom: 5px !important;
  display: block !important;
}

.topic-card-title:hover {
  color: #007bff !important;
}

.topic-card-author-info {
  font-size: 14px !important;
  color: #666 !important;
}

.topic-card-author {
  color: #007bff !important;
  text-decoration: none !important;
}

/* Footer improvements */
.topic-card-footer {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-top: 15px !important;
  padding-top: 15px !important;
  border-top: 1px solid #f0f0f0 !important;
}

.topic-card-stats .links {
  display: flex !important;
  gap: 15px !important;
}

.topic-card-stats .links ul {
  display: flex !important;
  gap: 15px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.topic-card-stats .links li {
  margin: 0 !important;
}

.topic-card-stats .links a {
  color: #666 !important;
  text-decoration: none !important;
  font-size: 14px !important;
}

.topic-card-stats .links a:hover {
  color: #007bff !important;
}

.topic-read-more-btn {
  background: #007bff !important;
  color: white !important;
  padding: 8px 16px !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  font-size: 14px !important;
}

.topic-read-more-btn:hover {
  background: #0056b3 !important;
  color: white !important;
}

.topic-card-stats .links {
  display: none !important;
}

a[href="https://civilsimian.com/taxonomy/term/34/feed"] {
    display: none !important;
}

a[href="https://civilsimian.com/taxonomy/term/3/feed"] {
    display: none !important;
}

a[href="https://civilsimian.com/taxonomy/term/2/feed"] {
    display: none !important;
}

a[href="https://civilsimian.com/taxonomy/term/1/feed"] {
    display: none !important;
}

/* Hide the Description heading------------------------------------------ */
.views-element-container header > div > div:first-child {
    display: none;
}

/* Add forum name before the description paragraph */
.views-element-container header > div > div:last-child p::before {
    content: "Civic and Philosophical Discussion";
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5em;
}

/* Style the description text */
.views-element-container header > div > div:last-child p {
    font-style: italic;
    color: #666;
    margin: 0;
}

/* Forum add topic link-------------------------------------- */
.user-forum-link {
  margin: 2px 0 20px 0;
  padding: 10px;
  background-color: #f0f4ff;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.view-submissions-link {
  display: block;
  color: #333;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

.view-submissions-link:hover {
  color: #0073aa;
}

/* Forum comment------------------------------------------------- */
/* Force background color of forum comment boxes */
.forum-comment-box {
  background-color: #f0f4ff !important;
  border: 1px solid #d3dcec !important;
}

.forum-comment-box {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 1em;
  margin-bottom: 1.5em;
}

.forum-comment-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.75em;
}

.forum-comment-avatar img {
  border-radius: 50%;
  width: 25px;
  height: 25px;
  object-fit: cover;
  margin-right: 1em;
}

.forum-comment-meta {
  font-size: 0.9em;
}

.forum-comment-author {
  font-weight: bold;
  color: #1d2a60;
}

.forum-comment-date {
  color: #777;
  font-size: 0.85em;
}

.forum-comment-title {
  font-size: 1.1em;
  margin-top: 0.25em;
  font-weight: bold;
}

.forum-comment-body {
  padding-left: 0.25em;
}

/* Individual Forum Post Page Styling (node--type-forum) */
/* -------------------------------------------------------------------------- */

.node--type-forum {
    background: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    overflow: visible;
}

/* User profile section in main post */
.profile-user-info {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.profile-user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.profile-member-info .username {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* Hide the empty about me section ONLY on forum post pages */
.node--type-forum .profile-about-me {
    display: none;
}

/* Submission info (by author, time ago) */
.submitted {
    padding: 8px 15px;
    background: transparent;
    border-bottom: none;
    font-size: 12px;
    color: #666;
}

.submitted a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.submitted a:hover {
    text-decoration: underline;
}

/* Main content area of the post */
.node--type-forum .content {
    padding: 20px;
}

/* Post title */
.node--type-forum h1,
.node--type-forum .node-title,
.node--type-forum .page-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

/* If title is visually hidden by default, ensure it shows */
.node--type-forum .visually-hidden.page-title {
    position: static !important;
    clip: auto !important;
    overflow: visible !important;
    width: auto !important;
    height: auto !important;
}

/* Forum Topic Card Specific Styles (for individual forum topic pages) */
/* -------------------------------------------------------------------------- */

.forum-topic-title { /* Already defined in common section above, but keeping for specificity if needed */
    margin: 0 0 12px 0;
}

.forum-topic-meta {
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

.forum-topic-meta a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.forum-topic-meta a:hover {
    text-decoration: underline;
}

.forum-topic-replies {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.forum-topic-last-reply {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.forum-topic-last-reply a {
    color: #0066cc;
    text-decoration: none;
}

.forum-topic-last-reply a:hover {
    text-decoration: underline;
}

/* Forum breadcrumb */
.node--type-forum .content > div:first-child {
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.node--type-forum .content > div:first-child a {
    color: #0066cc;
    text-decoration: none;
}

.node--type-forum .content > div:first-child a:hover {
    text-decoration: underline;
}

/* Main post content body */
.node--type-forum .content > div:last-of-type {
    margin-top: 15px;
    line-height: 1.6;
    color: #333;
}

.node--type-forum .content > div:last-of-type p {
    margin: 0 0 15px 0;
}

/* Comment section wrapper */
.node--type-forum section {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 20px;
}

.node--type-forum section h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

/* Forum Threading - General Styles */
/* -------------------------------------------------------------------------- */

/* Hide the "Add new Forum topic" button */
.action-links {
    display: none;
}

/* Hide the "No forum topics found" message (if it's a direct child of .region-content) */
.region-content > p {
    display: none !important;
}

/* Common styles for forum card wrappers (main forum list and topic lists) */
.forum-cards-wrapper,
.forum-topics-wrapper {
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    margin: 2px 0 0 0;
}

/* Common styles for individual forum cards and topic cards */
.forum-card,
.forum-topic-card {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.forum-card:hover,
.forum-topic-card:hover {
    background: #f8f9fa;
}

.forum-card:last-child,
.forum-topic-card:last-child {
    border-bottom: none;
}

/* Common styles for forum/topic titles */
.forum-card-title,
.forum-topic-title {
    margin: 0; /* Reset margin for titles */
    font-size: 18px;
    font-weight: bold;
}

.forum-card-title a,
.forum-topic-title a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

.forum-card-title a:hover,
.forum-topic-title a:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Hide the block title "Forums" if it's rendered by the block system */
#block-danland-forum-main-block .block-title {
    display: none;
}

/* Forum Card Specific Styles (for main forum list) */
/* -------------------------------------------------------------------------- */

.forum-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.forum-icon {
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

.forum-description {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.forum-description p { /* Ensure paragraphs inside description have no extra margin */
    margin: 0;
}

.forum-card-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-label {
    color: #666;
    font-weight: normal;
}

.stat-value {
    font-weight: 600;
    color: #333;
}

.last-post .stat-value {
    color: #666;
    font-weight: normal;
}

.last-post .stat-value a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.last-post .stat-value a:hover {
    text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .forum-cards-wrapper {
        margin: 8px;
        border-radius: 6px;
    }

    .forum-topics-wrapper {
        margin: 8px;
        border-radius: 6px;
    }

    .forum-card {
        padding: 15px;
    }

    .forum-topic-card {
        padding: 15px;
    }

    .forum-card-title {
        font-size: 16px;
    }

    .forum-topic-title {
        font-size: 16px;
    }

    .forum-card-stats {
        flex-direction: column;
        gap: 8px;
    }

    .node--type-forum {
        margin: 8px;
        border-radius: 6px;
    }

    .profile-user-info {
        flex-direction: column;
        text-align: center;
    }

    .profile-user-info img {
        margin: 0 0 10px 0;
    }
}

/* Style the post title */
.node--type-forum h1,
.node--type-forum .node-title,
.node--type-forum .page-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

/* If title is hidden, show it */
.node--type-forum .visually-hidden.page-title {
    position: static !important;
    clip: auto !important;
    overflow: visible !important;
    width: auto !important;
    height: auto !important;
}

/* Style the forum breadcrumb */
.node--type-forum .content > div:first-child {
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.node--type-forum .content > div:first-child a {
    color: #0066cc;
    text-decoration: none;
}

.node--type-forum .content > div:first-child a:hover {
    text-decoration: underline;
}

/* Style the main post content */
.node--type-forum .content > div:last-of-type {
    margin-top: 15px;
    line-height: 1.6;
    color: #333;
}

.node--type-forum .content > div:last-of-type p {
    margin: 0 0 15px 0;
}

/* Style the comment section */
.node--type-forum section {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 20px;
}

.node--type-forum section h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

/* Hide the block title "Forums" */
#block-danland-forum-main-block .block-title {
    display: none;
}

/* Style individual forum topic pages (/forum/1, /forum/2, etc.) */
.forum-topics-wrapper {
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    margin: 2px 0 0 0;
}

.forum-topic-card {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.forum-topic-card:hover {
    background: #f8f9fa;
}

.forum-topic-card:last-child {
    border-bottom: none;
}

.forum-topic-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: bold;
}

.forum-topic-title a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

.forum-topic-title a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.forum-topic-meta {
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

.forum-topic-meta a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.forum-topic-meta a:hover {
    text-decoration: underline;
}

.forum-topic-replies {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.forum-topic-last-reply {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.forum-topic-last-reply a {
    color: #0066cc;
    text-decoration: none;
}

.forum-topic-last-reply a:hover {
    text-decoration: underline;
}

/* DIRECT FORUM CSS - Targets specific forum elements only */

/* Hide the "Add new Forum topic" button */
.action-links {
    display: none;
}

/* Hide the "No forum topics found" message */
.region-content > p {
    display: none !important;
}

/* Style the new forum cards wrapper */
.forum-cards-wrapper {
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    margin: 2px 0 0 0;
}

/* Style individual forum cards */
.forum-card {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.forum-card:hover {
    background: #f8f9fa;
}

.forum-card:last-child {
    border-bottom: none;
}

/* Style the forum card header */
.forum-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.forum-icon {
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

.forum-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.forum-card-title a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

.forum-card-title a:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Style the forum description */
.forum-description {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.forum-description p {
    margin: 0;
}

/* Style the forum card stats */
.forum-card-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-label {
    color: #666;
    font-weight: normal;
}

.stat-value {
    font-weight: 600;
    color: #333;
}

.last-post .stat-value {
    color: #666;
    font-weight: normal;
}

.last-post .stat-value a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.last-post .stat-value a:hover {
    text-decoration: underline;
}

/* Style individual forum topic pages (/forum/1, /forum/2, etc.) */
body[class*="path-forum"] .forum-topics-wrapper {
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    margin: 2px 0 0 0;
}

body[class*="path-forum"] .forum-topic-card {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

body[class*="path-forum"] .forum-topic-card:hover {
    background: #f8f9fa;
}

body[class*="path-forum"] .forum-topic-card:last-child {
    border-bottom: none;
}

body[class*="path-forum"] .forum-topic-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: bold;
}

body[class*="path-forum"] .forum-topic-title a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

body[class*="path-forum"] .forum-topic-title a:hover {
    color: #0066cc;
    text-decoration: underline;
}

body[class*="path-forum"] .forum-topic-meta {
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

body[class*="path-forum"] .forum-topic-meta a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

body[class*="path-forum"] .forum-topic-meta a:hover {
    text-decoration: underline;
}

body[class*="path-forum"] .forum-topic-replies {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

body[class*="path-forum"] .forum-topic-last-reply {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

body[class*="path-forum"] .forum-topic-last-reply a {
    color: #0066cc;
    text-decoration: none;
}

body[class*="path-forum"] .forum-topic-last-reply a:hover {
    text-decoration: underline;
}

/* Mobile responsive - only for forum pages */
@media (max-width: 768px) {
    body[class*="path-forum"] .forum-cards-wrapper {
        margin: 8px;
        border-radius: 6px;
    }

    body[class*="path-forum"] .forum-topics-wrapper {
        margin: 8px;
        border-radius: 6px;
    }

    body[class*="path-forum"] .forum-card {
        padding: 15px;
    }

    body[class*="path-forum"] .forum-topic-card {
        padding: 15px;
    }

    body[class*="path-forum"] .forum-card-title {
        font-size: 16px;
    }

    body[class*="path-forum"] .forum-topic-title {
        font-size: 16px;
    }

    body[class*="path-forum"] .forum-card-stats {
        flex-direction: column;
        gap: 8px;
    }
}

/* Forum-------------------------------------------------------------------------*/
/* SAFE FORUM CSS - Only targets forum pages specifically */

/* Only target forum pages by URL path - won't affect other pages */
body[class*="path-forum"] .region-content .action-links {
    display: none;
}

/* Hide the "No forum topics found" message on forum pages only */
body[class*="path-forum"] .region-content > p {
    display: none !important;
}

/* Style the new forum cards wrapper */
body[class*="path-forum"] .forum-cards-wrapper {
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    margin: 2px 0 0 0;
}

/* Style individual forum cards */
body[class*="path-forum"] .forum-card {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

body[class*="path-forum"] .forum-card:hover {
    background: #f8f9fa;
}

body[class*="path-forum"] .forum-card:last-child {
    border-bottom: none;
}

/* Style the forum card header */
body[class*="path-forum"] .forum-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

body[class*="path-forum"] .forum-icon {
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

body[class*="path-forum"] .forum-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

body[class*="path-forum"] .forum-card-title a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

body[class*="path-forum"] .forum-card-title a:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Style the forum description */
body[class*="path-forum"] .forum-description {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

body[class*="path-forum"] .forum-description p {
    margin: 0;
}

/* Style the forum card stats */
body[class*="path-forum"] .forum-card-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
}

body[class*="path-forum"] .stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

body[class*="path-forum"] .stat-label {
    color: #666;
    font-weight: normal;
}

body[class*="path-forum"] .stat-value {
    font-weight: 600;
    color: #333;
}

body[class*="path-forum"] .last-post .stat-value {
    color: #666;
    font-weight: normal;
}

body[class*="path-forum"] .last-post .stat-value a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

body[class*="path-forum"] .last-post .stat-value a:hover {
    text-decoration: underline;
}

/* Style the block title "Forums" */
body[class*="path-forum"] .block-title {
    display: none; /* Hide the "Forums" title to clean up the interface */
}

/* INDIVIDUAL FORUM POST PAGE STYLING */

/* Remove outer container styling - let user box work naturally */
.node--type-forum {
    background: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    overflow: visible;
}

/* Responsive Adjustments */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .forum-cards-wrapper,
    .forum-topics-wrapper {
        margin: 8px;
        border-radius: 6px;
    }

    .forum-card,
    .forum-topic-card {
        padding: 15px;
    }

    .forum-card-title,
    .forum-topic-title {
        font-size: 16px;
    }

    .forum-card-stats {
        flex-direction: column;
        gap: 8px;
    }

    .node--type-forum {
        margin: 8px;
        border-radius: 6px;
    }

    .profile-user-info {
        flex-direction: column;
        text-align: center;
    }

    .profile-user-info img {
        margin: 0 0 10px 0;
    }

    /* Adjust threading indentation for smaller screens */
    .indented {
        margin-left: 15px;
        padding-left: 10px;
    }
}

/* INDIVIDUAL FORUM POST PAGE STYLING */

/* Remove outer container styling - let user box work naturally */
.node--type-forum {
    background: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    overflow: visible;
}

/* Hide the empty about me section ONLY on forum post pages */
.node--type-forum .profile-about-me {
    display: none;
}

/* Style the main content area */
.node--type-forum .content {
    padding: 20px;
}

.read-more-arrow::after {
  content: " →";
  font-size: 1.2em;
  transition: transform 0.2s ease;
}

.read-more-arrow:hover::after {
  transform: translateX(3px);
}

.read-more-svg {
  font-weight: bold;
  font-style: italic;
}

/* Responsive Adjustments */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .forum-cards-wrapper,
    .forum-topics-wrapper {
        margin: 8px;
        border-radius: 6px;
    }

    .forum-card,
    .forum-topic-card {
        padding: 15px;
    }

    .forum-card-title,
    .forum-topic-title {
        font-size: 16px;
    }

    .forum-card-stats {
        flex-direction: column;
        gap: 8px;
    }

    .node--type-forum {
        margin: 8px;
        border-radius: 6px;
    }

    .profile-user-info {
        flex-direction: column;
        text-align: center;
    }

    .profile-user-info img {
        margin: 0 0 10px 0;
    }

    /* Adjust threading indentation for smaller screens */
    .indented {
        margin-left: 15px;
        padding-left: 10px;
    }
}

/* ============================
   Forum Topic Edit Form Styling
   CivilSimian.com Custom Theme
   ============================ */

/* Main container */
form#node-forum-edit-form {
  background-color: #f0f4ff; /* Soft blue-gray tone */
  border: 1px solid #ccc;    /* Subtle neutral border */
  border-radius: 6px;        /* Rounded edges */
  padding: 20px 25px;        /* Comfortable inner spacing */
  margin: 2px auto;         /* Space from surrounding elements */
  max-width: 900px;          /* Keeps it centered and readable */
  box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Gentle drop shadow */
}

/* Space out form fields nicely */
form#node-forum-edit-form .form-item {
  margin-bottom: 1.3em;
}

/* Headings and labels */
form#node-forum-edit-form label {
  font-weight: 600;
  color: #222;
}

/* Inputs, textareas, selects */
form#node-forum-edit-form input.form-text,
form#node-forum-edit-form textarea.form-textarea,
form#node-forum-edit-form select.form-select {
  width: 100%;
  border: 1px solid #bbb;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 15px;
  transition: border-color 0.2s ease;
}

form#node-forum-edit-form input.form-text:focus,
form#node-forum-edit-form textarea.form-textarea:focus,
form#node-forum-edit-form select.form-select:focus {
  border-color: #6b7cff;
  outline: none;
}

/* Hide the "Create new revision" box */
form#node-forum-edit-form .form-item-revision {
  display: none !important;
}

/* Optionally hide 'Leave shadow copy' if unwanted */
form#node-forum-edit-form .form-item-shadow {
  display: none !important;
}

/* Buttons */
form#node-forum-edit-form .form-actions {
  margin-top: 25px;
  display: flex;
  gap: 12px;
}

form#node-forum-edit-form .button--primary {
  background-color: #4759d1;
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 9px 22px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

form#node-forum-edit-form .button--primary:hover {
  background-color: #3242a6;
}

form#node-forum-edit-form .button--danger {
background-color: #723882 !important;
  border-radius: 6px !important;
  color: #fff !important;
  border: none !important;
  padding: 8px 20px !important;
}

form#node-forum-edit-form .button--danger:hover {
  background-color: #c83f3f;
}
