
/* ---------- Wrapper ---------- */
#vmChatWidget{
  position:fixed;
  top:0; right:0; bottom:0; left:0;
  z-index:2147483000;
  pointer-events:none;
  font-family:'Poppins',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  font-size:14px;
  line-height:1.5;
  color:#1f2937;
  text-align:left;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
#vmChatWidget *,
#vmChatWidget *::before,
#vmChatWidget *::after{ box-sizing:border-box; }

#vmChatWidget .vm-chat-sr-only{
  position:absolute !important;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* ---------- Floating toggle ---------- */
#vmChatWidget .vm-chat-toggle{
  position:fixed;
  right:0;
  top:55%;
  transform:translateY(-50%);
  pointer-events:auto;
  display:inline-flex;
  align-items:center;
  gap:9px;
  padding:14px 17px;
  margin:0;
  border:0;
  border-radius:14px 0 0 14px;
  background:#0f3d6e;
  color:#ffffff;
  font-family:inherit;
  font-size:14px;
  font-weight:600;
  line-height:1;
  letter-spacing:.2px;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:-6px 8px 24px rgba(15,61,110,.28);
  transition:transform .25s cubic-bezier(.22,.61,.36,1),
             box-shadow .25s ease,
             background-color .25s ease,
             opacity .22s ease,
             visibility .22s ease;
}
#vmChatWidget .vm-chat-toggle:hover{
  background:#14568f;
  transform:translateY(-50%) translateX(-4px);
  box-shadow:-9px 12px 30px rgba(15,61,110,.36);
}
#vmChatWidget .vm-chat-toggle:active{ transform:translateY(-50%) translateX(-2px); }
#vmChatWidget .vm-chat-toggle:focus-visible{
  outline:3px solid #7fb2e5;
  outline-offset:3px;
}
#vmChatWidget .vm-chat-toggle-icon{ flex:0 0 auto; display:block; }
#vmChatWidget .vm-chat-toggle-label{ display:inline-block; }
#vmChatWidget .vm-chat-toggle-short{ display:none; }

#vmChatWidget .vm-chat-toggle.vm-chat-toggle-hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(-50%) translateX(26px);
}

/* ---------- Chat window ---------- */
#vmChatWidget .vm-chat-window{
  position:fixed;
  right:20px;
  bottom:20px;
  width:380px;
  height:600px;
  max-height:calc(100vh - 40px);
  display:flex;
  flex-direction:column;
  background:#ffffff;
  border:1px solid #e3e9f1;
  border-radius:18px;
  box-shadow:0 24px 60px rgba(15,23,42,.22), 0 6px 18px rgba(15,23,42,.08);
  overflow:hidden;
  pointer-events:auto;
  opacity:0;
  visibility:hidden;
  transform:translateX(28px);
  transition:opacity .25s ease,
             transform .25s cubic-bezier(.22,.61,.36,1),
             visibility .25s ease;
}
#vmChatWidget .vm-chat-window.vm-chat-open{
  opacity:1;
  visibility:visible;
  transform:translateX(0);
}
#vmChatWidget .vm-chat-window:focus{ outline:none; }

/* ---------- Header ---------- */
#vmChatWidget .vm-chat-header{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px;
  background:linear-gradient(135deg,#0f3d6e 0%,#17558f 100%);
  color:#ffffff;
}
#vmChatWidget .vm-chat-avatar{
  flex:0 0 auto;
  width:42px; height:42px;
  display:flex; align-items:center; justify-content:center;
  border-radius:50%;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.28);
  font-size:13px;
  font-weight:700;
  letter-spacing:.6px;
  color:#ffffff;
}
#vmChatWidget .vm-chat-header-text{ flex:1 1 auto; min-width:0; }
#vmChatWidget .vm-chat-title{
  margin:0;
  font-size:16px;
  font-weight:600;
  line-height:1.25;
  color:#ffffff;
  letter-spacing:.2px;
}
#vmChatWidget .vm-chat-subtitle{
  margin:2px 0 0;
  font-size:11.5px;
  font-weight:400;
  line-height:1.3;
  color:rgba(255,255,255,.82);
}
#vmChatWidget .vm-chat-status{
  margin:5px 0 0;
  display:flex;
  align-items:center;
  gap:6px;
  font-size:11.5px;
  font-weight:500;
  color:rgba(255,255,255,.92);
}
#vmChatWidget .vm-chat-status-dot{
  flex:0 0 auto;
  width:8px; height:8px;
  border-radius:50%;
  background:#34d399;
  box-shadow:0 0 0 3px rgba(52,211,153,.22);
}
#vmChatWidget .vm-chat-close{
  flex:0 0 auto;
  width:34px; height:34px;
  display:flex; align-items:center; justify-content:center;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.12);
  color:#ffffff;
  cursor:pointer;
  transition:background-color .2s ease, transform .25s ease;
}
#vmChatWidget .vm-chat-close:hover{
  background:rgba(255,255,255,.26);
  transform:rotate(90deg);
}
#vmChatWidget .vm-chat-close:focus-visible{
  outline:2px solid #ffffff;
  outline-offset:2px;
}

/* ---------- Body ---------- */
#vmChatWidget .vm-chat-body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding:16px 14px 8px;
  background:#f6f8fb;
  scrollbar-width:thin;
  scrollbar-color:#c8d4e2 transparent;
}
#vmChatWidget .vm-chat-body::-webkit-scrollbar{ width:7px; }
#vmChatWidget .vm-chat-body::-webkit-scrollbar-thumb{
  background:#c8d4e2; border-radius:8px;
}
#vmChatWidget .vm-chat-body::-webkit-scrollbar-track{ background:transparent; }

/* ---------- Messages ---------- */
#vmChatWidget .vm-chat-msg{
  display:flex;
  margin-bottom:10px;
  animation:vmChatMsgIn .25s ease both;
}
#vmChatWidget .vm-chat-msg-bot{ justify-content:flex-start; }
#vmChatWidget .vm-chat-msg-user{ justify-content:flex-end; }

#vmChatWidget .vm-chat-bubble{
  max-width:86%;
  padding:10px 13px;
  border-radius:14px;
  font-size:13.5px;
  line-height:1.55;
  overflow-wrap:break-word;
  word-wrap:break-word;
}
#vmChatWidget .vm-chat-msg-bot .vm-chat-bubble{
  background:#ffffff;
  color:#1f2937;
  border:1px solid #e6ecf3;
  border-bottom-left-radius:5px;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
#vmChatWidget .vm-chat-msg-user .vm-chat-bubble{
  background:#0f3d6e;
  color:#ffffff;
  border-bottom-right-radius:5px;
  box-shadow:0 2px 8px rgba(15,61,110,.22);
}
#vmChatWidget .vm-chat-bubble strong{ font-weight:600; }
#vmChatWidget .vm-chat-bubble a{
  color:#14568f;
  text-decoration:underline;
  word-break:break-word;
}
#vmChatWidget .vm-chat-msg-user .vm-chat-bubble a{ color:#cfe6ff; }
#vmChatWidget .vm-chat-bubble.vm-chat-bubble-success{
  background:#ecfdf3;
  border-color:#c6f0d7;
  color:#0f5132;
}

/* ---------- Typing indicator ---------- */
#vmChatWidget .vm-chat-typing{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:13px 14px;
}
#vmChatWidget .vm-chat-typing span{
  width:6px; height:6px;
  border-radius:50%;
  background:#9aabc0;
  animation:vmChatDot 1.2s infinite ease-in-out;
}
#vmChatWidget .vm-chat-typing span:nth-child(2){ animation-delay:.16s; }
#vmChatWidget .vm-chat-typing span:nth-child(3){ animation-delay:.32s; }

/* ---------- Quick replies ---------- */
#vmChatWidget .vm-chat-quick-row{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:0 0 12px 0;
  animation:vmChatMsgIn .25s ease both;
}
#vmChatWidget .vm-chat-quick-btn{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:8px 13px;
  border:1px solid #d3dfec;
  border-radius:999px;
  background:#ffffff;
  color:#0f3d6e;
  font-family:inherit;
  font-size:12.5px;
  font-weight:500;
  line-height:1.2;
  text-decoration:none;
  white-space:nowrap;
  cursor:pointer;
  transition:background-color .18s ease,
             color .18s ease,
             border-color .18s ease,
             transform .18s ease,
             box-shadow .18s ease;
}
#vmChatWidget .vm-chat-quick-btn:hover{
  background:#0f3d6e;
  border-color:#0f3d6e;
  color:#ffffff;
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(15,61,110,.22);
}
#vmChatWidget .vm-chat-quick-btn:active{ transform:translateY(0); }
#vmChatWidget .vm-chat-quick-btn:focus-visible{
  outline:2px solid #14568f;
  outline-offset:2px;
}

/* ---------- Enquiry form ---------- */
#vmChatWidget .vm-chat-form-wrap{ animation:vmChatMsgIn .25s ease both; }
#vmChatWidget .vm-chat-form{
  background:#ffffff;
  border:1px solid #e6ecf3;
  border-radius:14px;
  padding:14px;
  margin:0 0 12px;
  box-shadow:0 2px 10px rgba(15,23,42,.05);
}
#vmChatWidget .vm-chat-form-title{
  margin:0 0 4px;
  font-size:14px;
  font-weight:600;
  color:#0f3d6e;
}
#vmChatWidget .vm-chat-form-note{
  margin:0 0 13px;
  font-size:11.5px;
  line-height:1.45;
  color:#64748b;
}
#vmChatWidget .vm-chat-field{ margin-bottom:11px; }
#vmChatWidget .vm-chat-field label{
  display:block;
  margin-bottom:5px;
  font-size:12px;
  font-weight:500;
  color:#334155;
}
#vmChatWidget .vm-chat-req{ color:#d64545; }
#vmChatWidget .vm-chat-field input,
#vmChatWidget .vm-chat-field select,
#vmChatWidget .vm-chat-field textarea{
  display:block;
  width:100%;
  min-height:46px;
  padding:11px 12px;
  border:1px solid #dbe3ec;
  border-radius:10px;
  background:#f9fbfd;
  color:#1f2937;
  font-family:inherit;
  font-size:14px;
  line-height:1.4;
  outline:none;
  transition:border-color .18s ease,
             box-shadow .18s ease,
             background-color .18s ease;
}
#vmChatWidget .vm-chat-field textarea{
  min-height:80px;
  resize:vertical;
  line-height:1.5;
}
#vmChatWidget .vm-chat-field select{ cursor:pointer; }
#vmChatWidget .vm-chat-field input::placeholder,
#vmChatWidget .vm-chat-field textarea::placeholder{ color:#94a3b8; }
#vmChatWidget .vm-chat-field input:focus,
#vmChatWidget .vm-chat-field select:focus,
#vmChatWidget .vm-chat-field textarea:focus{
  border-color:#14568f;
  background:#ffffff;
  box-shadow:0 0 0 3px rgba(20,86,143,.13);
}
#vmChatWidget .vm-chat-field.vm-chat-invalid input,
#vmChatWidget .vm-chat-field.vm-chat-invalid select,
#vmChatWidget .vm-chat-field.vm-chat-invalid textarea{
  border-color:#e05252;
  background:#fff8f8;
}
#vmChatWidget .vm-chat-error{
  display:none;
  margin:5px 0 0;
  font-size:11.5px;
  font-weight:500;
  color:#cf3b3b;
}
#vmChatWidget .vm-chat-field.vm-chat-invalid .vm-chat-error{ display:block; }

#vmChatWidget .vm-chat-submit{
  width:100%;
  min-height:48px;
  margin-top:4px;
  padding:12px 16px;
  border:0;
  border-radius:10px;
  background:#0f3d6e;
  color:#ffffff;
  font-family:inherit;
  font-size:14px;
  font-weight:600;
  letter-spacing:.3px;
  cursor:pointer;
  transition:background-color .2s ease,
             transform .2s ease,
             box-shadow .2s ease,
             opacity .2s ease;
}
#vmChatWidget .vm-chat-submit:hover:not(:disabled){
  background:#14568f;
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(15,61,110,.26);
}
#vmChatWidget .vm-chat-submit:disabled{
  opacity:.65;
  cursor:not-allowed;
}
#vmChatWidget .vm-chat-submit:focus-visible{
  outline:3px solid #7fb2e5;
  outline-offset:2px;
}

/* ---------- Composer footer ---------- */
#vmChatWidget .vm-chat-footer{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  background:#ffffff;
  border-top:1px solid #e8edf3;
}
#vmChatWidget .vm-chat-input{
  flex:1 1 auto;
  min-width:0;
  height:44px;
  padding:0 15px;
  border:1px solid #dbe3ec;
  border-radius:22px;
  background:#f7f9fc;
  color:#1f2937;
  font-family:inherit;
  font-size:14px;
  outline:none;
  transition:border-color .18s ease,
             box-shadow .18s ease,
             background-color .18s ease;
}
#vmChatWidget .vm-chat-input::placeholder{ color:#94a3b8; }
#vmChatWidget .vm-chat-input:focus{
  border-color:#14568f;
  background:#ffffff;
  box-shadow:0 0 0 3px rgba(20,86,143,.13);
}
#vmChatWidget .vm-chat-send{
  flex:0 0 auto;
  width:44px; height:44px;
  display:flex; align-items:center; justify-content:center;
  border:0;
  border-radius:50%;
  background:#0f3d6e;
  color:#ffffff;
  cursor:pointer;
  transition:background-color .2s ease,
             transform .2s ease,
             box-shadow .2s ease;
}
#vmChatWidget .vm-chat-send:hover{
  background:#14568f;
  transform:scale(1.06);
  box-shadow:0 6px 16px rgba(15,61,110,.28);
}
#vmChatWidget .vm-chat-send:focus-visible{
  outline:3px solid #7fb2e5;
  outline-offset:2px;
}

/* ---------- Animations ---------- */
@keyframes vmChatMsgIn{
  from{ opacity:0; transform:translateY(8px); }
  to{ opacity:1; transform:translateY(0); }
}
@keyframes vmChatDot{
  0%,60%,100%{ transform:translateY(0); opacity:.5; }
  30%{ transform:translateY(-4px); opacity:1; }
}

/* ---------- Tablet ---------- */
@media (min-width:521px) and (max-width:900px){
  #vmChatWidget .vm-chat-window{
    width:360px;
    height:560px;
  }
}

/* ---------- Mobile ---------- */
@media (max-width:520px){
  #vmChatWidget .vm-chat-window{
    right:10px;
    bottom:10px;
    width:calc(100vw - 20px);
    height:calc(100vh - 20px);
    height:calc(100dvh - 20px);
    max-height:none;
    border-radius:16px;
  }
  #vmChatWidget .vm-chat-header{ padding:13px 13px; gap:10px; }
  #vmChatWidget .vm-chat-avatar{ width:38px; height:38px; font-size:12px; }
  #vmChatWidget .vm-chat-title{ font-size:15px; }
  #vmChatWidget .vm-chat-body{ padding:13px 11px 6px; }
  #vmChatWidget .vm-chat-bubble{ max-width:90%; font-size:13.5px; }
  #vmChatWidget .vm-chat-footer{ padding:9px 10px; }
  #vmChatWidget .vm-chat-input{ height:46px; font-size:15px; }
  #vmChatWidget .vm-chat-send{ width:46px; height:46px; }
  #vmChatWidget .vm-chat-field input,
  #vmChatWidget .vm-chat-field select{ min-height:48px; font-size:15px; }
  #vmChatWidget .vm-chat-submit{ min-height:50px; font-size:15px; }
  #vmChatWidget .vm-chat-quick-btn{ padding:9px 13px; font-size:13px; }

  #vmChatWidget .vm-chat-toggle{
    top:58%;
    padding:9px 6px;
    font-size:12.5px;
    gap:7px;
  }
  #vmChatWidget .vm-chat-toggle-full{ display:none; }
  #vmChatWidget .vm-chat-toggle-short{ display:inline; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  #vmChatWidget *,
  #vmChatWidget *::before,
  #vmChatWidget *::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
}
