/* ===== Bootstrap + Custom CSS for AI Hub Community ===== */

/* ng-cloak: hide until Angular compiles (prevents flash of raw bindings) */
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
  display: none !important;
}

/* Row spacing (Bootstrap 4 - extra vertical gap between columns when stacked) */
.community-row-gap > [class*="col-"] {
  margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
  .community-row-gap > [class*="col-"] {
    margin-bottom: 0;
  }
}

.community-follow-add-btn, .community-follow-add-btn:hover{text-decoration: none !important;background-color: transparent;}

/* Gap utilities (Bootstrap 4 fallback) */
.d-flex.gap-2,
.d-inline-flex.gap-2 { gap: 0.5rem; }
.d-flex.gap-3,
.d-inline-flex.gap-3 { gap: 0.75rem; }
.d-flex.gap-4,
.d-inline-flex.gap-4 { gap: 1rem; }

.discussion-card {
  padding: 20px;
  margin-bottom: 16px;
}

/* ===== Hero Section ===== */
.community-hero {
  border-color: #f1f5f9 !important;
}

.community-hero-inner {
  max-width: 56rem;
}

.community-badge {
  background: rgba(165, 197, 229, 0.2);
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(165, 197, 229, 0.3);
}

.community-badge-dot {
  width: 8px;
  height: 8px;
  background: #a5c5e5;
  animation: community-pulse 1.5s ease-in-out infinite;
}

@keyframes community-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== Like / Unlike animation ===== */
@keyframes community-like-burst {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  50% { transform: scale(1.2); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.community-like-btn.community-like-burst svg,
.community-like-btn.community-like-burst i {
  animation: community-like-burst 0.45s ease-out;
}

.community-child-reply-like-btn.community-like-burst svg,
.community-child-reply-like-btn.community-like-burst i {
  animation: community-like-burst 0.4s ease-out;
}

/* ===== Reply entry animation ===== */
@keyframes community-reply-enter {
  0% {
    opacity: 0;
    transform: translateY(-12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes community-child-reply-enter {
  0% {
    opacity: 0;
    transform: translateX(-8px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.community-panel-reply-card.community-reply-enter {
  animation: community-reply-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.community-child-reply-item.community-child-reply-enter {
  animation: community-child-reply-enter 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.community-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: #0f172a;
}

.logo-listItems-wrapper {
  gap: 1.5rem !important;
}
.navbar ul.nav-links>li {
  padding: 25px 12px;
}
.btns-wrapper .rhs {
  margin-right: 20px;
}
@media (min-width: 768px) {
  .community-title { font-size: 2.5rem; }
}

@media (min-width: 992px) {
  .community-title { font-size: 3rem; }
}

.community-title-gradient {
  background: linear-gradient(to right, #2563eb, #9333ea, #db2777);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.community-subtitle {
  font-size: 1.125rem;
  color: #475569;
  max-width: 42rem;
  line-height: 1.6;
}

/* Community feature banner */
.ai-hub-community-feature-wrap {
  background: #fff;
  padding: 0 0 2rem;
}

.ai-hub-community-feature-banner {
  position: relative;
  border-radius: 1.2rem;
  background: linear-gradient(145deg, #f8fbff 0%, #edf4fb 100%);
  border: 1px solid rgba(165, 197, 229, 0.45);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  padding: 2rem;
  overflow: hidden;
}

.ai-hub-community-feature-stripe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #a6c5e5 0%, #e5fcf4 50%, #f6f6f6 100%);
}

.ai-hub-community-feature-main {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.ai-hub-community-feature-content {
  width: 100%;
  max-width: 620px;
}

.ai-hub-community-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(67, 67, 67, 0.15);
  background: rgba(165, 197, 229, 0.25);
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
}

.ai-hub-community-feature-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a6c5e5;
}

.ai-hub-community-feature-title {
  margin: 0;
  color: #0f172a;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.ai-hub-community-feature-title-accent {
  color: #334155;
}

.ai-hub-community-feature-desc {
  margin: 1rem 0 0;
  color: #475569;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 600px;
}

.ai-hub-community-feature-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ai-hub-community-feature-btn-primary,
.ai-hub-community-feature-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.85rem;
  border-radius: 0.65rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.ai-hub-community-feature-btn-primary {
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #f8fafc !important;
  padding: 0.65rem 1rem;
}

.ai-hub-community-feature-btn-primary:hover {
  color: #f8fafc !important;
  background: #1e293b;
  border-color: #1e293b;
}

.ai-hub-community-feature-btn-outline {
  border: 1px solid rgba(67, 67, 67, 0.22);
  background: #fff;
  color: #1f2937 !important;
  padding: 0.65rem 0.95rem;
}

.ai-hub-community-feature-btn-outline:hover {
  background: #f8fafc;
  border-color: rgba(67, 67, 67, 0.4);
}

.ai-hub-community-feature-stats {
  margin-top: 1.4rem;
  display: flex;
  align-items: stretch;
  gap: 0.8rem;
}

.ai-hub-community-feature-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ai-hub-community-feature-stat-value {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
}

.ai-hub-community-feature-stat-label {
  color: #475569;
  font-size: 0.78rem;
}

.ai-hub-community-feature-stat-divider {
  width: 1px;
  min-height: 2.3rem;
  background: rgba(148, 163, 184, 0.35);
}

.ai-hub-community-feature-cards {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ai-hub-community-feature-card {
  border: 1px solid #d8e8f4;
  border-radius: 0.8rem;
  background: #fff;
  padding: 0.75rem 0.85rem;
  animation: ai-hub-community-feature-lift 3.2s ease-in-out infinite;
}

.ai-hub-community-feature-card:nth-child(2) {
  animation-delay: 0.35s;
}

.ai-hub-community-feature-card:nth-child(3) {
  animation-delay: 0.7s;
}

.ai-hub-community-feature-card-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.ai-hub-community-feature-avatar {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #a6c5e5;
  color: #434343;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ai-hub-community-feature-user {
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 600;
}

.ai-hub-community-feature-ago {
  margin-left: auto;
  color: #64748b;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.ai-hub-community-feature-card-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai-hub-community-feature-card-footer {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ai-hub-community-feature-tag {
  font-size: 0.67rem;
  font-weight: 500;
  padding: 0.16rem 0.45rem;
  border-radius: 999px;
  background: #eef5fc;
  color: #334155;
}

.ai-hub-community-feature-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: #64748b;
}

.ai-hub-community-feature-brand {
  display: inline-block;
  margin-top: 0.95rem;
  color: #64748b;
  font-size: 0.76rem;
}

@keyframes ai-hub-community-feature-lift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

.community-pending-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid #ffe2a8;
  background: #fff8e8;
  color: #9a6700;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.community-pending-note i {
  color: #d97706;
  font-size: 13px;
}

/* Keep talent profile modal above sticky community sidebar */
#publicProfileRoot .ai-hub-modal-wrapper {
  z-index: 1100 !important;
}

.community-thread-card__name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pp-v1-ai-experts-icon {
  display: inline-flex;
  align-items: center;
  color: #eab308;
}
.pp-v1-ai-experts-icon svg {
  width: 20px;
  height: 20px;
  fill: rgba(234, 179, 8, 0.2);
}

.community-contributor-rank--ai {
  background: transparent !important;
  border-radius: 0 !important;
  color: #78350f;
  overflow: visible;
}

.community-contributor-rank--ai .community-contributor-rank__ai-star {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: #eab308;
  fill: rgba(234, 179, 8, 0.2);
  transform: scale(1.65);
  transform-origin: center;
}

.community-contributor-rank--ai .community-contributor-rank__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  position: relative;
  z-index: 1;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.community-spacing{
  padding-top: 3rem;
}

@media (max-width: 991px) {
  .ai-hub-community-feature-main {
    flex-direction: column;
  }

  .ai-hub-community-feature-cards {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  
.community-spacing{
  padding-top: 0;
}
  .community-right-panel{
    padding: 0 !important;
  }
  .community-sidebar-title {
    display: block;
  }
  .ai-hub-community-feature-wrap {
    padding-bottom: 1.5rem;
  }

  .ai-hub-community-feature-banner {
    padding: 1.3rem 1rem 1.1rem 1.1rem;
  }

  .ai-hub-community-feature-title {
    font-size: 1.55rem;
  }

  .ai-hub-community-feature-stats {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .ai-hub-community-feature-stat-divider {
    display: none;
  }
}

/* Search bar - AI Hub Talent style with fixed right-side corners */
.community-search-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.community-search-form {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  position: relative;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.06);
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.community-search-form:focus-within {
  border-color: #a5c5e5;
  box-shadow: 0 0 0 2px rgba(165, 197, 229, 0.2), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
}

.community-search-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.community-search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.community-search-icon svg,
.community-search-icon i {
  width: 22px;
  font-size: 1.25rem;
}

.community-search-input {
  width: 100%;
  height: 4rem;
  min-height: 44px;
  padding-left: 3.25rem;
  padding-right: 1rem;
  font-size: 1rem;
  background: transparent;
  border: none;
  transition: none;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.community-search-input.form-control {
  border: none !important;
}

.community-search-input::placeholder {
  color: #94a3b8;
}

.community-search-input:focus {
  outline: none;
  box-shadow: none;
}

/* Button: rounded top-right and bottom-right to match form, straight left edge */
.community-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 4rem;
  min-height: 44px;
  padding: 0 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #000;
  background: #a5c5e5;
  border: none;
  border-radius: 0;
  border-top-right-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.2s;
  flex-shrink: 0;
  box-shadow: none;
  appearance: none;
}

.community-search-btn:hover {
  background: #94b5d6;
  color: #000;
}

@media (max-width: 575px) {
  .community-search-row {
    padding-left: 0;
    padding-right: 0;
  }
  .community-search-form {
    border-radius: 0.5rem;
  }
  .community-search-input,
  .community-search-btn {
    height: 3.5rem;
    min-height: 44px;
  }
  .community-search-btn {
    padding: 0 1rem;
    font-size: 0.875rem;
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
  }
}

/* ===== Sidebar ===== */
.community-sidebar {
  border-color: #e2e8f0 !important;
}

/* Sticky sidebar: stick below menu bar, not overlapping it */
.community-sidebar.sticky-top {
  top: 5rem !important; /* ~80px - matches header height (nav-dropdown top: 74px) */
  z-index: 999 !important; /* Below header (z-index: 1000) so it never overlaps */
}

.community-btn-primary {
  background: #a5c5e5 !important;
  border: none !important;
  color: #000 !important;
  font-weight: 700;
  height: 2.75rem;
}

.community-btn-primary:hover {
  background: #94b5d6 !important;
  color: #000 !important;
}

.community-filter-list .community-filter-btn {
  margin-bottom: 0.25rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  color: #475569;
  font-size: 0.875rem;
  text-align: left;
}

.community-filter-btn:hover {
  background: #f1f5f9;
}

.community-filter-btn-active {
  background: #f1f5f9 !important;
  color: var(--primary, #2563eb) !important;
  font-weight: 600 !important;
}

.community-filter-icon {
  width: 1rem;
  height: 1rem;
  font-size: 1rem;
  flex-shrink: 0;
}

.community-sidebar-title {
  font-weight: 600;
  color: #0f172a;
}

.community-topic-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  color: #475569;
  background: transparent;
  border: none;
  text-align: left;
  margin-bottom: 0.25rem;
}

.community-topic-btn:hover {
  background: #f1f5f9;
  color: #475569;
}

.community-topic-btn-active {
  background: rgba(37, 99, 235, 0.1) !important;
  color: #2563eb !important;
  font-weight: 600;
  border-left: 3px solid #2563eb;
}

.community-topic-count {
  font-size: 0.7rem;
  opacity: 0.85;
}

/* Mobile: horizontal scrollable topics (overflow-x-auto is not in bundled Bootstrap) */
.community-topics-mobile {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  /* Keep strip to one line; horizontal scrollbar stays under the chips */
  overscroll-behavior-x: contain;
}

.community-topic-btn-mobile {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
  line-height: 1.25;
  color: #475569;
  background: #f1f5f9;
  border: none;
  border-radius: 9999px;
  white-space: nowrap;
}

.community-topic-btn-mobile:hover {
  background: #e2e8f0;
  color: #475569;
}

.community-topic-btn-mobile.community-topic-btn-active {
  background: rgba(37, 99, 235, 0.15) !important;
  color: #2563eb !important;
  font-weight: 600;
}

/* Active topic chip in header */
.community-active-topic-chip {
  background: rgba(37, 99, 235, 0.1) !important;
  color: #2563eb !important;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}

.community-chip-clear {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.15rem;
  opacity: 0.8;
}

.community-chip-clear:hover {
  opacity: 1;
}

/* ===== Filter Trigger Button (opens modal) ===== */
.community-filter-trigger-btn {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.community-filter-trigger-btn:hover {
  color: #0f172a;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.community-filter-trigger-btn-active {
  color: #2563eb;
  border-color: #93c5fd;
  background: rgba(37, 99, 235, 0.06);
}

.community-filter-trigger-btn-active:hover {
  color: #1d4ed8;
  border-color: #60a5fa;
  background: rgba(37, 99, 235, 0.1);
}

.community-filter-trigger-icon {
  width: 14px;
  height: 14px;
  font-size: 0.875rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.community-filter-badge {
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.25rem;
  color: #fff;
  background: #2563eb;
  border-radius: 9999px;
  text-align: center;
}

/* Followed state icon (contributors) */
.community-followed-icon {
  font-size: 1rem;
}

/* Clear filters chip (next to filter button when filters active) */
.community-filter-clear-chip {
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.community-filter-clear-chip:hover {
  color: #dc2626;
  border-color: #fecaca;
  background: rgba(220, 38, 38, 0.04);
}

.community-filter-clear-chip-text {
  white-space: nowrap;
}

/* Legacy (sidebar filter icon) */
.community-filter-btn-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ===== Section Title ===== */
.community-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

/* Clear search button (next to "Search results for X") */
.community-clear-search-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b !important;
  background: transparent !important;
  border: none !important;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
  vertical-align: baseline;
}

.community-clear-search-btn:hover {
  color: #2563eb !important;
  text-decoration: underline;
}

/* ===== Skeleton Loader ===== */
.community-skeleton-card {
  animation: community-pulse 1.5s ease-in-out infinite;
  border-color: #e2e8f0 !important;
}

.community-skeleton-avatar {
  width: 2.5rem;
  height: 2.5rem;
  background: #e2e8f0;
}

.community-skeleton-line {
  height: 0.75rem;
  background: #e2e8f0;
  border-radius: 0.25rem;
}

.community-skeleton-name { width: 6rem; }
.community-skeleton-time { width: 4rem; }
.community-skeleton-title { width: 75%; }
.community-skeleton-content { width: 83%; }
.community-skeleton-footer { width: 2.5rem; }
.community-skeleton-footer-2 { width: 3rem; }
.community-skeleton-footer-3 { width: 2rem; }

/* Top contributors skeleton */
.community-contributor-skeleton {
  animation: community-pulse 1.5s ease-in-out infinite;
}
.community-skeleton-rank {
  bottom: -0.25rem;
  left: -0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  background: #e2e8f0;
  border-radius: 0.25rem;
}
.community-skeleton-rep {
  width: 4.5rem;
}

/* Thread card skeleton - matches discussion thread layout */
.community-skeleton-card.community-thread-card {
  cursor: default;
  pointer-events: none;
}
.community-skeleton-card.community-thread-card:hover {
  border-color: #e5e7eb;
  box-shadow: none;
}
.community-thread-card__accent--skeleton {
  opacity: 1;
  background: #e2e8f0;
}
.community-thread-card__avatar--skeleton {
  display: block !important;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
}
.community-thread-card__meta .community-skeleton-line {
  display: block;
}
.community-skeleton-menu {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 6px;
}
.community-skeleton-tag {
  display: inline-block;
  width: 3rem;
  height: 1.25rem;
  background: #e2e8f0;
  border-radius: 6px;
  animation: community-pulse 1.5s ease-in-out infinite;
}
.community-skeleton-action {
  width: 2.5rem;
  height: 0.875rem;
}
.community-thread-card__excerpt--skeleton {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}

/* Scroll sentinel for infinite scroll (minimal height for IntersectionObserver) */
.community-scroll-sentinel {
  height: 1px;
  width: 100%;
  pointer-events: none;
  visibility: hidden;
}

/* Load More button: disabled/loading state with reduced opacity */
.community-load-more-btn.community-load-more-loading,
.community-load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Discussion Thread Cards (New Design) ===== */
.community-thread-card {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 1rem;
  cursor: pointer;
  overflow: visible;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.community-thread-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.community-thread-card__accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #3b82f6 0%, #60a5fa 100%);
  opacity: 0;
  transition: opacity 0.2s;
}

.community-thread-card:hover .community-thread-card__accent {
  opacity: 1;
}

.community-thread-card__content {
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
}

.community-thread-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.community-thread-card__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.community-thread-card__menu {
  position: relative;
  flex-shrink: 0;
}

.community-panel-menu {
  position: relative;
}

.community-panel-post {
  overflow: visible;
}

.community-thread-card__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #9ca3af;
  background: transparent !important;
  border: none !important;
  border-radius: 6px;
  cursor: pointer;
  appearance: none;
  transition: color 0.2s, background 0.2s;
}

.community-thread-card__menu-btn:hover,
.community-thread-card__menu-btn:focus {
  color: #6b7280;
  background: #f3f4f6;
  outline: none;
}

.community-thread-card__menu-btn i {
  font-size: 1rem;
}

/* ===== Community Dropdown Menu (Edit/Delete/Report) ===== */
.community-thread-card__menu.dropdown .dropdown-menu,
.community-panel-menu.dropdown .dropdown-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  left: auto;
  min-width: 180px;
  padding: 0.375rem 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  z-index: 1050;
  transform-origin: top right;
  animation: community-dropdown-in 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.lang_ar .community-thread-card__menu.dropdown .dropdown-menu,
.lang_ar .community-panel-menu.dropdown .dropdown-menu {
  right: auto;
  left: 0;
  transform-origin: top left;
}

/* Ensure dropdown is not clipped by card content */
.community-thread-card__content {
  overflow: visible;
}

.community-thread-card__menu.dropdown .dropdown-menu .dropdown-item,
.community-panel-menu.dropdown .dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.community-thread-card__menu.dropdown .dropdown-menu .dropdown-item:hover,
.community-panel-menu.dropdown .dropdown-menu .dropdown-item:hover {
  background: #f8fafc;
  color: #0f172a;
}

.community-thread-card__menu.dropdown .dropdown-menu .dropdown-item:active,
.community-panel-menu.dropdown .dropdown-menu .dropdown-item:active {
  background: #f1f5f9;
}

.community-thread-card__menu.dropdown .dropdown-menu .dropdown-item i,
.community-panel-menu.dropdown .dropdown-menu .dropdown-item i {
  width: 1.125rem;
  margin-right: 0.5rem;
  font-size: 0.9375rem;
  opacity: 0.85;
}

.community-thread-card__menu.dropdown .dropdown-menu .dropdown-item.text-danger,
.community-panel-menu.dropdown .dropdown-menu .dropdown-item.text-danger {
  color: #dc2626;
}

.community-thread-card__menu.dropdown .dropdown-menu .dropdown-item.text-danger:hover,
.community-panel-menu.dropdown .dropdown-menu .dropdown-item.text-danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

@keyframes community-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.community-thread-card__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.community-thread-card__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #4338ca;
  font-size: 0.875rem;
  font-weight: 600;
}

.community-thread-card__avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.community-thread-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.community-thread-card__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
}

.community-thread-card__time {
  font-size: 0.75rem;
  color: #9ca3af;
}

.community-thread-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
  margin: 0 0 0.5rem 0;
  word-break: break-word;
}

.community-thread-card:hover .community-thread-card__title {
  color: #2563eb;
}

.community-thread-card__excerpt {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.community-thread-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.community-thread-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.community-thread-card__tag {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  background: #f3f4f6;
  color: #4b5563;
  border-radius: 6px;
}

.community-thread-card__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.community-thread-card__action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  font-size: 0.8125rem;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.community-thread-card__action:hover {
  color: #2563eb;
}

.community-thread-card__action i {
  font-size: 13px;
}

.community-thread-card__action--like.is-liked {
  color: #2563eb;
}

.community-thread-card__action--like:active i {
  transform: scale(0.9);
}

.community-thread-card__action--like.is-burst i {
  animation: community-like-burst 0.45s ease-out;
}

.community-thread-card__views {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

.community-thread-card__views i {
  font-size: 13px;
}

/* ===== Empty State ===== */
.community-empty-state {
  border-color: #e2e8f0 !important;
}

.community-empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
}

.community-btn-empty {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 500;
}

.community-btn-empty:hover {
  background: #dbeafe;
  color: #2563eb;
}

/* ===== Join Card (Guest) ===== */
.community-join-card {
  background: linear-gradient(135deg, rgba(165, 197, 229, 0.2), #fff);
  border: 1px solid rgba(165, 197, 229, 0.3);
}

.community-join-card.sticky-top {
  top: 5rem !important;
  z-index: 999 !important;
}

.community-join-icon {
  width: 3rem;
  height: 3rem;
  background: rgba(165, 197, 229, 0.2);
  color: #0f172a;
}

.community-join-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.community-join-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
}

.community-join-desc {
  color: #475569;
  line-height: 1.6;
}

.community-check-icon {
  width: 1rem;
  height: 1rem;
  font-size: 1rem;
  color: #22c55e;
  margin-top: 2px;
}

/* ===== Top Contributors (Guest) ===== */
.community-contributors-card {
  border-color: #e2e8f0 !important;
}

.community-contributors-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
}

.community-contributors-title svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #eab308;
  fill: #eab308;
}

.community-contributor-item {
  cursor: pointer;
  transition: background 0.2s;
}

.community-contributor-item:hover {
  background: #f8fafc;
}

.community-contributor-avatar {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.community-contributor-avatar-1 { background: #fef9c3; color: #a16207; }
.community-contributor-avatar-2 { background: #f1f5f9; color: #475569; }
.community-contributor-avatar-3 { background: #ffedd5; color: #c2410c; }

.community-contributor-rank {
  top: -0.25rem;
  right: -0.25rem;
  width: 1rem;
  height: 1rem;
  font-size: 10px;
}

.community-rank-1 { background: #eab308; color: #fff; }
.community-rank-2 { background: #94a3b8; color: #fff; }
.community-rank-3 { background: #f97316; color: #fff; }

/* ===== Auth Contributors (matches design: white card, yellow rank badge bottom-left) ===== */
.community-auth-contributors {
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-color: #e2e8f0 !important;
}

.community-auth-contributors-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.community-auth-contributor-item {
  transition: background 0.2s;
  padding: 0.5rem 0;
  border-radius: 0.375rem;
}

.community-auth-contributor-item:hover {
  background: #f8fafc;
}

.community-auth-contributors-items .community-auth-contributor-item:not(:last-child) {
  margin-bottom: 0.5rem;
}

.community-auth-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
}

.community-auth-avatar-wrap .community-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  border-radius: 50%;
}

.community-auth-avatar {
  width: 2.5rem;
  height: 2.5rem;
  background: #e2e8f0;
  color: #475569;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
}

.community-auth-rank {
  z-index: 2;
  position: absolute;
  bottom: -0.25rem;
  left: -0.25rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.5rem;
  background: #eab308;
  color: #fff !important;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 0.25rem;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.community-auth-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
}

.community-auth-rep {
  font-size: 0.75rem;
  color: #64748b;
}

.community-auth-contributors .btn-link.text-primary {
  color: #2563eb !important;
  font-weight: 500;
  text-decoration: none;
}

.community-auth-contributors .btn-link.text-primary:hover {
  color: #1d4ed8 !important;
}

/* Follow add button - small, black icon */
.community-follow-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  text-align: center;
}

.community-follow-add-icon {
  font-size: 0.8125rem;
  color: #1a1a1a;
  transition: color 0.2s;
}

.community-follow-add-btn:hover .community-follow-add-icon {
  color: #2563eb;
}

.community-auth-contributor-item .community-follow-add-btn .community-follow-add-icon {
  font-size: 0.75rem;
}

/* ===== Right Panel ===== */
.community-overlay {
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.8);
}

.community-right-panel {
  z-index: 1050;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 36rem;
  background: #fff;
  border-left: 1px solid #e2e8f0;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: -4px 0 6px -1px rgba(0, 0, 0, 0.1);
}

@media (min-width: 576px) {
  .community-right-panel { padding: 0; }
}

.community-panel-close {
  opacity: 0.7;
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
}

.community-panel-close:hover {
  opacity: 1;
}

.community-panel-close svg,
.community-panel-close i {
  width: 1rem;
  height: 1rem;
  font-size: 1.25rem;
}

.community-panel-tag {
  font-size: 0.7rem;
  background: rgba(165, 197, 229, 0.25);
  color: #334155;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.community-panel-title {
  font-size: 1.25rem;
  color: #0f172a;
  line-height: 1.4;
  letter-spacing: -0.01em;
  word-break: break-word;
}

/* Panel loading state */
.community-panel-loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid #e2e8f0;
  border-top-color: #a5c5e5;
  border-radius: 50%;
  animation: community-panel-spin 0.7s linear infinite;
}

@keyframes community-panel-spin {
  to { transform: rotate(360deg); }
}

/* Panel post & reply cards */
.community-panel-post .community-panel-content,
.community-panel-content {
  font-size: 0.9375rem;
  color: #334155;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.community-panel-meta {
  font-size: 0.8125rem;
}

.community-panel-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0 !important;
  color: #9ca3af !important;
  background: transparent !important;
  border: none !important;
  border-radius: 6px;
  text-decoration: none !important;
  transition: color 0.2s, background 0.2s;
}

.community-panel-menu-btn:hover,
.community-panel-menu-btn:focus {
  color: #6b7280 !important;
  background: #f3f4f6 !important;
  text-decoration: none !important;
}

.community-panel-menu-btn i {
  font-size: 1rem;
}

/* Action buttons (like, reply, follow) */
.community-panel-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.community-panel-action-btn:hover {
  color: #334155;
  background: #f1f5f9;
}

.community-panel-action-btn-active {
  color: #2563eb !important;
}

.community-panel-action-btn-active:hover {
  color: #1d4ed8 !important;
  background: rgba(37, 99, 235, 0.08) !important;
}

.community-panel-action-btn svg,
.community-panel-action-btn i {
  flex-shrink: 0;
}

.community-like-btn:active svg,
.community-like-btn:active i {
  transform: scale(0.9);
  transition: transform 0.1s ease;
}

.community-panel-action-count {
  font-weight: 500;
}

.community-panel-action-btn-sm {
  padding: 0.15rem 0.35rem;
  font-size: 0.75rem;
}

/* Reply cards */
.community-panel-reply-card {
  padding: 1rem 0;
}

/* Thread author: delete reply (shown on card hover / focus-within) */
.community-reply-owner-delete {
  position: absolute;
  top: 0.5rem;
  right: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.community-panel-reply-card:hover .community-reply-owner-delete,
.community-panel-reply-card:focus-within .community-reply-owner-delete,
.community-child-reply-item:hover .community-reply-owner-delete,
.community-child-reply-item:focus-within .community-reply-owner-delete {
  opacity: 1;
  pointer-events: auto;
}

.community-reply-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 0.375rem;
  background: rgba(248, 250, 252, 0.95);
  color: #94a3b8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.community-reply-delete-btn:hover,
.community-reply-delete-btn:focus {
  color: #dc2626;
  background: #fef2f2;
  outline: none;
}

.community-child-reply-owner-delete {
  top: 0.25rem;
  right: 0.25rem;
}

.community-child-reply-delete-btn {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.8125rem;
}

@media (hover: none) {
  .community-reply-owner-delete {
    opacity: 1;
    pointer-events: auto;
  }
}

.community-panel-reply-card:not(:last-child) {
  border-bottom: 1px solid #f1f5f9;
}

.community-reply-card-inner {
  align-items: flex-start;
}

.community-reply-body {
  padding-top: 0.125rem;
}

.community-reply-header {
  line-height: 1.4;
}

.community-reply-author {
  font-size: 0.875rem;
  color: #0f172a;
}

.community-reply-author-sep {
  color: #cbd5e1;
  font-weight: 400;
  user-select: none;
}

.community-reply-time {
  font-size: 0.8125rem;
}

.community-reply-content {
  font-size: 0.9375rem;
  color: #334155;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.community-reply-actions {
  flex-wrap: wrap;
}

/* Child replies (nested) */
.community-child-replies {
  margin-left: 0.5rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid rgba(165, 197, 229, 0.5);
  background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
  border-radius: 0 0.5rem 0.5rem 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.community-child-replies-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.community-child-replies-icon {
  flex-shrink: 0;
  font-size: 0.875rem;
  color: #94a3b8;
}

.community-child-replies-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.community-child-replies-count {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.community-child-reply-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.625rem 0;
  margin-bottom: 0.25rem;
  border-radius: 0.375rem;
  transition: background 0.15s;
}

.community-child-reply-item:hover {
  background: rgba(255, 255, 255, 0.6);
}

.community-child-reply-item:last-of-type {
  margin-bottom: 0;
}

.community-child-reply-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
}

.community-child-reply-avatar-wrap .community-child-avatar,
.community-child-reply-avatar-wrap .community-avatar-img {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.6875rem;
}

.community-child-reply-avatar-wrap .community-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.community-child-avatar {
  background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
  color: #475569;
  font-weight: 600;
}

.community-child-reply-content {
  flex: 1;
  min-width: 0;
}

.community-child-reply-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.25rem;
}

.community-child-reply-author {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}

.community-child-reply-time {
  font-size: 0.75rem;
  color: #94a3b8;
}

.community-child-reply-text {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.community-child-reply-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.375rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: #94a3b8;
  background: transparent;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.community-child-reply-like-btn:hover {
  color: #64748b;
  background: rgba(0, 0, 0, 0.04);
}

.community-child-reply-like-btn-active {
  color: #2563eb;
}

.community-child-reply-like-btn-active:hover {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
}

.community-child-reply-like-btn:active svg {
  transform: scale(0.9);
  transition: transform 0.1s ease;
}

.community-panel-view-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.community-panel-view-more-btn:hover:not(:disabled) {
  color: #1d4ed8 !important;
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.3);
}

.community-panel-view-more-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.community-panel-view-more-btn svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.community-view-more-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.community-view-more-spinner {
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid rgba(37, 99, 235, 0.2);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: community-panel-spin 0.7s linear infinite;
}

/* Empty state */
.community-panel-empty {
  background: #f8fafc;
}

.community-panel-empty-icon {
  font-size: 3rem;
  color: #cbd5e1;
}

.community-panel-avatar {
  width: 2.5rem;
  height: 2.5rem;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
  font-size: 0.875rem;
}

.community-panel-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
}

.community-panel-avatar-wrap .community-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Hide profile photos until loaded (avoids wrong/stale frame when ng-src updates). */
.community-thread-card__avatar-img:not(.community-profile-img-loaded),
.community-auth-avatar-wrap .community-avatar-img:not(.community-profile-img-loaded),
.community-panel-avatar-wrap .community-avatar-img:not(.community-profile-img-loaded),
.community-reply-avatar-wrap .community-avatar-img:not(.community-profile-img-loaded),
.community-child-reply-avatar-wrap .community-avatar-img:not(.community-profile-img-loaded),
.community-child-avatar-wrap .community-avatar-img:not(.community-profile-img-loaded),
.community-modal-avatar-img:not(.community-profile-img-loaded) {
  opacity: 0;
  visibility: hidden;
}

.community-thread-card__avatar-img.community-profile-img-loaded,
.community-auth-avatar-wrap .community-avatar-img.community-profile-img-loaded,
.community-panel-avatar-wrap .community-avatar-img.community-profile-img-loaded,
.community-reply-avatar-wrap .community-avatar-img.community-profile-img-loaded,
.community-child-reply-avatar-wrap .community-avatar-img.community-profile-img-loaded,
.community-child-avatar-wrap .community-avatar-img.community-profile-img-loaded,
.community-modal-avatar-img.community-profile-img-loaded {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.15s ease;
}

.community-panel-content {
  color: #1e293b;
  line-height: 1.6;
}

.community-panel-divider {
  display: flex;
  align-items: center;
  margin: 1rem 0;
}

.community-panel-divider hr {
  flex: 1;
  margin: 0;
}

.community-panel-divider-text {
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 0 0.5rem;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.community-reply-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
}

.community-reply-avatar-wrap .community-reply-avatar,
.community-reply-avatar-wrap .community-avatar-img {
  width: 2rem;
  height: 2rem;
}

.community-reply-avatar-wrap .community-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.community-reply-avatar {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
}

.community-reply-content {
  color: #334155;
  line-height: 1.6;
}

.community-child-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
}

.community-child-avatar-wrap .community-child-avatar,
.community-child-avatar-wrap .community-avatar-img {
  width: 1.5rem;
  height: 1.5rem;
}

.community-child-avatar-wrap .community-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.community-child-avatar {
  background: #e2e8f0;
  font-size: 10px;
  color: #475569;
}

.community-reply-box {
  position: sticky;
  bottom: 0;
  background: #fff;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);
}

.community-reply-box-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.community-reply-composer {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.community-reply-composer:focus-within {
  border-color: #c7d9f0;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.community-reply-validation-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.65rem 0.9rem;
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.96) 0%, rgba(255, 251, 250, 0.98) 100%);
  border-bottom: 1px solid rgba(252, 165, 165, 0.45);
}

.community-reply-validation-banner__icon {
  flex-shrink: 0;
  width: 1.875rem;
  height: 1.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  font-size: 0.875rem;
}

.community-reply-validation-banner__text {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  font-weight: 500;
  color: #7f1d1d;
  padding-top: 0.2rem;
}

/* Guest: reply area (login / register CTA) */
.community-reply-composer-guest {
  background: linear-gradient(135deg, rgba(248, 250, 252, 1) 0%, rgba(241, 245, 249, 0.92) 100%);
  border-color: #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.community-reply-composer-guest:focus-within {
  border-color: #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.community-reply-guest-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  width: 100%;
}

.community-reply-guest-lock {
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.14), rgba(165, 197, 229, 0.28));
  color: #1d4ed8;
  font-size: 1.0625rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.community-reply-guest-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.community-reply-guest-desc {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
}

.community-reply-guest-actions {
  margin-inline-start: auto;
}

.community-reply-guest-btn-login {
  text-decoration: none !important;
  white-space: nowrap;
}

.community-reply-guest-btn-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155 !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.community-reply-guest-btn-register:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

@media (max-width: 576px) {
  .community-reply-guest-actions {
    width: 100%;
    margin-inline-start: 0;
    justify-content: stretch;
  }

  .community-reply-guest-actions .community-btn-reply,
  .community-reply-guest-actions .community-reply-guest-btn-register {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
  }
}

.community-reply-textarea {
  resize: none;
  min-height: 2.75rem;
  max-height: 10rem;
  background: transparent !important;
  border: none !important;
  font-size: 0.9375rem;
  line-height: 1.5;
  padding: 0.75rem 1rem 0.5rem;
  outline: none;
}

.community-reply-textarea::placeholder {
  color: #94a3b8;
}

.community-reply-composer-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.5rem 1rem 0.75rem;
}

.community-reply-char-count {
  font-size: 0.75rem;
  color: #64748b;
  margin-right: auto;
}

.community-reply-char-count.is-warning {
  color: #f59e0b;
}

.community-btn-reply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #2563eb !important;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  transition: background 0.2s, opacity 0.2s;
}

.community-btn-reply:hover:not(:disabled) {
  background: #1d4ed8 !important;
  color: #fff !important;
}

.community-btn-reply:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.community-btn-reply .community-btn-reply-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: community-panel-spin 0.7s linear infinite;
}

.community-btn-reply.is-loading {
  animation: community-reply-btn-pulse 1.2s ease-in-out infinite;
}

@keyframes community-reply-btn-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* ===== Modal Contributors ===== */
.community-modal-icon {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 1.25rem;
}

.community-modal-contributor:hover {
  background: #f8fafc;
}

.community-modal-avatar-wrap {
  position: relative;
}

.community-modal-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: #f1f5f9;
  color: #475569;
  text-align: center;
  line-height: 1;
}

.community-modal-avatar-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-modal-rank {
  bottom: -0.25rem;
  right: -0.25rem;
  font-size: 8px;
}

.community-modal-rank-1 { background: #eab308; color: #1e293b; }
.community-modal-rank-2 { background: #cbd5e1; color: #334155; }
.community-modal-rank-3 { background: #b45309; color: #fffbeb; }

/* Font weight semibold (Bootstrap fallback) */
.font-weight-semibold {
  font-weight: 600;
}

/* Min width for flex overflow (Bootstrap 4 fallback) */
.min-w-0 {
  min-width: 0;
}

/* Flex shrink (Bootstrap 4 fallback) */
.flex-shrink-0 {
  flex-shrink: 0;
}

/* Filter modal form spacing */
#filter-modal .form-group {
  margin-bottom: 1rem;
}

/* ===== Filter Modal (improved design) ===== */
.filter-modal-body {
  padding: 0 0 1.5rem;
}

.filter-modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 575px) {
  .filter-modal-row {
    grid-template-columns: 1fr;
  }
}

.filter-modal-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-modal-section {
  margin-bottom: 1.5rem;
}

.filter-modal-section:last-of-type {
  margin-bottom: 0;
}

.filter-modal-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0;
}

.filter-modal-label svg,
.filter-modal-label i {
  flex-shrink: 0;
  font-size: 0.875rem;
  color: #64748b;
}

.filter-modal-select {
  height: 42px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-modal-select:hover {
  border-color: #cbd5e1;
}

.filter-modal-select:focus {
  border-color: #a5c5e5;
  box-shadow: 0 0 0 3px rgba(165, 197, 229, 0.25);
  outline: none;
}

.filter-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-modal-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-modal-tag:hover {
  border-color: #a5c5e5;
  background: rgba(165, 197, 229, 0.12);
  color: #2563eb;
}

.filter-modal-tag.active {
  background: rgba(165, 197, 229, 0.35);
  border-color: #a5c5e5;
  color: #0f172a;
  font-weight: 600;
}

.filter-modal-status {
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.filter-modal-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: #334155;
  position: relative;
}

.filter-modal-checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.filter-modal-checkbox-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  transition: all 0.2s ease;
}

.filter-modal-checkbox input:focus-visible + .filter-modal-checkbox-box {
  box-shadow: 0 0 0 2px rgba(165, 197, 229, 0.4);
}

.filter-modal-checkbox input:checked + .filter-modal-checkbox-box {
  background: #a5c5e5;
  border-color: #a5c5e5;
}

.filter-modal-checkbox-box {
  position: relative;
}

.filter-modal-checkbox input:checked + .filter-modal-checkbox-box::after {
  content: '';
  display: block;
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.filter-modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 0;
  border-top: 1px solid #f1f5f9;
}

.filter-modal-btn-clear {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  padding: 0.5rem 0;
}

.filter-modal-btn-clear:hover {
  color: #0f172a;
}

.filter-modal-footer-actions {
  display: flex;
  gap: 0.5rem;
}

.filter-modal-btn-cancel {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.filter-modal-btn-cancel:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.filter-modal-btn-apply {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

/* ===== Overlay & Panel (extracted from inline) ===== */
.community-overlay.app-overlay {
  pointer-events: auto;
  display: none;
}

.community-overlay.app-overlay.is-visible {
  display: block;
}

.community-right-panel.app-right-panel,
.community-panel-events {
  pointer-events: auto;
}

/* ===== Overlay ===== */
.modal.app-modal-overlay {
  background: rgba(0,0,0,0.5);

}

/* ===== Modal ===== */
.modal-content.app-modal {
  background: #fff;
  width: 100%;
  max-width: 720px;
  border-radius: 12px;
  padding: 24px;
  border: none;
}

/* ===== Animation ===== */
.modal.fade .modal-content.app-modal {
  transform: translateY(10px) scale(0.95);
  opacity: 0;
  transition: all 0.2s ease;
}

.modal.show .modal-content.app-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-header{
  padding-left: 0 !important;
}

/* ===== Header ===== */
.modal-header .modal-title {
  display: block;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 0;
}

/* ===== Body ===== */
.app-modal-body {
  padding: 20px 0;
}

/* ===== Footer ===== */
.app-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.app-modal-footer .btn-cancel-white {
  background-color: #fff !important;
  color: #1a1a1a !important;
  border: 1px solid #dee2e6;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  line-height: 1.5;
}

.app-modal-footer .btn-cancel-white:hover {
  background-color: #f8f9fa !important;
  color: #1a1a1a !important;
  border-color: #dee2e6;
}

/* ===== Close Button ===== */
.app-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 2;
  color: inherit;
}

.modal-header .app-modal-close {
  position: static;
  top: auto;
  right: auto;
  margin-left: 12px;
}

/* ===== Tags ===== */
.app-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-tag {
  border: 1px solid #ddd;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.app-tag:hover {
  border-color: #a5c5e5;
  color: #2563eb;
}

.app-tag-add {
  border-style: dashed;
  color: #999;
}

/* Right side sheet (generic) */
.app-right-panel {
    transform: translateX(100%);
    transition: transform 0.4s ease;
    padding-top: 80px;
}

/* Community panel: no top padding, header aligned with close at top */
.community-right-panel.app-right-panel {
    padding-top: 0;
}

.app-right-panel.is-open {
    transform: translateX(0);
}

/* Overlay default hidden */
.app-overlay {
    display: none;
}


/* Hover feedback */
.app-tag:hover {
    border-color: #a5c5e5;
    background: #f5f9fd;
}

/* ✅ Selected state */
.app-tag.active {
    background: #a5c5e5;
    border-color: #a5c5e5;
    color: #000;
    font-weight: 600;
    box-shadow: 0 0 0 2px rgba(165, 197, 229, 0.35);
}

.flex-input-ans{
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 0;
}

.app-modal-overlay .form-control{
      background: #ffffff !important;
}

/* Add tag chip */
.app-tag-add {
    border-style: dashed;
    color: #6b7280;
}

/* Inline add wrapper */
.app-tag-add-inline {
    display: inline-flex;
    align-items: center;
}

/* Input wrapper (for icon positioning) */
.app-tag-input-wrapper {
    position: relative;
    display: inline-flex;
}

/* Input styled like tag */
.app-tag-input {
    height: 34px;
    padding: 6px 34px 6px 12px; /* space for icon */
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    outline: none;
    min-width: 120px;
}

/* SVG icon INSIDE input */
.app-tag-input-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
}

/* Hover effect */
.app-tag-input-icon:hover {
    color: #16a34a;
}


/* ===== Discussion Modal (New Discussion) ===== */
.discussion-modal-body {
  padding: 0 0 1.5rem;
}

.discussion-modal-field {
  margin-bottom: 1.5rem;
}

.discussion-modal-section {
  margin-bottom: 1.5rem;
}

.discussion-modal-section:last-of-type {
  margin-bottom: 0;
}

.discussion-modal-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.discussion-modal-label svg,
.discussion-modal-label i {
  flex-shrink: 0;
  font-size: 0.875rem;
  color: #64748b;
}

.discussion-modal-required {
  color: #dc2626;
}

.discussion-modal-input {
  width: 100%;
  height: 42px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.discussion-modal-input:hover {
  border-color: #cbd5e1;
}

.discussion-modal-input:focus {
  border-color: #a5c5e5;
  box-shadow: 0 0 0 3px rgba(165, 197, 229, 0.25);
  outline: none;
}

.discussion-modal-error {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: #dc2626;
}

.discussion-modal-char-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
}

.discussion-modal-textarea {
  width: 100%;
  height: auto;
  min-height: 140px;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.discussion-modal-textarea:hover {
  border-color: #cbd5e1;
}

.discussion-modal-textarea:focus {
  border-color: #a5c5e5;
  box-shadow: 0 0 0 3px rgba(165, 197, 229, 0.25);
  outline: none;
}

.discussion-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.discussion-modal-tag {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

.discussion-modal-tag:hover {
  border-color: #a5c5e5;
  color: #2563eb;
  background: rgba(165, 197, 229, 0.2);
}

.discussion-modal-tag:active {
  transform: scale(0.96);
}

.discussion-modal-tag.active {
  background: rgba(165, 197, 229, 0.35);
  border-color: #a5c5e5;
  color: #0f172a;
  font-weight: 600;
}

.discussion-modal-tag--disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

.discussion-modal-tag--removable {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.discussion-modal-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  margin-left: 0.125rem;
  font-size: 1rem;
  line-height: 1;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.discussion-modal-tag-remove:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

.discussion-modal-tag--just-added {
  animation: discussion-tag-add 0.5s ease-out;
}

@keyframes discussion-tag-add {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.discussion-modal-tag-add {
  border-style: dashed;
  color: #64748b;
  background: transparent;
}

.discussion-modal-tag-add:hover {
  color: #2563eb;
  border-color: #a5c5e5;
  background: rgba(165, 197, 229, 0.1);
}

.discussion-modal-tag-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.discussion-modal-tag-input-wrap--animated {
  animation: discussion-tag-input-appear 0.25s ease-out;
}

@keyframes discussion-tag-input-appear {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.discussion-modal-tag-input-wrap:focus-within {
  border-color: #a5c5e5;
  box-shadow: 0 0 0 2px rgba(165, 197, 229, 0.2);
}

.discussion-modal-tag-input {
  width: 8rem;
  min-width: 6rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  border: none;
  outline: none;
  background: transparent;
}

.discussion-modal-tag-input::placeholder {
  color: #94a3b8;
}

.discussion-modal-tag-input-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: color 0.2s, background 0.2s;
}

.discussion-modal-tag-input-btn:hover {
  color: #2563eb;
  background: rgba(165, 197, 229, 0.2);
}

.discussion-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
}

.discussion-modal-btn-cancel {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.discussion-modal-btn-cancel:hover {
  color: #0f172a;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.discussion-modal-btn-submit {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  background: #a5c5e5;
  border: none;
  border-radius: 0.5rem;
  transition: background 0.2s, opacity 0.2s;
}

.discussion-modal-btn-submit:hover:not(:disabled) {
  background: #94b5d6;
}

.discussion-modal-btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.replying-to-box {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: #f1f5f9;
    border-left: 4px solid #a5c5e5;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 6px;
}

.replying-to-content {
    flex: 1;
    overflow: hidden;
}

.replying-to-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 2px;
}

.replying-to-text {
    font-size: 13px;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.replying-to-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: color 0.15s, background 0.15s;
}

.replying-to-close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.replying-to-close svg {
    width: 1rem;
    height: 1rem;
}

/* ===== SweetAlert2 custom styles (delete confirmation) ===== */
.custom-swal-popup {
    height: auto !important;
    padding: 20px !important;
    border-radius: 20px !important;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.1), 0 2px 20px 0 rgba(0, 0, 0, 0.2);
}

.custom-swal-popup .swal2-html-container {
    text-align: left !important;
}

.lang_ar .custom-swal-popup .swal2-html-container {
    text-align: right !important;
}

.custom-swal-skill-save-btn {
    background: #a5c5e5 !important;
    border: 1px solid #a5c5e5 !important;
    font-size: 14px !important;
    font-weight: bold !important;
    color: #1a1a1a !important;
    border-radius: 5px !important;
    padding: 10px 10px !important;
    max-width: 153px !important;
    width: 100% !important;
    display: inline-block !important;
}

.custom-swal-skill-white-btn {
    background: #ffffff !important;
    border: 1px solid #dddddd !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
    border-radius: 5px !important;
    padding: 10px 10px !important;
    max-width: 153px !important;
    width: 100% !important;
    display: inline-block !important;
}

.swal-actions-right {
    display: flex !important;
    justify-content: flex-end !important;
    width: 100% !important;
    padding-right: 28px !important;
}

.swal-actions-center {
    display: flex !important;
    justify-content: center !important;
    margin: 0 auto;
    width: 100% !important;
    margin-top: 24px;
}

/* Delete discussion popup content */
.delete-discussion-swal {
    text-align: center;
    padding: 0.5rem 0;
}

.delete-discussion-swal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 50%;
    color: #dc2626;
}

.delete-discussion-swal__icon i {
    font-size: 1.5rem;
}

.delete-discussion-swal__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem;
}

.delete-discussion-swal__desc {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

.lang_ar .delete-discussion-swal {
    text-align: center;
}

nav.breadcrumb{
  background: transparent !important;
  padding: 0px 1rem !important;
}