/* WhatsApp floating widget — Sandra the director */

.wa-fab-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 400;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-direction: row-reverse;
}

.wa-fab {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0,0,0,0.22), 0 2px 6px rgba(0,0,0,0.1);
  cursor: pointer;
  padding: 0;
  overflow: visible;
  transition: transform 0.25s cubic-bezier(.2,.7,.3,1);
}
.wa-fab:hover { transform: translateY(-3px) scale(1.04); }

.wa-fab-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-sizing: border-box;
}

.wa-fab-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 26px;
  height: 26px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.wa-fab-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #25D366;
  opacity: 0;
  animation: wa-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.3); opacity: 0; }
}

.wa-bubble {
  background: #fff;
  border-radius: 14px 14px 4px 14px;
  padding: 12px 30px 12px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  max-width: 240px;
  font-size: 13px;
  line-height: 1.4;
  color: #222;
  cursor: pointer;
  position: relative;
  animation: wa-bubble-in 0.5s cubic-bezier(.2,.7,.3,1);
  font-family: var(--font-body);
}
.wa-bubble strong { display: block; margin-bottom: 3px; font-weight: 600; }
.wa-bubble span { color: #666; font-size: 12px; }
.wa-bubble-close {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  font-size: 16px;
  line-height: 1;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.wa-bubble-close:hover { background: #f0f0f0; }
@keyframes wa-bubble-in {
  from { opacity: 0; transform: translateY(8px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Expanded chat card */
.wa-card {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 400;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: #ece5dd;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.12);
  overflow: hidden;
  font-family: var(--font-body);
  animation: wa-card-in 0.35s cubic-bezier(.2,.7,.3,1);
  display: flex;
  flex-direction: column;
  max-height: min(560px, calc(100vh - 48px));
}
@keyframes wa-card-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.wa-card-head {
  background: #075E54;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.wa-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.wa-card-head-info { flex-grow: 1; min-width: 0; }
.wa-card-head-name {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  line-height: 1.2;
}
.wa-card-head-role {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wa-online {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: wa-online-pulse 2s ease-out infinite;
}
@keyframes wa-online-pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
  100% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
}
.wa-card-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s;
}
.wa-card-close:hover { background: rgba(255,255,255,0.22); }

.wa-card-body {
  padding: 16px 14px 8px;
  overflow-y: auto;
  flex-grow: 1;
  background-color: #ece5dd;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.3) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.2) 0, transparent 40%);
}

.wa-msg {
  max-width: 85%;
  margin-bottom: 8px;
  animation: wa-msg-in 0.35s cubic-bezier(.2,.7,.3,1) backwards;
}
.wa-msg:nth-child(2) { animation-delay: 0.15s; }
.wa-msg-in { align-self: flex-start; }
.wa-msg-text {
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  border-top-left-radius: 2px;
  font-size: 14px;
  line-height: 1.4;
  color: #222;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  word-wrap: break-word;
}
.wa-msg-text strong { font-weight: 600; }
.wa-msg-time {
  font-size: 10px;
  color: #888;
  margin-top: 2px;
  margin-left: 4px;
}
@keyframes wa-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.wa-quick {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  animation: wa-msg-in 0.35s cubic-bezier(.2,.7,.3,1) 0.4s backwards;
}
.wa-quick-btn {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  color: #075E54;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-weight: 500;
  transition: background 0.2s, transform 0.15s;
  line-height: 1.3;
}
.wa-quick-btn:hover {
  background: #d9fdd3;
  transform: translateX(2px);
}

.wa-card-foot {
  padding: 12px 14px;
  background: #f6f0e6;
  border-top: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
}
.wa-send {
  width: 100%;
  background: #25D366;
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s;
}
.wa-send:hover { background: #1fb855; transform: translateY(-1px); }

@media (max-width: 640px) {
  .wa-fab-wrap { bottom: 18px; right: 18px; }
  .wa-fab { width: 60px; height: 60px; }
  .wa-bubble { max-width: 200px; font-size: 12px; }
  .wa-card { bottom: 18px; right: 18px; left: 18px; width: auto; max-height: calc(100vh - 36px); }
}
