/* ============================================================================
   508 Ministry Compass & Dove Social
   Interactive Comments (Like, Love & Threaded Replies) + Clickable Avatar & Follow System
   Self-hosted Cormorant + Figtree only. Sunlit ivory / sky / champagne-gold palette.
   ============================================================================ */

/* --- Clickable Avatars & Author Names Everywhere --- */
.post-card .post-author,
.post-card .post-avatar,
.post-card .post-name,
.comment-item .comment-avatar,
.comment-item .comment-author {
  cursor: pointer;
}

.comment-item .comment-avatar {
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.comment-item .comment-avatar:hover {
  transform: scale(1.07);
  box-shadow: 0 0 0 2.5px rgba(212, 168, 75, 0.55);
}

.comment-item .comment-author {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  padding: 0 3px;
  margin-left: -3px;
  transition: color 0.15s ease, background 0.15s ease;
}
.comment-item .comment-author:hover {
  color: #1D4ED8;
  background: rgba(219, 234, 254, 0.65);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-card .post-avatar {
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.post-card .post-author:hover .post-avatar {
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.45);
}

/* --- Comment Thread Container & Nested Replies --- */
.comment-item.scf-enhanced {
  flex-wrap: wrap;
  background: linear-gradient(180deg, #FFFFFF 0%, #FCFDFE 100%);
  border: 1px solid rgba(203, 219, 240, 0.85);
  box-shadow: 0 2px 8px rgba(20, 31, 66, 0.03);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.comment-item.scf-enhanced:hover {
  border-color: rgba(147, 197, 253, 0.9);
}

.scf-comment-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
}

.scf-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #D8E4F3;
  background: #F8FBFF;
  color: #33466B;
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  user-select: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
}
.scf-pill-btn:hover {
  background: #EDF5FF;
  border-color: #93C5FD;
  color: #14224A;
  transform: translateY(-1px);
}
.scf-pill-btn:active {
  transform: scale(0.96);
}
.scf-pill-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.scf-pill-btn .scf-ico {
  font-size: 13px;
  line-height: 1;
}
.scf-pill-btn .scf-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  padding: 0 3px;
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.scf-pill-btn .scf-cnt.is-zero {
  opacity: 0.55;
}

/* Active Royal-Blue Like State */
.scf-pill-btn.is-like.is-active {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border-color: #2563EB;
  color: #1D4ED8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.18);
}
.scf-pill-btn.is-like.is-active .scf-cnt {
  color: #1E40AF;
  opacity: 1;
}

/* Active Warm Rose-Gold Love State */
.scf-pill-btn.is-love.is-active {
  background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 60%, #FEF3C7 100%);
  border-color: #E11D48;
  color: #BE123C;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.18);
}
.scf-pill-btn.is-love.is-active .scf-cnt {
  color: #9F1239;
  opacity: 1;
}

/* Active Reply Toggle State */
.scf-pill-btn.is-reply-open {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border-color: #D4A84B;
  color: #141F42;
}

@keyframes scfPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
.scf-pill-btn.is-popping {
  animation: scfPop 0.28s ease;
}

/* --- Inline Reply Form --- */
.scf-reply-form-wrap {
  width: 100%;
  margin-top: 9px;
  padding: 10px 11px;
  border-radius: 12px;
  background: linear-gradient(160deg, #F4F9FF 0%, #FFFDF5 100%);
  border: 1px solid #C8DCF5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.scf-reply-form-wrap[hidden] {
  display: none;
}

.scf-reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: #36507A;
}
.scf-reply-target {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.scf-reply-target strong {
  color: #141F42;
}
.scf-reply-cancel {
  border: none;
  background: transparent;
  color: #64748B;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.scf-reply-cancel:hover {
  background: rgba(148, 163, 184, 0.18);
  color: #141F42;
}

.scf-reply-form {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.scf-reply-name {
  width: 122px;
  flex: 0 0 auto;
  border: 1px solid #C5D6EC;
  border-radius: 9px;
  padding: 7px 9px;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 12.2px;
  background: #FFFFFF;
  color: #141F42;
}
.scf-reply-input {
  flex: 1 1 160px;
  min-width: 140px;
  border: 1px solid #C5D6EC;
  border-radius: 9px;
  padding: 7px 10px;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 12.8px;
  background: #FFFFFF;
  color: #141F42;
}
.scf-reply-input:focus,
.scf-reply-name:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 2.5px rgba(37, 99, 235, 0.14);
}
.scf-reply-submit {
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid #D4A84B;
  background: linear-gradient(135deg, #1E2E5C 0%, #141F42 100%);
  color: #FFFFFF;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 12.3px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.scf-reply-submit:hover {
  box-shadow: 0 3px 10px rgba(20, 31, 66, 0.22);
  transform: translateY(-1px);
}
.scf-reply-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}
.scf-reply-warn {
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #F59E0B;
  background: #FFFBEB;
  color: #92400E;
  font-size: 12px;
  font-weight: 700;
}
.scf-reply-warn[hidden] {
  display: none;
}

/* --- Threaded Replies Container with Sky-Gold Thread Line --- */
.scf-replies-list {
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 9px;
  margin-left: 6px;
  padding-left: 13px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.scf-replies-list:empty {
  display: none;
}
.scf-replies-list::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 4px;
  width: 2.5px;
  border-radius: 99px;
  background: linear-gradient(180deg, #60A5FA 0%, #D4A84B 55%, #F0D38A 100%);
}

.comment-item.scf-is-reply {
  box-sizing: border-box;
  width: 100%;
  background: linear-gradient(180deg, #F8FBFF 0%, #FFFDF9 100%);
  border: 1px solid rgba(191, 214, 242, 0.85);
  border-radius: 11px;
  padding: 8px 10px;
}
.comment-item.scf-is-reply .comment-avatar {
  width: 27px;
  height: 27px;
}
.scf-reply-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #EEF5FF;
  border: 1px solid #C8DDF8;
  color: #1E40AF;
  font-size: 10.5px;
  font-weight: 700;
}

/* --- Active Author Filter Banner above Feed --- */
.scf-author-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 11px 15px;
  border-radius: 14px;
  background: linear-gradient(135deg, #EFF6FF 0%, #FFFBF0 100%);
  border: 1.5px solid #D4A84B;
  box-shadow: 0 6px 20px rgba(20, 31, 66, 0.08);
  font-family: 'Figtree', system-ui, sans-serif;
}
.scf-author-filter-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.scf-author-filter-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #D4A84B;
  background: #141F42;
}
.scf-author-filter-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #141F42;
}
.scf-author-filter-sub {
  font-size: 11.8px;
  color: #4E5D7C;
}
.scf-author-filter-clear {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid #1E2E5C;
  background: #1E2E5C;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.scf-author-filter-clear:hover {
  background: #2B3F7A;
}

/* --- Member Quick-Profile Modal (Desktop Popover / Mobile Bottom Sheet) --- */
.scf-profile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(15, 25, 52, 0.48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.scf-profile-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.scf-profile-sheet {
  width: 100%;
  max-width: 430px;
  border-radius: 22px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 62%, #FFFDF6 100%);
  border: 1.5px solid rgba(212, 168, 75, 0.72);
  box-shadow: 0 24px 64px rgba(13, 24, 54, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  overflow: hidden;
  transform: translateY(14px) scale(0.97);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  color: #141F42;
}
.scf-profile-backdrop.is-open .scf-profile-sheet {
  transform: translateY(0) scale(1);
}

.scf-sheet-grabber {
  display: none;
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: rgba(20, 31, 66, 0.22);
  margin: 10px auto 2px;
}

.scf-sheet-banner {
  position: relative;
  height: 76px;
  background: linear-gradient(125deg, #162552 0%, #24458E 48%, #5B8FD9 82%, #E5C169 100%);
}
.scf-sheet-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 25%, rgba(255, 248, 220, 0.42), transparent 55%);
}

.scf-sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 25, 52, 0.42);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.scf-sheet-close:hover {
  background: rgba(15, 25, 52, 0.72);
  transform: scale(1.06);
}

.scf-sheet-body {
  padding: 0 22px 22px;
}

.scf-sheet-av-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: -38px;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.scf-sheet-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.scf-sheet-avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  border: 3.5px solid #FFFFFF;
  box-shadow: 0 0 0 2.5px #D4A84B, 0 8px 22px rgba(20, 31, 66, 0.22);
  background: #141F42;
  display: block;
}
.scf-sheet-verified-dot {
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E8C060 0%, #C6932E 100%);
  border: 2px solid #FFFFFF;
  color: #141F42;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(20, 31, 66, 0.25);
}

.scf-btn-follow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 126px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid #D4A84B;
  background: linear-gradient(135deg, #1A2B5B 0%, #244085 100%);
  color: #FFFFFF;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(26, 43, 91, 0.24);
  transition: all 0.16s ease;
}
.scf-btn-follow:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(26, 43, 91, 0.3);
}
.scf-btn-follow.is-following {
  background: linear-gradient(135deg, #EFF6FF 0%, #FFFBEB 100%);
  border-color: #D4A84B;
  color: #14224A;
  box-shadow: 0 3px 12px rgba(212, 168, 75, 0.22);
}
.scf-btn-follow:disabled {
  opacity: 0.65;
  cursor: wait;
}

.scf-sheet-name {
  margin: 0;
  font-family: 'Cormorant', Georgia, serif;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.12;
  color: #111D3E;
}

.scf-sheet-handle-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.scf-sheet-handle {
  font-size: 13px;
  font-weight: 700;
  color: #2563EB;
}
.scf-sheet-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFF9E6 0%, #EEF5FF 100%);
  border: 1px solid rgba(212, 168, 75, 0.65);
  color: #2A3C66;
  font-size: 11.2px;
  font-weight: 800;
}

.scf-sheet-bio {
  margin: 10px 0 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #3E4F71;
}

.scf-sheet-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.scf-stat-box {
  text-align: center;
  padding: 10px 6px;
  border-radius: 13px;
  background: #FFFFFF;
  border: 1px solid #D7E5F6;
  box-shadow: 0 2px 6px rgba(20, 31, 66, 0.04);
}
.scf-stat-val {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #141F42;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.scf-stat-lbl {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #5C6D8E;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scf-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scf-sheet-act-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 13px;
  border: 1px solid #C6932E;
  background: linear-gradient(135deg, #E8C060 0%, #D4A13C 100%);
  color: #131C3A !important;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.16s ease;
}
.scf-sheet-act-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(212, 161, 60, 0.32);
}

.scf-sheet-act-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.scf-sheet-act-sec {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #C8DCF5;
  background: #F4F9FF;
  color: #1B366D;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 12.6px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.scf-sheet-act-sec:hover {
  background: #E5F1FF;
  border-color: #93C5FD;
}

/* --- Mobile Bottom Sheet & Compact Replies (<= 680px) --- */
@media (max-width: 680px) {
  .scf-replies-list {
    margin-left: 8px;
    padding-left: 10px;
  }
  .scf-reply-name {
    width: 100%;
    flex: 1 1 100%;
  }
  .scf-profile-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .scf-profile-sheet {
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    transform: translateY(36px);
  }
  .scf-profile-backdrop.is-open .scf-profile-sheet {
    transform: translateY(0);
  }
  .scf-sheet-grabber {
    display: block;
  }
  .scf-sheet-banner {
    height: 64px;
  }
  .scf-sheet-body {
    padding: 0 18px calc(22px + env(safe-area-inset-bottom, 0px));
  }
  .scf-sheet-name {
    font-size: 24px;
  }
  .scf-sheet-act-row {
    grid-template-columns: 1fr;
  }
}
