
#comment-popup .cm2-comment-actions{
  display:flex; justify-content:space-between; align-items:center;
  gap:8px; margin-top:4px;
}
#comment-popup .cm2-icon-btn,
#comment-popup .cm2-send-btn{
  width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center;
  border:none; background:none; padding:0; line-height:0; cursor:pointer;
  position:static !important; right:auto !important; top:auto !important;
  -webkit-appearance:none; appearance:none;
}
#comment-popup .cm2-send-btn{
  background:#1877f2; color:#fff; border-radius:50%;
}
#comment-popup .cm2-comment-actions svg{ display:block }
.like-post-btn[data-liked="true"] .icon {
  color: #3b82f6;
}


/* Avatar */
.comment-item img[alt="avatar"] {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

/* ===== Bubble ===== */
.comment-body .bubble {
  background: #f0f2f5; /* mặc định xám */
  border-radius: 18px;
  padding: 8px 12px;
  display: inline-block;
  max-width: 100%;
  position: relative;
}

.comment-item.is-owner .comment-body .bubble {
  background: #1877f2; /* xanh Messenger */
  color: #fff;
}

.comment-item.is-owner .comment-body .bubble a {
  color: #fff; /* tên trắng */
}

.comment-body .bubble a {
  font-weight: 600;
  font-size: 14px;
  color: #050505;
  text-decoration: none;
  display: block;
  margin-bottom: 2px;
}

.comment-body .bubble a:hover {
  text-decoration: underline;
}

.comment-text {
  font-size: 14px;
  color: inherit;
  white-space: pre-line;
}

.comment-body img {
  margin-top: 6px;
  max-width: 100%;
  border-radius: 12px;
}

/* ===== Actions ===== */
.comment-actions {
  display: flex;
  gap: 16px;
  margin: 4px 0 0 6px;
  font-size: 12px;
  color: #65676b;
}

.comment-item.is-owner .comment-actions {
  color: #e4e6eb; /* sáng hơn khi ở nền xanh */
}

.comment-actions span {
  cursor: pointer;
}

.comment-actions span:hover {
  text-decoration: underline;
  color: #1877f2;
}

.comment-item.is-owner .comment-actions span:hover {
  color: #fff;
}

/* ===== Like count bubble ===== */
.like-count-wrap {
  margin-top: 2px;
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #65676b;
}
.comment-item.is-owner .like-count-wrap {
  color: #fff;
}



.comment-item.is-owner .heart-icon {
  color: #e4e6eb;
}

.comment-item.is-owner .heart-icon.liked {
  color: #ffccd5; /* hồng nhạt trên nền xanh */
}

.like-count {
  font-size: 12px;
}

/* ===== Reply form ===== */
.reply-form textarea {
  width: 100%;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 4px;
}

.reply-form button.send-reply-btn {
  padding: 4px 10px;
  border: none;
  background: #1877f2;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.reply-form button.send-reply-btn:hover {
  background: #166fe5;
}
/*CSS MƠI CHO 3 NÚT CHÍ SẺ */
/* ===== RESET & STYLE RIÊNG CHO 3 NÚT LIKE / SHARE / COMMENT ===== */
.post-buttons-row,
.buttons-section {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  margin: 10px 0;
  flex-wrap: wrap; /* Cho phép xuống hàng trên mobile */
}

.post-action-btn,
.like-post-btn,
.share-btn,
.comment-btn {
  all: unset; /* Reset toàn bộ để tránh bị ảnh hưởng từ rule button toàn cục */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1;
  border-radius: 30px;
  background: #f9f9f9;
  color: #606770;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}

.like-post-btn:hover,
.share-btn:hover,
.comment-btn:hover {
  background-color: #f0f2f5;
  color: #000;
}



/* Trạng thái đã like */



  /* Cho phép text xuống dòng nếu cần */
  .buttons-section button span {
    white-space: normal;
  }
/* Nút toast sao chép */
#copy-toast {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}





.so-head{display:flex;justify-content:space-between;align-items:center;padding-bottom:8px;border-bottom:1px solid #eee}
.so-close{border:none;background:#f3f4f6;border-radius:8px;padding:6px 10px;cursor:pointer}

.so-internal{margin-top:10px}
.so-user{display:flex;gap:8px;align-items:center;margin-bottom:8px}
.so-user img{width:36px;height:36px;border-radius:50%}
.so-scope{background:#eef2f7;border:none;border-radius:999px;padding:6px 10px}

.so-text{width:100%;min-height:90px;border:1px solid #e5e7eb;border-radius:10px;padding:10px;resize:vertical}
.so-count{text-align:right;color:#888;font-size:12px;margin-top:4px}
.so-preview{display:flex;gap:10px;align-items:center;border:1px solid #eee;border-radius:10px;padding:8px;margin-top:8px}
.so-preview img{width:96px;height:64px;object-fit:cover;border-radius:8px}
.so-title{font-weight:600;line-height:1.3}
.so-link{font-size:12px;color:#6b7280;word-break:break-all}

.so-actions{display:flex;justify-content:flex-end;margin-top:10px}
.so-submit{background:#1877f2;color:#fff;border:none;border-radius:10px;padding:8px 14px;cursor:pointer}

.so-sep{margin-top:12px;font-weight:600}
.so-external{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:8px}
.so-btn{display:block;text-align:center;background:#f9fafb;border:1px solid #eee;border-radius:10px;padding:10px;text-decoration:none;color:#111;cursor:pointer}
@keyframes heart-pop {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.4); color: #ff2d55; }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); color: #ff2d55; }
}


/* ===== Post buttons – giữ màu khi bấm ===== */
.post-buttons-wrapper{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

/* Nút chung */
.post-action-btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 12px; background:transparent; border:none; cursor:pointer;
  border-radius:999px; color:#374151; transition: color .15s ease, background .15s ease;
}
.post-action-btn .icon svg,
.post-action-btn .icon svg path{
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* Hover xanh cho share/comment */
.post-action-btn:hover{ color:#1877f2; background:rgba(24,119,242,.08); }
.post-action-btn.is-active{ color:#1877f2; background:rgba(24,119,242,.12); }



/* Pop effect khi vừa like */
@keyframes cm2-pop { 0%{transform:scale(.8);} 60%{transform:scale(1.2);} 100%{transform:scale(1);} }
.post-action-btn .icon.pop { animation: cm2-pop .25s ease; }


/* Nút trong popup (đóng...) vẫn giữ style gọn */
.so-close{ transition: background .15s ease; }
.so-close:hover{ background:#e9eef5; }
/* ===== Mobile: Gom 3 nút Thích - Chia sẻ - Bình luận ===== */
@media (max-width: 768px){
  .cm2-post-actions {   /* bọc 3 nút trong div này */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0; /* bỏ khoảng cách thừa */
    background: #fff;
    border-radius: 12px;
    padding: 8px 0;
    margin: 12px auto;
    width: 95%;  /* gần full màn hình */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }

  .cm2-post-actions > div {
    flex: 1;                /* chia 3 đều nhau */
    text-align: center;      /* căn giữa icon + text */
    font-size: 14px;
    padding: 6px 0;
    border-right: 1px solid #eee;
  }

  /* bỏ gạch phải ở nút cuối */
  .cm2-post-actions > div:last-child {
    border-right: none;
  }
}


/* Pop effect */

/* ===== COMMENT CONTAINER ===== */
.comment-item {
  margin-top: 10px;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

/* Avatar */
.comment-item img[alt="avatar"] {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

/* ===== Bubble ===== */
.comment-body .bubble {
  background: #f0f2f5; /* mặc định xám */
  border-radius: 18px;
  padding: 8px 12px;
  display: inline-block;
  max-width: 100%;
  position: relative;
}

.comment-item.is-owner .comment-body .bubble {
  background: #1877f2; /* xanh Messenger */
  color: #fff;
}

.comment-item.is-owner .comment-body .bubble a {
  color: #fff; /* tên trắng */
}

.comment-body .bubble a {
  font-weight: 600;
  font-size: 14px;
  color: #050505;
  text-decoration: none;
  display: block;
  margin-bottom: 2px;
}

.comment-body .bubble a:hover {
  text-decoration: underline;
}

.comment-text {
  font-size: 14px;
  color: inherit;
  white-space: pre-line;
}

.comment-body img {
  margin-top: 6px;
  max-width: 100%;
  border-radius: 12px;
}

/* ===== Actions ===== */
.comment-actions {
  display: flex;
  gap: 16px;
  margin: 4px 0 0 6px;
  font-size: 12px;
  color: #65676b;
}

.comment-item.is-owner .comment-actions {
  color: #e4e6eb; /* sáng hơn khi ở nền xanh */
}

.comment-actions span {
  cursor: pointer;
}

.comment-actions span:hover {
  text-decoration: underline;
  color: #1877f2;
}

.comment-item.is-owner .comment-actions span:hover {
  color: #fff;
}

/* ===== Like count bubble ===== */
.like-count-wrap {
  margin-top: 2px;
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #65676b;
}

.comment-item.is-owner .like-count-wrap {
  color: #fff;
}



.comment-item.is-owner .heart-icon {
  color: #e4e6eb;
}

.comment-item.is-owner .heart-icon.liked {
  color: #ffccd5; /* hồng nhạt trên nền xanh */
}



/* ===== Reply form ===== */
.reply-form textarea {
  width: 100%;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 4px;
}

.reply-form button.send-reply-btn {
  padding: 4px 10px;
  border: none;
  background: #1877f2;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.reply-form button.send-reply-btn:hover {
  background: #166fe5;
}
