/* Q6.9.7-HF.1.18C REV5 — Comments Visual + States + Public Render */

/* ---------- ADMIN ---------- */
[data-admin-pane="comments"]{
  width:100%;
  min-width:0;
}

.hf118c-r5-shell{
  width:100%;
  display:grid;
  gap:16px;
}

.hf118c-r5-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:22px;
  align-items:start;
  overflow:hidden;
}

.hf118c-r5-hero-copy{
  min-width:0;
}

.hf118c-r5-hero-copy h2{
  margin:6px 0 8px;
  font-size:clamp(1.55rem,2vw,2rem);
}

.hf118c-r5-hero-copy p{
  max-width:720px;
  margin:0;
}

.hf118c-r5-hero-actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.hf118c-r5-primary{
  background:linear-gradient(135deg,#e7c26e,#b98d3a)!important;
  color:#090909!important;
  border-color:transparent!important;
  font-weight:900!important;
}

.hf118c-r5-share{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:110px minmax(0,1fr);
  gap:8px 12px;
  align-items:center;
  padding-top:16px;
  border-top:1px solid rgba(255,255,255,.08);
}

.hf118c-r5-share>span{
  color:#b5b5b5;
  font-size:.9rem;
}

.hf118c-r5-share-field{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  min-width:0;
}

.hf118c-r5-share input{
  width:100%;
  min-width:0;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  background:#090909;
  color:#c6c6c6;
  padding:11px 13px;
  font:inherit;
}

.hf118c-r5-share>small{
  grid-column:2;
  min-height:1.15em;
  color:#9ee7b2;
}

.hf118c-r5-stats{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.hf118c-r5-stats article{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border:1px solid rgba(219,174,75,.24);
  border-radius:16px;
  padding:13px 15px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.025),rgba(255,255,255,.012));
}

.hf118c-r5-stats span{
  color:#9c9c9c;
  font-size:.83rem;
}

.hf118c-r5-stats strong{
  color:#e0b94f;
  font-size:1.35rem;
}

.hf118c-r5-toolbar-card{
  padding:14px 16px!important;
}

.hf118c-r5-toolbar{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.hf118c-r5-filter{
  display:grid;
  gap:6px;
  min-width:220px;
}

.hf118c-r5-filter span{
  color:#a9a9a9;
  font-size:.82rem;
}

.hf118c-r5-filter select{
  width:100%;
  min-height:42px;
  border:1px solid rgba(219,174,75,.25);
  border-radius:12px;
  background:#0b0b0b;
  color:#f4f4f4;
  padding:0 12px;
  font:inherit;
}

.hf118c-r5-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(360px,1fr));
  gap:14px;
}

.hf118c-r5-card{
  display:grid;
  align-content:start;
  gap:14px;
  min-width:0;
  overflow:hidden;
  padding:18px!important;
  transition:
    transform .18s ease,
    border-color .22s ease,
    box-shadow .22s ease;
}

.hf118c-r5-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.hf118c-r5-person{
  display:grid;
  gap:4px;
  min-width:0;
}

.hf118c-r5-person strong{
  font-size:1.04rem;
  line-height:1.25;
  overflow-wrap:anywhere;
}

.hf118c-r5-person span{
  color:#8f8f8f;
  font-size:.85rem;
  overflow-wrap:anywhere;
}

.hf118c-r5-badge{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:7px 10px;
  font-size:.7rem;
  font-weight:900;
  letter-spacing:.07em;
  white-space:nowrap;
}

.hf118c-r5-badge.pending{
  color:#e6c36e;
  border:1px solid rgba(230,195,110,.34);
  background:rgba(230,195,110,.07);
}

.hf118c-r5-badge.published{
  color:#9ee7b2;
  border:1px solid rgba(158,231,178,.34);
  background:rgba(158,231,178,.07);
}

.hf118c-r5-badge.hidden{
  color:#aaa;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.035);
}

.hf118c-r5-body-wrap{
  display:grid;
  gap:7px;
}

.hf118c-r5-body-label{
  color:#8f8f8f;
  font-size:.8rem;
}

.hf118c-r5-body{
  width:100%;
  min-height:96px;
  max-height:220px;
  box-sizing:border-box;
  resize:vertical;
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  background:#090909;
  color:#f4f4f4;
  padding:12px 13px;
  font:inherit;
  line-height:1.5;
}

.hf118c-r5-meta-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  color:#8f8f8f;
  font-size:.82rem;
}

.hf118c-r5-inline-order{
  display:flex;
  align-items:center;
  gap:8px;
}

.hf118c-r5-order{
  width:78px;
  min-height:36px;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.10);
  border-radius:10px;
  background:#0a0a0a;
  color:#fff;
  padding:0 9px;
}

.hf118c-r5-card-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.07);
}

.hf118c-r5-publish{
  background:linear-gradient(135deg,#e7c26e,#b98d3a)!important;
  color:#090909!important;
  border-color:transparent!important;
}

.hf118c-r5-published-pulse{
  animation:hf118cR5Published 1s ease;
}

@keyframes hf118cR5Published{
  0%{transform:scale(1);box-shadow:none}
  38%{
    transform:scale(1.012);
    border-color:rgba(158,231,178,.65);
    box-shadow:0 0 0 4px rgba(158,231,178,.08)
  }
  100%{transform:scale(1);box-shadow:none}
}

.hf118c-r5-empty{
  display:grid;
  gap:5px;
  text-align:center;
  justify-items:center;
  padding:28px!important;
}

.hf118c-r5-empty[hidden]{
  display:none!important;
}

/* ---------- ADMIN MODAL ---------- */
.hf118c-r5-modal[hidden]{
  display:none!important;
}

.hf118c-r5-modal{
  position:fixed;
  inset:0;
  z-index:12000;
  display:grid;
  place-items:center;
  padding:18px;
}

.hf118c-r5-backdrop{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  background:rgba(0,0,0,.82);
}

.hf118c-r5-dialog{
  position:relative;
  z-index:1;
  width:min(650px,100%);
  max-height:92vh;
  overflow:auto;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.12);
  border-radius:24px;
  padding:26px;
  background:#090909;
  box-shadow:0 28px 90px rgba(0,0,0,.55);
}

.hf118c-r5-x{
  position:absolute;
  top:13px;
  right:16px;
  border:0;
  background:none;
  color:#fff;
  font-size:28px;
  cursor:pointer;
}

.hf118c-r5-form{
  display:grid;
  gap:14px;
  margin-top:20px;
}

.hf118c-r5-form label{
  display:grid;
  gap:7px;
}

.hf118c-r5-form input,
.hf118c-r5-form textarea{
  width:100%;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.12);
  border-radius:13px;
  background:#0d0d0d;
  color:#fff;
  padding:12px 13px;
  font:inherit;
}

.hf118c-r5-order-field{
  max-width:160px;
}

.hf118c-r5-form-status{
  min-height:1.2em;
  margin:0;
  color:#ffaaa5;
}

.hf118c-r5-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

body.hf118c-r5-modal-open{
  overflow:hidden;
}

/* ---------- PUBLIC COMMENTS ---------- */
.hf118c-r5-public{
  padding:82px 0;
  border-top:1px solid rgba(255,255,255,.07);
  background:
    radial-gradient(circle at 14% 16%,rgba(219,174,75,.08),transparent 36%),
    #070707;
}

.hf118c-r5-public-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin-bottom:26px;
}

.hf118c-r5-public-head h2{
  max-width:760px;
  margin:7px 0 8px;
}

.hf118c-r5-public-head p{
  margin:0;
  opacity:.68;
}

.hf118c-r5-public-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:16px;
}

.hf118c-r5-public-card{
  position:relative;
  display:grid;
  align-content:space-between;
  gap:22px;
  min-height:180px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:20px;
  padding:22px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.025),rgba(255,255,255,.012));
  overflow:hidden;
}

.hf118c-r5-quote{
  position:absolute;
  top:8px;
  right:14px;
  color:rgba(224,185,79,.16);
  font-family:Georgia,serif;
  font-size:4rem;
  line-height:1;
}

.hf118c-r5-public-card p{
  position:relative;
  z-index:1;
  margin:0;
  white-space:pre-wrap;
  line-height:1.62;
}

.hf118c-r5-public-author{
  display:grid;
  gap:3px;
}

.hf118c-r5-public-author span{
  opacity:.58;
  font-size:.88rem;
}

.hf118c-r5-public-empty{
  display:grid;
  gap:6px;
  justify-items:start;
  border:1px dashed rgba(255,255,255,.12);
  border-radius:18px;
  padding:22px;
  opacity:.78;
}

.hf118c-r5-public-empty[hidden]{
  display:none!important;
}

/* Public modal */
.hf118c-r5-public-modal[hidden]{
  display:none!important;
}

.hf118c-r5-public-modal{
  position:fixed;
  inset:0;
  z-index:12000;
  display:grid;
  place-items:center;
  padding:18px;
}

.hf118c-r5-public-backdrop{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  background:rgba(0,0,0,.84);
}

.hf118c-r5-public-dialog{
  position:relative;
  z-index:1;
  width:min(680px,100%);
  max-height:92vh;
  overflow:auto;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.12);
  border-radius:24px;
  padding:28px;
  background:#090909;
  box-shadow:0 28px 90px rgba(0,0,0,.55);
}

.hf118c-r5-public-x{
  position:absolute;
  top:13px;
  right:16px;
  border:0;
  background:none;
  color:#fff;
  font-size:29px;
  cursor:pointer;
}

.hf118c-r5-public-form{
  display:grid;
  gap:15px;
  margin-top:22px;
}

.hf118c-r5-public-form label{
  display:grid;
  gap:7px;
}

.hf118c-r5-public-form input,
.hf118c-r5-public-form textarea{
  width:100%;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.13);
  border-radius:13px;
  padding:12px 13px;
  background:#0e0e0e;
  color:#fff;
  font:inherit;
}

.hf118c-r5-public-consent{
  grid-template-columns:auto 1fr!important;
  align-items:start;
}

.hf118c-r5-public-consent input{
  width:auto;
  margin-top:4px;
}

.hf118c-r5-honeypot{
  position:absolute!important;
  left:-9999px!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
}

.hf118c-r5-public-status{
  min-height:1.35em;
  margin:0;
  color:#ff9b9b;
}

.hf118c-r5-public-submit{
  background:linear-gradient(135deg,#e0bf73,#b98b35)!important;
  color:#080808!important;
  border:0!important;
  font-weight:900!important;
}

.hf118c-r5-public-success{
  min-height:300px;
  display:grid;
  place-items:center;
  align-content:center;
  text-align:center;
  gap:10px;
}

.hf118c-r5-success-check{
  width:74px;
  height:74px;
  display:grid;
  place-items:center;
  border-radius:50%;
  border:1px solid rgba(158,231,178,.38);
  color:#9ee7b2;
  background:rgba(158,231,178,.08);
  font-size:34px;
}

body.hf118c-r5-public-modal-open{
  overflow:hidden;
}

@media(max-width:900px){
  .hf118c-r5-hero{
    grid-template-columns:1fr;
  }

  .hf118c-r5-hero-actions{
    justify-content:flex-start;
  }

  .hf118c-r5-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .hf118c-r5-list{
    grid-template-columns:1fr;
  }
}

@media(max-width:680px){
  .hf118c-r5-share{
    grid-template-columns:1fr;
  }

  .hf118c-r5-share>small{
    grid-column:1;
  }

  .hf118c-r5-share-field{
    grid-template-columns:1fr;
  }

  .hf118c-r5-stats{
    grid-template-columns:1fr;
  }

  .hf118c-r5-card-head,
  .hf118c-r5-public-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .hf118c-r5-card-actions{
    justify-content:flex-start;
  }

  .hf118c-r5-dialog,
  .hf118c-r5-public-dialog{
    padding:23px 18px;
  }
}
