/* Trợ lý Bác sĩ Thịnh — gợi ý liên hệ không chặn màn hình */
.tt-asst { position: fixed; right: 24px; bottom: 24px; z-index: 45; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
.tt-asst[hidden] { display: none; }
.tt-asst > * { pointer-events: auto; }

.tt-asst__fab { position: relative; width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--white); background: var(--tint); padding: 0; overflow: hidden; box-shadow: 0 10px 24px -10px rgba(59, 36, 32, .45); transition: transform .2s; }
.tt-asst__fab:hover { transform: translateY(-2px); }
.tt-asst__fab img { width: 100%; height: 100%; display: block; }
.tt-asst__fab:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
.tt-asst__badge { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); border: 2px solid var(--white); display: none; }
.tt-asst.has-unread .tt-asst__badge { display: block; }

.tt-asst__bubble { position: relative; max-width: 300px; background: var(--white); border: 1px solid var(--line); border-radius: 16px 16px 4px 16px; padding: 14px 40px 14px 16px; box-shadow: 0 16px 32px -18px rgba(28, 36, 48, .3); font-size: 14.5px; line-height: 1.5; animation: tt-asst-in .3s ease-out; }
.tt-asst__bubble[hidden], .tt-asst__panel[hidden] { display: none; }
.tt-asst__msg { margin: 0 0 8px; color: var(--ink); }
.tt-asst__link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; min-height: 32px; color: var(--bronze); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.tt-asst__x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.tt-asst__x:hover { background: var(--sand-2); color: var(--ink); }

.tt-asst__panel { width: 320px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-media); padding: 18px; box-shadow: 0 24px 48px -24px rgba(28, 36, 48, .35); display: flex; flex-direction: column; gap: 14px; animation: tt-asst-in .25s ease-out; }
.tt-asst__head { display: flex; align-items: center; gap: 12px; position: relative; padding-right: 36px; }
.tt-asst__head img { width: 48px; height: 48px; border-radius: 50%; background: var(--tint); flex: none; }
.tt-asst__title { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.25; }
.tt-asst__status { margin: 2px 0 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tt-asst__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.tt-asst__status.is-open .tt-asst__dot { background: #2E7D4F; box-shadow: 0 0 0 3px rgba(46, 125, 79, .15); }
.tt-asst__status.is-open { color: #1E5A37; }
.tt-asst__x--panel { top: -4px; right: -4px; }
.tt-asst__actions { display: flex; flex-direction: column; gap: 8px; }
.tt-asst__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tt-asst__note { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
@keyframes tt-asst-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Mobile: không có nút nổi; bong bóng/bảng nằm trên thanh liên hệ */
@media (max-width: 760px) {
  .tt-asst { right: 12px; left: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); align-items: stretch; }
  .tt-asst__fab { display: none; }
  .tt-asst__bubble, .tt-asst__panel { max-width: none; width: auto; }
  .tt-asst__bubble { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) { .tt-asst__bubble, .tt-asst__panel { animation: none; } }
@media print { .tt-asst { display: none !important; } }
.tt-asst__more { display: block; margin-top: 2px; border: 0; background: none; padding: 0; min-height: 28px; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tt-asst__more:hover { color: var(--ink); }
