/* Widget liên hệ nổi — chép từ mangthanhcong.vn (COMPACT CONTACT WIDGET), class đổi tiền tố wt-cw, icon SVG thay Font Awesome */
.wt-cw { position: fixed; bottom: 5%; right: 10%; z-index: 9999; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.wt-cw svg { width: 1em; height: 1em; fill: currentColor; display: block; }

.wt-cw__toggle { width: 56px; height: 56px; border-radius: 50%; border: 0; padding: 0; margin: 0; background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 15px rgba(124, 58, 237, .3); transition: all .3s ease; position: relative; color: #fff; font-size: 24px; min-height: 0; line-height: 1; }
.wt-cw__toggle:hover { transform: scale(1.08); box-shadow: 0 6px 25px rgba(124, 58, 237, .4); }
.wt-cw__toggle.is-active { background: linear-gradient(135deg, #ec4899 0%, #f97316 100%); }
.wt-cw__toggle svg { transition: transform .3s ease; }
.wt-cw__toggle.is-active svg { transform: rotate(135deg); }
.wt-cw__dot { position: absolute; top: 0; right: 0; width: 12px; height: 12px; background: #ef4444; border-radius: 50%; border: 2px solid #fff; animation: wt-cw-pulse 2s infinite; }
@keyframes wt-cw-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }

.wt-cw__popup { position: absolute; bottom: 70px; right: 0; width: 280px; background: #fff; border-radius: 12px; box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.95); transition: all .25s cubic-bezier(.4, 0, .2, 1); overflow: hidden; text-align: left; }
.wt-cw__popup.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); animation: wt-cw-in .3s ease-out; }
@keyframes wt-cw-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.wt-cw__head { background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%); color: #fff; padding: 12px 15px; position: relative; text-align: center; }
.wt-cw__title { font-size: 15px; font-weight: 600; margin: 0; color: #fff; line-height: 1.4; }
.wt-cw__head p { font-size: 11px; margin: 2px 0 0; opacity: .9; color: #fff; line-height: 1.4; }
.wt-cw__close { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; min-height: 0; padding: 0; margin: 0; border: 0; background: rgba(255, 255, 255, .2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; color: #fff; font-size: 12px; }
.wt-cw__close:hover { background: rgba(255, 255, 255, .3); }

.wt-cw__body { padding: 8px; max-height: 620px; overflow-y: auto; }
.wt-cw__section { font-size: 10px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .5px; margin: 0 0 4px 4px; }
.wt-cw__item { display: flex; align-items: center; padding: 5px 8px; background: #f9fafb; border-radius: 6px; margin-bottom: 3px; text-decoration: none !important; transition: all .2s; cursor: pointer; }
.wt-cw__item:hover { background: #f3f4f6; transform: translateX(2px); }
.wt-cw__ico { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; margin-right: 8px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%); flex-shrink: 0; color: #fff; font-size: 13px; }
.wt-cw__info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.wt-cw__name { font-size: 12px; font-weight: 600; color: #1f2937; white-space: nowrap; flex-shrink: 0; }
.wt-cw__sep { color: #d1d5db; font-weight: 400; }
.wt-cw__num { font-size: 11px; color: #6b7280; white-space: nowrap; }

.wt-cw__quick { display: flex; gap: 6px; padding: 8px; border-top: 1px solid #e5e7eb; background: #fafafa; }
.wt-cw__btn { flex: 1; padding: 8px; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; transition: all .2s; text-decoration: none !important; color: #7c3aed; font-size: 16px; }
.wt-cw__btn:hover { background: #f9fafb; border-color: #7c3aed; }
.wt-cw__btn span { font-size: 10px; color: #4b5563; line-height: 1.2; }

.wt-cw__body::-webkit-scrollbar { width: 4px; }
.wt-cw__body::-webkit-scrollbar-track { background: transparent; }
.wt-cw__body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.wt-cw__body::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

@media (max-width: 480px) {
  .wt-cw { bottom: 15px; right: 15px; }
  .wt-cw__toggle { width: 52px; height: 52px; font-size: 22px; }
  .wt-cw__popup { width: 260px; bottom: 65px; }
  .wt-cw__body { max-height: 280px; }
  .wt-cw__ico { width: 26px; height: 26px; font-size: 12px; }
  .wt-cw__name { font-size: 11px; }
  .wt-cw__num { font-size: 10px; }
  .wt-cw__item { padding: 5px 7px; }
  .wt-cw__info { gap: 4px; }
}
/* Trang SP trên mobile có thanh CTA cố định ở đáy (.wt-pd-mbar) → nâng widget lên trên thanh */
@media (max-width: 849px) {
  body:has(.wt-pd-mbar) .wt-cw, body.wt-has-mbar .wt-cw { bottom: 84px; }
}
