/* WhatsApp chat — same widget as g-estates.com, anchored in the footer */

.wa-chat {
  position: relative;
  z-index: 1100;
  flex-shrink: 0;
  font-family: inherit;
}

.wa-chat-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40.5px;
  height: 40.5px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: #25d366;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-chat-toggle:hover,
.wa-chat[data-open="1"] .wa-chat-toggle {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.wa-chat-toggle i:before {
  content: "\e967";
  font-size: 25.2px;
  line-height: 1;
}

.wa-chat-panel {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.45rem);
  z-index: 1200;
  width: 320px;
  max-width: min(320px, calc(100vw - 2rem));
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.28);
}

.wa-chat[data-open="1"] .wa-chat-panel {
  display: block;
}

.wa-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #075e54;
  color: #fff;
}

.wa-chat-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.wa-chat-avatar i:before {
  content: "\e967";
  font-size: 22px;
}

.wa-chat-info {
  flex: 1;
  min-width: 0;
}

.wa-chat-info strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.wa-chat-status {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  opacity: 0.85;
}

.wa-chat-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  opacity: 0.85;
  flex-shrink: 0;
  cursor: pointer;
}

.wa-chat-close:hover {
  opacity: 1;
}

.wa-chat-close i:before {
  content: "\e928";
  font-size: 14px;
}

.wa-chat-body {
  padding: 16px;
  background: #e5ddd5 url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h30v30H0zm30 30h30v30H30z' fill='%23d4cdc4' fill-opacity='0.15'/%3E%3C/svg%3E");
  min-height: 80px;
}

.wa-chat[data-page="funnel"] .wa-chat-body {
  min-height: 0;
}

.wa-chat-message {
  display: inline-block;
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 0 8px 8px 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.wa-chat-message[hidden] {
  display: none !important;
}

.wa-chat-message p,
.wa-chat-greeting {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #303030;
  white-space: pre-wrap;
}

.wa-chat-message + .wa-chat-input {
  margin-top: 12px;
}

.wa-chat-input {
  display: block;
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid #d1d7db;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #303030;
  resize: vertical;
  box-sizing: border-box;
  -webkit-user-select: text;
  user-select: text;
}

.wa-chat-input:focus {
  outline: none;
  border-color: #25d366;
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2);
}

.wa-chat-footer {
  padding: 12px 16px 16px;
  background: #f0f0f0;
}

.wa-chat-start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 24px;
  background: #25d366;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.wa-chat-start:hover {
  background: #1fb855;
  color: #fff;
}

.wa-chat-start i:before {
  content: "\e967";
  font-size: 18px;
}

.wa-chat-start em {
  font-style: normal;
}

@media screen and (max-width: 480px) {
  .wa-chat-panel {
    width: calc(100vw - 1.5rem);
    right: 0;
  }
}
