/* Editorial Newsroom Comments — Major News Portal Style (VnExpress / Dân Trí inspired, Unboxed) */
.vnw .ncmt-sec {
  padding: 48px 0 64px;
  border-top: 1px solid var(--bd);
  background: #ffffff;
}
.vnw .ncmt-sec.alt {
  background: #ffffff;
}
.vnw .ncmt-wrap {
  max-width: 820px;
  margin: 0 auto;
}
.vnw .ncmt-wrap.wide {
  max-width: 960px;
}

/* Header */
.vnw .ncmt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.vnw .ncmt-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.vnw .ncmt-title-row h2 {
  width: auto;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: #15292b;
  margin: 0;
  padding-left: 12px;
  border-left: 4px solid var(--a);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.vnw .ncmt-title-row h2 i {
  display: none;
}
.vnw .ncmt-count {
  font-size: 16px;
  font-weight: 500;
  color: #6b7b7c;
  background: none;
  padding: 0;
}
.vnw .ncmt-count::before {
  content: "(";
}
.vnw .ncmt-count::after {
  content: ")";
}
.vnw .ncmt-head .sub {
  display: none;
}

/* Subtle quiet toggle link on the right */
.vnw .ncmt-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vnw button.ncmt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 4px 0;
  margin: 0;
  height: auto;
  min-height: 0;
  line-height: 1.3;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #6b7b7c;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: none;
}
.vnw button.ncmt-toggle:hover {
  color: var(--g);
}
.vnw .ncmt-sw {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 99px;
  background: var(--a);
  transition: background 0.2s ease;
  flex: none;
}
.vnw .ncmt-sw i {
  position: absolute;
  top: 2px;
  left: 16px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s ease;
}
.vnw button.ncmt-toggle[aria-checked="false"] .ncmt-sw {
  background: #c2cccb;
}
.vnw button.ncmt-toggle[aria-checked="false"] .ncmt-sw i {
  left: 2px;
}

/* Closed / Disabled state */
.vnw .ncmt-closed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: #f8faf9;
  border: 1px solid #dfe6e5;
  border-radius: 6px;
  padding: 16px 20px;
}
.vnw .ncmt-closed[hidden],
.vnw .ncmt-body[hidden],
.vnw .ncmt-form-card[hidden],
.vnw .ncmt-ok[hidden],
.vnw .ncmt-err[hidden] {
  display: none !important;
}
.vnw .ncmt-closed-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 220px;
}
.vnw .ncmt-closed-info > i {
  font-size: 18px;
  color: #6b7b7c;
}
.vnw .ncmt-closed-info b {
  display: block;
  font-size: 14.5px;
  color: #15292b;
  margin-bottom: 2px;
}
.vnw .ncmt-closed-info span {
  display: block;
  font-size: 13.5px;
  color: #6b7b7c;
}
.vnw .ncmt-closed-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.vnw button.ncmt-reopen,
.vnw button.ncmt-peek {
  margin: 0;
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 5px;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.vnw button.ncmt-reopen {
  background: var(--a);
  color: #fff;
  border: 1px solid var(--a);
}
.vnw button.ncmt-reopen:hover {
  background: #6a8a4c;
  border-color: #6a8a4c;
}
.vnw button.ncmt-peek {
  background: #fff;
  color: #3b4f4f;
  border: 1px solid #cfd9d8;
}

/* Unified News-Portal Comment Composer Box (VnExpress style) */
.vnw .ncmt-form-card {
  margin-bottom: 20px;
}
.vnw .ncmt-composer {
  border: 1px solid #d4dddc;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.vnw .ncmt-composer:focus-within {
  border-color: #8fa6a3;
  box-shadow: 0 0 0 3px rgba(16, 64, 64, 0.05);
}
.vnw .ncmt-form {
  margin: 0;
}
.vnw .ncmt-composer textarea {
  width: 100%;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 13px 15px !important;
  min-height: 78px;
  background: #ffffff !important;
  color: #1f2d2d !important;
  box-shadow: none !important;
  font-family: Inter, sans-serif;
  font-size: 15px !important;
  line-height: 1.55;
  resize: vertical;
  outline: none;
}
.vnw .ncmt-composer textarea::placeholder,
.vnw .ncmt-composer input::placeholder {
  color: #8b9a99;
}
.vnw .ncmt-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #f7f9f9;
  border-top: 1px solid #e8eeed;
}
.vnw .ncmt-composer-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 240px;
}
.vnw .ncmt-composer-inputs input {
  flex: 1;
  min-width: 0;
  height: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 11px !important;
  border: 1px solid #d7e0df !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  color: #1f2d2d !important;
  box-shadow: none !important;
  font-family: Inter, sans-serif;
  font-size: 13.8px !important;
  outline: none;
}
.vnw .ncmt-composer-inputs input:focus {
  border-color: var(--a) !important;
}
.vnw button.ncmt-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--a);
  color: #ffffff;
  border: 0;
  border-radius: 4px;
  padding: 0 18px;
  margin: 0;
  height: 36px;
  min-height: 36px;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  flex: none;
  transition: background 0.15s ease;
}
.vnw button.ncmt-submit:hover {
  background: #6a8a4c;
}
.vnw .ncmt-ok {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 4px;
  background: #edf7f0;
  color: #216332;
  font-size: 13.5px;
  font-weight: 500;
}
.vnw .ncmt-err {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 4px;
  background: #fdf2f2;
  color: #b03025;
  font-size: 13.5px;
  font-weight: 500;
}

/* Sort Tabs: Quan tâm nhất | Mới nhất (Exact VnExpress tab bar) */
.vnw .ncmt-sort {
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid #e5ebea;
  margin-bottom: 2px;
}
.vnw .ncmt-sort button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin: 0 0 -1px;
  padding: 10px 0;
  height: auto;
  min-height: 0;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #6b7b7c;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  transition: color 0.15s;
}
.vnw .ncmt-sort button:hover {
  color: #15292b;
}
.vnw .ncmt-sort button.on {
  color: #15292b;
  font-weight: 700;
  border-bottom-color: var(--a);
}

/* Unboxed Comment Stream */
.vnw .ncmt-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.vnw .ncmt-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #eceff0;
  border-radius: 0;
  padding: 18px 0;
  margin: 0;
}
.vnw .ncmt-item:last-child {
  border-bottom: 0;
}
.vnw .ncmt-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.vnw .ncmt-ava {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e6eceb;
  color: #354a4a;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
  text-transform: uppercase;
  margin-top: 1px;
}
.vnw .ncmt-ava.staff {
  background: var(--a);
  color: #ffffff;
}
.vnw .ncmt-main {
  flex: 1;
  min-width: 0;
}
.vnw .ncmt-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.vnw .ncmt-author {
  font-size: 14.5px;
  font-weight: 700;
  color: #15292b;
}
.vnw .ncmt-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 3px;
  background: #eef4e8;
  color: #48682f;
}
.vnw .ncmt-badge.mine {
  background: #edf2f4;
  color: #355052;
}
.vnw .ncmt-text {
  font-size: 15px;
  line-height: 1.62;
  color: #222b2b;
  margin: 0 0 7px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.vnw .ncmt-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.8px;
  color: #758485;
}
.vnw .ncmt-act {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  height: auto;
  min-height: 0;
  line-height: 1.3;
  font-family: Inter, sans-serif;
  font-size: 12.8px;
  font-weight: 500;
  color: #6c7c7d;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.vnw .ncmt-act:hover {
  color: #15292b;
}
.vnw .ncmt-act.liked {
  color: var(--a);
  font-weight: 600;
}
.vnw .ncmt-act.liked i {
  color: var(--a);
}
.vnw .ncmt-act.del:hover {
  color: #c0392b;
}
.vnw .ncmt-time {
  font-size: 12.5px;
  color: #8a9899;
}

/* Indented Nested Replies (Left Vertical Thread Line, No Box) */
.vnw .ncmt-replies {
  list-style: none;
  margin: 12px 0 0 4px;
  padding: 2px 0 0 16px;
  border-top: 0;
  border-left: 2px solid #e1e8e7;
  display: grid;
  gap: 14px;
}
.vnw .ncmt-reply {
  margin: 0;
}
.vnw .ncmt-reply .ncmt-ava {
  width: 30px;
  height: 30px;
  font-size: 11.5px;
}

/* Inline Reply Form */
.vnw .ncmt-rform {
  margin: 12px 0 4px;
  padding: 12px;
  border-radius: 5px;
  background: #f7f9f9;
  border: 1px solid #dde5e4;
  display: grid;
  gap: 8px;
}
.vnw .ncmt-rform input,
.vnw .ncmt-rform textarea {
  width: 100%;
  margin: 0 !important;
  border: 1px solid #d4dddc !important;
  border-radius: 4px !important;
  padding: 8px 11px !important;
  background: #ffffff !important;
  color: #1f2d2d !important;
  box-shadow: none !important;
  font-family: Inter, sans-serif;
  font-size: 14px !important;
  outline: none;
}
.vnw .ncmt-rform input {
  height: 36px !important;
}
.vnw .ncmt-rform textarea {
  min-height: 64px;
  resize: vertical;
}
.vnw .ncmt-rform-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.vnw button.ncmt-rcancel {
  background: #ffffff;
  border: 1px solid #cfd9d8;
  color: #566868;
  border-radius: 4px;
  padding: 0 14px;
  margin: 0;
  height: 34px;
  min-height: 34px;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  cursor: pointer;
}
.vnw .ncmt-rform button.ncmt-submit {
  height: 34px;
  min-height: 34px;
  padding: 0 16px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .vnw .ncmt-sec {
    padding: 36px 0 48px;
  }
  .vnw .ncmt-composer-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .vnw .ncmt-composer-inputs {
    flex-direction: column;
    min-width: 0;
  }
  .vnw .ncmt-composer-inputs input,
  .vnw .ncmt-composer textarea {
    font-size: 16px !important;
  }
  .vnw button.ncmt-submit {
    width: 100%;
  }
}
