/* =====================================================
   HOLY CIRCLE – FORUM THREAD (PREMIUM)
   ===================================================== */

:root {
  --hc-blue: #002e6b;
  --hc-blue-soft: #0b3f87;
  --hc-gold: #bf9745;
  --hc-gold-glow: rgba(191, 151, 69, 0.45);
  --hc-bg: #f6f7f9;
  --hc-card: #ffffff;
  --hc-border: #e6e8ee;
  --hc-muted: #6b7280;
  --hc-shadow-soft: 0 8px 30px rgba(0,0,0,.06);
  --hc-shadow-strong: 0 20px 60px rgba(0,0,0,.12);
}

/* -----------------------------------------------------
   PAGE FOUNDATION
----------------------------------------------------- */
body[data-page="forum-thread"] {
  background: radial-gradient(
    1200px 600px at 50% -200px,
    #eef3fb,
    var(--hc-bg)
  );
}

/* -----------------------------------------------------
   RIGHT SIDEBAR — COMMUNITY CARD (DECLUTTERED)
----------------------------------------------------- */
body[data-page="forum-thread"] #threadCommunityCard.thread-community-card {
  overflow: hidden;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hc-muted);
}

body[data-page="forum-thread"] #threadCommunityCard .tc-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--hc-border);
  background: linear-gradient(180deg, #fff, #f8fafc);
  color: var(--hc-blue);
  font-weight: 700;
  white-space: nowrap;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-title {
  display: block;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-title:hover {
  color: var(--hc-blue);
}

body[data-page="forum-thread"] #threadCommunityCard .tc-desc {
  margin-top: 0.55rem;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-stats {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--hc-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-stat {
  background: linear-gradient(180deg, #ffffff, #f9fafb);
  border: 1px solid var(--hc-border);
  border-radius: 14px;
  padding: 0.75rem 0.8rem;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-stat-num {
  font-weight: 800;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.1;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-stat-label {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--hc-muted);
  font-weight: 700;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-actions {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--hc-border);
  display: grid;
  gap: 0.55rem;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  width: 100%;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-actions .btn:focus-visible {
  outline: 3px solid rgba(0, 46, 107, 0.25);
  outline-offset: 2px;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-actions .btn.btn-gold {
  background: var(--hc-gold);
  color: #fff;
  border-color: var(--hc-gold);
}

body[data-page="forum-thread"] #threadCommunityCard .tc-actions .btn.btn-gold:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

body[data-page="forum-thread"] #threadCommunityCard .tc-actions .btn.is-joined {
  background: #eef0f4;
  border-color: #d7dbe3;
  color: #111;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-actions .btn.is-joined:hover {
  background: #e3e6ee;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-view {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--hc-blue);
  text-decoration: none;
}

body[data-page="forum-thread"] #threadCommunityCard .tc-view:hover {
  color: var(--hc-gold);
  text-decoration: underline;
}

/* -----------------------------------------------------
   CONTENT WIDTH
----------------------------------------------------- */
.forum-shell.narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1rem 5rem;
}

/* -----------------------------------------------------
   THREAD CARD (HERO CONTENT)
----------------------------------------------------- */
.thread-card {
  background: var(--hc-card);
  border-radius: 28px;
  padding: 2.2rem;
  border: 1px solid var(--hc-border);
  box-shadow: var(--hc-shadow-strong);
  position: relative;
  overflow: visible;
}

/* subtle top glow */
.thread-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 46, 107, 0.08),
    transparent 40%
  );
  pointer-events: none;
}

.reply-edit-countdown,
#editCountdown {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* -----------------------------------------------------
   TITLE & META
----------------------------------------------------- */
.thread-card-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.thread-card-meta {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--hc-muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* -----------------------------------------------------
   THREAD BODY
----------------------------------------------------- */
.thread-card-body {
  margin-top: 1.4rem;
  font-size: 1rem;
  line-height: 1.7;
  color: #1f2937;
}

/* -----------------------------------------------------
   THREAD ACTION BAR
----------------------------------------------------- */
.thread-card-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hc-border);
}

/* Left/right alignment inside action bar */
.thread-actions-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.thread-actions-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.thread-card-actions .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}


/* -----------------------------------------------------
   REPLIES SECTION
----------------------------------------------------- */
.forum-section {
  margin-top: 2.5rem;
}

/* reply list */
.reply-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* -----------------------------------------------------
   INDIVIDUAL REPLY CARD
----------------------------------------------------- */
.reply-row {
  background: var(--hc-card);
  border-radius: 20px;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--hc-border);
  box-shadow: var(--hc-shadow-soft);
  position: relative;
  opacity: 0;
  transform: translateY(12px);
  animation: replyIn 0.45s ease forwards;
}

/* reply accent bar */
.reply-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(
    180deg,
    var(--hc-blue),
    var(--hc-gold)
  );
}

.reply-row.reply-enter {
  animation-delay: 0.05s;
}

@keyframes replyIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -----------------------------------------------------
   REPLY HEADER
----------------------------------------------------- */
.reply-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--hc-muted);
  margin-bottom: 0.4rem;
}

/* -----------------------------------------------------
   REPLY BODY
----------------------------------------------------- */
.reply-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #1f2937;
}

/* Reply meta row contains author/time + edit/delete */
.reply-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--hc-muted);
}

.reply-meta .dot {
  opacity: 0.7;
}

.reply-edit-btn,
.reply-delete-btn {
  appearance: none;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid var(--hc-border);
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.reply-edit-btn {
  color: var(--hc-blue);
  border-color: rgba(0, 46, 107, 0.25);
}

.reply-edit-btn:hover {
  background: rgba(0, 46, 107, 0.06);
  transform: translateY(-1px);
}

.reply-delete-btn {
  color: var(--hc-gold);
  border-color: rgba(191, 151, 69, 0.35);
}

.reply-delete-btn:hover {
  background: rgba(191, 151, 69, 0.10);
  transform: translateY(-1px);
}

.reply-edit-btn:focus-visible,
.reply-delete-btn:focus-visible {
  outline: 3px solid rgba(0, 46, 107, 0.20);
  outline-offset: 2px;
}

/* -----------------------------------------------------
   REPLY ACTIONS
----------------------------------------------------- */
.reply-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.reply-btn {
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  border: 1px solid var(--hc-border);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reply-btn:hover {
  background: #f1f5f9;
}

/* -----------------------------------------------------
   GUEST CTA
----------------------------------------------------- */
.guest-hint {
  text-align: center;
  padding: 1.2rem;
  border-radius: 20px;
  background: linear-gradient(
    180deg,
    #ffffff,
    #f8fafc
  );
  border: 1px dashed var(--hc-border);
}

.guest-hint p {
  color: var(--hc-muted);
  margin-bottom: 0.5rem;
}

/* =====================================================
   REPLY COMPOSER – LUXURY LOCKED INPUT
   ===================================================== */

#replyComposer textarea,
.reply-composer textarea,
textarea[name="reply"],
textarea {
  resize: none !important;              /* 🔒 lock size */
  height: 120px;                         /* intentional height */
  max-height: 120px;
  min-height: 120px;

  width: 100%;
  padding: 0.85rem 1rem;

  border-radius: 14px;
  border: 1px solid var(--hc-border);
  background: linear-gradient(
    180deg,
    #ffffff,
    #f9fafb
  );

  font-size: 0.95rem;
  line-height: 1.55;
  font-family: inherit;

  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

/* Focus state — soft, premium glow */
#replyComposer textarea:focus,
.reply-composer textarea:focus {
  border-color: var(--hc-blue);
  background: #ffffff;
  box-shadow:
    0 0 0 3px rgba(0, 46, 107, 0.12),
    0 10px 25px rgba(0,0,0,0.08);
}

/* -----------------------------------------------------
   POST REPLY BUTTON – UPGRADE
----------------------------------------------------- */
#replyComposer button,
.reply-composer button,
button[type="submit"] {
  margin-top: 0.8rem;

  padding: 0.55rem 1.4rem;
  border-radius: 999px;

  font-size: 0.8rem;
  font-weight: 600;

  border: none;
  background: linear-gradient(
    180deg,
    var(--hc-blue),
    var(--hc-blue-soft)
  );
  color: #ffffff;

  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    opacity seen 0.15s ease;
}

#replyComposer button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

#replyComposer button:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}


/* Replying as header */
.replying-as {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--hc-border);
}

.replying-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.replying-label {
  font-size: 0.7rem;
  color: var(--hc-muted);
}

.replying-name {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Character counter */
.char-hint {
  margin-top: 0.3rem;
  font-size: 0.7rem;
  color: var(--hc-muted);
  text-align: right;
}

.char-hint .over {
  color: #c2410c;
  font-weight: 600;
}

.mention {
  color: #bf9745;
  cursor: pointer;
  font-weight: 500;
}

.mention:hover {
  text-decoration: underline;
}

.mention-hover-card img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
}

.mhc-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mention-hover-card .muted {
  font-size: 12px;
  opacity: 0.7;
}

.mention-hover-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mention-hover-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.45);
}


/* ============================================
   HOLY CIRCLE — MODERATOR ACTIONS
============================================ */

.hc-mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.3rem;
 
  
}

/* Base action */
.hc-action {
  appearance: none;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--hc-border);
  background: #fff;
  color: var(--hc-blue);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.hc-action:hover {
  background: rgba(0, 46, 107, 0.06);
  border-color: rgba(0, 46, 107, 0.25);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.hc-action:focus-visible {
  outline: 3px solid rgba(0, 46, 107, 0.20);
  outline-offset: 2px;
}

/* ===============================
   INDIVIDUAL ACTION STYLES
================================ */

/* Add Update — hopeful / constructive */
.hc-update {
  border-color: var(--hc-blue);
  color: var(--hc-blue);
}
.hc-update:hover {
  background: rgba(0, 46, 107, 0.08);
}

/* Lock — protective */
.hc-lock {
  border-color: var(--hc-gold);
  color: var(--hc-gold);
}
.hc-lock:hover {
  background: rgba(191, 151, 69, 0.12);
}

/* Unlock — use theme (same family as Lock) */
.hc-unlock {
  border-color: var(--hc-gold);
  color: var(--hc-gold);
}
.hc-unlock:hover {
  background: rgba(191, 151, 69, 0.12);
}

/* Archive — respectful / quiet */
.hc-archive {
  border-color: var(--hc-border);
  color: var(--hc-muted);
}
.hc-archive:hover {
  background: #f6f7f9;
}

/* Delete — solemn, not aggressive */
.hc-delete {
  border-color: var(--hc-gold);
  color: var(--hc-gold);
}
.hc-delete:hover {
  background: rgba(191, 151, 69, 0.10);
}


/* -----------------------------------------------------
   MOBILE POLISH
----------------------------------------------------- */
@media (max-width: 640px) {
  .thread-card {
    padding: 1.5rem;
    border-radius: 22px;
  }

  .thread-card-title {
    font-size: 1.5rem;
  }

  .reply-row {
    padding: 1rem;
  }
   #replyComposer textarea {
    height: 110px;
    max-height: 110px;
    min-height: 110px;
  }
}
