/* BBclubs Post Styling */

/* Prevent body scrolling when using fixed layout */
body {
  overflow-x: hidden;
}

/* Reply indicator styling */
.reply-indicator {
  position: absolute;
  bottom: 12px;
  right: 43px;
  width: 7px;
  height: 7px;
  background-color: #4CAF50;
  border-radius: 50%;
  animation: pulse-green 2s infinite;
  z-index: 10;
  border: 2px solid white;
}

/* Pulse animation for reply indicator */
@keyframes pulse-green {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}


/* Deleted Post Styling */
.username.deleted {
  color: #999 !important;
  font-style: italic !important;
  text-decoration: line-through !important;
}

/* Lock Badge Styling */
.post-locked-badge {
  display: inline-block;
  background-color: #e72121;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.member-avatar {
  text-align: center;
}
.member-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #ddd;
}

/* Creator avatar styling */
.creator-avatar img {
  width: 35px !important;
  height: 35px !important;
  border-radius: 50px !important;
  object-fit: cover;
}

/* Group profile photo overlay styling */
.group-info-section.with-profile-photo {
  margin-top: 0px;
}

.group-info-section.with-cover-photo {
  border-radius: 0 0 8px 8px;
}

.group-info-section:not(.with-cover-photo) {
  border-radius: 8px;
}

.group-cover-photo {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}

.group-cover-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.group-info-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-top: 0px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 1px solid #e9ecef;
  position: relative;
}

/* Reddit-style Threaded Comment System */
.comment-item {
  position: relative;
  margin-bottom: 4px;
  min-height: 20px;
}

/* Threaded indentation system */
.comment-item[data-depth="0"] { 
  margin-left: 0px; 
  padding-left: 0px;
  border-left: none;
}

.comment-item[data-depth="1"] { 
  margin-left: 0px; 
  padding-left: 24px;
   border-left: 1px solid #c0c0c0;
}

.comment-item[data-depth="2"] { 
  margin-left: 0px; 
  padding-left: 48px;
   border-left: 1px solid #c0c0c0;
}

.comment-item[data-depth="3"] { 
  margin-left: 0px; 
  padding-left: 72px;
   border-left: 1px solid #c0c0c0;
}

.comment-item[data-depth="4"] { 
  margin-left: 0px; 
  padding-left: 30px;
   border-left: 1px solid #c0c0c0;
}

.comment-item[data-depth="5"] { 
  margin-left: 0px; 
  padding-left: 120px;
   border-left: 1px solid #c0c0c0;
}

.comment-item[data-depth="6"] { 
  margin-left: 0px; 
  padding-left: 144px;
   border-left: 1px solid #c0c0c0;
}

.comment-item[data-depth="7"] { 
  margin-left: 0px; 
  padding-left: 168px;
   border-left: 1px solid #c0c0c0;
}

.comment-item[data-depth="8"] { 
  margin-left: 0px; 
  padding-left: 192px;
   border-left: 1px solid #c0c0c0;
}

/* Thread branch separation - add margin between different branches at all levels */
/* Compact spacing for replies */
.comment-item[data-depth="1"]:not(:first-child) {
  margin-top: 5px;
  border-top: 1px solid #ffffff;
  padding-top: 5px;
}

.comment-item[data-depth="2"]:not(:first-child) {
  margin-top: 5px;
  border-top: 1px solid #ffffff;
  padding-top: 5px;
}

.comment-item[data-depth="3"]:not(:first-child) {
  margin-top:5px;
  border-top: 1px solid #ffffff;
  padding-top: 5px;
}

.comment-item[data-depth="4"]:not(:first-child) {
  margin-top: 5px;
  border-top: 1px solid #ffffff;
  padding-top: 5px;
}

.comment-item[data-depth="5"]:not(:first-child) {
  margin-top: 5px;
  border-top: 1px solid #ffffff;
  padding-top: 5px;
}

.comment-item[data-depth="6"]:not(:first-child) {
  margin-top: 5px;
  border-top: 1px solid #ffffff;
  padding-top: 5px;
}

.comment-item[data-depth="7"]:not(:first-child) {
  margin-top: 5px;
  border-top: 1px solid #ffffff;
  padding-top: 5px;
}

.comment-item[data-depth="8"]:not(:first-child) {
  margin-top: 5px;
  border-top: 1px solid #ffffff;
  padding-top: 5px;
}

/* Compact styling for replies with right indent */
.comment-item[data-depth="1"] {
  margin-left: 20px;
  padding-left: 30px;
  border-left: 1px solid #c0c0c0;
}

.comment-item[data-depth="2"] {
  margin-left: 60px;
  padding-left: 30px;
  border-left: 1px solid #c0c0c0;
}

.comment-item[data-depth="3"] {
  margin-left: 97px;
  padding-left: 30px;
  border-left: 1px solid #c0c0c0;
}

.comment-item[data-depth="4"] {
  margin-left: 135px;
}

.comment-item[data-depth="5"] {
  margin-left: 172px;
  padding-left: 30px;
 border-left: 1px solid #c0c0c0;
}

.comment-item[data-depth="6"] {
  margin-left: 210px;
  padding-left: 30px;
  border-left: 1px solid #c0c0c0;
}

.comment-item[data-depth="7"] {
  margin-left: 248px;
  padding-left: 30px;
  border-left: 1px solid #c0c0c0;
}

.comment-item[data-depth="8"] {
  margin-left: 285px;
  padding-left: 30px;
 border-left: 1px solid #c0c0c0;
}

/* Visual thread branch indicators - subtle dots for all levels */
.thread-branch {
  position: relative;
}

/* Enhanced thread branch separation - more subtle */
.comment-item[data-is-new-branch="1"] {
  margin-top: 16px;
  border-top: 1px solid #e9ecef;
  padding-top: 12px;
  position: relative;
}

/* Show thread branch label for all replies (depth > 0) */
.comment-item[data-depth="1"][data-is-new-branch="1"]::before {
  content: 'Thread ' attr(data-thread-branch) !important;
  position: absolute !important;
  top: -6px !important;
  left: 5px !important;
  background: transparent !important;
  color: #6c757d !important;
  font-size: 9px !important;
  padding: 1px 4px !important;
  border-radius: 2px !important;
  z-index: 5 !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  display: inline-block !important;
  line-height: 1 !important;
  writing-mode: horizontal-tb !important;
}

/* Show simplified thread labels for nested replies (depth > 1) */
.comment-item[data-depth="2"]::before,
.comment-item[data-depth="3"]::before,
.comment-item[data-depth="4"]::before,
.comment-item[data-depth="5"]::before,
.comment-item[data-depth="6"]::before,
.comment-item[data-depth="7"]::before,
.comment-item[data-depth="8"]::before {
  content: attr(data-thread-hierarchy) !important;
  position: absolute !important;
  top: -6px !important;
  left: 5px !important;
  background: transparent !important;
  color: #6c757d !important;
  font-size: 9px !important;
  padding: 1px 4px !important;
  border-radius: 2px !important;
  z-index: 5 !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  display: inline-block !important;
  line-height: 1 !important;
  writing-mode: horizontal-tb !important;
}

/* Only show thread hierarchy if it's not empty */
.comment-item[data-thread-hierarchy=""]::before {
  content: none !important;
}

.comment-post {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 6px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Enhanced styling for different depths - main posts vs replies */
.comment-item[data-depth="0"] {
  margin-top: 0px;
}

.comment-item[data-depth="0"] .comment-post {
  background: #f3f3f3bd;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
  padding: 16px 20px;
  border: 0px;
  border-radius: 3px;
}

.comment-post:hover {
  border-color: #007bff;
  box-shadow: 0 2px 6px rgba(0,123,255,0.15);
}

/* Post stats for main posts */
.post-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #6b7280;
}

.post-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-stat-icon {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

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

.comment-post .post-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  color: #666;
  margin-left: 0;
  padding-left: 0;
}

.comment-post .poster-info {
  display: flex;
  align-items: center;
  margin-right: 8px;
}

.comment-post .poster-avatar {
  margin-right: 6px;
}

/* Adjust avatar margin for main posts */
.comment-item[data-depth="0"] .comment-post .poster-avatar {
  margin-right: 10px;
}

/* Avatar sizing - bigger for main posts, smaller for replies */
.comment-item[data-depth="0"] .comment-post .poster-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #e1e5e9;
}

.comment-item[data-depth]:not([data-depth="0"]) .comment-post .poster-avatar img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #e1e5e9;
}

.comment-post .poster-name {
  font-weight: 600;
  color: #007bff;
  text-decoration: none;
}

/* Compact poster info for replies */
.comment-item[data-depth]:not([data-depth="0"]) .comment-post .poster-name {
  font-size: 12px;
  font-weight: 500;
}

.comment-post .poster-name:hover {
  text-decoration: underline;
}

.comment-post .post-time {
  color: #666;
  margin-left: 8px;
}

.comment-post .post-separator {
  color: #868686;
  margin: 0px;
  font-weight: bold;
}

/* Compact post time for replies */
.comment-item[data-depth]:not([data-depth="0"]) .comment-post .post-time {
  font-size: 10px;
  margin-left: 4px;
}

/* Compact post separator for replies */
.comment-item[data-depth]:not([data-depth="0"]) .comment-post .post-separator {
  margin: 0 4px;
  font-size: 10px;
}

.comment-post .post-content {
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  margin-bottom: 8px;
}

/* Compact text for replies */
.comment-item[data-depth]:not([data-depth="0"]) .comment-post .post-content {
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.comment-post .post-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

/* Parent post actions at bottom right */
.comment-item[data-depth="0"] .comment-post .post-actions {
  justify-content: flex-start;
  margin-top: 12px;
  text-align: right;
  display: flex;
}

/* Compact post actions for replies */
.comment-item[data-depth]:not([data-depth="0"]) .comment-post .post-actions {
  gap: 4px;
  font-size: 9px;
  margin-top: 2px;
}

.comment-post .post-actions .button2 {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 2px;
  font-size: 11px;
  transition: all 0.2s ease;
}

.comment-post .post-actions .button2:hover {
  background: #e5e5e5f5;
  color: #666b6f;
  border-radius: 50px;
}

/* Remove focus outline from reply buttons */
.comment-post .post-actions .button2:focus {
  outline: none;
  box-shadow: none;
}

/* Remove focus outline from all buttons in post actions */
.post-actions button:focus,
.post-actions input[type="button"]:focus,
.post-actions input[type="submit"]:focus {
  outline: none;
  box-shadow: none;
}

/* Enhanced typography for comments */
.comment-content {
  background-color: #fff;
  line-height: 1.5;
  font-size: 14px;
  color: #1f2937;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding: 3px 6px;
  border-radius: 3px;
}

.comment-content p {
  margin: 0 0 8px 0;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

/* Comment main content area */
.comment-main {
  flex: 1;
  min-width: 0;
}

.comment-post {
  display: flex;
  align-items: flex-start;
}

/* Threading indicators */
.thread-line {
  position: absolute;
  left: -2px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #10b981a6;
  z-index: 1;
}

.thread-connector {
  position: absolute;
  left: -2px;
  top: 20px;
  width: 16px;
  height: 2px;
  background: #10b981a6;
  z-index: 2;
}

/* Enhanced collapsed comment styling with smooth transitions */
.comment-item.collapsed .comment-post {
  display: none;
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Animated green dot for newly added replies (via JS class) */
.comment-item.new-post[data-depth]:not([data-depth="0"]) .comment-post::after {
  background: #28a745 !important;
  transform-origin: center;
  animation: dotPop 0.25s ease-out;
}

/* Also animate when landing on :target (after normal form submit/redirect) */
.comment-item:target[data-depth]:not([data-depth="0"]) .comment-post::after {
  background: #28a745 !important;
  transform-origin: center;
  animation: dotPop .25s ease-out;
}

/* Pop-in scale */
@keyframes dotPop {
  0%   { transform: scale(0.6); }
  100% { transform: scale(1); }
}


/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .comment-item.new-post[data-depth]:not([data-depth="0"]) .comment-post::after,
  .comment-item:target[data-depth]:not([data-depth="0"]) .comment-post::after {
    animation: none;
  }
}

@keyframes highlight {
  0% { border-left-color: #ffc107; }
  50% { border-left-color: #ff6b35; }
  100% { border-left-color: #ffc107; }
}

.comment-item.collapsed .comment-child-count {
  display: none;
}

.comment-item.collapsed .comment-collapse {
  background: #f8f9fa;
  border-color: #007bff;
  color: #007bff;
  display: block !important;
  visibility: visible !important;
  transform: rotate(0deg);
  transition: all 0.2s ease;
}

.comment-item.collapsed .comment-collapse::after {
  content: '-';
  font-size: 10px;
  color: #6b7280;
  font-weight: bold;
  padding-left: 6px;
}

.comment-item .comment-collapse {
  transition: all 0.2s ease;
}

.comment-item .comment-collapse.collapsed {
  transform: rotate(0deg);
}

/* BBCode toolbar styling */
.bbcode-toolbar {
    margin-bottom: 5px;
    padding: 5px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.bbcode-toolbar .button2 {
    margin: 2px;
    padding: 3px 6px;
    font-size: 11px;
}

/* Post actions styling */
.post-actions {
  margin-top: 5px;
  text-align: right;
}

/* Center submit buttons in all forms */
.submit-buttons {
  text-align: center;
}

/* Center submit buttons in edit forms */
fieldset.submit-buttons {
  text-align: center;
}

/* Center submit buttons in threaded reply forms */
div[style*="text-align: center"] {
  text-align: center !important;
}

/* Ensure all submit button containers are centered */
div.submit-buttons,
fieldset.submit-buttons,
.submit-buttons {
  text-align: center !important;
}

/* Center buttons within submit button containers */
.submit-buttons input[type="submit"],
.submit-buttons input[type="button"],
.submit-buttons button {
  margin: 0 5px;
}

/* Toggle switch functionality */
.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
  background: #007bff;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider .toggle-knob {
  transform: translateX(16px);
}

/* Smaller toggle for threaded replies */
.toggle-switch input[type="checkbox"]:checked + .toggle-slider[style*="width: 28px"] .toggle-knob {
  transform: translateX(14px) !important;
}

/* Override inline styles for smaller toggle knobs */
.toggle-slider[style*="width: 28px"] .toggle-knob[style*="transform: translateX(13px)"] {
  transform: translateX(14px) !important;
}

.toggle-switch .toggle-slider:hover {
  background: #b8b8b8;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider:hover {
  background: #0056b3;
}

/* Reply form textarea styling */
.reply-form textarea {
  width: 100%;
  min-height: 70px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

.post-actions form {
  display: inline;
}

/* Reply styling */
.reply-container {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  border-left: 4px solid #007cba;
}

.reply-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.reply-poster-avatar {
  margin-right: 10px;
}

.reply-poster-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #ddd;
}

.reply-poster-name {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.reply-time {
  color: #666;
  font-size: 0.8rem;
  margin-left: auto;
}

.reply-content {
  color: #555;
  line-height: 1.5;
  font-size: 0.9rem;
}

/* Reply form styling */
.reply-form {
  background: #ffffff;
  border-radius: 0px;
  padding: 0px;
  margin-top: 0px;
  border: 1px solid #ffffff;
}

.reply-form h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.1rem;
}

.reply-form textarea {
  width: 100%;
  min-height: 35px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

.reply-form .submit-buttons {
  margin-top: 15px;
  text-align: center;
}

.reply-form .button1 {
  padding: 8px 16px;
  background: #2d94c7;
  color: white;
  border: 1px solid #007cba;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

.reply-form .button1:hover {
  background: #005a87;
  border-color: #005a87;
}

.reply-form .button2 {
  -webkit-appearance: button;
  appearance: button;
  cursor: pointer;
  padding: 8px 16px;
  background: #e0e0e0;
  color: #545454;
  border: 1px solid #cecece;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

.reply-form .button2:hover {
  background: #d0d0d0;
  border-color: #b8b8b8;
  color: #333;
}

/* Two-column layout */
.page-layout {
  display: flex;
  gap: 0px;
  margin-top: 20px;
  transition: all 0.3s ease;
  min-height: calc(100vh - 120px); /* Minimum height minus header */
  position: relative;
}

.sidebar {
  width: 22%;
  background: #ffffff;
  border-radius: 0px;
  padding: 8px;
  border-right: 1px solid #e5e7eb;
  height: fit-content;
  transition: all 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  position: sticky;
  top: 20px;
  align-self: flex-start;
  max-height: calc(100vh - 40px);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  scrollbar-width: thin; /* Firefox - always reserve space */
  scrollbar-color: transparent transparent; /* Firefox - transparent by default */
  -ms-overflow-style: -ms-autohiding-scrollbar; /* IE and Edge */
}

/* Custom scrollbar for sidebar - transparent by default, visible on hover */
.sidebar::-webkit-scrollbar {
  width: 6px; /* Always reserve space to prevent content shift */
}

.sidebar::-webkit-scrollbar-track {
  background: transparent; /* Hide track by default */
}

.sidebar::-webkit-scrollbar-thumb {
  background: transparent; /* Hide thumb by default */
  border-radius: 3px;
}

.sidebar:hover {
  scrollbar-color: #c1c1c1 #f1f1f1; /* Firefox - show on hover */
}

.sidebar:hover::-webkit-scrollbar-track {
  background: #f1f1f1; /* Show track on hover */
  border-radius: 3px;
}

.sidebar:hover::-webkit-scrollbar-thumb {
  background: #c1c1c1; /* Show thumb on hover */
  border-radius: 3px;
}

.sidebar:hover::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8; /* Darker on thumb hover */
}

.sidebar.hidden {
  width: 0;
  padding: 0;
  margin: 0;
  border: none;
  opacity: 0;
}

/* ============================================
   MODERN MINIMALIST SIDEBAR
   Clean, compact, data-focused design
   ============================================ */

/* Compact Header */
.sidebar-commpact-header {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e5e7eb;
}

.header-group-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-name-main {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.group-meta-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Creator Compact */
.sidebar-creator-compact {
  margin-bottom: 24px;
}

.creator-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 10px;
}

.creator-avatar-inline {
  flex-shrink: 0;
}

.creator-avatar-inline img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
}

.creator-info-inline {
  flex: 1;
  min-width: 0;
}

.creator-name-inline {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.creator-meta-inline {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #6b7280;
}

.creator-meta-inline svg {
  flex-shrink: 0;
  color: #9ca3af;
}

/* Description Compact */
.sidebar-desc-compact {
  margin-bottom: 24px;
}

.desc-content-compact {
  padding: 14px;
  background: #f9fafb;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
}

/* Statistics Compact */
.sidebar-stats-compact {
  margin-bottom: 24px;
}

.stats-compact-row {
  display: flex;
  gap: 12px;
}

.stat-item-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.stat-item-compact:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.stat-icon-compact {
  font-size: 20px;
  line-height: 1;
}

.stat-details-compact {
  flex: 1;
}

.stat-value-compact {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.stat-label-compact {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

/* Activity Overview */
.sidebar-activity-compact {
  margin-bottom: 24px;
  padding: 14px;
  background: #f9fafb;
  border-radius: 10px;
}

.activity-compact-header {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.activity-compact-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-item-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #ffffff;
  border-radius: 8px;
  font-size: 12px;
}

.activity-icon-compact {
  font-size: 16px;
  line-height: 1;
}

.activity-label-compact {
  flex: 1;
  color: #6b7280;
  font-weight: 500;
}

.activity-value-compact {
  color: #111827;
  font-weight: 700;
}

.activity-item-compact.new-members {
  background: #ecfdf5;
  border: 1px solid #d1fae5;
}

.activity-item-compact.new-members .activity-value-compact {
  color: #059669;
}

/* Top Contributor */
.sidebar-top-contributor {
  margin-bottom: 24px;
  padding: 14px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: 10px;
}

.top-contributor-header {
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.top-contributor-content {
  padding: 10px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #fbbf24;
}

.top-contributor-name {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.top-contributor-count {
  font-size: 12px;
  color: #92400e;
  font-weight: 600;
}

/* Quick Actions */
.sidebar-quick-actions {
  margin-bottom: 24px;
  padding: 14px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 10px;
}

.quick-actions-header {
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #78350f;
  transition: all 0.2s ease;
}

.quick-action-item:hover {
  background: #fffbeb;
  border-color: #f59e0b;
  transform: translateX(2px);
}

.quick-action-icon {
  font-size: 16px;
  line-height: 1;
}

.quick-action-text {
  flex: 1;
}

/* Navigation Compact */
.sidebar-nav-compact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.nav-btn-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
  color: #374151;
}

.nav-btn-compact:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateX(2px);
}

.nav-btn-icon {
  font-size: 18px;
  line-height: 1;
}

.nav-btn-text {
  flex: 1;
  font-weight: 500;
}

.nav-btn-count {
  color: #9ca3af;
  font-weight: 400;
}

/* Members Compact */
.sidebar-members-compact {
  margin-bottom: 24px;
}

.members-compact-header {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.members-compact-list {
  max-height: 300px;
  overflow-y: auto;
}

.member-compact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.member-compact-item:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.member-avatar-compact {
  flex-shrink: 0;
}

.member-avatar-compact img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.member-fallback-compact {
  width: 32px;
  height: 32px;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #9ca3af;
}

.member-details-compact {
  flex: 1;
  min-width: 0;
}

.member-name-compact {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
}

.member-role-compact {
  font-size: 12px;
  color: #9ca3af;
}

.members-empty-compact {
  padding: 30px 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}

/* Action Compact */
.sidebar-action-compact {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.action-form-compact {
  margin: 0;
}

.action-btn-compact {
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn-compact.join-btn {
  background: #111827;
  color: white;
}

.action-btn-compact.join-btn:hover {
  background: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn-compact.leave-btn {
  background: #ef4444;
  color: white;
}

.action-btn-compact.leave-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.creator-showcase-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 12px;
}

.creator-showcase-header svg {
  color: #10b981;
  opacity: 0.9;
}

.creator-showcase-label {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.creator-showcase-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.creator-showcase-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.05), transparent);
  transition: left 0.5s ease;
}

.creator-showcase-card:hover::before {
  left: 100%;
}

.creator-showcase-card:hover {
  border-color: #10b981;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
  transform: translateY(-2px);
}

.creator-showcase-avatar-wrap {
  position: relative;
}

.creator-showcase-avatar-border {
  position: relative;
}

.creator-showcase-avatar-border img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #d1fae5;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.creator-showcase-status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: #10b981;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.creator-showcase-details {
  text-align: center;
  width: 100%;
}

.creator-showcase-name {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.creator-showcase-role {
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.creator-showcase-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.creator-showcase-date svg {
  color: #10b981;
  opacity: 0.8;
}

/* Description Panel */
.sidebar-description-panel {
  margin-bottom: 32px;
}

.description-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f1f5f9 0%, #ffffff 100%);
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
}

.description-panel-header svg {
  color: #10b981;
}

.description-panel-header span {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.description-panel-content {
  padding: 20px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-left: 4px solid #10b981;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.75;
  color: #475569;
}

.sidebar-module-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
}

.sidebar-module-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 30px;
  height: 1px;
  background: #10b981a6;
}

.module-icon {
  color: #10b981;
  flex-shrink: 0;
  opacity: 0.8;
}

.module-title {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  flex: 1;
}

.module-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 6px;
  background: #10b981;
  color: white;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* Owner Module */
.owner-display-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  border-left: 3px solid #10b981;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.owner-display-card:hover {
  border-left-color: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
  transform: translateY(-1px);
}

.owner-avatar-frame {
  flex-shrink: 0;
}

.owner-avatar-frame img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d1fae5;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.owner-info-block {
  flex: 1;
  min-width: 0;
}

.owner-display-name {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 6px;
}

.owner-created-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}

.owner-created-info svg {
  flex-shrink: 0;
  color: #10b981;
}

/* Description Module */
.description-text-block {
  font-size: 14px;
  line-height: 1.65;
  color: #4b5563;
  padding: 16px;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  border-left: 3px solid #10b981;
  border-radius: 8px;
}

/* Navigation Module */
.nav-link-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 3px solid transparent;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link-item:hover {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border-left-color: #10b981;
  color: #1f2937;
  transform: translateX(2px);
}

.nav-link-icon {
  flex-shrink: 0;
  color: #10b981;
  opacity: 0.7;
}

.nav-link-item:hover .nav-link-icon {
  opacity: 1;
  color: #059669;
}

.nav-link-text {
  flex: 1;
}

.nav-link-badge {
  color: #6b7280;
  font-weight: 400;
  font-size: 12px;
}

/* Members Module */
.members-list-container {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.member-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 3px solid #10b981;
  border-radius: 8px;
  margin-bottom: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.member-list-item:hover {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border-left-color: #059669;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

.member-avatar-mini {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: #f3f4f6;
  border: 2px solid #d1fae5;
}

.member-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-fallback-mini {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #059669;
}

.member-list-info {
  flex: 1;
  min-width: 0;
}

.member-list-username {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.member-list-role-tag {
  display: inline-block;
  padding: 3px 10px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #166534;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Empty State */
.empty-state-message {
  text-align: center;
  padding: 50px 20px;
  color: #9ca3af;
}

.empty-state-icon {
  margin: 0 auto 16px;
  color: #e5e7eb;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 14px;
  margin: 0;
  color: #6b7280;
  font-weight: 500;
}

/* Social Share Module */
.share-buttons-grid {
  display: flex;
  gap: 8px;
}

.share-button-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 3px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-button-item:hover {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border-left-color: #10b981;
  color: #1f2937;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.share-button-icon {
  flex-shrink: 0;
  color: #10b981;
  opacity: 0.8;
}

.share-button-item:hover .share-button-icon {
  opacity: 1;
  color: #059669;
}

/* Action Module */
.sidebar-action-module {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid #f3f4f6;
  position: relative;
}

.sidebar-action-module::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, #10b981, transparent);
}

.action-button-form {
  margin: 0;
}

.sidebar-action-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border: 2px solid #10b981;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-action-button:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-color: #047857;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}

.sidebar-action-button.leave-action {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: #dc2626;
  color: #ffffff;
}

.sidebar-action-button.leave-action:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border-color: #b91c1c;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25);
}

.action-button-icon {
  flex-shrink: 0;
  color: currentColor;
}

.main-content {
  width: 82%;
  flex: 1;
  transition: all 0.3s ease;
  overflow: visible;
  position: relative;
}

.main-content.expanded {
  width: 100%;
}

/* Ensure the main content container doesn't cause page overflow */
.main-content > * {
  max-width: 100%;
  box-sizing: border-box;
}

.sidebar-toggle {
  display: none !important;
}

.sidebar-toggle:hover {
  display: none !important;
}

.sidebar-toggle.hidden {
  display: none !important;
}

.sidebar-show-toggle {
  display: none !important;
}

.sidebar-show-toggle:hover {
  display: none !important;
}

.sidebar-show-toggle.visible {
  display: none !important;
}

/* Lightbox Gallery Styles - Force Full Screen Modal */
#lightbox {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.95) !important;
  z-index: 999999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#lightbox.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#lightbox .lightbox-content {
  position: relative !important;
  max-width: 90vw !important;
  max-height: 90vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  margin: 0 !important;
  padding: 0 !important;
}

#lightbox .lightbox-image {
  max-width: 100% !important;
  max-height: calc(100vh - 100px) !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
  margin: 0 !important;
  padding: 0 !important;
}

#lightbox .lightbox-close {
  position: absolute !important;
  top: -50px !important;
  right: 0 !important;
  color: white !important;
  font-size: 30px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  z-index: 1000000 !important;
  background: rgba(0, 0, 0, 0.5) !important;
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.3s ease !important;
}

#lightbox .lightbox-close:hover {
  background: rgba(0, 0, 0, 0.8) !important;
}

#lightbox .lightbox-nav {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: white !important;
  font-size: 40px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  z-index: 1000000 !important;
  padding: 15px 20px !important;
  user-select: none !important;
  background: rgba(0, 0, 0, 0.5) !important;
  border-radius: 50% !important;
  transition: background 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#lightbox .lightbox-nav:hover {
  background: rgba(0, 0, 0, 0.8) !important;
}

#lightbox .lightbox-prev {
  left: -80px !important;
}

#lightbox .lightbox-next {
  right: -80px !important;
}

#lightbox .lightbox-counter {
  position: absolute !important;
  bottom: -50px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  color: white !important;
  font-size: 14px !important;
  background: rgba(0, 0, 0, 0.7) !important;
  padding: 8px 16px !important;
  border-radius: 20px !important;
  margin: 0 !important;
}

/* Prevent body scroll when lightbox is active */
body.lightbox-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
}

@media (max-width: 768px) {
  .page-layout {
    flex-direction: column;
    min-height: auto; /* Allow natural height on mobile */
  }
  .sidebar {
    width: 100%;
    height: auto; /* Allow natural height on mobile */
    position: static; /* Remove sticky positioning on mobile */
    max-height: none; /* Remove height restrictions on mobile */
    top: auto;
    align-self: auto;
  }
  .main-content {
    width: 100%;
    overflow: visible;
  }
  .sidebar.hidden {
    display: none;
  }
  .sidebar-toggle,
  .sidebar-show-toggle {
    display: none;
  }
  body {
    overflow-x: visible; /* Allow natural scrolling on mobile */
  }
  
  /* Mobile lightbox adjustments */
  #lightbox .lightbox-content {
    max-width: 95vw !important;
    max-height: 95vh !important;
  }
  
  #lightbox .lightbox-image {
    max-height: calc(100vh - 80px) !important;
  }
  
  #lightbox .lightbox-nav {
    font-size: 30px !important;
    padding: 10px 15px !important;
  }
  #lightbox .lightbox-prev {
    left: -50px !important;
  }
  #lightbox .lightbox-next {
    right: -50px !important;
  }
  #lightbox .lightbox-close {
    top: -40px !important;
    font-size: 24px !important;
    width: 35px !important;
    height: 35px !important;
  }
  
  #lightbox .lightbox-counter {
    bottom: -40px !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
  }
}

/* Comment collapse button */
.comment-collapse {
  margin-top: 13px;
  position: absolute;
  left: -11px;
  top: -5px;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #6b7280;
  z-index: 4;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.comment-collapse:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #374151;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.comment-collapse.collapsed::after {
  content: '-';
  font-size: 10px;
  color: #6b7280;
  font-weight: bold;
}

.comment-collapse.expanded::after {
  content: '+';
  font-size: 10px;
  color: #374151;
  font-weight: bold;
}

/* Hide collapse button for root posts */
.comment-item[data-depth="0"] .comment-collapse {
  display: none;
}

/* Child count indicator */
.comment-child-count {
  position: absolute;
  left: -40px;
  top: 6px;
  font-size: 10px;
  color: #9ca3af;
  background: #f9fafb;
  padding: 2px 4px;
  border-radius: 2px;
  border: 1px solid #e5e7eb;
  z-index: 3;
  min-width: 16px;
  text-align: center;
}

.comment-item[data-depth="0"] .comment-child-count {
  display: none;
}

/* Hide child count when it's 0 */
.comment-child-count:empty,
.comment-child-count[data-count="0"] {
  display: none;
}

.comment-item[data-depth]:not([data-depth="0"]) .comment-post::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 0;
  width: 25px;
  height: 2px;
  background: #e1e1e1;
  left: -26px;
}

.comment-item[data-depth]:not([data-depth="0"]) .comment-post::after {
    content: '';
    position: absolute;
    top: 8px;
    left: -17px;
    width: 8px;
    height: 8px;
    background: #e1e1e1;
    border-radius: 50%;
}

/* Maximum depth styling - visual indicator that no further replies are allowed */
.comment-item[data-depth="8"] .comment-post {
  border-left: 3px solid #ff6b6b;
  background: #fff5f5;
  position: relative;
}

.comment-item[data-depth="8"] .comment-post::after {
  content: 'Maximum depth reached';
  position: absolute;
  top: -8px;
  right: 8px;
  background: #ff6b6b !important;  /* Added !important */
  color: white;
  font-size: 10px;
  padding: 0px;
  border-radius: 3px;
  font-weight: bold;
}

.comment-item[data-depth="1"] .comment-post,
.comment-item[data-depth="2"] .comment-post,
.comment-item[data-depth="3"] .comment-post,
.comment-item[data-depth="4"] .comment-post,
.comment-item[data-depth="5"] .comment-post,
.comment-item[data-depth="6"] .comment-post,
.comment-item[data-depth="7"] .comment-post,
.comment-item[data-depth="8"] .comment-post {
  background: #fafafa;
  padding: 3px 7px;
  border: 1px solid #e5e7eb;
  box-shadow: none;
  margin-bottom: 4px;
}

/* Avatar styling */
.poster-avatar {
  float: left;
  margin-right: 8px;
  margin-bottom: 5px;
}

.poster-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 3px;
  border: 1px solid #ccc;
}

/* Anonymous username styling */
.username.anonymous {
    font-size: 12px;
    color: #666666;
    font-weight: bold;
}

/* More options button styling */
button.button2.more_options {
    margin-top: 4px;
}

/* Participants avatars styling - Tree Leaves Effect */
.participants-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 0px;
    padding: 5px 0;
    justify-content: flex-end;
    position: relative;
}

/* Tree leaves positioning for main post contributors */
.participants-grid.tree-leaves {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    pointer-events: none;
    z-index: 10;
}

.participant-avatar {
    transition: all 0.3s ease;
    position: relative;
}

.participant-avatar:hover {
    transform: scale(1.1);
}

.participant-avatar img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #e1e5e9;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.participant-avatar:hover img {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

/* Enhanced tree leaves positioning along vertical wire line */
.participant-avatar.tree-leaf {
    position: absolute;
    pointer-events: auto;
    opacity: 1;
    z-index: 15;
}

.participant-avatar.tree-leaf img {
    width: 16px;
    height: 16px;
    border: 2px solid #e1e5e9;
}

/* Leaf positioning along the vertical wire line from main post to first reply */
.participant-avatar.tree-leaf:nth-child(1) { 
    top: 80px; 
    left: 8px; 
}
.participant-avatar.tree-leaf:nth-child(2) { 
    top: 100px; 
    left: 8px; 
}
.participant-avatar.tree-leaf:nth-child(3) { 
    top: 120px; 
    left: 8px; 
}
.participant-avatar.tree-leaf:nth-child(4) { 
    top: 140px; 
    left: 8px; 
}
.participant-avatar.tree-leaf:nth-child(5) { 
    top: 160px; 
    left: 8px; 
}
.participant-avatar.tree-leaf:nth-child(6) { 
    top: 180px; 
    left: 8px; 
}
.participant-avatar.tree-leaf:nth-child(7) { 
    top: 200px; 
    left: 8px; 
}
.participant-avatar.tree-leaf:nth-child(8) { 
    top: 220px; 
    left: 8px; 
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .participant-avatar.tree-leaf:nth-child(n) {
        left: 8px !important;
        top: calc(40px + (var(--leaf-index, 0) * 12px)) !important;
    }
    
    .participant-avatar.tree-leaf img {
        width: 12px;
        height: 12px;
        border-width: 1px;
    }
    
    .participant-avatar.tree-leaf .fallback-avatar {
        width: 12px !important;
        height: 12px !important;
        font-size: 6px !important;
    }
}

@media (max-width: 480px) {
    .participant-avatar.tree-leaf:nth-child(n) {
        left: 8px !important;
        top: calc(35px + (var(--leaf-index, 0) * 10px)) !important;
    }
    
    .participant-avatar.tree-leaf img {
        width: 10px;
        height: 10px;
        border-width: 1px;
    }
    
    .participant-avatar.tree-leaf .fallback-avatar {
        width: 10px !important;
        height: 10px !important;
        font-size: 5px !important;
    }
}

@media (max-width: 360px) {
    .participant-avatar.tree-leaf:nth-child(n) {
        left: 8px !important;
        top: calc(30px + (var(--leaf-index, 0) * 8px)) !important;
    }
    
    .participant-avatar.tree-leaf img {
        width: 8px;
        height: 8px;
        border-width: 1px;
    }
    
    .participant-avatar.tree-leaf .fallback-avatar {
        width: 8px !important;
        height: 8px !important;
        font-size: 4px !important;
    }
}

/* Deleted avatar styling in participants grid */
.participants-grid .deleted-avatar {
    width: 20px !important;
    height: 20px !important;
}

.participants-grid.tree-leaves .deleted-avatar {
    width: 16px !important;
    height: 16px !important;
}

/* Button styling improvements */
.button2 svg.icon-reply {
  vertical-align: middle;
  margin-right: 5px;
  margin-top: -2px; /* fine-tune vertical alignment */
}

.button2 {
  display: inline-flex;
  align-items: center;
  gap: 0px;
  line-height: 1;
}

/* Hide broken emoji images to prevent 404 errors */
img[src*="bbemoji"][src*=".svg"]:not([src*="1f468-1f9b1"]):not([src*="1f9d3"]) {
  display: none !important;
}

/* Fallback for missing emoji SVGs - show Unicode emoji instead */
img[src*="1f468-1f9b1.svg"]:not([src*="data:"]),
img[src*="1f9d3.svg"]:not([src*="data:"]) {
  display: none !important;
}

/* Thread Wires Hover Effects - High Specificity */
svg.bbclubs-wires .bbclubs-wire.is-hover path,
svg.bbclubs-wires .bbclubs-wire.is-chain path {
  stroke: #ff6b35 !important; /* Bright orange for visibility */
  stroke-width: 4px !important;
  filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.8)) !important;
}

/* Enhanced hover effect for circles - High Specificity */
svg.bbclubs-wires .bbclubs-wire.is-hover circle,
svg.bbclubs-wires .bbclubs-wire.is-chain circle {
  fill: #ff6b35 !important;
  stroke: #ff6b35 !important;
  stroke-width: 3px !important;
  filter: drop-shadow(0 0 6px rgba(255, 107, 53, 0.8)) !important;
}

/* Default wire appearance */
.bbclubs-wire path {
  stroke: #cfcfcf !important;
  stroke-width: 0.8px !important;
  transition: all 0.2s ease !important;
}

.bbclubs-wire circle {
  fill: #cfcfcf !important;
  stroke: #dfdfdfa6 !important;
  stroke-width: 0.8px !important;
  transition: all 0.2s ease !important;
}

/* Removed conflicting CSS rules - using JavaScript direct attribute modification instead */

/* Reply form actions styling */
.reply-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding: 8px 0;
  border-top: 1px solid #e5e7eb;
}

.reply-form-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reply-form-buttons {
  display: flex;
  gap: 4px;
}

.reply-form-buttons button {
  padding: 4px 6px;
  font-size: 11px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reply-form-buttons button:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.reply-form-actions-right {
  display: flex;
  gap: 8px;
}

.reply-form-actions-right .button1,
.reply-form-actions-right .button2 {
  padding: 3px 6px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reply-form-actions-right .button1 {
  background: #007bff;
  color: white;
  border: 1px solid #007bff;
}

.reply-form-actions-right .button1:hover {
  background: #0056b3;
  border-color: #0056b3;
}

.reply-form-actions-right .button2 {
  background: #6c757d;
  color: white;
  border: 1px solid #6c757d;
}

.reply-form-actions-right .button2:hover {
  background: #545b62;
  border-color: #545b62;
}

/* Responsive design - limit indentation on mobile */
@media (max-width: 768px) {
  .comment-item[data-depth="1"] { margin-left: 15px; }
  .comment-item[data-depth="2"] { margin-left: 30px; }
  .comment-item[data-depth="3"] { margin-left: 45px; }
  .comment-item[data-depth="4"] { margin-left: 60px; }
  .comment-item[data-depth="5"] { margin-left: 60px; }
  .comment-item[data-depth="6"] { margin-left: 60px; }
  .comment-item[data-depth="7"] { margin-left: 60px; }
  .comment-item[data-depth="8"] { margin-left: 60px; }
  
  /* Adjust maximum depth indicator for mobile */
  .comment-item[data-depth="8"] .comment-post::after {
    font-size: 9px;
    padding: 1px 4px;
    top: -6px;
    right: 4px;
  }
  
  /* Mobile-specific reply form actions styling */
  .reply-form-actions {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .reply-form-toolbar {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .reply-form-buttons {
    gap: 3px;
  }
  
  .reply-form-buttons button {
    padding: 3px 5px;
    font-size: 10px;
    min-width: 24px;
    text-align: center;
  }
  
  .reply-form-actions-right {
    justify-content: center;
    gap: 6px;
  }
  
  .reply-form-actions-right .button1,
  .reply-form-actions-right .button2 {
    padding: 8px 16px;
    font-size: 13px;
    flex: 1;
    max-width: 120px;
  }
  
  /* Make toggle switch smaller on mobile */
  .reply-form-actions .toggle-switch {
    font-size: 11px;
  }
  
  .reply-form-actions .toggle-switch .toggle-slider {
    width: 24px !important;
    height: 12px !important;
  }
  
  .reply-form-actions .toggle-switch .toggle-knob {
    height: 8px !important;
    width: 8px !important;
    left: 2px !important;
    top: 2px !important;
  }
  
  .reply-form-actions .toggle-switch input[type="checkbox"]:checked + .toggle-slider .toggle-knob {
    transform: translateX(12px) !important;
  }
}

/* Edit Reason Accordion Styles */
.edit-reason-accordion {
  margin-top: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background-color: #f8f9fa;
  overflow: hidden;
  transition: all 0.3s ease;
}

.edit-reason-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  cursor: pointer;
  background-color: #f1f3f4;
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s ease;
}

.edit-reason-header:hover {
  background-color: #e8eaed;
}

.edit-reason-title {
  font-size: 12px;
  font-weight: 500;
  color: #5f6368;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.edit-reason-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.edit-reason-content.expanded {
  max-height: 200px;
}

.edit-reason-text {
  padding: 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #333;
  background-color: #ffffff;
  margin: 0;
  border-top: 1px solid #e5e7eb;
}

.clickable-edit-reason {
  cursor: pointer;
  color: #007bff;
  text-decoration: underline;
  transition: color 0.2s;
}

.clickable-edit-reason:hover {
  color: #0056b3;
}

/* User Quick Card Styles */
.user-quick-card {
  position: absolute;
  z-index: 10000;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid #e1e5e9;
  min-width: 256px;
  max-width: 320px;
  max-height: 80vh;
  overflow-y: auto;
  opacity: 0;
  transform: scale(0.95) translateY(-10px);
  transition: all 0.2s ease-out;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* Prevent conflicts with existing styles */
  margin: 0;
  padding: 0;
  line-height: normal;
  /* Positioning will be set by JavaScript */
}

.user-quick-card.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.user-quick-card-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease-out;
  pointer-events: none;
}

.user-quick-card-overlay.show {
  opacity: 1;
}

.user-card-content {
  padding: 16px;
}

.user-card-avatar {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.user-card-avatar-placeholder,
.user-card-avatar-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.user-card-avatar-img {
  object-fit: cover;
}

.user-card-info {
  text-align: center;
  margin-bottom: 20px;
}

.user-card-username {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 4px 0;
  word-break: break-word;
}

.user-card-joined {
  font-size: 14px;
  color: #6b7280;
}

.user-card-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.user-card-follow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: #1a84fd;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  text-decoration: none;
  outline: none;
  margin-bottom: 8px;
}

.user-card-follow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(26, 132, 253, 0.4);
  background: #0d6efd;
}

.user-card-follow-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(26, 132, 253, 0.3);
}

.user-card-follow-btn svg {
  margin-right: 6px;
  transition: transform 0.2s ease;
}

.user-card-follow-btn:hover svg {
  transform: scale(1.1);
}

.user-card-follow-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.user-card-follow-btn:disabled:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(26, 132, 253, 0.3);
}

.user-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.user-card-stat-group h4 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-card-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
}

.stat-value {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.stat-value.upvotes {
  color: #059669;
}

.stat-value.downvotes {
  color: #dc2626;
}

/* Post Awards Display on Posts */
.post-awards-display {
  display: inline-block !important;
  vertical-align: middle !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.25 !important;
}

.post-awards-display:not(:empty)::before {
  content: " • ";
  margin: 0 4px;
  color: #56606d;
  display: inline;
}

.post-awards-list {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  align-items: center !important;
  vertical-align: middle !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.post-award-item {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  transition: transform 0.2s ease;
  vertical-align: middle !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.post-award-item:hover {
  transform: scale(1.15);
}

.post-award-icon {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain !important;
  display: inline-block !important;
  vertical-align: middle !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.post-award-count {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #3b82f6;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  border: 1px solid white;
}

/* User Card Awards Section */
.user-card-awards {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.user-card-awards h4 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-card-awards-list {
  min-height: 60px;
}

.user-card-awards-loading,
.user-card-awards-empty {
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  padding: 12px 0;
}

.user-card-awards-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.user-card-award-item {
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.user-card-award-item:hover {
  transform: scale(1.1);
}

.award-image-wrapper {
  position: relative;
  width: 30px;
  height: 30px;
}

.award-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.award-count {
  position: absolute;
  bottom: -14px;
  right: 2px;
  background: #3b82f6;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Loading States */
.user-card-loading {
  padding: 20px;
}

.user-card-skeleton {
  display: flex;
  gap: 12px;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-content {
  flex: 1;
}

.skeleton-line {
  height: 12px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-title {
  width: 60%;
  height: 16px;
}

.skeleton-subtitle {
  width: 40%;
  height: 12px;
}

.skeleton-text {
  width: 80%;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Error State */
.user-card-error {
  padding: 20px;
  text-align: center;
}

.error-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.error-message {
  color: #6b7280;
  margin-bottom: 12px;
}

.error-retry {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.error-retry:hover {
  background-color: #2563eb;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .user-quick-card {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    max-width: none;
    width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 60vh;
    transform: translateY(100%);
  }
  
  .user-quick-card.show {
    transform: translateY(0);
  }
  
  .user-card-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .user-quick-card {
    max-height: 70vh;
  }
}

/* Focus trap styles */
.user-quick-card:focus {
  outline: none;
}

.user-quick-card *:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* ============================================
   COMPACT USER CARD STYLES
   ============================================ */

/* Compact Header Layout */
.user-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 12px;
}

.user-card-info {
  flex: 1;
  min-width: 0;
}

.user-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
}

.user-card-role {
  font-size: 12px;
  color: #6b7280;
}

/* Compact Stats Grid */
.user-card-stats-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  transition: background-color 0.2s;
}

.stat-item:hover {
  background: #f3f4f6;
}

.stat-icon {
  font-size: 18px;
  line-height: 1;
}

.stat-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.stat-info .stat-value {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  line-height: 1;
}

.stat-info .stat-label {
  font-size: 10px;
  color: #6b7280;
  line-height: 1;
  margin-top: 2px;
}

/* Moderation Section */
.user-card-moderation {
  display: flex;
  gap: 12px;
  padding: 8px;
  background: #fef2f2;
  border-radius: 6px;
  margin-bottom: 12px;
  border: 1px solid #fee2e2;
}

.moderation-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.moderation-label {
  color: #991b1b;
}

.moderation-value {
  font-weight: 600;
  color: #dc2626;
}

/* Awards Header */
.user-card-awards-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.user-card-awards-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.user-card-awards-count {
  font-size: 12px;
  color: #6b7280;
  background: #e5e7eb;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Avatar and button size adjustments for header */
.user-card-header .user-card-avatar-placeholder,
.user-card-header .user-card-avatar-img {
  width: 48px;
  height: 48px;
}

.user-card-header .user-card-username {
  font-size: 16px;
  margin-bottom: 4px;
}

.user-card-header .user-card-follow-btn {
  padding: 4px 12px;
  font-size: 12px;
  min-width: 80px;
}

.user-card-content {
  padding: 12px;
}

@media (max-width: 768px) {
  .user-card-stats-compact {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .user-card-stats-compact {
    grid-template-columns: 1fr;
  }
}


/* Custom Title Styles */
span.user-custom-title.admin_super_moderator_ {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    padding: 0px 3px;
    border-radius: 4px;
    margin-top: 8px;
    position: relative;
    top: -5px;
}

/* Group Info Section Styles */
.group-info-content {
  font-size: 12px;
  line-height: 1.6;
}

.group-info-item {
  margin-bottom: 8px;
}

.group-info-item.owner-info {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.group-info-label {
  margin-right: 8px;
}

.group-info-value {
  display: flex;
  align-items: center;
}

.group-info-avatar {
  margin-right: 6px;
}

.group-info-username {
  font-weight: bold;
}

.group-info-date {
  margin-bottom: 8px;
}

.group-info-description {
  font-size: 12px;
  line-height: 1.4;
}

/* Panel Styles */
.panel {
  margin-top: 20px;
}

.panel-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-button {
  text-align: center;
  padding: 8px;
  text-decoration: none;
}

/* Members Panel Styles */
.members-content {
  max-height: 200px;
  overflow-y: auto;
}

.member-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}

.member-avatar-container {
  margin-right: 8px;
}

.member-fallback-avatar {
  width: 24px;
  height: 24px;
  background: #ddd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.member-info {
  font-weight: bold;
}

.member-role {
  font-size: 10px;
  color: #666;
}

.no-members-message {
  font-size: 12px;
  color: #666;
  margin: 0;
}

/* Social Share Styles */
.social-share-content {
  display: flex;
  gap: 8px;
}

.social-share-button {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.social-share-button.facebook {
  background: #1877f2;
  color: white;
}

.social-share-button.twitter {
  background: #1da1f2;
  color: white;
}

.social-share-icon {
  margin-right: 6px;
}

/* Group Cover Section Styles */
.group-cover-section {
  position: relative;
  margin-bottom: 20px;
}

.group-cover-photo-overlay {
  height: 200px;
  border-radius: 8px 8px 0 0;
  position: relative;
  overflow: hidden;
}

.group-cover-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

.group-profile-photo-overlay {
  position: absolute;
  top: 126px;
  left: 20px;
  z-index: 10;
}

.group-profile-photo-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.group-profile-photo-standalone {
  text-align: center;
  margin-bottom: 20px;
}

.group-profile-photo-standalone-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Group Title Styles */
.group-title {
  margin: 0 0 10px 0;
  font-size: 28px;
  color: #333;
  text-align: center;
}

.group-title-link {
  color: #333;
  text-decoration: none;
}

/* Participant Avatar Styles */
.participant-avatar-tree-leaf {
  --leaf-index: 0;
}

.participant-fallback-avatar {
  width: 16px;
  height: 16px;
  background: #ddd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #666;
  font-weight: bold;
}

.participant-fallback-avatar-large {
  width: 20px;
  height: 20px;
  background: #ddd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #666;
}

/* Follow Button Styles */
.follow-button-container {
  margin-left: 8px;
}

.follow-user-button {
  padding: 2px 8px;
  font-size: 11px;
}

.follow-icon {
  margin-right: 4px;
}

/* Post Title Styles */
.post-title {
  margin: 10px 0;
  font-size: 18px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
}

/* Post Actions Styles */
.post-actions {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.vote-section {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vote-button {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.vote-score {
  font-size: 12px;
  font-weight: 600;
}

.post-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #666;
}

.reply-button {
  padding: 4px 8px;
  font-size: 12px;
}

.reply-icon {
  margin-right: 4px;
}

.more-options-button {
  padding: 4px 8px;
}

/* Reply Form Styles */
.reply-form {
  display: none;
}

.reply-form-title {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.reply-form-textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.reply-form-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
}

.toggle-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.toggle-checkbox {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  width: 46px;
  height: 22px;
  background: #ccc;
  border-radius: 22px;
  transition: 0.3s;
  display: inline-block;
  position: relative;
}

.toggle-knob {
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

.anonymous-status {
  font-size: 12px;
  color: #888;
  margin-top: 10px;
  display: none;
}

/* Edit Form Styles */
.edit-form {
  display: none;
}

.edit-form-textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

/* User Card Styles */
.user-card-avatar-img {
  display: none;
}

.user-card-loading {
  display: none;
}

.user-card-error {
  display: none;
}

/* Toggle Button Badge Styles */
.toggle-btn.has-badge + .toggle-badge {
  display: inline-block;
}

/* Toggle Button Styles */
.toggle-btn {
  width: 15px;
  height: 15px;
  border-radius: 50px;
  position: relative;
  top: 70px;
  right: 3px;
  border: 1px solid #999999;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  color: #838383;
  cursor: pointer;
  user-select: none;
}

/* Thread Wires CSS Variables */
:root {
  --bbclubs-wire-width: 3;
  --bbclubs-elbow-offset: 20;
  --bbclubs-elbow-radius: 25; /* used for child-side elbow */
  --bbclubs-depth-0: #10b981a6;
  --bbclubs-depth-1: #10b981a6;
  --bbclubs-depth-2: #10b981a6;
  --bbclubs-depth-3: #10b981a6;
}

/* Thread container */
.thread {
  position: relative;
  padding-left: 9px;
}

/* Node structure for wire system */
.node {
  margin-bottom: 0px;
  position: relative;
}

.comment-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.gutter {
  flex: 0 0 24px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 3;
}

.gutter .toggle-btn {
  margin-top: 0;
}

/* Comment styling */
.comment {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  /* background: #f6f6f6a6; */
  border-radius: 12px;
  padding: 8px 3px;
  /* box-shadow: 0 1px 0 rgba(0, 0, 0, .03); */
  position: relative;
  z-index: 2;
  min-width: 0;
}

.comment > .avatar {
  flex: 0 0 28px;
}

.comment > :nth-child(3) {
  flex: 1 1 auto;
  min-width: 0;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-top: -2px;
}

.deleted-avatar {
  width: 32px !important;
  height: 32px !important;
}

.post-deleted {
  opacity: 1 !important;
}

.meta {
  font-size: 12px;
  color: #56606d;
  margin-bottom: 6px;
  line-height: 1.25;
}

.edit-timestamp {
  color: #888;
}

.edit-timestamp:hover {
  color: #666;
}

.moderator-info {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 8px;
  border: 1px solid #bbdefb;
}

.text {
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;

  padding: 4px;
  border-radius: 6px;
  color: #515151;
}

/* Children container */
.children {
  margin-left: 18px;
  margin-top: 0px;
  position: relative; /* Ensure positioning context for sticky pin */
}

.children.collapsed {
  display: none !important;
}

.children.collapsed * {
  display: none !important;
}

.toggle-btn[hidden] {
  display: none !important;
}

.toggle-btn:hover {
  background: #f1f4fb;
  border-color: #c9d1e0;
}

/* Badge */
.toggle-badge {
  position: absolute;
  top: 60px;
  right: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50px;
  background: #ecece8;
  color: #6a6a6a;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: normal;
  display: none;
  pointer-events: none;
}

/* Wires */
.bbclubs-wires {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  overflow: visible;
  z-index: 1;
}

/* Reply forms styling */
.reply-form {
  position: relative;
  z-index: 10;
  background: #ffffff;
  border-radius: 8px;
  padding: 15px;
  margin-top: 12px;
  margin-left: 20px;
}

.reply-form-content {
  position: relative;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}

.reply-form-content textarea {
  width: 100%;
  padding: 8px 8px 0 8px;
  border: none;
  border-radius: 6px 6px 0 0;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  background: transparent;
  outline: none;
}

.reply-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 0 0 6px 6px;
}

.reply-form-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reply-form-buttons {
  display: flex;
  gap: 3px;
}

.reply-form-buttons button {
  padding: 3px 6px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 2px;
  font-size: 11px;
  cursor: pointer;
}

.reply-form-buttons button:hover {
  background: #f0f0f0;
}

.reply-form-actions-right {
  display: flex;
  gap: 6px;
}

.reply-form-actions-right input {
  padding: 4px 8px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
}

.reply-form-actions-right .button1 {
  background: #007bff;
  color: white;
}

.reply-form-actions-right .button2 {
  background: #6c757d;
  color: white;
}

/* Edit form styling to prevent wire overlap */
.edit-form {
  position: relative;
  z-index: 10;
  background: #ffffff;
  border-radius: 8px;
  padding: 15px;
  margin-top: 12px;
  margin-left: 20px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive adjustments for nested reply forms */
@media (max-width: 768px) {
  .reply-form {
    margin-left: 10px;
    padding: 10px;
  }
  
  .reply-form-content textarea {
    font-size: 14px;
  }
  
  .reply-form-buttons button {
    font-size: 12px;
    padding: 4px 8px;
  }
  
  .edit-form {
    margin-left: 10px;
    padding: 10px;
  }
}

.bbclubs-wire path {
  stroke: #10b981a6;
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: var(--bbclubs-wire-width);
  pointer-events: stroke;
}

.bbclubs-wire circle {
  fill: #10b981a6;
  pointer-events: none;
}

.bbclubs-wire.highlight path {
  filter: drop-shadow(0 0 2px rgba(0,0,0,.15));
  stroke: #3b3b3b;
  stroke-width: 1px;
}

.bbclubs-wire.highlight circle {
  fill: #3b3b3b;
}

/* Reddit-style See More CSS */
.post-text-content {
  position: relative;
}

.post-text-content.collapsed {
  max-height: 200px; /* ~5 lines */
  position: relative;
  overflow: hidden;
}

.post-text-content.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, #fff);
  pointer-events: none;
  z-index: 1;
}

.see-more-btn {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #495057;
  cursor: pointer;
  font-size: 12px;
  padding: 4px 8px;
  margin: 8px 0 0 0;
  border-radius: 4px;
  display: inline-block;
  font-weight: 500;
  transition: all 0.2s ease;
  z-index: 2;
  position: relative;
}

.see-more-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #343a40;
}

.see-more-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.post-text-content.expanded {
  max-height: none;
}

.post-text-content.expanded::after {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  :root {
    --bbclubs-elbow-offset: 16;
  }
  
  .post-text-content.collapsed {
    max-height: 150px; /* Smaller height on mobile */
  }
  
  .comment {
    gap: 10px;
    padding: 10px 12px;
  }
  
  .avatar {
    width: 26px;
    height: 26px;
  }
  
  .children {
    margin-left: 16px;
  }
  
  .gutter {
    flex-basis: 22px;
  }
  
  .gutter .toggle-btn {
    width: 22px;
    height: 22px;
  }
  
  /* Hide sidebar on mobile */
  .sidebar {
    display: none !important;
  }
  
  /* Make main content full width on mobile */
  .main-content {
    width: 100% !important;
    margin-left: 0 !important;
  }
  
  /* Hide sidebar toggle buttons on mobile */
  .sidebar-toggle,
  .sidebar-show-toggle {
    display: none !important;
  }
}

/* Edit Reason Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
}

.modal-header {
  border-bottom: 1px solid #ddd;
}

.modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.modal-header .close {
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
  transition: color 0.2s;
}

.modal-header .close:hover {
  color: #333;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  border-top: 1px solid #ddd;
  text-align: right;
}

.clickable-edit-reason {
  cursor: pointer;
  color: #007bff;
  text-decoration: underline;
  transition: color 0.2s;
}

.clickable-edit-reason:hover {
  color: #0056b3;
}

/* User Quick Card Styles */
.user-quick-card {
  position: absolute;
  z-index: 10000;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid #e1e5e9;
  min-width: 256px;
  max-width: 320px;
  max-height: 80vh;
  overflow-y: auto;
  opacity: 0;
  transform: scale(0.95) translateY(-10px);
  transition: all 0.2s ease-out;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* Prevent conflicts with existing styles */
  margin: 0;
  padding: 0;
  line-height: normal;
  /* Positioning will be set by JavaScript */
}

.user-quick-card.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.user-quick-card-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease-out;
  pointer-events: none;
}

.user-quick-card-overlay.show {
  opacity: 1;
}

.user-card-content {
  padding: 16px;
}

.user-card-avatar {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.user-card-avatar-placeholder,
.user-card-avatar-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.user-card-avatar-img {
  object-fit: cover;
}

.user-card-info {
  text-align: center;
  margin-bottom: 20px;
}

.user-card-username {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 4px 0;
  word-break: break-word;
}

.user-card-joined {
  font-size: 14px;
  color: #6b7280;
}

.user-card-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.user-card-follow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: #1a84fd;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  text-decoration: none;
  outline: none;
  margin-bottom: 8px;
}

.user-card-follow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(26, 132, 253, 0.4);
  background: #0d6efd;
}

.user-card-follow-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(26, 132, 253, 0.3);
}

.user-card-follow-btn svg {
  margin-right: 6px;
  transition: transform 0.2s ease;
}

.user-card-follow-btn:hover svg {
  transform: scale(1.1);
}

.user-card-follow-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.user-card-follow-btn:disabled:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(26, 132, 253, 0.3);
}

.user-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.user-card-stat-group h4 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-card-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
}

.stat-value {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.stat-value.upvotes {
  color: #059669;
}

.stat-value.downvotes {
  color: #dc2626;
}

/* Post Awards Display on Posts */
.post-awards-display {
  display: inline-block !important;
  vertical-align: middle !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.25 !important;
}

.post-awards-display:not(:empty)::before {
  content: " • ";
  margin: 0 4px;
  color: #56606d;
  display: inline;
}

.post-awards-list {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  align-items: center !important;
  vertical-align: middle !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.post-award-item {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  transition: transform 0.2s ease;
  vertical-align: middle !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.post-award-item:hover {
  transform: scale(1.15);
}

.post-award-icon {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain !important;
  display: inline-block !important;
  vertical-align: middle !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.post-award-count {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #3b82f6;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  border: 1px solid white;
}

/* User Card Awards Section */
.user-card-awards {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.user-card-awards h4 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-card-awards-list {
  min-height: 60px;
}

.user-card-awards-loading,
.user-card-awards-empty {
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  padding: 12px 0;
}

.user-card-awards-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.user-card-award-item {
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.user-card-award-item:hover {
  transform: scale(1.1);
}

.award-image-wrapper {
  position: relative;
  width: 30px;
  height: 30px;
}

.award-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.award-count {
  position: absolute;
  bottom: -14px;
  right: 2px;
  background: #3b82f6;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Loading States */
.user-card-loading {
  padding: 20px;
}

.user-card-skeleton {
  display: flex;
  gap: 12px;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-content {
  flex: 1;
}

.skeleton-line {
  height: 12px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-title {
  width: 60%;
  height: 16px;
}

.skeleton-subtitle {
  width: 40%;
  height: 12px;
}

.skeleton-text {
  width: 80%;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Error State */
.user-card-error {
  padding: 20px;
  text-align: center;
}

.error-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.error-message {
  color: #6b7280;
  margin-bottom: 12px;
}

.error-retry {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.error-retry:hover {
  background-color: #2563eb;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .user-quick-card {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    max-width: none;
    width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 60vh;
    transform: translateY(100%);
  }
  
  .user-quick-card.show {
    transform: translateY(0);
  }
  
  .user-card-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .user-quick-card {
    max-height: 70vh;
  }
}

/* Focus trap styles */
.user-quick-card:focus {
  outline: none;
}

.user-quick-card *:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* ============================================
   COMPACT USER CARD STYLES
   ============================================ */

/* Compact Header Layout */
.user-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 12px;
}

.user-card-info {
  flex: 1;
  min-width: 0;
}

.user-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
}

.user-card-role {
  font-size: 12px;
  color: #6b7280;
}

/* Compact Stats Grid */
.user-card-stats-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  transition: background-color 0.2s;
}

.stat-item:hover {
  background: #f3f4f6;
}

.stat-icon {
  font-size: 18px;
  line-height: 1;
}

.stat-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.stat-info .stat-value {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  line-height: 1;
}

.stat-info .stat-label {
  font-size: 10px;
  color: #6b7280;
  line-height: 1;
  margin-top: 2px;
}

/* Moderation Section */
.user-card-moderation {
  display: flex;
  gap: 12px;
  padding: 8px;
  background: #fef2f2;
  border-radius: 6px;
  margin-bottom: 12px;
  border: 1px solid #fee2e2;
}

.moderation-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.moderation-label {
  color: #991b1b;
}

.moderation-value {
  font-weight: 600;
  color: #dc2626;
}

/* Awards Header */
.user-card-awards-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.user-card-awards-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.user-card-awards-count {
  font-size: 12px;
  color: #6b7280;
  background: #e5e7eb;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Avatar and button size adjustments for header */
.user-card-header .user-card-avatar-placeholder,
.user-card-header .user-card-avatar-img {
  width: 48px;
  height: 48px;
}

.user-card-header .user-card-username {
  font-size: 16px;
  margin-bottom: 4px;
}

.user-card-header .user-card-follow-btn {
  padding: 4px 12px;
  font-size: 12px;
  min-width: 80px;
}

.user-card-content {
  padding: 12px;
}

@media (max-width: 768px) {
  .user-card-stats-compact {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .user-card-stats-compact {
    grid-template-columns: 1fr;
  }
}
/* BBClubs Floating Thread Pin / Header Styles */
#bbclubs-thread-pin {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  max-width: 100%;
  margin: 0;
  margin-bottom: 8px;
}

#bbclubs-thread-pin:not(.is-hidden) {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.bbclubs-thread-pin-content {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  max-width: 1200px;
  margin: 0 auto;
}

.bbclubs-thread-pin-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bbclubs-thread-pin-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
  line-height: 1.3;
  flex-wrap: wrap;
}

/* Add spacing between main title and thread title */
.bbclubs-thread-pin-main-title + .bbclubs-thread-pin-thread-title {
  margin-left: 4px;
}

.bbclubs-thread-pin-header .bbclubs-thread-pin-type {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  flex: 0 1 auto;
  min-width: 0;
}

.bbclubs-thread-pin-type {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.bbclubs-thread-pin-type-main {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.bbclubs-thread-pin-type-root {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #78350f;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Main post title styling - distinct from thread children */
.bbclubs-thread-pin-main-title {
  background: #6366f1 !important;
  color: #ffffff !important;
  font-weight: 400 !important;
  padding: 3px 8px !important;
}

/* Thread children title styling */
.bbclubs-thread-pin-thread-title {
  background: #fef3c7 !important;
  color: #78350f !important;
  font-weight: 400 !important;
  padding: 3px 8px !important;
  max-width: 500px !important;
  width: 325px;
}

/* Username styling in thread pin */
.bbclubs-thread-pin-username {
  color: #007bff !important;
  font-weight: 400 !important;
}

/* Avatar styling in thread pin */
.bbclubs-thread-pin-thread-title img {
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
  margin-right: 4px !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

.bbclubs-thread-pin-label {
  color: #64748b;
  font-size: 10px;
  font-weight: 400;
  margin-left: 2px;
}

.bbclubs-thread-pin-number {
  color: #2563eb;
  font-weight: 400;
  font-size: 11px;
  background: #eff6ff;
  padding: 3px 8px;
  border-radius: 4px;
}

.bbclubs-thread-pin-meta {
  display: none !important;
}

.bbclubs-thread-pin-title-wrapper {
  font-size: 13px;
  color: #374151;
  line-height: 1.4;
}

.bbclubs-thread-pin-title {
  color: #1f2937;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}


/* Thread highlight animation when clicking "Back to top" */
.bbclubs-thread-pin-highlight {
  animation: bbclubsThreadPinHighlight 2s ease-in-out;
  border-radius: 4px;
}

@keyframes bbclubsThreadPinHighlight {
  0% {
    background-color: transparent;
    box-shadow: 0 0 0 0 rgba(254, 243, 199, 0);
  }
  15% {
    background-color: #fef3c7;
    box-shadow: 0 0 0 4px rgba(254, 243, 199, 0.5);
  }
  30% {
    background-color: transparent;
    box-shadow: 0 0 0 0 rgba(254, 243, 199, 0);
  }
  100% {
    background-color: transparent;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .bbclubs-thread-pin-content {
    padding: 5px 10px;
    gap: 6px;
  }
  
  .bbclubs-thread-pin-header {
    font-size: 10px;
    gap: 4px;
  }
  
  .bbclubs-thread-pin-type {
    font-size: 9px;
    padding: 2px 6px;
    max-width: 150px;
  }
  
  .bbclubs-thread-pin-main-title {
    padding: 2px 6px !important;
    font-size: 9px !important;
  }
  
  .bbclubs-thread-pin-thread-title {
    padding: 2px 6px !important;
    font-size: 9px !important;
  }
  
  .bbclubs-thread-pin-label {
    font-size: 9px;
  }
  
  .bbclubs-thread-pin-number {
    font-size: 10px;
    padding: 2px 6px;
  }
  
  .bbclubs-thread-pin-meta {
    font-size: 9px;
  }
  
}

@media (max-width: 480px) {
  /* Mobile: Keep at top but adjust styling */
  #bbclubs-thread-pin {
    position: sticky;
    top: 0;
    transform: translateY(-100%);
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
  }
  
  #bbclubs-thread-pin:not(.is-hidden) {
    transform: translateY(0);
  }
  
  .bbclubs-thread-pin-content {
    padding: 6px 10px;
    gap: 6px;
  }
  
  .bbclubs-thread-pin-info {
    min-width: 0;
  }
  
  .bbclubs-thread-pin-header {
    font-size: 9px;
    gap: 4px;
  }
  
  .bbclubs-thread-pin-type {
    font-size: 8px;
    padding: 1px 4px;
  }
  
  .bbclubs-thread-pin-meta {
    font-size: 10px;
  }
  
  .bbclubs-thread-pin-title-wrapper {
    font-size: 11px;
  }
  
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  #bbclubs-thread-pin {
    transition: opacity 0.2s ease;
  }
  
  #bbclubs-thread-pin:not(.is-hidden) {
    transform: translateY(0);
  }
  
  .bbclubs-thread-pin-highlight {
    animation: none;
    background-color: #fef3c7;
  }
}
