/* ==========================================================================
   Comments Styles - Shared between main page and admin panel
   Author: Shorea Solutions
   Version: 1.0
   ========================================================================== */

/* ==========================================================================
   Comment Composer
   ========================================================================== */

/* Ensure the composer layout stacks text area and error message */
.comment-composer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

/* Ensure form elements inside comment-composer don't have default form styling */
.comment-composer form {
  margin: 0;
  padding: 0.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comment-composer .js-composer-error-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

/* Comment Composer Styles */
.composer-input {
  border: none;
  min-height: 40px;
  height: 40px;
  padding: 8px 16px;
  border-radius: var(--border-radius-pill);
  resize: none;
  position: relative;
  z-index: 0;
  background: transparent;
  color: var(--color-text, #111827);
  line-height: 1.5;
  overflow: hidden;
  transition: all 0.2s ease;
  width: 100%;
  display: block;
}

.composer-input:focus {
  outline: none;
}

.composer-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.composer-input::placeholder {
  color: var(--color-text-tertiary);
  opacity: 1;
  line-height: 1.5;
}

/* Hide scrollbar visuals on focus while keeping scroll */
.composer-input:focus { 
  scrollbar-width: none;           /* Firefox */
  -ms-overflow-style: none;        /* IE/Edge legacy */
}
.composer-input:focus::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
  .composer-input {
      width: 100%;
      min-height: 45px;
      outline: none;
      border-radius: 12px;
  }

  /* Allow vertical resize when focused on larger screens */
  .composer-input:focus { resize: vertical; }
}

/* Error state for comment composer (Reddit-style validation) */
.js-composer-box.has-error,
.js-inline-reply.has-error,
.inline-reply-wrapper .js-composer-box.has-error {
  border: 2px solid red !important;
}

.js-composer-box.has-error:focus-within,
.js-inline-reply.has-error:focus-within,
.inline-reply-wrapper .js-composer-box.has-error:focus-within {
  border-color: red !important;
  box-shadow: none;
}

.composer-validation {
  display: none;
  align-items: center;
  gap: 0.5rem;
  color: #dc2626;
  font-size: var(--text-sm);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-wide);
}

.composer-validation:not([hidden]) {
  display: flex;
}

.composer-validation__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  border: 2px solid currentColor;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
}

.composer-box {
  border: 2px solid var(--color-border);
  border-radius: var(--button-radius);
  padding: var(--padding-sm);
  overflow: hidden;
  background: var(--color-background);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.2s ease;
  margin: 0; /* Reset form default margins */
  width: 100%; /* Ensure full width */
  box-sizing: border-box; /* Include padding in width */
}

.composer-box:focus-within:not(.has-error) {
  border-color: var(--color-brand);
  box-shadow: var(--shadow-sm);
}

/* Inline reply wrapper template */
.inline-reply-wrapper-template {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Position inline reply composer boxes within comment threads */
.inline-reply-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  clear: both !important;
  flex-basis: 100% !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  min-width: 0 !important;
  order: 999;
  overflow: hidden;
}

.inline-reply-wrapper .composer-box,
.js-inline-reply.composer-box {
  margin-top: 0;
  width: 100%;
  box-sizing: border-box;
  gap: 0.5rem;
}

.inline-reply-wrapper .composer-input,
.js-inline-reply .composer-input {
  flex: 1;
  min-width: 0;
  display: block;
  height: 40px;
  min-height: 40px;
}

.inline-reply-wrapper .composer-actions,
.js-inline-reply .composer-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
}


.comment-content .inline-reply-wrapper {
  grid-column: 1 / -1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Error message is now inside the wrapper, so it inherits the flex column layout */
.inline-reply-wrapper .js-inline-reply-error:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

/* Force reply wrapper to appear on new line after comment actions */
.comment-actions + .inline-reply-wrapper {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  clear: both !important;
  flex-basis: 100% !important;
}

/* Ensure wrapper is block-level when inside comment-content */
.comment-content > .inline-reply-wrapper {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  align-self: stretch !important;
  flex-basis: 100% !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  clear: both !important;
}

/* Reply-level indentation for inline reply wrappers - follow comment indentation */
/* Use padding-left instead of margin-left to keep within container bounds */
/* Automatic indentation based on data-reply-level attribute for any nesting depth */
.inline-reply-wrapper[data-reply-level] {
  margin-left: 0 !important;
  padding-right: 0.7rem;
}

/* Calculate padding-left based on nesting level: 0.5rem per level + 0.7rem base */
.inline-reply-wrapper[data-reply-level="1"] {
  padding-left: 0.7rem;
}

.inline-reply-wrapper[data-reply-level="2"] {
  padding-left: calc(1rem + 0.7rem);
}

.inline-reply-wrapper[data-reply-level="3"] {
  padding-left: calc(1.5rem + 0.7rem);
}

.inline-reply-wrapper[data-reply-level="4"] {
  padding-left: calc(2rem + 0.7rem);
}

.inline-reply-wrapper[data-reply-level="5"] {
  padding-left: calc(2.5rem + 0.7rem);
}

/* Support for deeper nesting levels (6+) using CSS calc formula */
.inline-reply-wrapper[data-reply-level="6"] {
  padding-left: calc(3rem + 0.7rem);
}

.inline-reply-wrapper[data-reply-level="7"] {
  padding-left: calc(3.5rem + 0.7rem);
}

.inline-reply-wrapper[data-reply-level="8"] {
  padding-left: calc(4rem + 0.7rem);
}

.inline-reply-wrapper[data-reply-level="9"] {
  padding-left: calc(4.5rem + 0.7rem);
}

.inline-reply-wrapper[data-reply-level="10"] {
  padding-left: calc(5rem + 0.7rem);
}

/* Fallback for class-based approach (backward compatibility) */
.inline-reply-wrapper.reply-level-1 {
  margin-left: 0 !important;
  padding-left: 0.7rem;
  padding-right: 0.7rem;
}

.inline-reply-wrapper.reply-level-2 {
  margin-left: 0 !important;
  padding-left: calc(1rem + 0.7rem);
  padding-right: 0.7rem;
}

.inline-reply-wrapper.reply-level-3 {
  margin-left: 0 !important;
  padding-left: calc(1.5rem + 0.7rem);
  padding-right: 0.7rem;
}

.inline-reply-wrapper.reply-level-4 {
  margin-left: 0 !important;
  padding-left: calc(2rem + 0.7rem);
  padding-right: 0.7rem;
}

.inline-reply-wrapper.reply-level-5 {
  margin-left: 0 !important;
  padding-left: calc(2.5rem + 0.7rem);
  padding-right: 0.7rem;
}

/* Dynamic indentation for any level using CSS custom properties (most flexible) */
.inline-reply-wrapper[style*="--reply-level"] {
  margin-left: 0 !important;
  padding-left: calc(var(--reply-level, 0) * 0.5rem + 0.7rem);
  padding-right: 0.7rem;
}

.js-inline-reply-error.reply-level-1,
.js-inline-reply-error.reply-level-2,
.js-inline-reply-error.reply-level-3,
.js-inline-reply-error.reply-level-4,
.js-inline-reply-error.reply-level-5 {
  margin-left: 0;
}

/* Sign-in required state for composer */
.composer-requires-signin {
  border-color: var(--color-border-strong);
  background: var(--color-light-bg);
}

.composer-signin-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(245, 245, 245, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  border-radius: var(--border-radius-composer);
  pointer-events: none;
}

.composer-signin-message {
  margin: 0;
  color: var(--color-foreground);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  text-align: center;
  padding: 0 var(--padding-md);
}

@media (min-width: 768px) {
  .composer-signin-message {
      font-size: var(--text-base);
  }
}

/* Composer actions - controlled via JS state */
.composer-actions {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.js-composer-box.is-active .composer-actions,
.js-composer-box.has-error .composer-actions {
  display: flex;
}

/* Inline replies always show actions on the same line */
.js-inline-reply .composer-actions,
.inline-reply-wrapper .composer-actions {
  display: flex;
}

.composer-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--button-radius);
  padding: 0.875rem 1.5rem;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wide);
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: fit-content;
  height: auto;
}

@media (max-width: 640px) {
  .composer-action-btn {
    padding: 0.625rem 1rem;
    font-size: var(--text-xs);
  }
}

/* Reddit-style Cancel button (outline) */
.composer-action-btn.btn--outline {
  color:  #000;
  border: 1px solid #000000;
  font-weight: var(--font-weight-semibold);
}

.composer-action-btn.btn--outline:hover {
  background: var(--color-light-bg, #f9fafb);
  color:  #000000;
  border-color: var(--color-border, #d1d5db);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Reddit-style Reply/Comment button (primary) */
.composer-action-btn.btn--primary {
  background: var(--color-foreground, #1a1a1b);
  color: var(--color-background, #ffffff);
  font-weight: var(--font-weight-semibold);
  border: none;
}

.composer-action-btn.btn--primary:hover {
  background: var(--color-foreground, #000000);
  color: var(--color-background, #ffffff);
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.composer-action-btn.btn--primary:active {
  background: var(--color-foreground, #000000);
  transform: scale(0.98);
}

/* ==========================================================================
   Comment Toolbar (Sort & Search)
   ========================================================================== */

.comment-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #374151; /* Darker grey for better readability - meets WCAG AA */
}


.dropdown-item {
  padding: 0.5rem 0.75rem;
  color: var(--color-text-dark);
  cursor: pointer;
  transition: background-color 0.2s ease;
  min-height: 44px; /* Touch target */
  display: flex;
  align-items: center;
}


.dropdown-item:first-child {
  background-color: #b5b2b2;
  color: #000000;
  border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 6px 6px;
}

.search-comments {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .6rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #fff;
}

.search-icon { color: #4b5563; } /* Darker grey for better readability */

.search-input {
  border: none;
  outline: none;
  font-size: var(--text-base);
  letter-spacing: var(--letter-spacing-wide);
}

/* ==========================================================================
   Comments Section
   ========================================================================== */

.comments-section {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  z-index: 0; /* Ensure it stays in normal flow */
}

/* ==========================================================================
   Comments Section Header
   ========================================================================== */

.comments-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

.comments-controls {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .comments-controls {
    flex-direction: row;
    align-items: center;
  }
}

.comments-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-label {
  font-size: var(--text-sm);
  white-space: nowrap;
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
}

.sort-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--color-background, #ffffff);
  border: unset;
  border-radius: var(--border-radius-md, 8px);
  padding: 0.5rem 1.75rem 0.5rem 0rem;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-dark, #111827);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 14px 14px;
  flex: 0 0 auto;
}

.sort-select:focus {
  outline: unset;
  outline-offset: unset;
}

.sort-select:hover {
  border-color: var(--color-border, #d1d5db);
}

.comments-search {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  padding-inline: .75rem;
  padding-block: .9rem;
  border: 1px solid #d1d5db;
  border-radius: 10rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.comments-search.is-active {
  border-color: var(--color-brand, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comments-search .search-icon {
  color: var(--color-text-secondary); /* Improved contrast - using secondary instead of tertiary */
  flex-shrink: 0;
}

.comments-search .search-input {
  border: none;
  outline: none;
  font-size: var(--text-sm);
  color: var(--color-text-dark);
  width: 100%;
  background: transparent;
}

.comments-search-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.comments-search-wrapper .search-results-count {
  display: flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  font-size: var(--text-sm);
  color: var(--color-text-secondary, #6b7280);
  margin-top: 0;
}

.comments-search-wrapper .search-results-count:not([hidden]) {
  margin-top: 0.5rem;
}
/* Hide native browser clear button for search inputs */
.comments-search .search-input::-webkit-search-cancel-button {
  display: none;
  -webkit-appearance: none;
}

.comments-search .search-input::-ms-clear {
  display: none;
}

.comments-search .search-input.is-active {
  color: var(--color-text-dark);
}

.comments-search .search-input::placeholder {
  color: var(--color-text-tertiary);
}

.comments-search .search-clear {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  border-radius: 50%;
  border: 1px solid #000000;
  transition: background-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* Show clear button when it doesn't have hidden attribute */
.comments-search .search-clear:not([hidden]) {
  display: flex;
}

.comments-search .search-clear:hover {
  background: var(--background-gray, #f3f4f6);
  color: var(--color-text-dark);
}

.comments-search .search-clear:focus-visible {
  outline: 2px solid var(--color-brand, #2563eb);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .comments-header {
      flex-direction: column;
      align-items: stretch;
      gap: 0.75rem;
  }
  
  
  .sort-label {
      font-size: var(--text-xs);
  }
  
  .sort-select {
      font-size: var(--text-xs);
  }

  
  .search-results-count {
      margin-left: 0;
      padding-left: 0;
      text-align: center;
      width: 100%;
      order: 3;
      font-size: var(--text-xs);
  }
  
  .comment-body,
  .comment-item-rendered .comment-body {
      font-size: var(--text-sm);
  }
  
  .comment-username {
      font-size: var(--text-sm);
  }
  
  .comment-time {
      font-size: var(--text-xs);
  }
}

.search-highlight {
  background: #fef08a;
  color: var(--color-text-dark);
  padding: 0.1em 0;
  border-radius: 2px;
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-wide);
}

.search-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  min-height: 300px;
}

.search-empty-state__illustration {
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.search-empty-state__content {
  max-width: 400px;
}

.search-empty-state__title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wide);
  color: var(--color-text-dark, #111827);
  margin: 0 0 0.75rem 0;
  line-height: var(--line-height-normal);
}

.search-empty-state__message {
  font-size: var(--text-sm);
  letter-spacing: var(--letter-spacing-wide);
  color: var(--color-text-secondary, #6b7280);
  margin: 0;
  line-height: var(--line-height-relaxed);
}

@media (max-width: 640px) {
  .search-empty-state {
      padding: 2rem 1rem;
      min-height: 250px;
  }
  
  .search-empty-state__illustration {
      margin-bottom: 1rem;
  }
  
  .search-empty-state__illustration svg {
      width: 100px;
      height: 100px;
  }
  
  .search-empty-state__title {
      font-size: 1rem;
  }
  
  .search-empty-state__message {
      font-size: var(--text-sm);
  }
}

/* ==========================================================================
   Comments List
   ========================================================================== */
.comments-management-list, .comments-posts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Comment Structure */
.comment-item {
  border-radius: var(--border-radius-lg);
  background: var(--color-background);
  overflow: hidden;
  transition: background-color 0.2s ease;
}

.comment-item:hover {
  background: var(--color-light-bg);
}

/* Smooth expand/collapse animation */
.comment-item[open] {
  animation: fadeIn 0.2s ease-in;
}

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

.comment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  list-style: none;
  position: relative;
}

.comment-summary::-webkit-details-marker {
  display: none;
}

.comment-summary::marker {
  display: none;
}
.first-comment {
  padding-inline: 0.7rem;
}

.expand-icon {
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-text-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.expand-icon:hover {
  background: var(--background-gray);
  border-color: var(--color-text-tertiary);
}

.expand-icon:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.expand-icon-svg {
  color: var(--color-text-muted);
  width: 100%;
  height: auto;
}

.expand-icon-svg line {
  transition: opacity 0.15s ease-in-out;
  opacity: 1; /* Default: both lines visible (plus sign) */
}

/* Hide vertical line when expanded to show minus (-) instead of plus (+) */
details[open] > summary .expand-icon-svg line:first-child {
  opacity: 0;
}

/* Keep horizontal line visible (shows minus when expanded) */
.expand-icon-svg line:last-child {
  opacity: 1;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-name {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-dark);
  font-size: var(--text-sm);
  line-height: 1.6; /* Improved readability */
}

.comment-time {
  font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */
  color: var(--color-text-tertiary);
  line-height: 1.7; /* Improved readability for small text - increased for WCAG compliance */
}

/* Threading Lines */
.thread-line {
  position: absolute;
  left: -1.5rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border-light);
}

.main-thread-line {
  position: absolute;
  left: -1.5rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border-light);
}

/* Comment Body */
.comment-body {
  color: var(--color-text-muted);
  line-height: 1.6;
  font-size: var(--text-base); /* Increased from text-sm (14px) to text-base (16px) for better readability */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Empty comment text */
.comment-empty {
  color: var(--color-text-tertiary, #9ca3af);
  font-style: italic;
  font-size: var(--text-sm);
}

/* Enhanced Comment Body for Rendered Comments */
.comment-item-rendered .comment-body {
  color: var(--color-text-dark, #111827);
  line-height: 1.7;
  font-size: var(--text-base);
  margin-bottom: 0.5rem;
  padding: 0;
  width: 100%;
}

.comment-item-rendered .comment-meta {
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.comment-item-rendered .author-name {
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wide);
  color: var(--color-text-dark, #111827);
  font-size: var(--text-sm);
}

.comment-item-rendered .comment-time {
  font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */
  color: var(--color-text-tertiary, #9ca3af);
  margin-left: 0.5rem;
}

.comment-item-rendered .comment-actions {
  margin-top: 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border-light, #e5e7eb);
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Vote count styling */
.vote-count {
  font-size: var(--text-xs);
  letter-spacing: var(--letter-spacing-wide);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-loose);
}

/* Upvote button with vote count - Reddit-style */
.js-comment-upvote {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding-inline: 0.5rem;
}

.js-comment-upvote .pill-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.js-comment-upvote .pill-btn-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  transition: fill 0.2s ease;
}

.js-comment-upvote.upvoted .pill-btn-icon svg,
.js-comment-upvote.is-active .pill-btn-icon svg {
  fill: var(--color-brand);
}

.js-comment-upvote .vote-count {
  transition: color 0.2s ease;
}

.js-comment-upvote.upvoted .vote-count,
.js-comment-upvote.is-active .vote-count {
  color: var(--color-brand);
  font-weight: var(--font-weight-bold);
}

/* Comment Actions */
.comment-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
  gap: 0.75rem;
}

/* Ensure reply wrapper breaks to new line after comment actions */
.comment-actions ~ .inline-reply-wrapper {
  flex-basis: 100% !important;
  width: 100% !important;
  min-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  clear: both !important;
}

.comment-action-btn {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */
  letter-spacing: var(--letter-spacing-wide);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
  min-height: 24px; /* Touch target size on mobile */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.comment-action-btn:hover {
  background: var(--background-gray);
  color: var(--color-text-dark);
}

.comment-action-btn:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

/* Active state - when button is clicked/opened (menu is open) */
.comment-action-btn.is-active,
.comment-action-btn.upvoted,
.js-comment-reply.is-active,
.js-comment-upvote.is-active,
.js-comment-upvote.upvoted,
.comment-share.is-open .comment-share-trigger,
.post-share.is-open .js-share-trigger,
.comment-options.is-open .comment-action-btn {
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-wide);
  background: var(--background-gray);
  color: var(--color-text-dark);
}

/* Comment Share */
.comment-share,
.post-share {
  position: relative;
}

.comment-share-trigger {
  padding-inline: 0.75rem;
}

.comment-share-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  bottom: auto;
  left: 0;
  right: auto;
  min-width: 180px;
  width: max-content;
  max-width: min(320px, calc(100vw - 16px));
  background: var(--color-background, #ffffff);
  border: 1px solid var(--color-border-light, #e5e7eb);
  border-radius: 0.5rem;
  box-shadow: 0px 12px 24px rgba(15, 23, 42, 0.12);
  padding: 0.35rem 0;
  z-index: 9999;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  pointer-events: none;
}

.comment-share-menu:not([hidden]) {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.comment-share-menu[hidden] {
  display: none;
}

.comment-share-menu.is-flipped {
  top: auto;
  bottom: calc(100% + 0.35rem);
}

.comment-share-menu::before,
.comment-share-menu::after {
  display: none;
  content: none;
}

.share-menu-item {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--color-text-secondary, #6b7280);
  cursor: pointer;
  padding: 0.45rem 0.95rem;
  text-align: left;
}

.share-menu-item:hover,
.share-menu-item:focus-visible {
  background: var(--background-gray, #f3f4f6);
  color: var(--color-text-dark, #111827);
  outline: none;
}

.share-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.share-menu-icon svg {
  width: 1rem;
  height: 1rem;
}

.share-menu-text {
  flex: 1;
}

.share-menu-feedback {
  font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */
  color: var(--color-brand, #2563eb);
  padding: 0.25rem 0.95rem 0;
}

.share-menu-feedback.is-error {
  color: var(--color-error, #dc2626);
}

@media (max-width: 640px) {
  .comment-share-menu {
      max-width: min(320px, calc(100vw - 16px));
  }

  .share-menu-item {
      font-size: 1rem;
      padding-block: 0.6rem;
  }

  .share-menu-icon svg {
      width: 1.1rem;
      height: 1.1rem;
  }

  .share-menu-feedback {
      text-align: center;
  }
}

/* ==========================================================================
   Comment Children & Threading
   ========================================================================== */

.comment-children {
  position: relative;
}

/* Reply Levels - Clean hierarchical flow */
.reply-level-1 {
  margin-left: 0;
  padding-inline: 0.7rem;
}

.reply-level-2 {
  margin-left: 1rem;
  padding-inline: 0.7rem;
}

.reply-level-3 {
  margin-left: 1.5rem;
  padding-inline: 0.7rem;
}

.reply-level-4 {
  margin-left: 2rem;
  padding-inline: 0.7rem;
}

.reply-level-5 {
  margin-left: 2.5rem;
  padding-inline: 0.7rem;
}

/* Reddit-Style Comment Indentation for Rendered Comments */
.comments-list-level-0 {
  margin: 0;
  padding: 0;
}

.comments-list-level-1 {
  margin-left: 1.5rem;
  padding-left: 0;
  border-left: 2px solid var(--color-border-light, #e5e7eb);
  position: relative;
}

.comments-list-level-2 {
  margin-left: 1.5rem;
  padding-left: 0;
  border-left: 2px solid var(--color-border-light, #e5e7eb);
  position: relative;
}

.comments-list-level-3 {
  margin-left: 1.5rem;
  padding-left: 0;
  border-left: 2px solid var(--color-border-light, #e5e7eb);
  position: relative;
}

.comments-list-level-4,
.comments-list-level-5,
.comments-list-level-6 {
  margin-left: 1.5rem;
  padding-left: 0;
  border-left: 2px solid var(--color-border-light, #e5e7eb);
  position: relative;
}

/* Comment Item Rendered - Reddit Style */
.comment-item-rendered {
  position: relative;
  padding: 0.75rem 0.5rem;
  margin-bottom: 0.5rem;
  margin-left: 0;
  background: var(--color-background, #ffffff);
  border-radius: var(--border-radius-sm, 4px);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}

.comment-item-rendered:hover {
  background: var(--color-light-bg, #f9fafb);
}

/* Comment Header with Collapse Button */
.comment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.comment-collapse-btn {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary, #6b7280);
  border-radius: 4px;
  transition: all 0.2s ease;
  min-width: 24px;
  min-height: 24px;
  flex-shrink: 0;
}

.comment-collapse-btn:hover {
  background: var(--color-light-bg, #f3f4f6);
  color: var(--color-text-dark, #111827);
}

.comment-collapse-btn:focus-visible {
  outline: 2px solid var(--color-brand, #3b82f6);
  outline-offset: 2px;
}

.collapse-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
  transform: rotate(0deg);
}

.comment-item-rendered[data-collapsed="true"] .collapse-icon {
  transform: rotate(-90deg);
}

/* Comment Replies Container */
.comment-replies-container {
  padding-top: 0.75rem;
  transition: opacity 0.2s ease;
}

.comment-item-rendered[data-collapsed="true"] .comment-replies-container {
  display: none;
}

/* Collapsed Indicator */
.comment-collapsed-indicator {
  padding: 0.5rem;
  padding-top: 1rem;
  font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */
  color: var(--color-text-secondary, #6b7280);
  background: var(--color-light-bg, #f9fafb);
  border-radius: var(--border-radius-sm, 4px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-collapsed-indicator:hover {
  background: var(--color-border-light, #e5e7eb);
  color: var(--color-text-dark, #111827);
}

/* Continue Thread Link - Reddit Style */
.continue-thread-link {
  display: inline-block;
  padding: 0.25rem 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted, #6b7280);
  text-decoration: none;
  background: transparent;
  border: none;
  transition: color 0.2s ease;
  cursor: pointer;
  font-weight: var(--font-weight-medium, 500);
  /* Align with comment hierarchy - match comments-list-level indentation exactly */
  margin-left: 1.5rem;
  padding-left: 0;
}

/* Ensure it aligns properly within comment-children container */
.comment-children > .continue-thread-link {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  /* Match the exact indentation of comments-list-level containers */
  margin-left: 1.5rem;
  padding-left: 0;
}

.continue-thread-link:hover {
  color: var(--color-brand, #3b82f6);
  text-decoration: underline;
}

.continue-thread-link:focus-visible {
  outline: 2px solid var(--color-brand, #3b82f6);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Load More Replies Link - Reddit Style */
.load-more-replies-link {
  display: inline-block;
  padding: 0.25rem 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted, #6b7280);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  font-weight: var(--font-weight-medium, 500);
  font-family: inherit;
  /* Align with comment hierarchy - match comments-list-level indentation exactly */
  margin-left: 1.5rem;
  padding-left: 0;
}

/* Ensure it aligns properly within comment-children container */
.comment-children > .load-more-replies-link {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  /* Match the exact indentation of comments-list-level containers */
  margin-left: 1.5rem;
  padding-left: 0;
}

.load-more-replies-link:hover {
  color: var(--color-brand, #3b82f6);
  text-decoration: underline;
}

.load-more-replies-link:focus-visible {
  outline: 2px solid var(--color-brand, #3b82f6);
  outline-offset: 2px;
  border-radius: 2px;
}

.load-more-replies-link:active {
  opacity: 0.8;
}

/* Highlight comment when navigating to it */
.comment-item.highlight-comment {
  animation: highlightComment 2s ease;
}

@keyframes highlightComment {
  0% {
    background: var(--color-brand-light, #dbeafe);
  }
  50% {
    background: var(--color-brand-light, #dbeafe);
  }
  100% {
    background: var(--color-background, #ffffff);
  }
}

/* Thread Line for Nested Comments - Reddit Style */
.comments-list-level-1::before,
.comments-list-level-2::before,
.comments-list-level-3::before,
.comments-list-level-4::before,
.comments-list-level-5::before,
.comments-list-level-6::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border-light, #e5e7eb);
  opacity: 0.6;
  z-index: 0;
}

/* Enhanced Thread Lines with Hover Effect */
.comments-list-level-1:hover::before,
.comments-list-level-2:hover::before,
.comments-list-level-3:hover::before,
.comments-list-level-4:hover::before,
.comments-list-level-5:hover::before,
.comments-list-level-6:hover::before {
  opacity: 0.8;
  background: var(--color-brand, #3b82f6);
}

/* Thread Line Connection Points */
.comment-item-rendered {
  position: relative;
  z-index: 1;
}

/* Horizontal Thread Line at Top of Nested Comments */
.comments-list-level-1 > .comment-item-rendered::before,
.comments-list-level-2 > .comment-item-rendered::before,
.comments-list-level-3 > .comment-item-rendered::before,
.comments-list-level-4 > .comment-item-rendered::before,
.comments-list-level-5 > .comment-item-rendered::before,
.comments-list-level-6 > .comment-item-rendered::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.75rem;
  width: 0.75rem;
  height: 2px;
  background: var(--color-border-light, #e5e7eb);
  opacity: 0.6;
  z-index: 0;
}

/* Collapsible Comment Structure */
.comment-item-rendered.has-replies {
  position: relative;
}

.comment-item-rendered.has-replies::after {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 1.5rem;
  bottom: -0.5rem;
  width: 2px;
  background: var(--color-border-light, #e5e7eb);
  opacity: 0.4;
}

/* Collapsed State */
.comment-item:not([open]) .comment-children {
  display: none;
}

/* Hide the default details marker */
.comment-item summary::-webkit-details-marker {
  display: none;
}

.comment-item summary::marker {
  display: none;
}

/* Comment Threading */
.comment-item.reply-level-1 {
  margin-left: 2rem;
  border-left: 2px solid var(--color-border);
  padding-left: 1rem;
}

.comment-item.reply-level-2 {
  margin-left: 4rem;
  border-left: 2px solid var(--color-border);
  padding-left: 1rem;
}

/* ==========================================================================
   Comment Card (for Admin Panel)
   ========================================================================== */

.comment-card {
  background: var(--color-background, #ffffff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--border-radius-lg, 12px);
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.comment-card:hover {
  border-color: var(--color-border-hover, #d1d5db);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.comment-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-background-secondary, #f3f4f6);
  flex-shrink: 0;
}

.comment-author-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.comment-username {
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wide);
  color: var(--color-text-dark, #111827);
  font-size: var(--text-base);
}

.comment-date {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary, #9ca3af);
}

.comment-delete-btn {
  padding: 0.5rem 1rem;
  background: var(--color-error, #dc2626);
  color: white;
  border: none;
  border-radius: var(--border-radius-md, 6px);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.comment-delete-btn:hover:not(:disabled) {
  background: var(--color-error-dark, #b91c1c);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.comment-delete-btn:active:not(:disabled) {
  transform: translateY(0);
}

.comment-delete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.comment-delete-btn:focus-visible {
  outline: 2px solid var(--color-error, #dc2626);
  outline-offset: 2px;
}

.comment-card-body {
  margin-bottom: 1rem;
}

.comment-text {
  margin: 0;
  color: var(--color-text-dark, #111827);
  line-height: 1.6;
  font-size: var(--text-base); /* 16px for better readability */
  white-space: pre-wrap;
  word-wrap: break-word;
}

.comment-card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--color-text-secondary, #6b7280);
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border, #e5e7eb);
}

.comment-post-context {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-post-context a {
  color: var(--color-brand, #2563eb);
  text-decoration: none;
  font-weight: 500;
}

.comment-post-context a:hover {
  text-decoration: underline;
}

.comment-reply-indicator {
  font-style: italic;
  color: var(--color-text-tertiary, #9ca3af);
}

/* ==========================================================================
   Comment Options Menu
   ========================================================================== */

.comment-options {
  position: relative;
  display: inline-block;
}

.comment-options .comment-action-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted, #6b7280);
  font-size: 0.80rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  line-height: 1;
}

.comment-options .comment-action-btn:hover {
  background: var(--color-background-hover, #f3f4f6);
  color: var(--color-text, #111827);
}

.comment-options.is-open .comment-action-btn {
  background: var(--color-background-hover, #f3f4f6);
  color: var(--color-text, #111827);
}

.comment-options-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  background: white !important;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0;
  z-index: 1000;
}

.comment-options-menu[hidden] {
  display: none;
}

.comment-options-menu button,
.comment-options-menu .share-menu-item {
  width: 100%;
  padding: 0.625rem 1rem;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 1rem;
  color: var(--color-text, #111827);
  cursor: pointer;
  transition: background-color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-options-menu button:hover,
.comment-options-menu .share-menu-item:hover {
  background: var(--color-background-hover, #f3f4f6);
}

.comment-options-menu button[data-comment-action="delete"]:hover,
.comment-options-menu .share-menu-item[data-comment-action="delete"]:hover {
  background: #fee2e2;
  color: #991b1b;
}

.comment-options-menu .share-menu-icon {
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-options-menu .share-menu-icon svg {
  width: 100%;
  height: 100%;
}

.comment-options-menu .share-menu-text {
  flex: 1;
}

.comment-options-menu .share-menu-feedback {
  padding: 0.625rem 1rem;
  font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */
  color: var(--color-text-muted, #6b7280);
}

/* ==========================================================================
   Share Modal Preview
   ========================================================================== */

.share-modal__preview,
.embed-preview {
  display: block;
}

.share-preview-card,
.embed-preview-card {
  border: 1px solid var(--color-border-light, #e5e7eb);
  border-radius: 0.75rem;
  background: var(--color-light-bg, #f9fafb);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.share-preview-card__meta,
.embed-preview-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-text-secondary, #6b7280);
  gap: 0.75rem;
}

.share-preview-card__author,
.embed-preview-card__author {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-dark, #111827);
}

.share-preview-card__time,
.embed-preview-card__time {
  font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */
  color: var(--color-text-tertiary, #9ca3af);
}

.share-preview-card__body,
.embed-preview-card__body {
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-dark, #111827);
  white-space: pre-wrap;
}

.share-preview-card__footer,
.embed-preview-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-text-secondary, #6b7280);
}

.embed-preview-card__link {
  color: var(--color-brand, #2563eb);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
}

.embed-preview-card__link:hover,
.embed-preview-card__link:focus {
  text-decoration: underline;
}

/* ==========================================================================
   Mobile Responsive Styles
   ========================================================================== */

/* Mobile Reply Levels (320px+) */
.reply-level-1 {
  margin-left: 0;
}

.reply-level-2 {
  margin-left: 0.25rem;
}

.reply-level-3 {
  margin-left: 0.375rem;
}

.reply-level-4 {
  margin-left: 0.5rem;
}

.reply-level-5 {
  margin-left: 0.625rem;
}

.thread-line,
.main-thread-line {
  left: -0.75rem;
  width: 1px; /* Increased from 0.5px for better visibility */
}

.comment-action-btn {
  font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */ /* Minimum 12px for WCAG compliance */
  padding: 0.15rem 0.3rem;
}

.comment-meta {
  gap: 0.25rem;
}

.author-name {
  font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */
  letter-spacing: var(--letter-spacing-wide);
  line-height: var(--line-height-relaxed); /* Improved readability for small text */
}

.comment-time {
  font-size: var(--text-sm); /* Minimum 14px for WCAG compliance - increased from 12px */
  letter-spacing: var(--letter-spacing-wide);
  line-height: var(--line-height-loose); /* Improved readability for small text */
}

/* Small Mobile Landscape (480px+) */
@media (min-width: 480px) {
  /* Enhanced Reply Levels */
  .reply-level-1 {
      margin-left: 0;
  }
  
  .reply-level-2 {
      margin-left: 0.5rem;
  }
  
  .reply-level-3 {
      margin-left: 0.75rem;
  }
  
  .reply-level-4 {
      margin-left: 1rem;
  }
  
  .reply-level-5 {
      margin-left: 1.25rem;
  }
  
  
  .thread-line,
  .main-thread-line {
      left: -1rem;
      width: 1px; /* Increased from 0.5px for better visibility */
  }
  
  .comment-action-btn {
      font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */ /* Minimum 12px for WCAG compliance */
      padding: 0.2rem 0.4rem;
  }
  
  /* Enhanced Comments */
  .author-name {
      font-size: var(--text-sm);
  }
  
  .comment-time {
      font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */ /* Minimum 12px for WCAG compliance */
  }
}

/* Tablet Portrait (768px+) */
@media (min-width: 768px) {
  .comment-meta {
      gap: 0.5rem;
  }
  
  .author-name {
      font-size: var(--text-sm);
  }
  
  .comment-time {
      font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */
  }
  
  /* Enhanced Reply Levels */
  .reply-level-1 {
      margin-left: 0;
  }
  
  .reply-level-2 {
      margin-left: 1rem;
  }
  
  .reply-level-3 {
      margin-left: 1.5rem;
  }
  
  .reply-level-4 {
      margin-left: 2rem;
  }
  
  .reply-level-5 {
      margin-left: 2.5rem;
  }
  
  .thread-line,
  .main-thread-line {
      left: -1.5rem;
      width: 1px;
  }
  
  .comment-action-btn {
      font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */
      padding: 0.25rem 0.5rem;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .author-name {
      font-size: var(--text-sm);
  }
  
  .comment-time {
      font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */
  }
  
  .thread-line,
  .main-thread-line {
      left: -1.5rem;
      width: 1px;
  }
  
  .comment-action-btn {
      font-size: var(--text-sm); /* Increased from 12px to 14px for accessibility */
      padding: 0.25rem 0.5rem;
  }
}

