/* Restored WhatsApp chat popup. Loaded after site.css. */

.bigo-site .wa-chat-backdrop {
  display: none;
  pointer-events: none;
}

.bigo-site .wa-chat-popup {
  position: fixed;
  z-index: 125;
  right: 24px;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  width: 344px;
  max-width: calc(100vw - 24px);
  max-height: min(520px, calc(100dvh - 120px));
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  color: #111827;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.bigo-site .wa-chat-popup.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.bigo-site .wa-chat-popup__panel {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  height: auto;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(7, 94, 84, 0.12);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.06);
}

.bigo-site .wa-chat-popup__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  background: linear-gradient(135deg, #075e54 0%, #128c7e 58%, #1faa5a 100%);
  color: #fff;
  flex-shrink: 0;
}

.bigo-site .wa-chat-popup__avatar {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
}

.bigo-site .wa-chat-popup__avatar svg {
  display: block;
  width: 36px;
  height: 36px;
}

.bigo-site .wa-chat-popup__head-text {
  flex: 1 1 auto;
  min-width: 0;
}

.bigo-site .wa-chat-popup__head-text h3 {
  margin: 0;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.bigo-site .wa-chat-popup__status {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
}

.bigo-site .wa-chat-popup__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  padding: 0;
}

.bigo-site .wa-chat-popup__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.bigo-site .wa-chat-popup__close svg {
  display: block;
  width: 16px;
  height: 16px;
}

.bigo-site .wa-chat-popup__chat {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px;
  overflow-y: auto;
  background-color: #efeae2;
  background-image: radial-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px);
  background-size: 16px 16px;
  scrollbar-width: thin;
}

.bigo-site .wa-chat-popup__bubble {
  max-width: 92%;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 4px 14px 14px 14px;
  background: #fff;
  color: #111827;
  font-size: 0.875rem;
  line-height: 1.45;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}

.bigo-site .wa-chat-popup__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bigo-site .wa-chat-popup__chip {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(7, 94, 84, 0.28);
  background: #fff;
  color: #075e54;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.bigo-site .wa-chat-popup__chip:hover,
.bigo-site .wa-chat-popup__chip.is-selected {
  background: #f0fdf4;
  border-color: #128c7e;
}

.bigo-site .wa-chat-popup__confirm {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}

.bigo-site .wa-chat-popup__confirm p {
  margin: 0 0 8px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.bigo-site .wa-chat-popup__confirm-actions {
  display: flex;
  gap: 6px;
}

.bigo-site .wa-chat-popup__confirm-actions button {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(7, 94, 84, 0.28);
  background: #fff;
  color: #075e54;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.bigo-site .wa-chat-popup__confirm-actions button:first-child {
  background: #128c7e;
  border-color: #128c7e;
  color: #fff;
}

.bigo-site .wa-chat-popup__composer {
  flex-shrink: 0;
  padding: 8px 10px 10px;
  background: #f0f2f5;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.bigo-site .wa-chat-popup__input {
  display: block;
  width: 100%;
  min-height: 40px;
  max-height: 96px;
  margin: 0 0 8px;
  padding: 8px 10px;
  resize: none;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #111827;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.4;
}

.bigo-site .wa-chat-popup__input:focus {
  outline: none;
  border-color: #128c7e;
  box-shadow: 0 0 0 3px rgba(18, 140, 126, 0.18);
}

.bigo-site .wa-chat-popup__error {
  margin: -2px 0 8px;
  color: #b91c1c;
  font-size: 0.75rem;
  line-height: 1.3;
}

.bigo-site .wa-chat-popup__send {
  width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: #128c7e;
  color: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.bigo-site .wa-chat-popup__send:hover {
  background: #0f766e;
}

.bigo-site .wa-chat-popup__send .bigo-ico--wa-inline {
  width: 16px;
  height: 16px;
  color: #fff;
}

.bigo-site .wa-chat-popup__helper {
  margin: 6px 0 0;
  text-align: center;
  color: #475569;
  font-size: 0.72rem;
  line-height: 1.35;
}

.bigo-site .wa-chat-popup button:focus-visible,
.bigo-site .wa-chat-popup textarea:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.bigo-site .wa-chat-popup__chip:focus-visible,
.bigo-site .wa-chat-popup__input:focus-visible,
.bigo-site .wa-chat-popup__send:focus-visible,
.bigo-site .wa-chat-popup__confirm-actions button:focus-visible {
  outline-color: #075e54;
}

body.bigo-site.bc-wa-panel .back-to-top {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 767px) {
  .bigo-site .wa-chat-backdrop.is-active {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(15, 23, 42, 0.28);
    pointer-events: auto;
  }

  .bigo-site .wa-chat-popup,
  body.bigo-site.bc-sticky-visible .wa-chat-popup {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bigo-site .wa-chat-popup {
    transition: none;
    transform: none;
  }
}
