/* Trendy "Chat with us" floating widget */

.amanah-chat-fab-wrap {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 1030;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.amanah-chat-fab-wrap > * {
  pointer-events: auto;
}

.amanah-chat-bubble {
  background: var(--sf, #1c1e26);
  border: 1px solid var(--brd, rgba(255, 255, 255, 0.1));
  color: var(--tx, #f5f5f7);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  max-width: 200px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.amanah-chat-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.amanah-chat-bubble strong {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #25d366;
  margin-bottom: 4px;
}

.amanah-chat-fab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 14px;
  border-radius: 980px;
  color: #fff;
  text-decoration: none;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: box-shadow 0.25s ease, background 0.2s ease, transform 0.2s ease;
}
.amanah-chat-fab--wa {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 6px 22px rgba(34, 197, 94, 0.35), 0 2px 6px rgba(0, 0, 0, 0.15);
}
.amanah-chat-fab--wa:hover {
  box-shadow: 0 10px 32px rgba(34, 197, 94, 0.42);
  color: #fff;
}
.amanah-chat-fab--ig {
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 48%, #8134af 100%);
  box-shadow: 0 6px 22px rgba(221, 42, 123, 0.32), 0 2px 6px rgba(0, 0, 0, 0.12);
}
.amanah-chat-fab--ig:hover {
  box-shadow: 0 10px 28px rgba(221, 42, 123, 0.4);
  color: #fff;
  transform: translateY(-1px);
}
.amanah-chat-fab-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.amanah-chat-fab-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 980px;
  border: 2px solid rgba(34, 197, 94, 0.4);
  animation: chatPulse 2.8s ease-out infinite;
  pointer-events: none;
}
@keyframes chatPulse {
  0% { transform: scale(1); opacity: 0.6; }
  70% { transform: scale(1.1); opacity: 0; }
  100% { transform: scale(1.1); opacity: 0; }
}

@media (min-width: 768px) {
  .amanah-chat-fab-wrap {
    bottom: calc(28px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 640px) {
  .amanah-chat-fab-label-long {
    display: none;
  }
  .amanah-chat-fab-label-short {
    display: inline;
  }
}
@media (min-width: 641px) {
  .amanah-chat-fab-label-short {
    display: none;
  }
}

html[data-theme="light"] .amanah-chat-bubble {
  background: #fff;
  color: #4C2B08;
  border-color: #e5ddd0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
