/* ==========================================================================
   SEA GADABOUT - 24/7 WHATSAPP PROPERTY MANAGER WIDGET
   Direct connection to Logged-in Admin WhatsApp or Owner (+91 98942 07097)
   ========================================================================== */

.wa-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #25D366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  cursor: pointer;
  border: 2px solid #ffffff;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  animation: waPulse 3s infinite;
}

.wa-floating-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.6);
}

.wa-floating-btn svg {
  width: 34px;
  height: 34px;
  fill: #ffffff;
}

@keyframes waPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.65), 0 8px 24px rgba(37, 211, 102, 0.4);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(37, 211, 102, 0), 0 8px 24px rgba(37, 211, 102, 0.4);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 8px 24px rgba(37, 211, 102, 0.4);
  }
}

/* Tooltip badge */
.wa-floating-tooltip {
  position: fixed;
  bottom: 34px;
  right: 96px;
  z-index: 9998;
  background: #030e21;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  border: 1px solid rgba(212, 175, 55, 0.3);
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.wa-floating-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent #030e21;
}

.wa-floating-tooltip .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25D366;
  display: inline-block;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Interactive Concierge Modal */
.wa-concierge-modal {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 120px);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(3, 14, 33, 0.35);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 10000;
  border: 1px solid rgba(212, 175, 55, 0.25);
  animation: waSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.wa-concierge-modal.active {
  display: flex;
}

@keyframes waSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Header */
.wa-modal-header {
  background: linear-gradient(135deg, #030e21 0%, #0c2340 100%);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--gold-accent, #d4af37);
}

.wa-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wa-header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  padding: 3px;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.wa-header-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  color: #ffffff;
}

.wa-header-sub {
  font-size: 0.72rem;
  color: #25D366;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.wa-close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  padding: 4px;
  transition: opacity 0.2s;
}

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

/* Modal Body / Messages Log */
.wa-modal-body {
  flex: 1;
  background: #efeae2;
  background-image: radial-gradient(rgba(0,0,0,0.04) 1px, transparent 0);
  background-size: 16px 16px;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wa-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.45;
  position: relative;
  word-wrap: break-word;
}

.wa-msg-bot {
  align-self: flex-start;
  background: #ffffff;
  color: #1e293b;
  border-top-left-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.wa-msg-user {
  align-self: flex-end;
  background: #d9fdd3;
  color: #0f172a;
  border-top-right-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.wa-msg-time {
  font-size: 0.65rem;
  color: #94a3b8;
  text-align: right;
  margin-top: 4px;
}

/* Interactive Chips */
.wa-chips-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.wa-chip {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #030e21;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wa-chip:hover {
  background: #030e21;
  color: #ffffff;
  border-color: #030e21;
}

/* Modal Footer */
.wa-modal-footer {
  background: #f8fafc;
  padding: 12px 14px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wa-direct-action {
  width: 100%;
  background: #25D366;
  color: #ffffff;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.wa-direct-action:hover {
  background: #20ba5a;
}

.wa-input-row {
  display: flex;
  gap: 8px;
}

.wa-input-field {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 0.84rem;
  outline: none;
  background: #ffffff;
}

.wa-input-field:focus {
  border-color: #25D366;
}

.wa-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #030e21;
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.wa-send-btn:hover {
  background: #25D366;
}

/* Mobile Responsiveness & Bottom Dock Clearance */
@media (max-width: 768px) {
  .wa-floating-btn {
    bottom: calc(92px + env(safe-area-inset-bottom, 0px)); /* Raised cleanly above mobile bottom dock & BOOK button */
    right: 16px;
    width: 52px;
    height: 52px;
  }
  .wa-floating-btn svg {
    width: 28px;
    height: 28px;
  }
  .wa-floating-tooltip {
    display: none !important;
  }
  .wa-concierge-modal {
    bottom: calc(154px + env(safe-area-inset-bottom, 0px));
    right: 12px;
    left: 12px;
    width: auto;
    height: 480px;
    max-height: calc(100vh - 175px);
  }
}

@media (max-width: 480px) {
  .wa-floating-btn {
    bottom: calc(95px + env(safe-area-inset-bottom, 0px)); /* Additional clearance for small mobile viewports */
    right: 14px;
    width: 50px;
    height: 50px;
  }
  .wa-floating-btn svg {
    width: 26px;
    height: 26px;
  }
  .wa-concierge-modal {
    bottom: calc(156px + env(safe-area-inset-bottom, 0px));
    right: 10px;
    left: 10px;
    max-height: calc(100vh - 175px);
  }
}

