/* Bộ đếm bài blog KHA (brief K 08/10/2026). Icon + chữ: inline-flex canh giữa dọc, chữ line-height 1. */
.blog-dt-content .info-author .kbd-dai {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.blog-dt-content .info-author .kbd-dai .acces {
  margin: 0;
}
.kbd-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #FEE9F4;
  color: #3A3A3A;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}
button.kbd-chip {
  cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s;
}
button.kbd-chip:hover {
  border-color: #F9A8C8;
}
button.kbd-chip:active {
  transform: scale(.96);
}
.kbd-ic {
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
}
.kbd-ic svg {
  display: block;
  width: 100%;
  height: 100%;
}
.kbd-so,
.kbd-chu {
  display: block;
  line-height: 1;
  text-box: trim-both cap alphabetic;
}
.kbd-so {
  min-width: 1ch;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.kbd-tim {
  fill: none;
  stroke: #F9595F;
  transition: fill .15s;
}
.kbd-thich.kbd-da .kbd-tim {
  fill: #F9595F;
}
.kbd-chip.kbd-thich.kbd-da {
  border-color: #F9595F;
  background: #FFDCE8;
}
.kbd-thich.kbd-da .kbd-ic {
  animation: kbd-nhip .32s ease-out;
}
@keyframes kbd-nhip {
  50% { transform: scale(1.3); }
}
/* chưa có số: giữ chỗ, không hiện số 0 giả */
html:not(.kbd-co-so) .kbd-so,
html:not(.kbd-co-so) .kbd-dong-so b {
  visibility: hidden;
}

/* popup chia sẻ ở dải đầu */
.kbd-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100001; /* trên cụm nút Zalo / Messenger / Hùng nhỏ nổi bên phải */
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 190px;
  padding: 6px;
  border: 1px solid #EBEBEB;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(21, 34, 79, .14);
}
.kbd-pop[hidden] {
  display: none;
}
.kbd-pop .kbd-cs {
  justify-content: flex-start;
  width: 100%;
  border-color: transparent;
}
.kbd-pop .kbd-cs:hover {
  background: #F6F6F8;
}

/* nút chia sẻ (dùng chung popup + khối cuối) */
.kbd-cs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #E3E3E8;
  border-radius: 10px;
  background: #fff;
  color: #3A3A3A;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.kbd-cs .kbd-ic {
  width: 18px;
  height: 18px;
}
.kbd-cs:hover {
  border-color: #B9B9C6;
}
.kbd-cs-sao-chep .kbd-ic {
  color: #6B6B7B;
}

/* khối cuối bài */
.kbd-cuoi {
  margin: 32px 0 8px;
  padding: 20px;
  border: 1px solid #F3D5E4;
  border-radius: 16px;
  background: #FFF7FB;
}
.kbd-cuoi .kbd-hoi {
  margin: 0 0 6px;
  color: #15224F;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}
.kbd-cuoi .kbd-phu {
  margin: 0 0 14px;
  color: #5B5B6B;
  font-size: 14px;
  line-height: 1.5;
}
.kbd-hang {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.kbd-nut-thich {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #F9595F;
  border-radius: 10px;
  background: #fff;
  color: #D93A48;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s, color .15s, transform .15s;
}
.kbd-nut-thich .kbd-ic {
  width: 18px;
  height: 18px;
}
.kbd-nut-thich:active {
  transform: scale(.96);
}
.kbd-nut-thich.kbd-da {
  background: #F9595F;
  color: #fff;
}
.kbd-nut-thich.kbd-da .kbd-tim {
  fill: #fff;
  stroke: #fff;
}
.kbd-nut-thich .kbd-so {
  padding-left: 8px;
  border-left: 1px solid currentColor;
}
.kbd-dong-so {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #F0CFE0;
  color: #6B6B7B;
  font-size: 13px;
}
.kbd-mon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}
.kbd-mon[hidden] {
  display: none;
}
.kbd-mon > span:last-child {
  display: block;
  line-height: 1;
  text-box: trim-both cap alphabetic;
}
.kbd-mon .kbd-ic {
  width: 14px;
  height: 14px;
}
.kbd-mon .kbd-tim {
  fill: #F9595F;
}
.kbd-dong-so b {
  color: #3A3A3A;
  font-weight: 700;
}

/* thông báo nhỏ */
.kbd-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 99999;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border-radius: 10px;
  background: #15224F;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .2s, transform .2s;
}
.kbd-toast.kbd-hien {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 767px) {
  .blog-dt-content .info-author .kbd-dai {
    width: 100%;
  }
  .kbd-chip {
    height: 30px;
    padding: 0 9px;
    font-size: 13px;
  }
  .kbd-pop {
    left: auto;
    right: 0;
  }
  .kbd-cuoi {
    padding: 16px;
  }
  .kbd-hang {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .kbd-nut-thich {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .kbd-hang .kbd-cs {
    justify-content: center;
  }
  .kbd-hang .kbd-cs-sao-chep {
    grid-column: 1 / -1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kbd-thich.kbd-da .kbd-ic { animation: none; }
}
/* logo Zalo là chữ: đặt trong nền tròn xanh như icon app cho dễ nhận ra ở 18px */
.kbd-cs-zalo .kbd-ic {
  padding: 2px;
  border-radius: 50%;
  background: #0068FF;
}
.kbd-cs-zalo .kbd-ic path {
  fill: #fff;
}
