/* Live chat VMP Development — panel percakapan dan tombol melayang. */
.vmp-chat {
  --chat-ink: #132943;
  --chat-paper: #f8f6ef;
  --chat-surface: #eeeae0;
  --chat-accent: #e6b43d;
  position: fixed;
  right: 24px;
  bottom: 24px;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 2000;
  font-family: "Inter", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--chat-ink);
}
.vmp-chat *, .vmp-chat *::before, .vmp-chat *::after {box-sizing: border-box;}
.vmp-chat button, .vmp-chat input {font-family: inherit;}
.vmp-chat button {cursor: pointer;}
.vmp-chat__launcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 22px;
  border: 2px solid rgba(255, 255, 255, .82);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd66b, var(--chat-accent));
  color: #04142f;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .28);
  transition: transform .2s, box-shadow .2s;
}
.vmp-chat__launcher:hover {transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0, 0, 0, .38);}
.vmp-chat__panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 360px;
  max-width: calc(100vw - 48px);
  height: 420px;
  max-height: calc(100vh - 124px);
  max-height: calc(100dvh - 124px - env(safe-area-inset-bottom));
  overflow: hidden;
  border: 1px solid #d9d7cd;
  border-radius: 20px;
  background: var(--chat-paper);
  box-shadow: 0 18px 65px rgba(0, 0, 0, .3);
  animation: vmp-chat-enter .2s ease;
}
.vmp-chat__panel[hidden] {display: none;}
.vmp-chat__header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 17px 16px;
  background: #0b203b;
  color: #fffdf7;
}
.vmp-chat__logo {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  object-fit: cover;
  border: 1px solid #e6b43d;
  border-radius: 50%;
  background: #04142f;
}
.vmp-chat__heading {min-width: 0; flex: 1;}
.vmp-chat__heading h2 {margin: 0; font: 700 14px/1.4 "Inter", Arial, sans-serif;}
.vmp-chat__heading p {margin: 3px 0 0; font-size: 10px; line-height: 1.5; color: #d9dfeb;}
.vmp-chat__close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fffdf7;
}
.vmp-chat__close:hover {background: rgba(255, 255, 255, .12);}
.vmp-chat__conversation {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  background: var(--chat-surface);
  scrollbar-width: thin;
}
.vmp-chat__date {margin: 0 0 14px; text-align: center; text-transform: uppercase; font-size: 8px; letter-spacing: 1.5px; color: #75746b;}
.vmp-chat__messages {display: flex; flex-direction: column; gap: 10px;}
.vmp-chat__bubble {
  max-width: 100%;
  padding: 14px;
  border-radius: 0 13px 13px 13px;
  background: #fffdf6;
  color: var(--chat-ink);
  font-size: 12px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.vmp-chat__bubble p {margin: 0; white-space: pre-wrap;}
.vmp-chat__bubble p + p {margin-top: 18px;}
.vmp-chat__bubble--visitor {align-self: flex-end; max-width: 88%; border-radius: 13px 0 13px 13px; background: #173354; color: #fff;}
.vmp-chat__meta {display: block; margin-top: 10px; text-align: right; font-size: 8px; line-height: 1.4; color: #77766e;}
.vmp-chat__bubble--visitor .vmp-chat__meta {color: #c7d7e9;}
.vmp-chat__footer {padding: 12px; background: #fffdf6; border-top: 1px solid #e3dfd5;}
.vmp-chat__topics {display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;}
.vmp-chat__topics button {
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid #dad6ca;
  border-radius: 6px;
  background: #fffdf6;
  color: var(--chat-ink);
  font-size: 10px;
  line-height: 1.4;
  transition: background .15s, border-color .15s;
}
.vmp-chat__topics button:hover {background: #f4ebd1; border-color: #c8a04a;}
.vmp-chat__composer {display: flex; align-items: center; gap: 7px; margin: 0;}
.vmp-chat__composer input {
  display: block;
  flex: 1;
  width: 0;
  min-width: 0;
  height: 42px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dad6ca;
  border-radius: 11px;
  background: #fffdf6;
  color: var(--chat-ink);
  font-size: 16px;
  line-height: 1.3;
  outline: none;
}
.vmp-chat__composer input::placeholder {font-size: 12px; color: #969387; opacity: 1;}
.vmp-chat__composer input:focus {border-color: #b98923; box-shadow: 0 0 0 3px rgba(230, 180, 61, .24);}
.vmp-chat__send {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: var(--chat-accent);
  color: #04142f;
}
.vmp-chat__send:hover {background: #ffd66b;}
.vmp-chat__note {margin: 9px 0 0; text-align: center; font-size: 8px; line-height: 1.5; color: #78766c;}
.vmp-chat__status {margin: 8px 0 0; font-size: 10px; line-height: 1.5; color: #485e3e;}
.vmp-chat__status:empty {display: none;}
.vmp-chat button:focus-visible {outline: 2px solid #b98923; outline-offset: 3px;}
.vmp-chat__close:focus-visible {outline-color: #ffd66b;}
@keyframes vmp-chat-enter {from {opacity: 0; transform: translateY(10px);} to {opacity: 1; transform: translateY(0);}}
@media (max-width: 640px) {
  .vmp-chat {right: 16px; bottom: 16px; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));}
  .vmp-chat__launcher {height: 52px; padding: 0 18px; font-size: 13px;}
  .vmp-chat__panel {bottom: 66px; max-width: calc(100vw - 32px); max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px - env(safe-area-inset-bottom));}
}
@media (prefers-reduced-motion: reduce) {
  .vmp-chat__panel {animation: none;}
  .vmp-chat__launcher, .vmp-chat__topics button {transition: none;}
}
