/* โพสต์ popup แบบ Facebook (รูป 2–3) */
.fb-post-modal-overlay,
.comment-modal{
  position:fixed;
  inset:0;
  z-index:20100;
  display:none;
  align-items:center;
  justify-content:center;
  padding:12px;
  background:rgba(244,244,244,.82);
  backdrop-filter:blur(8px);
}
.fb-post-modal-overlay.show,
.comment-modal.show{ display:flex; }

.fb-post-modal-dialog,
.comment-dialog.fb-post-modal-dialog{
  width:min(500px,100%);
  max-height:min(90vh,780px);
  display:flex;
  flex-direction:column;
  background:#fff;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 12px 28px rgba(0,0,0,.18),0 2px 8px rgba(0,0,0,.08);
  animation:fbPostModalIn .2s ease;
}
@keyframes fbPostModalIn{
  from{ opacity:0; transform:scale(.97) translateY(6px); }
  to{ opacity:1; transform:none; }
}

.fb-post-modal-head,
.comment-modal.fb-post-modal-dialog .fb-post-modal-head{
  position:relative;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
  padding:10px 48px;
  border-bottom:1px solid #e4e6eb;
  background:#fff;
}
.fb-post-modal-head h2,
.comment-modal.fb-post-modal-dialog .fb-post-modal-head h2{
  margin:0;
  font-size:17px;
  font-weight:700;
  color:#050505;
  text-align:center;
  letter-spacing:-.01em;
}
.fb-post-modal-close,
.comment-modal.fb-post-modal-dialog .fb-post-modal-close{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:36px;
  height:36px;
  border:none;
  border-radius:999px;
  background:#e4e6eb;
  color:#050505;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  display:grid;
  place-items:center;
}
.fb-post-modal-close:hover{ background:#d8dadf; }

.fb-post-modal-scroll,
.comment-modal.fb-post-modal-dialog .fb-post-modal-scroll{
  flex:1;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  background:#fff;
}

.fb-post-modal-post{ padding:12px 16px 0; }
.fb-post-modal-author{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}
.fb-post-modal-av{
  width:28px;
  height:28px;
  border-radius:999px;
  background:linear-gradient(180deg,#eaebef,#dfe3e8);
  border:1px solid #ccd0d5;
  display:grid;
  place-items:center;
  font-size:12px;
  font-weight:700;
  color:#050505;
  flex-shrink:0;
  overflow:hidden;
}
.fb-post-modal-av img,
.fb-post-modal-av .fb-comment-avatar-img{ width:100%; height:100%; object-fit:cover; display:block; }
.fb-post-modal-owner-link{ text-decoration:none; color:inherit; cursor:pointer; }
.fb-post-modal-meta{ min-width:0; }
.fb-post-modal-name{
  font-size:15px;
  font-weight:600;
  color:#050505;
  line-height:1.2;
}
.fb-post-modal-time{
  font-size:13px;
  color:#65676b;
  margin-top:2px;
}
.fb-post-modal-text{
  font-size:15px;
  line-height:1.45;
  color:#050505;
  white-space:pre-wrap;
  word-break:break-word;
  margin-bottom:8px;
}
.fb-post-modal-details{
  font-size:14px;
  line-height:1.45;
  color:#65676b;
  white-space:pre-wrap;
  margin-bottom:8px;
}
.fb-post-modal-hero{
  margin:8px -16px 0;
  background:#f0f2f5;
  overflow:hidden;
}
.fb-post-modal-hero img,
.fb-post-modal-hero video{
  display:block;
  width:100%;
  max-height:min(52vh,480px);
  object-fit:cover;
  background:#000;
}
.fb-post-modal-engage{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:10px 0 8px;
  font-size:14px;
  color:#65676b;
}
.fb-post-modal-engage-left{ display:flex; gap:12px; flex-wrap:wrap; }
.fb-post-modal-divider{
  height:1px;
  background:#e4e6eb;
  margin:0 -16px;
}

.fb-post-modal-comments{
  padding:8px 12px 12px;
}

/* แถวคอมเมนต์ — รูปโปรไฟล์วงกลมหน้าชื่อ (ใช้ได้ทุกหน้า รวม popup จากแจ้งเตือน) */
.fb-post-modal-comments .fb-comment-row,
.fb-post-modal-comments .feed-comment-row{
  display:flex;
  align-items:flex-start;
  gap:8px;
  max-width:100%;
  margin-bottom:8px;
}
.fb-post-modal-comments .fb-comment-avatar,
.fb-post-modal-comments .feed-comment-avatar{
  flex-shrink:0;
  width:28px;
  height:28px;
  min-width:28px;
  border-radius:999px;
  background:linear-gradient(180deg,#eaebef,#dfe3e8);
  border:1px solid #ccd0d5;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:700;
  color:#050505;
  overflow:hidden;
}
.fb-post-modal-comments .fb-comment-avatar-link,
.fb-post-modal-comments .feed-comment-avatar-link{
  border:none;
  padding:0;
  margin:0;
  background:transparent;
  cursor:pointer;
}
.fb-post-modal-comments .fb-comment-avatar img,
.fb-post-modal-comments .fb-comment-avatar .fb-comment-avatar-img,
.fb-post-modal-comments .feed-comment-avatar img,
.fb-post-modal-comments .feed-comment-avatar .fb-comment-avatar-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:999px;
}
.fb-post-modal-comments .fb-comment-col,
.fb-post-modal-comments .feed-comment-col{
  flex:1;
  min-width:0;
}
.fb-post-modal-comments .fb-comment-bubble,
.fb-post-modal-comments .feed-comment-bubble{
  display:inline-block;
  max-width:100%;
  background:#f0f2f5;
  border-radius:18px;
  padding:8px 12px;
  vertical-align:top;
}
.fb-post-modal-comments .feed-comment-bubble{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.fb-post-modal-comments .fb-comment-meta-row,
.fb-post-modal-comments .feed-comment-meta-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px 12px;
  margin:4px 0 0;
  padding-left:0;
  font-size:12px;
  color:#65676b;
}
.fb-post-modal-comments .fb-comment-link,
.fb-post-modal-comments .feed-comment-link{
  background:none;
  border:none;
  padding:0;
  margin:0;
  font:inherit;
  font-weight:600;
  color:#65676b;
  cursor:pointer;
}
.fb-post-modal-comments .fb-comment-link:hover,
.fb-post-modal-comments .feed-comment-link:hover{
  text-decoration:underline;
  color:#050505;
}
.fb-post-modal-foot .fb-comment-composer,
.comment-modal-foot .fb-comment-composer{
  align-items:center;
}
.fb-post-modal-foot .fb-comment-composer-avatar-wrap,
.fb-post-modal-foot .fb-comment-composer-avatar,
.comment-modal-foot .fb-comment-composer-avatar-wrap,
.comment-modal-foot .fb-comment-composer-avatar{
  width:28px;
  height:28px;
  font-size:11px;
}
.fb-post-modal-foot .fb-comment-composer-caret,
.comment-modal-foot .fb-comment-composer-caret{
  width:12px;
  height:12px;
  font-size:8px;
}
.fb-post-modal-comments .fb-comment-name,
.fb-post-modal-comments .feed-comment-name{
  font-size:13px;
  font-weight:700;
  color:#050505;
  line-height:1.25;
}
.fb-post-modal-comments .fb-comment-author-link{
  border:none;
  background:transparent;
  padding:0;
  margin:0;
  font:inherit;
  color:inherit;
  cursor:pointer;
  text-align:left;
}
.fb-post-modal-comments .fb-comment-author-link:hover{ text-decoration:underline; }
.fb-post-modal-comments .fb-comment-text,
.fb-post-modal-comments .feed-comment-text{
  margin-top:3px;
  font-size:14px;
  font-weight:400;
  line-height:1.4;
  color:#050505;
  white-space:pre-wrap;
  word-break:break-word;
}
.fb-post-modal-comments .empty{
  padding:16px 8px;
  text-align:center;
  font-size:14px;
  color:#65676b;
}

.fb-post-modal-foot,
.comment-modal.fb-post-modal-dialog .comment-modal-foot{
  flex-shrink:0;
  padding:8px 12px 12px;
  border-top:1px solid #e4e6eb;
  background:#fff;
}
.fb-post-modal-foot .fb-comment-composer{ margin-top:0; }

.fb-post-modal-scroll .fb-post-modal-profile-link{
  padding-bottom:10px;
}
.fb-post-modal-profile-link{
  display:block;
  text-align:center;
  padding:6px 16px 0;
  font-size:13px;
  font-weight:600;
  color:#1877f2;
  text-decoration:none;
  background:#fff;
}
.fb-post-modal-profile-link:hover{ text-decoration:underline; }

.comment-modal.fb-post-modal-dialog .comment-modal-head,
.comment-modal.fb-post-modal-dialog .comment-modal-sub{ display:none; }
