/* ── A1 TECHNOVATION WHATSAPP LIVE CHAT SYSTEM ───────────────────────── */
/* Primary WhatsApp: +8801799976295 */

.wa-chat-root {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Stacking adjustment for .scroll-top */
.scroll-top {
  bottom: 160px !important;
  right: 30px !important;
  z-index: 9990 !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* ── FLOATING TRIGGER BUTTON ── */
.wa-trigger-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9995;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wa-trigger-btn {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 10px 25px -4px rgba(37, 211, 102, 0.5), 0 4px 12px rgba(15, 23, 42, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  outline: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.wa-trigger-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 14px 30px -4px rgba(37, 211, 102, 0.65), 0 6px 16px rgba(15, 23, 42, 0.2);
}

.wa-trigger-btn:active {
  transform: scale(0.96);
}

/* Pulse animation ring */
.wa-trigger-btn::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.6);
  animation: waPulseRing 2.4s infinite cubic-bezier(0.24, 0, 0.38, 1);
  pointer-events: none;
}

@keyframes waPulseRing {
  0% { transform: scale(0.92); opacity: 0.9; }
  50% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* Online indicator dot on trigger */
.wa-status-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background-color: #10b981;
  border: 2.5px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Notification badge */
.wa-notify-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  animation: waBadgeBounce 2s infinite ease-in-out;
}

@keyframes waBadgeBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Tooltip pill preview */
.wa-tooltip-pill {
  background: #ffffff;
  color: #0f172a;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 6px 20px -2px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.05);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  animation: waFadeInPill 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.wa-tooltip-pill:hover {
  transform: translateX(-2px);
  background: #f8fafc;
}

.wa-tooltip-close {
  color: #94a3b8;
  font-size: 11px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
}

.wa-tooltip-close:hover {
  color: #0f172a;
}

@keyframes waFadeInPill {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── LIVE CHAT WINDOW ── */
.wa-chat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 375px;
  max-width: calc(100vw - 32px);
  max-height: min(600px, calc(100vh - 120px));
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.06);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.wa-chat-window.is-open {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Window Header */
.wa-chat-header {
  background: linear-gradient(135deg, #060b18 0%, #0d1526 55%, #172554 100%);
  color: #ffffff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 3px solid #06b6d4;
  position: relative;
}

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

.wa-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #06b6d4;
  overflow: hidden;
  flex-shrink: 0;
  background: #0f172a;
}

.wa-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wa-avatar-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  background: #10b981;
  border: 2px solid #0f172a;
  border-radius: 50%;
}

.wa-header-meta h4 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wa-header-meta p {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.wa-pulse-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
}

.wa-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wa-header-wa-icon {
  color: #25D366;
  font-size: 20px;
}

.wa-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #cbd5e1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}

.wa-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Chat Body (Message Container) */
.wa-chat-body {
  background-color: #f8fafc;
  background-image: radial-gradient(rgba(148, 163, 184, 0.15) 1px, transparent 1px);
  background-size: 16px 16px;
  padding: 16px 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 220px;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Scrollbar in chat body */
.wa-chat-body::-webkit-scrollbar {
  width: 5px;
}
.wa-chat-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.wa-time-stamp {
  align-self: center;
  background: #e2e8f0;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Agent message bubble */
.wa-bubble-agent {
  align-self: flex-start;
  background: #ffffff;
  color: #1e293b;
  padding: 12px 14px;
  border-radius: 14px 14px 14px 2px;
  box-shadow: 0 2px 8px -1px rgba(15, 23, 42, 0.08);
  font-size: 12.5px;
  line-height: 1.5;
  max-width: 88%;
  border: 1px solid #e2e8f0;
}

.wa-bubble-agent p {
  margin: 0 0 6px 0;
}

.wa-bubble-agent p:last-child {
  margin-bottom: 0;
}

.wa-bubble-time {
  display: block;
  font-size: 9.5px;
  color: #94a3b8;
  text-align: right;
  margin-top: 4px;
}

/* Outgoing user bubble (dynamically created) */
.wa-bubble-user {
  align-self: flex-end;
  background: #dcf8c6;
  color: #0f172a;
  padding: 10px 14px;
  border-radius: 14px 14px 2px 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  font-size: 12.5px;
  line-height: 1.45;
  max-width: 85%;
}

/* Quick Action Suggestion Chips */
.wa-chips-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.wa-chips-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.wa-chip-btn {
  background: #ffffff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.wa-chip-btn:hover {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #1d4ed8;
  transform: translateX(2px);
}

.wa-chip-btn i {
  color: #93c5fd;
  font-size: 10px;
}

/* Chat Footer / Input */
.wa-chat-footer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 12px 14px;
}

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

.wa-input-field {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 24px;
  padding: 9px 15px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.wa-input-field:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.wa-input-field::placeholder {
  color: #94a3b8;
}

.wa-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wa-send-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 14px rgba(37, 211, 102, 0.5);
}

.wa-send-btn:active {
  transform: scale(0.94);
}

/* Privacy & Branding note */
.wa-footer-note {
  text-align: center;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* ── TELEGRAM FLOATING BUTTON ── */
.tg-trigger-wrap {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 9994;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.tg-trigger-btn {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2AABEE 0%, #0088cc 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 8px 20px -4px rgba(0, 136, 204, 0.5), 0 4px 10px rgba(15, 23, 42, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  outline: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  text-decoration: none;
}

.tg-trigger-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 26px -4px rgba(0, 136, 204, 0.65), 0 6px 14px rgba(15, 23, 42, 0.18);
  color: #ffffff;
}

.tg-trigger-btn:active {
  transform: scale(0.96);
}

.tg-tooltip-pill {
  background: #ffffff;
  color: #0f172a;
  padding: 7px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 6px 20px -2px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.05);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  animation: waFadeInPill 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tg-tooltip-pill:hover {
  transform: translateX(-2px);
  background: #f0f9ff;
}

/* Mobile responsive tuning */
@media (max-width: 480px) {
  .wa-trigger-wrap {
    bottom: 18px;
    right: 18px;
  }
  .wa-trigger-btn {
    width: 54px;
    height: 54px;
    font-size: 28px;
  }
  .tg-trigger-wrap {
    bottom: 82px;
    right: 22px;
  }
  .tg-trigger-btn {
    width: 46px;
    height: 46px;
    font-size: 22px;
  }
  .scroll-top {
    bottom: 138px !important;
    right: 23px !important;
    width: 44px !important;
    height: 44px !important;
    font-size: 0.9rem !important;
  }
  .wa-chat-window {
    bottom: 84px;
    right: 16px;
    width: calc(100vw - 32px);
    max-height: 80vh;
  }
  .wa-tooltip-pill,
  .tg-tooltip-pill {
    display: none;
  }
}

