﻿/* ArcaX WhatsApp Popup Widget */

.arcax-whatsapp-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9998;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── FAB ── */
.arcax-wa-fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #00c6a2 0%, #0ea5e9 100%);
  box-shadow: 0 4px 20px rgba(0, 198, 162, .45);
  transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s;
  animation: ax-wa-pulse 3s ease-in-out infinite;
  position: relative;
}
.arcax-wa-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(0, 198, 162, .55), 0 0 0 8px rgba(0, 198, 162, .12);
  animation: none;
}
.arcax-wa-fab:active { transform: scale(.95); }

.arcax-wa-fab svg { width: 28px; height: 28px; fill: #fff; transition: opacity .25s, transform .25s; }
.arcax-wa-fab .wa-icon-close { display: none; width: 22px; height: 22px; fill: none; }
.arcax-wa-fab.is-open .wa-icon-wa   { display: none; }
.arcax-wa-fab.is-open .wa-icon-close { display: block; }

/* Online dot on FAB */
.arcax-wa-fab::after {
  content: '';
  position: absolute;
  top: 3px; right: 3px;
  width: 13px; height: 13px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #060b18;
  animation: ax-wa-online 2s ease-in-out infinite;
  transition: opacity .25s;
}
.arcax-wa-fab.is-open::after { opacity: 0; }

@keyframes ax-wa-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(0,198,162,.45), 0 0 0 0 rgba(0,198,162,.3); }
  50%       { box-shadow: 0 4px 20px rgba(0,198,162,.45), 0 0 0 12px rgba(0,198,162,0); }
}
@keyframes ax-wa-online {
  0%, 100% { opacity: 1; }
  50%       { opacity: .55; }
}

/* ── Backdrop ── */
.arcax-wa-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(4, 6, 15, .55);
  backdrop-filter: blur(3px);
  z-index: 9997;
}
.arcax-wa-backdrop.is-visible { display: block; animation: ax-bd-in .2s ease; }
@keyframes ax-bd-in { from { opacity: 0; } to { opacity: 1; } }

/* ── Popup ── */
.arcax-wa-popup {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 360px;
  max-width: calc(100vw - 32px);
  z-index: 9999;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(0,198,162,.2);
  transform: translateY(18px) scale(.94);
  opacity: 0;
  visibility: hidden;
  transition: all .32s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.arcax-wa-popup.is-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Header */
.arcax-wa-header {
  background: linear-gradient(135deg, #06111f 0%, #0d1b3e 100%);
  padding: 22px 22px 18px;
  position: relative;
  overflow: hidden;
}
.arcax-wa-header::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(0,198,162,.18) 0%, transparent 70%);
  pointer-events: none;
}
.arcax-wa-header-close {
  position: absolute; top: 11px; right: 11px;
  background: rgba(255,255,255,.1); border: none; border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #94a3b8; font-size: 17px; line-height: 1;
  transition: background .18s, color .18s;
}
.arcax-wa-header-close:hover { background: rgba(255,255,255,.22); color: #fff; }

.arcax-wa-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #00c6a2, #0ea5e9);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  border: 2.5px solid rgba(0,198,162,.35);
}
.arcax-wa-avatar svg { width: 26px; height: 26px; fill: #fff; }

.arcax-wa-header-title { font-size: 1.05rem; font-weight: 700; color: #fff; margin: 0 0 4px; line-height: 1.3; }
.arcax-wa-header-sub   { font-size: .8rem; color: #94a3b8; margin: 0; display: flex; align-items: center; gap: 6px; }
.ax-online-dot {
  width: 8px; height: 8px; background: #22c55e; border-radius: 50%; display: inline-block;
  animation: ax-wa-online 2s ease-in-out infinite;
}

/* Body */
.arcax-wa-body { background: #0b1120; padding: 18px 22px; }

.arcax-wa-bubble {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(0,198,162,.15);
  border-radius: 0 14px 14px 14px;
  padding: 14px; margin-bottom: 14px; position: relative;
}
.arcax-wa-bubble::before {
  content: ''; position: absolute; top: 0; left: -7px;
  border-top: 7px solid rgba(255,255,255,.05);
  border-left: 7px solid transparent;
}
.arcax-wa-bubble-text { font-size: .88rem; color: #e2e8f0; line-height: 1.6; margin: 0; }
.arcax-wa-bubble-time { font-size: .68rem; color: #64748b; text-align: right; margin-top: 7px; }

.arcax-wa-phone {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(14,165,233,.15);
  border-radius: 12px; margin-bottom: 14px;
}
.arcax-wa-phone-icon {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(34,197,94,.12);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.arcax-wa-phone-icon svg { width: 17px; height: 17px; stroke: #22c55e; fill: none; }
.arcax-wa-phone-info { display: flex; flex-direction: column; }
.arcax-wa-phone-number { font-size: .92rem; font-weight: 600; color: #e2e8f0; letter-spacing: .02em; }
.arcax-wa-phone-label  { font-size: .68rem; color: #64748b; text-transform: uppercase; letter-spacing: .05em; }

.arcax-wa-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px 20px;
  border: none; border-radius: 13px; cursor: pointer;
  font-family: inherit; font-size: .93rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 4px 16px rgba(34,197,94,.3);
  text-decoration: none;
  transition: transform .25s, box-shadow .25s;
}
.arcax-wa-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(34,197,94,.4); color: #fff; text-decoration: none; }
.arcax-wa-cta:active { transform: translateY(0); }
.arcax-wa-cta svg { width: 21px; height: 21px; fill: #fff; }

/* Footer */
.arcax-wa-footer {
  background: rgba(11,17,32,.95);
  padding: 10px 22px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.05);
}
.arcax-wa-footer-text { font-size: .68rem; color: #475569; margin: 0; }

/* Mobile adjustments */
@media (max-width: 480px) {
  .arcax-whatsapp-widget { bottom: 16px; right: 16px; }
  .arcax-wa-popup { right: 16px; bottom: 88px; }
}
