/* ========================================================
   Abide Pastoral Care Live Chat Widget (Pastor Stephen)
   ======================================================== */

.abide-chat-launcher {
  position: fixed;
  bottom: 92px;
  right: 24px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #18181B;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 11px 18px;
  border-radius: 9999px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.abide-chat-launcher:hover {
  background: #27272A;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.abide-chat-launcher .pulse-dot {
  width: 8px;
  height: 8px;
  background: #4ADE80;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.28);
}

.abide-chat-launcher .launcher-icon {
  font-size: 14px;
  color: #E2B774;
}

.abide-chat-modal {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 420px;
  height: 640px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 100px);
  background: #FFFFFF;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.25);
  border: 1px solid #E4E4E7;
  z-index: 9999;
  display: none;
  flex-direction: column;
  animation: abideSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.abide-chat-modal.active {
  display: flex;
}

.abide-chat-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #18181B;
  color: #FFFFFF;
}

.abide-chat-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
}

.abide-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.abide-chat-btn-icon {
  background: transparent;
  border: none;
  color: #A1A1AA;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.abide-chat-btn-icon:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

.abide-chat-modal iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
}

@keyframes abideSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 540px) {
  .abide-chat-launcher {
    bottom: 84px;
    right: 18px;
    padding: 10px 14px;
    font-size: 12.5px;
  }

  .abide-chat-modal {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    z-index: 999999 !important;
  }

  .abide-chat-header-bar {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}
