/* Widget chat hỗ trợ PPOS — dùng chung cho toàn bộ landing (Đợt 111) */
.ppos-sup-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 9990;
  display: inline-flex; align-items: center; gap: 8px;
  background: #006fee; color: #fff; border: none; cursor: pointer;
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; font-weight: 700; line-height: 1;
  padding: 14px 20px; border-radius: 999px;
  box-shadow: 0 14px 32px -10px rgba(0, 111, 238, .55), 0 2px 6px rgba(16, 24, 40, .12);
  transition: background .2s, transform .2s;
}
.ppos-sup-btn:hover { background: #005bd1; transform: translateY(-1px); }
.ppos-sup-btn .ppos-sup-dot {
  position: absolute; top: -2px; right: -2px; width: 14px; height: 14px;
  border-radius: 999px; background: #e02424; border: 2.5px solid #fff; display: none;
}
.ppos-sup-btn.has-unread .ppos-sup-dot { display: block; }

.ppos-sup-panel {
  position: fixed; right: 20px; bottom: 84px; z-index: 9991;
  width: 352px; max-width: calc(100vw - 24px);
  height: 520px; max-height: calc(100dvh - 110px);
  display: none; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid #dce6f2; border-radius: 20px;
  box-shadow: 0 28px 56px -22px rgba(16, 24, 40, .30), 0 2px 6px rgba(16, 24, 40, .06);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #16202e;
}
.ppos-sup-panel.open { display: flex; }
.ppos-sup-head {
  display: flex; align-items: center; gap: 10px;
  background: #006fee; color: #fff; padding: 13px 16px; flex: none;
}
.ppos-sup-head .ppos-sup-title { font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.ppos-sup-head .ppos-sup-code { font-size: 12px; font-weight: 600; opacity: .9; }
.ppos-sup-close {
  margin-left: auto; background: rgba(255,255,255,.16); color: #fff; border: none;
  width: 30px; height: 30px; border-radius: 999px; font-size: 17px; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.ppos-sup-close:hover { background: rgba(255,255,255,.3); }

.ppos-sup-form { padding: 14px 16px 4px; flex: none; }
.ppos-sup-form label { display: block; font-size: 13px; font-weight: 700; margin: 10px 0 5px; }
.ppos-sup-form label:first-child { margin-top: 0; }
.ppos-sup-form label .opt { font-weight: 500; color: #5b6b7c; }
.ppos-sup-form input {
  width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 14.5px;
  font-family: inherit; color: #16202e; background: #f5f8fc;
  border: 1.5px solid #dce6f2; border-radius: 12px; outline: none;
}
.ppos-sup-form input:focus { border-color: #006fee; background: #fff; }
.ppos-sup-note { font-size: 12.5px; color: #5b6b7c; margin-top: 10px; line-height: 1.5; }
.ppos-sup-err { font-size: 13px; color: #b42318; margin-top: 8px; display: none; line-height: 1.5; }

.ppos-sup-msgs {
  flex: 1; overflow-y: auto; padding: 14px 14px 8px; display: flex;
  flex-direction: column; gap: 8px; background: #f5f8fc;
}
.ppos-sup-empty { color: #5b6b7c; font-size: 13.5px; text-align: center; margin: auto 0; padding: 12px; line-height: 1.6; }
.ppos-sup-row { display: flex; flex-direction: column; max-width: 82%; }
.ppos-sup-row.me { align-self: flex-end; align-items: flex-end; }
.ppos-sup-row.them { align-self: flex-start; align-items: flex-start; }
.ppos-sup-bubble {
  padding: 9px 12px; border-radius: 16px; font-size: 14.5px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
.ppos-sup-row.me .ppos-sup-bubble { background: #006fee; color: #fff; border-bottom-right-radius: 5px; }
.ppos-sup-row.them .ppos-sup-bubble { background: #fff; color: #16202e; border: 1px solid #dce6f2; border-bottom-left-radius: 5px; }
.ppos-sup-time { font-size: 11px; color: #8496a9; margin-top: 3px; padding: 0 2px; }
.ppos-sup-sys {
  align-self: center; text-align: center; font-size: 12.5px; color: #5b6b7c;
  background: #eef5ff; border: 1px solid #dce6f2; border-radius: 12px;
  padding: 8px 12px; line-height: 1.55; max-width: 94%;
}
.ppos-sup-newchat {
  align-self: center; background: #006fee; color: #fff; border: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 700;
  padding: 9px 16px; border-radius: 999px;
}
.ppos-sup-newchat:hover { background: #005bd1; }

.ppos-sup-inputbar {
  flex: none; display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid #dce6f2; background: #fff; align-items: flex-end;
}
.ppos-sup-inputbar textarea {
  flex: 1; box-sizing: border-box; resize: none; max-height: 96px;
  padding: 10px 12px; font-size: 14.5px; font-family: inherit; color: #16202e;
  border: 1.5px solid #dce6f2; border-radius: 12px; outline: none; line-height: 1.45;
}
.ppos-sup-inputbar textarea:focus { border-color: #006fee; }
.ppos-sup-send {
  background: #006fee; color: #fff; border: none; cursor: pointer; flex: none;
  font-family: inherit; font-size: 14.5px; font-weight: 700;
  padding: 11px 16px; border-radius: 12px; transition: background .2s;
}
.ppos-sup-send:hover { background: #005bd1; }
.ppos-sup-send:disabled, .ppos-sup-inputbar textarea:disabled { opacity: .55; cursor: default; }

@media (max-width: 560px) {
  .ppos-sup-btn { right: 14px; bottom: 14px; }
  .ppos-sup-panel { right: 12px; bottom: 76px; }
}
