/* =============================================
   WhatsApp Agents - Expert Solutions Centre
   Colors: #C5972A (gold) | #9B2335 (crimson)
   ============================================= */

:root {
  --wsa-crimson: #9B2335;
  --wsa-gold:    #C5972A;
  --wsa-green:   #25D366;
  --wsa-white:   #ffffff;
  --wsa-shadow:  0 8px 32px rgba(0,0,0,0.18);
}

/* ---- Root Container ---- */
#wsa-root {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99999;
  font-family: 'Segoe UI', Arial, sans-serif;
}

/* ---- FAB Button ---- */
#wsa-fab {
  width: 62px;
  height: 62px;
  background: linear-gradient(135deg, var(--wsa-crimson), var(--wsa-gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(155,35,53,0.45);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: wsaPulse 2.5s infinite;
}

#wsa-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(155,35,53,0.55);
}

#wsa-fab svg {
  width: 34px;
  height: 34px;
}

@keyframes wsaPulse {
  0%   { box-shadow: 0 0 0 0 rgba(155,35,53,0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(155,35,53,0); }
  100% { box-shadow: 0 0 0 0 rgba(155,35,53,0); }
}

/* ---- Badge ---- */
#wsa-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--wsa-green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* ---- Panel ---- */
#wsa-panel {
  position: absolute;
  bottom: 78px;
  right: 0;
  width: 340px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--wsa-shadow);
  overflow: hidden;
  transform: scale(0.85) translateY(20px);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#wsa-panel.wsa-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* ---- Header ---- */
#wsa-header {
  background: linear-gradient(135deg, #9B2335 0%, #7a1a27 100%);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  border-bottom: 3px solid #C5972A;
}

#wsa-logo-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(197,151,42,0.6);
}

#wsa-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  object-position: center top;
  display: block;
  mix-blend-mode: normal;
}

#wsa-header-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#wsa-brand {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.3px;
}

#wsa-status {
  color: rgba(255,255,255,0.8);
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}

.wsa-dot {
  width: 8px;
  height: 8px;
  background: var(--wsa-green);
  border-radius: 50%;
  display: inline-block;
  animation: wsaBlink 1.5s infinite;
}

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

#wsa-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
}

#wsa-close:hover {
  background: rgba(255,255,255,0.3);
}

/* ---- Body ---- */
#wsa-body {
  padding: 18px 16px 14px;
  background: #f0f2f5;
}

/* ---- Chat Bubble ---- */
#wsa-bubble {
  background: #fff;
  border-radius: 0 12px 12px 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  position: relative;
}

#wsa-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  border-width: 0 8px 8px 0;
  border-style: solid;
  border-color: transparent #fff transparent transparent;
}

#wsa-intro-text {
  margin: 0;
  font-size: 13.5px;
  color: #333;
  line-height: 1.5;
}

/* ---- Agents ---- */
#wsa-agents {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.wsa-agent {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wsa-agent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

#wsa-agent-legal {
  background: linear-gradient(135deg, var(--wsa-crimson), #7a1a27);
}

#wsa-agent-training {
  background: linear-gradient(135deg, var(--wsa-gold), #a07520);
}

.wsa-agent-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.wsa-agent-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wsa-agent-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.wsa-agent-name {
  color: rgba(255,255,255,0.78);
  font-size: 12px;
  margin-top: 2px;
}

.wsa-agent-arrow {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- Footer Note ---- */
#wsa-footer-note {
  text-align: center;
  font-size: 11.5px;
  color: #888;
  margin: 0;
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
  #wsa-root {
    bottom: 18px;
    right: 14px;
  }

  #wsa-panel {
    width: calc(100vw - 28px);
    right: -14px;
  }
}
