.vp-live-chat-fab {
  position: fixed;
  right: 16px;
  bottom: 88px;
  z-index: 1300;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #625bf6 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(98, 91, 246, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.vp-live-chat-fab:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 28px rgba(98, 91, 246, 0.55);
}

.vp-live-chat-fab svg {
  width: 26px;
  height: 26px;
}

.vp-live-chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border: 2px solid #fff;
}

.vp-live-chat-panel {
  position: fixed;
  right: 16px;
  bottom: 156px;
  z-index: 1301;
  width: min(360px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 180px));
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.vp-live-chat-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.vp-live-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #625bf6 0%, #4f46e5 100%);
  color: #fff;
}

.vp-live-chat-header strong {
  display: block;
  font-size: 15px;
}

.vp-live-chat-header small {
  display: block;
  font-size: 11px;
  opacity: 0.85;
  margin-top: 2px;
}

.vp-live-chat-close {
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.vp-live-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f3f4f6;
}

.vp-live-chat-msg {
  margin-bottom: 10px;
  max-width: 88%;
}

.vp-live-chat-msg.user {
  margin-left: auto;
  text-align: right;
}

.vp-live-chat-bubble {
  display: inline-block;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.vp-live-chat-msg.user .vp-live-chat-bubble {
  background: #625bf6;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.vp-live-chat-msg.admin .vp-live-chat-bubble {
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
}

.vp-live-chat-time {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 3px;
}

.vp-live-chat-empty,
.vp-live-chat-login {
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  padding: 28px 16px;
}

.vp-live-chat-login a {
  color: #625bf6;
  font-weight: 600;
  text-decoration: none;
}

.vp-live-chat-footer {
  padding: 10px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  gap: 8px;
  align-items: center;
}

.vp-live-chat-preview {
  padding: 8px 10px 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.vp-live-chat-preview-card {
  position: relative;
  display: inline-block;
  max-width: 120px;
}

.vp-live-chat-preview-card img {
  display: block;
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #d1d5db;
}

.vp-live-chat-preview-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.vp-live-chat-attach {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: #1a2744;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 14px rgba(26, 39, 68, 0.38);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.vp-live-chat-attach svg {
  width: 22px;
  height: 22px;
}

.vp-live-chat-attach:hover {
  background: #24365a;
  color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(26, 39, 68, 0.48);
}

.vp-live-chat-attach:active {
  transform: scale(0.97);
}

.vp-live-chat-image-link {
  display: block;
  margin-bottom: 6px;
}

.vp-live-chat-image {
  display: block;
  max-width: 220px;
  max-height: 180px;
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  cursor: zoom-in;
}

.vp-live-chat-text + .vp-live-chat-image-link,
.vp-live-chat-image-link + .vp-live-chat-text {
  margin-top: 6px;
}

.vp-live-chat-text {
  white-space: pre-wrap;
}

.vp-live-chat-footer input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  outline: none;
  color: #111827 !important;
  background-color: #ffffff !important;
  -webkit-text-fill-color: #111827 !important;
  caret-color: #111827;
}

.vp-live-chat-footer input::placeholder {
  color: #9ca3af !important;
  opacity: 1;
  -webkit-text-fill-color: #9ca3af !important;
}

.vp-live-chat-footer input:focus {
  border-color: #625bf6;
  box-shadow: 0 0 0 2px rgba(98, 91, 246, 0.15);
}

.vp-live-chat-footer button {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: #625bf6;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.vp-live-chat-footer button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (min-width: 768px) {
  .vp-live-chat-fab {
    bottom: 24px;
  }

  .vp-live-chat-panel {
    bottom: 92px;
  }
}

html[data-vp-theme="light"] .vp-live-chat-panel,
html[data-vp-theme="light"] .vp-live-chat-body {
  background: #fff;
}

html[data-vp-theme="light"] .vp-live-chat-body {
  background: #f8fafc;
}

/* Adhere.pro — brand lime live chat widget */
html[data-vp-live-chat="adhere"] .vp-live-chat-fab {
  right: 12px;
  bottom: 24px;
  background: linear-gradient(135deg, #daff45 0%, #c4e612 100%);
  color: #111827;
  box-shadow: 0 8px 24px rgba(196, 230, 18, 0.45);
}

html[data-vp-live-chat="adhere"] .vp-live-chat-fab:hover {
  box-shadow: 0 10px 28px rgba(196, 230, 18, 0.55);
}

html[data-vp-live-chat="adhere"] .vp-live-chat-panel {
  right: 12px;
  bottom: 92px;
}

html[data-vp-live-chat="adhere"] .vp-live-chat-header {
  background: linear-gradient(135deg, #daff45 0%, #c4e612 100%);
  color: #111827;
}

html[data-vp-live-chat="adhere"] .vp-live-chat-header small {
  color: rgba(17, 24, 39, 0.72);
}

html[data-vp-live-chat="adhere"] .vp-live-chat-close {
  background: rgba(17, 24, 39, 0.12);
  color: #111827;
}

html[data-vp-live-chat="adhere"] .vp-live-chat-msg.user .vp-live-chat-bubble,
html[data-vp-live-chat="adhere"] .vp-live-chat-footer button#vp-live-chat-send {
  background: #c4e612;
  color: #111827;
}

html[data-vp-live-chat="adhere"] .vp-live-chat-footer input:focus {
  border-color: #c4e612;
  box-shadow: 0 0 0 2px rgba(196, 230, 18, 0.25);
}

html[data-vp-live-chat="adhere"] .vp-live-chat-login a {
  color: #4d6b00;
}

html[data-vp-live-chat="adhere"] .vp-live-chat-attach {
  background: #1a2744;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(26, 39, 68, 0.38);
}

html[data-vp-live-chat="adhere"] .vp-live-chat-attach:hover {
  background: #24365a;
  color: #ffffff;
}

/* Keep typed text visible regardless of app dark/light theme globals */
.vp-live-chat-panel .vp-live-chat-footer input,
html[data-vp-theme="light"] .vp-live-chat-panel .vp-live-chat-footer input,
html[data-vp-theme="dark"] .vp-live-chat-panel .vp-live-chat-footer input,
html .vp-live-chat-panel .vp-live-chat-footer input {
  color: #111827 !important;
  background-color: #ffffff !important;
  -webkit-text-fill-color: #111827 !important;
  caret-color: #111827 !important;
}

.vp-live-chat-panel .vp-live-chat-footer input::placeholder {
  color: #9ca3af !important;
  -webkit-text-fill-color: #9ca3af !important;
}
