.wa-live-chat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147483000;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #101828;
}

.wa-live-chat * {
  box-sizing: border-box;
}

.wa-chat-toggle {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #d7a729, #ffe08a);
  box-shadow: 0 18px 42px rgba(201, 149, 29, .34);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.wa-chat-toggle svg {
  width: 30px;
  height: 30px;
}

.wa-chat-panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: min(388px, calc(100vw - 28px));
  height: min(610px, calc(100vh - 116px));
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(16, 24, 40, .08);
  box-shadow: 0 28px 72px rgba(10, 22, 50, .24);
  display: flex;
  flex-direction: column;
  transform-origin: right bottom;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.wa-live-chat.is-closed .wa-chat-panel {
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.98);
  pointer-events: none;
}

.wa-chat-header {
  min-height: 76px;
  padding: 18px 18px 16px;
  background: linear-gradient(135deg, #19140a, #c9951d);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wa-chat-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 800;
}

.wa-chat-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
}

.wa-chat-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .2);
}

.wa-chat-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.wa-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: #f6f8fc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wa-message {
  max-width: 86%;
  padding: 11px 13px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.42;
  word-break: break-word;
}

.wa-message.manager {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(16, 24, 40, .08);
  color: #1f2937;
}

.wa-message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #c9951d, #d7a729);
  color: #fff;
}

.wa-message.system {
  align-self: center;
  max-width: 100%;
  padding: 8px 11px;
  border-radius: 12px;
  background: #fff4e5;
  color: #9a5b00;
  font-size: 12px;
  text-align: center;
}

.wa-chat-composer {
  padding: 14px;
  background: #fff;
  border-top: 1px solid rgba(16, 24, 40, .08);
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 10px;
}

.wa-chat-input {
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #d7deeb;
  outline: none;
  color: #111827;
  background: #f8fafc;
  font-size: 14px;
}

.wa-chat-input:focus {
  border-color: #c9951d;
  box-shadow: 0 0 0 4px rgba(201, 149, 29, .14);
}

.wa-chat-send {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: #c9951d;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.wa-chat-send svg {
  width: 21px;
  height: 21px;
}

.wa-phone-overlay {
  position: absolute;
  inset: 76px 0 0;
  background: rgba(255, 255, 255, .97);
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wa-phone-overlay.is-hidden {
  display: none;
}

.wa-phone-card {
  display: grid;
  gap: 14px;
}

.wa-phone-card h4 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  line-height: 1.15;
}

.wa-phone-card p {
  margin: 0 0 6px;
  color: #667085;
  font-size: 14px;
  line-height: 1.55;
}

.wa-phone-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
}

.wa-phone-code,
.wa-phone-input {
  height: 50px;
  border-radius: 14px;
  border: 1px solid #d7deeb;
  background: #f8fafc;
  color: #111827;
  font-size: 14px;
}

.wa-phone-code {
  padding: 0 12px;
}

.wa-phone-input {
  width: 100%;
  padding: 0 14px;
  outline: none;
}

.wa-phone-submit {
  height: 54px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #d7a729, #c9951d);
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
}

.wa-phone-error {
  min-height: 18px;
  color: #ef4444;
  font-size: 13px;
  line-height: 1.35;
}

.wa-phone-note {
  color: #98a2b3;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 560px) {
  .wa-live-chat {
    right: 14px;
    bottom: 14px;
  }

  .wa-chat-panel {
    right: -2px;
    bottom: 74px;
    width: calc(100vw - 24px);
    height: min(610px, calc(100vh - 96px));
    border-radius: 20px;
  }

  .wa-chat-toggle {
    width: 58px;
    height: 58px;
  }
}
