/* =============================================================================
   WoWGoldFarms Comments Section Stylesheet

   House chrome card styling for item comments. Game-client aesthetic with real
   Blizzard atlas textures. Vanilla CSS only, mobile-first responsive.

   All colors/borders/shadows use CSS variables from static/css/_tokens.css
   (loaded before this sheet).

   Class prefix: wgf-cmt-*
   ============================================================================= */

:root {
  /* Fallback tokens if not loaded from _tokens.css */
  --wgf-gold-bright: #ffd76a;
  --wgf-gold: #f0c040;
  --wgf-gold-dim: #d7c24e;
  --wgf-gold-soft: #caa24e;
  --wgf-gold-dark: #8a6a1e;
  --wgf-gold-muted: #caa24e;
  --wgf-gold-accent: #d4af37;
  --wgf-gold-rgb: 244, 196, 92;

  --wgf-bg: #0a0805;
  --wgf-bg-2: #0f0d0a;
  --wgf-bg-base: #0d0b08;
  --wgf-panel-1: #0c0a07;
  --wgf-panel-2: #1a1815;
  --wgf-panel-3: #2a251f;
  --wgf-well: #000;
  --wgf-plate: #1a1815;
  --wgf-plate-hi: #2a251f;

  --wgf-metal: #4a4642;
  --wgf-metal-soft: #2d2a27;
  --wgf-border-neutral: #3a3632;
  --wgf-border-neutral-soft: #2a2622;
  --wgf-border-strong: #6b8c5f;
  --wgf-well-edge: #1a1815;

  --wgf-text: #e8e8f4;
  --wgf-muted: #a99e92;
  --wgf-on-gold: #0a0805;

  --wgf-down: #ff0000;
  --wgf-up: #00b000;

  --q-poor: #9d9d9d;
  --q-common: #ffffff;
  --q-uncommon: #1eff00;
  --q-rare: #0070dd;
  --q-epic: #a335ee;
  --q-legendary: #ff8000;
  --q-artifact: #e6b800;
  --q-heirloom: #0070dd;

  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;

  --font-game: "Friz Quadrata", serif;
  --font-game-display: "Morpheus", serif;
  --font-ui: system-ui, -apple-system, sans-serif;
  --font-mono: "Courier New", monospace;

  --text-ink-outline: 0 1px 2px rgba(0, 0, 0, 0.8);
  --text-xs: 11px;
  --text-sm: 12px;
  --text-md: 14px;
  --text-lg: 18px;
  --focus-ring: 0 0 0 2px rgba(240, 192, 64, 0.75);

  --motion-fast: 0.15s;
  --ease-standard: ease;

  --shadow-1: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 6px 16px rgba(0, 0, 0, 0.5);

  --wgf-btn-h: 34px;
  --wgf-btn-cap: 15px;
  --wgf-input-h: 34px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   COMMENTS PANEL CONTAINER

   Outer chrome frame: real corner braces + metal border + class hall texture.
   Game-client aesthetic, no rounded corners.
   ═══════════════════════════════════════════════════════════════════════════ */

#wgf-comments {
  position: relative;
  box-sizing: border-box;
  border: 2px solid var(--wgf-metal);
  border-radius: 0;

  background:
    url(/assets/ui/ui-frame-metal-cornertopleft-2x.png) top left / 40px auto no-repeat,
    url(/assets/ui/ui-frame-metal-cornertopright-2x.png) top right / 40px auto no-repeat,
    url(/assets/ui/ui-frame-metal-cornerbottomleft-2x.png) bottom left / 26px auto no-repeat,
    url(/assets/ui/ui-frame-metal-cornerbottomright-2x.png) bottom right / 26px auto no-repeat,
    linear-gradient(rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.44)),
    url(/assets/ui/classhall-stone-tile.png) left top / 256px 256px repeat,
    var(--wgf-plate);

  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.65),
    var(--shadow-2);
  color: var(--wgf-text);

  margin: var(--space-4) 0;
  overflow: hidden;
}


/* ═══════════════════════════════════════════════════════════════════════════
   PANEL HEADER (title + close button)
   ═══════════════════════════════════════════════════════════════════════════ */

.wgf-cmt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  min-height: 38px;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid rgba(0, 0, 0, 0.6);

  background:
    linear-gradient(rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.38)),
    url(/assets/ui/classhall-stone-tile.png) left top / 256px 256px repeat,
    var(--wgf-plate-hi);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -6px 10px rgba(0, 0, 0, 0.4);

  gap: var(--space-3);
}

.wgf-cmt-title {
  font-family: var(--font-game);
  font-size: var(--text-md);
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.03em;
  color: var(--wgf-gold);
  text-shadow: var(--text-ink-outline);
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.wgf-cmt-close {
  flex: 0 0 auto;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url(/assets/ui/128-redbutton-exit.png) center / 24px 24px no-repeat transparent;
  cursor: pointer;
  transition: filter var(--motion-fast) var(--ease-standard);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wgf-cmt-close:hover {
  filter: brightness(1.15);
}

.wgf-cmt-close:active {
  background-image: url(/assets/ui/128-redbutton-exit-pressed.png);
}

.wgf-cmt-close:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}


/* ═══════════════════════════════════════════════════════════════════════════
   COMMENTS BODY & LIST CONTAINER

   Near-black inset well (ig-63/64) for dense comments list.
   Scrollable with bronze/gold thumb.
   ═══════════════════════════════════════════════════════════════════════════ */

.wgf-cmt-body {
  padding: var(--space-3) var(--space-3);
  box-sizing: border-box;
}

.wgf-cmt-list {
  box-sizing: border-box;
  padding: var(--space-2);
  border: 1px solid var(--wgf-well-edge);
  border-radius: 0;
  background: var(--wgf-well);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.75),
    inset 0 0 0 1px rgba(0, 0, 0, 0.6);

  min-height: 200px;
  max-height: 600px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: thin;
  scrollbar-color: #8b7236 #0d0d08;
}

.wgf-cmt-list::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.wgf-cmt-list::-webkit-scrollbar-track {
  background: #0d0d08;
}

.wgf-cmt-list::-webkit-scrollbar-thumb {
  background: #8b7236;
  border-radius: 0;
}

.wgf-cmt-list::-webkit-scrollbar-thumb:hover {
  background: #a08040;
}

.wgf-cmt-list::-webkit-scrollbar-corner {
  background: #0d0d08;
}


/* ═══════════════════════════════════════════════════════════════════════════
   COMMENT CARD / ROW

   Individual comment with avatar, author, body, meta, and actions.
   Zebra rowstripe texture + hover gold gradient.
   ═══════════════════════════════════════════════════════════════════════════ */

.wgf-cmt-card {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2);
  border-bottom: 1px solid var(--wgf-border-neutral-soft);
  align-items: flex-start;
  transition: background var(--motion-fast) var(--ease-standard);
  box-sizing: border-box;
}

.wgf-cmt-card:nth-child(odd) {
  background: url(/assets/ui/auctionhouse-rowstripe-1.png) left top / auto 100% repeat-x fixed;
}

.wgf-cmt-card:nth-child(even) {
  background: url(/assets/ui/auctionhouse-rowstripe-2.png) left top / auto 100% repeat-x fixed;
}

.wgf-cmt-card:hover {
  background: linear-gradient(180deg, rgba(var(--wgf-gold-rgb), 0.10), rgba(var(--wgf-gold-rgb), 0.04));
}

.wgf-cmt-card.is-selected {
  background: linear-gradient(180deg, rgba(var(--wgf-gold-rgb), 0.22), rgba(var(--wgf-gold-rgb), 0.10));
  outline: 1px solid rgba(var(--wgf-gold-rgb), 0.45);
  outline-offset: -1px;
}

@media (max-width: 480px) {
  .wgf-cmt-card {
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-2);
  }
}


/* ─────────────────────────────────────────────────────────────────────────── */
/* Avatar */
/* ─────────────────────────────────────────────────────────────────────────── */

.wgf-cmt-avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 2px;
  object-fit: cover;
  background: #000;
  display: block;
}

.wgf-cmt-avatar-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  flex: 0 0 44px;
}

.wgf-cmt-avatar-frame.q-rare {
  background-image: url(/assets/ui/auctionhouse-itemicon-border-blue.png);
}

.wgf-cmt-avatar-frame.q-epic {
  background-image: url(/assets/ui/auctionhouse-itemicon-border-purple.png);
}

.wgf-cmt-avatar-frame.q-legendary {
  background-image: url(/assets/ui/auctionhouse-itemicon-border-orange.png);
}

.wgf-cmt-avatar-frame.q-uncommon {
  background-image: url(/assets/ui/auctionhouse-itemicon-border-green.png);
}

.wgf-cmt-avatar-frame.q-common {
  background-image: url(/assets/ui/auctionhouse-itemicon-border-white.png);
}

.wgf-cmt-avatar-frame .wgf-cmt-avatar {
  width: 32px;
  height: 32px;
}


/* ─────────────────────────────────────────────────────────────────────────── */
/* Comment body (author, text, meta) */
/* ─────────────────────────────────────────────────────────────────────────── */

.wgf-cmt-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.wgf-cmt-author {
  font-family: var(--font-ui);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--wgf-gold-bright);
  text-shadow: var(--text-ink-outline);
  margin: 0;
  word-break: break-word;
}

.wgf-cmt-text {
  font-family: var(--font-ui);
  font-size: var(--text-md);
  line-height: 1.4;
  color: var(--wgf-text);
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.wgf-cmt-meta {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--wgf-muted);
  margin: 0;
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}


/* ─────────────────────────────────────────────────────────────────────────── */
/* Comment actions (report, etc.) */
/* ─────────────────────────────────────────────────────────────────────────── */

.wgf-cmt-actions {
  flex: 0 0 auto;
  display: flex;
  gap: var(--space-1);
  margin-left: var(--space-2);
}

.wgf-cmt-action-btn {
  flex: 0 0 auto;
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--wgf-border-neutral-soft);
  border-radius: 4px;
  background: var(--wgf-panel-1);
  color: var(--wgf-gold-soft);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all var(--motion-fast) var(--ease-standard);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wgf-cmt-action-btn:hover {
  background: var(--wgf-panel-2);
  color: var(--wgf-gold-bright);
  border-color: var(--wgf-gold-soft);
}

.wgf-cmt-action-btn:active {
  transform: translateY(1px);
}

.wgf-cmt-action-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* State: reporting (confirm step) */
.wgf-cmt-action-btn.wgf-cmt-is-reporting {
  color: var(--wgf-gold-bright);
  border-color: var(--wgf-gold-soft);
  background: var(--wgf-panel-2);
  cursor: pointer;
}

/* State: reported (success/muted) */
.wgf-cmt-action-btn.wgf-cmt-is-reported {
  color: var(--wgf-muted);
  border-color: var(--wgf-border-neutral-soft);
  background: var(--wgf-panel-1);
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
}

/* State: error on report */
.wgf-cmt-action-btn.wgf-cmt-is-error {
  border-color: var(--wgf-down);
  border-width: 1px;
  color: #ff9999;
  background: rgba(255, 0, 0, 0.08);
}

.wgf-cmt-action-btn[disabled],
.wgf-cmt-action-btn.is-disabled {
  color: var(--wgf-gold-dim);
  cursor: default;
  pointer-events: none;
  opacity: 0.6;
}

@media (max-width: 480px) {
  .wgf-cmt-actions {
    margin-left: 0;
    align-self: flex-end;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   INPUT / COMPOSER PANEL

   Textarea + red POST button for logged-in users.
   ═══════════════════════════════════════════════════════════════════════════ */

.wgf-cmt-input-panel {
  border-top: 1px solid var(--wgf-border-neutral-soft);
  padding: var(--space-3);
  background: var(--wgf-panel-1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}

.wgf-cmt-input-wrap {
  display: flex;
  gap: var(--space-2);
  flex-direction: column;
  box-sizing: border-box;
}

.wgf-cmt-textarea {
  flex: 1 1 auto;
  min-height: 80px;
  padding: var(--space-2);
  border: 1px solid var(--wgf-border-neutral-soft);
  border-radius: 4px;
  background: var(--wgf-well);
  color: var(--wgf-text);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  line-height: 1.4;
  box-sizing: border-box;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  resize: vertical;
}

.wgf-cmt-textarea::placeholder {
  color: var(--wgf-muted);
}

.wgf-cmt-textarea:focus {
  outline: none;
  box-shadow: var(--focus-ring), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.wgf-cmt-input-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .wgf-cmt-input-wrap {
    gap: var(--space-2);
  }

  .wgf-cmt-input-actions {
    justify-content: stretch;
  }

  .wgf-cmt-input-actions .wgf-btn-red {
    flex: 1 1 100%;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   RED CTA BUTTON (POST / SUBMIT)

   Real 3-slice red button from client UI (128-redbutton-* caps).
   ═══════════════════════════════════════════════════════════════════════════ */

.wgf-btn-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: var(--wgf-btn-h);
  min-width: 96px;
  min-height: 44px;
  padding: 0 var(--wgf-btn-cap);
  border: 0;
  border-radius: 0;

  background:
    url(/assets/ui/128-redbutton-left-cap.png) left center / auto 100% no-repeat border-box,
    url(/assets/ui/128-redbutton-right-cap.png) right center / auto 100% no-repeat border-box,
    url(/assets/ui/_128-redbutton-center.png) left center / auto 100% repeat-x content-box;

  background-color: transparent;
  color: var(--wgf-gold-bright);
  font-family: var(--font-game);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-shadow: var(--text-ink-outline);
  cursor: pointer;
  user-select: none;
  transition: filter var(--motion-fast) var(--ease-standard);
}

.wgf-btn-red:hover {
  filter: brightness(1.12);
}

.wgf-btn-red:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.wgf-btn-red:active {
  background:
    url(/assets/ui/128-redbutton-left-cap-pressed.png) left center / auto 100% no-repeat border-box,
    url(/assets/ui/128-redbutton-right-cap-pressed.png) right center / auto 100% no-repeat border-box,
    url(/assets/ui/_128-redbutton-center-pressed.png) left center / auto 100% repeat-x content-box;
  transform: translateY(1px);
  filter: brightness(0.92);
}

.wgf-btn-red.wgf-cmt-is-posting {
  filter: brightness(0.75);
  pointer-events: none;
  cursor: default;
}

.wgf-btn-red[disabled],
.wgf-btn-red.is-disabled {
  background:
    url(/assets/ui/128-redbutton-left-cap-disabled.png) left center / auto 100% no-repeat border-box,
    url(/assets/ui/128-redbutton-right-cap-disabled.png) right center / auto 100% no-repeat border-box,
    url(/assets/ui/_128-redbutton-center-disabled.png) left center / auto 100% repeat-x content-box;
  color: var(--wgf-gold-dim);
  cursor: default;
  pointer-events: none;
  filter: none;
}


/* ═══════════════════════════════════════════════════════════════════════════
   SIGN-IN PROMPT

   Prompt for unauthenticated users with link to auth flow.
   ═══════════════════════════════════════════════════════════════════════════ */

.wgf-cmt-signin-prompt {
  padding: var(--space-4);
  text-align: center;
  background: var(--wgf-panel-1);
  border-top: 1px solid var(--wgf-border-neutral-soft);
}

.wgf-cmt-signin-message {
  font-family: var(--font-ui);
  font-size: var(--text-md);
  color: var(--wgf-text);
  margin: 0 0 var(--space-3);
  line-height: 1.4;
}

.wgf-cmt-signin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--wgf-border-neutral);
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(var(--wgf-gold-rgb), 0.12), rgba(var(--wgf-gold-rgb), 0.04));
  color: var(--wgf-gold-bright);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  font-weight: 600;
  text-decoration: none;
  text-shadow: var(--text-ink-outline);
  cursor: pointer;
  transition: all var(--motion-fast) var(--ease-standard);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.wgf-cmt-signin-link:hover {
  background: linear-gradient(135deg, rgba(var(--wgf-gold-rgb), 0.20), rgba(var(--wgf-gold-rgb), 0.08));
  border-color: var(--wgf-gold-soft);
}

.wgf-cmt-signin-link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.wgf-cmt-signin-link:active {
  transform: translateY(1px);
}


/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATE

   Displayed when no comments exist.
   ═══════════════════════════════════════════════════════════════════════════ */

.wgf-cmt-empty {
  padding: var(--space-5) var(--space-3);
  text-align: center;
  color: var(--wgf-muted);
  font-size: var(--text-md);
  line-height: 1.4;
  font-style: italic;
}


/* ═══════════════════════════════════════════════════════════════════════════
   LOADING STATE

   Spinner or loading message.
   ═══════════════════════════════════════════════════════════════════════════ */

.wgf-cmt-loading {
  padding: var(--space-4);
  text-align: center;
  color: var(--wgf-muted);
  font-size: var(--text-md);
}


/* ═══════════════════════════════════════════════════════════════════════════
   ERROR STATE

   Error message display with red border and soft red background.
   ═══════════════════════════════════════════════════════════════════════════ */

.wgf-cmt-error {
  padding: var(--space-3);
  border: 1px solid var(--wgf-down);
  border-radius: 4px;
  background: rgba(255, 0, 0, 0.05);
  color: #ff9999;
  font-size: var(--text-md);
  line-height: 1.4;
  margin: var(--space-2);
}


/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES

   Common typography and color utilities.
   ═══════════════════════════════════════════════════════════════════════════ */

.text-gold {
  color: var(--wgf-gold);
  text-shadow: var(--text-ink-outline);
}

.text-gold-bright {
  color: var(--wgf-gold-bright);
  text-shadow: var(--text-ink-outline);
}

.text-muted {
  color: var(--wgf-muted);
}

.font-ui {
  font-family: var(--font-ui);
}

.font-game {
  font-family: var(--font-game);
  font-variant: small-caps;
  letter-spacing: 0.03em;
  text-shadow: var(--text-ink-outline);
}

.font-mono {
  font-family: var(--font-mono);
}


/* ═══════════════════════════════════════════════════════════════════════════
   QUALITY COLOR BADGES

   WoW item quality colors for user class/status indicators.
   ═══════════════════════════════════════════════════════════════════════════ */

.q-poor { color: var(--q-poor); }
.q-common { color: var(--q-common); }
.q-uncommon { color: var(--q-uncommon); }
.q-rare { color: var(--q-rare); }
.q-epic { color: var(--q-epic); }
.q-legendary { color: var(--q-legendary); }
.q-artifact { color: var(--q-artifact); }


/* ═══════════════════════════════════════════════════════════════════════════
   HIDDEN / DISABLED STATES
   ═══════════════════════════════════════════════════════════════════════════ */

[hidden] {
  display: none !important;
}

.wgf-cmt-disabled {
  opacity: 0.5;
  pointer-events: none;
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE: TABLET
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  #wgf-comments {
    margin: var(--space-3) 0;
  }

  .wgf-cmt-header {
    padding: var(--space-2) var(--space-3);
  }

  .wgf-cmt-body {
    padding: var(--space-2);
  }

  .wgf-cmt-list {
    max-height: 500px;
    padding: var(--space-1);
  }

  .wgf-cmt-card {
    padding: var(--space-1);
    gap: var(--space-1);
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE: MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  #wgf-comments {
    margin: var(--space-2) calc(var(--space-2) * -1);
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .wgf-cmt-header {
    padding: var(--space-2);
    gap: var(--space-2);
  }

  .wgf-cmt-title {
    font-size: var(--text-md);
  }

  .wgf-cmt-body {
    padding: var(--space-2);
  }

  .wgf-cmt-list {
    max-height: 400px;
    padding: var(--space-1);
    border-radius: 0;
  }

  .wgf-cmt-card {
    padding: var(--space-1) var(--space-2);
    gap: var(--space-1);
  }

  .wgf-cmt-author {
    font-size: var(--text-sm);
  }

  .wgf-cmt-text {
    font-size: var(--text-sm);
  }

  .wgf-cmt-meta {
    font-size: 10px;
    gap: var(--space-1);
  }

  .wgf-cmt-input-panel {
    padding: var(--space-2);
  }

  .wgf-cmt-textarea {
    min-height: 70px;
    font-size: 16px; /* iOS zoom prevention */
  }

  .wgf-cmt-signin-prompt {
    padding: var(--space-3);
  }

  .wgf-btn-red {
    width: 100%;
    min-width: 44px;
    min-height: 44px;
    font-size: var(--text-sm);
  }
}

/* =============================================================================
   Outbound discussion link + dark-mode notice (2026-08-01)

   Rendered by comments_embed.community_section_html() on every commentable entity
   page. The Wowhead link is a LINK, never a mirror - their comments are not copied
   here (robots.txt, Fandom ToU, third-party copyright, AdSense scraped-content
   policy). Styled as a chrome-kit plate, not a plain box (owner: "too much plain").
   ============================================================================= */

.wgf-comments-pending {
  padding: var(--space-3, 12px);
  border: 1px solid var(--wgf-border-neutral);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(var(--wgf-gold-rgb), 0.05), rgba(0, 0, 0, 0.35)),
    var(--wgf-plate);
  box-shadow: inset 0 1px 0 rgba(var(--wgf-gold-rgb), 0.10),
              inset 0 -1px 0 rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
}

.wgf-comments-pending-note {
  margin: 0 0 var(--space-2, 8px);
  color: var(--wgf-muted);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.5;
}

.wgf-comments-elsewhere {
  margin: var(--space-2, 8px) 0 0;
}

.wgf-comments-pending .wgf-comments-elsewhere {
  margin-top: 0;
}

.wgf-comments-outbound {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--wgf-gold-dark);
  border-radius: 2px;
  background: linear-gradient(180deg, var(--wgf-plate-hi), var(--wgf-plate));
  color: var(--wgf-gold);
  font-size: var(--text-sm, 0.875rem);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(var(--wgf-gold-rgb), 0.14);
  transition: color var(--motion-fast, 120ms) var(--ease-standard, ease),
              border-color var(--motion-fast, 120ms) var(--ease-standard, ease);
}

.wgf-comments-outbound:hover,
.wgf-comments-outbound:focus-visible {
  color: var(--wgf-gold-bright);
  border-color: var(--wgf-gold);
  text-decoration: underline;
}

.wgf-comments-outbound-mark {
  font-size: 0.9em;
  opacity: 0.8;
}

/* Screen-reader-only text (the "opens in a new tab" warning). Scoped here because
   the site has no global helper for it yet. */
.wgf-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Guest name field (2026-08-02): posting without an account. Matches the textarea's
   well treatment so the composer reads as one control, not two. */
.wgf-cmt-name {
  display: block;
  width: 100%;
  margin-bottom: var(--space-2, 8px);
  padding: 8px 10px;
  box-sizing: border-box;
  border: 1px solid var(--wgf-border-neutral);
  border-radius: 2px;
  background: var(--wgf-well, #000);
  color: var(--wgf-text);
  font-family: inherit;
  font-size: var(--text-sm, 0.875rem);
  min-height: 36px;
}

.wgf-cmt-name::placeholder { color: var(--wgf-muted); opacity: 0.8; }

.wgf-cmt-name:focus-visible {
  outline: 1px solid rgba(var(--wgf-gold-rgb), 0.55);
  outline-offset: -1px;
  border-color: var(--wgf-gold-dark);
}

/* -- Composer identity: who you post as, and the way to change it -------------
   Signed in -> the byline names you. Signed out -> guest posting stays primary
   and Battle.net sign-in sits beside it as the quieter second option. */

.wgf-cmt-byline {
  margin: 0 0 var(--space-2, 8px);
  font-size: var(--text-sm, 0.875rem);
  color: var(--wgf-muted);
}

.wgf-cmt-byline strong {
  color: var(--wgf-gold, #f8b700);
  font-weight: 700;
}

.wgf-cmt-signin {
  margin: var(--space-2, 8px) 0 0;
  font-size: var(--text-sm, 0.875rem);
  color: var(--wgf-muted);
}

.wgf-cmt-signin-link {
  color: #35b0ff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(53, 176, 255, 0.4);
}

.wgf-cmt-signin-link:hover,
.wgf-cmt-signin-link:focus-visible {
  color: #7ccbff;
  border-bottom-color: rgba(124, 203, 255, 0.75);
}

/* =============================================================================
   Sourced (third-party) comment corpus - wgf-cmt-src-*
   Rendered by sourced_comments.py. INERT as of 2026-08-02: the grant interlock
   keeps this markup off every page until a written grant exists. Styles ship
   anyway so that go-live is a data change, not a CSS scramble.

   Visually SUBORDINATE to first-party comments on purpose: dimmer plate, no gold
   title, explicit "via <source>" badge on every card. A reader must never be
   able to mistake a mirrored comment for a WoWGoldFarms reader's comment.
   ============================================================================= */

.wgf-cmt-src-block {
  margin: 1.25rem 0 0;
  padding: 0.85rem 0.9rem 0.9rem;
  background: var(--wgf-panel-1, #0c0a07);
  border: 1px solid var(--wgf-border-neutral-soft, #2a2622);
  border-left: 3px solid var(--wgf-metal, #4a4642);
  border-radius: 3px;
}

.wgf-cmt-src-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.wgf-cmt-src-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  /* deliberately NOT --wgf-gold: gold is reserved for our own sections */
  color: var(--wgf-muted, #a99e92);
  letter-spacing: 0.01em;
}

.wgf-cmt-src-count {
  font-size: 0.75rem;
  color: var(--wgf-muted, #a99e92);
  opacity: 0.8;
}

.wgf-cmt-src-attribution {
  margin: 0 0 0.7rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--wgf-muted, #a99e92);
  opacity: 0.85;
}

.wgf-cmt-src-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.wgf-cmt-src-card {
  padding: 0.6rem 0.7rem;
  background: var(--wgf-well, #000);
  border: 1px solid var(--wgf-well-edge, #1a1815);
  border-radius: 2px;
}

.wgf-cmt-src-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  color: var(--wgf-muted, #a99e92);
}

.wgf-cmt-src-author { font-weight: 600; color: var(--wgf-gold-soft, #caa24e); }
.wgf-cmt-src-date   { opacity: 0.75; }
.wgf-cmt-src-score  { font-variant-numeric: tabular-nums; opacity: 0.85; }

.wgf-cmt-src-badge {
  margin-left: auto;
  padding: 0.05rem 0.35rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wgf-muted, #a99e92);
  background: var(--wgf-metal-soft, #2d2a27);
  border-radius: 2px;
}

.wgf-cmt-src-permalink,
.wgf-cmt-src-home {
  color: var(--wgf-gold-soft, #caa24e);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.wgf-cmt-src-permalink:hover,
.wgf-cmt-src-home:hover { color: var(--wgf-gold-bright, #ffd76a); }

.wgf-cmt-src-body {
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--wgf-text, #e8e8f4);
}
.wgf-cmt-src-body p { margin: 0 0 0.5rem; }
.wgf-cmt-src-body p:last-child { margin-bottom: 0; }

.wgf-cmt-src-footer {
  margin-top: 0.7rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--wgf-border-neutral-soft, #2a2622);
  font-size: 0.78rem;
}

@media (max-width: 480px) {
  .wgf-cmt-src-block { padding: 0.7rem 0.6rem; }
  .wgf-cmt-src-badge { margin-left: 0; }
}

/* --- attribution hardening (2026-08-02): every card links back to the source --- */
blockquote.wgf-cmt-src-body { margin: 0; padding: 0; border: 0; quotes: none; }
blockquote.wgf-cmt-src-body::before,
blockquote.wgf-cmt-src-body::after { content: none; }

a.wgf-cmt-src-author { text-decoration: none; border-bottom: 1px dotted currentColor; }
a.wgf-cmt-src-author:hover { color: var(--wgf-gold-bright, #ffd76a); }

a.wgf-cmt-src-badge { text-decoration: none; }
a.wgf-cmt-src-badge:hover {
  color: var(--wgf-gold-soft, #caa24e);
  background: var(--wgf-panel-3, #2a251f);
}

.wgf-cmt-src-attribution a {
  color: var(--wgf-gold-soft, #caa24e);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.wgf-cmt-src-attribution a:hover { color: var(--wgf-gold-bright, #ffd76a); }

.wgf-cmt-src-outbound-mark { margin-left: 0.25rem; font-size: 0.85em; opacity: 0.8; }
