/* ==========================================================================
   Friendly Chat Box - Modern, Pixel-Perfect Component Styles
   Engineered for seamless integration & immunity against WordPress theme CSS bleeding
   ========================================================================== */

:root {
  --fcb-royal-blue: #1c449c;
  --fcb-royal-blue-hover: #15367d;
  --fcb-royal-blue-light: #f0f4fa;
  --fcb-royal-blue-subtle: #e8eef8;
  --fcb-yellow: #ffd21a;
  --fcb-yellow-glow: rgba(255, 210, 26, 0.45);
  --fcb-dark: #1e293b;
  --fcb-muted: #64748b;
  --fcb-light-muted: #94a3b8;
  --fcb-border: #e2e8f0;
  --fcb-border-subtle: #edf2f7;
  --fcb-bubble-agent: #f1f5f9;
  --fcb-font: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ==========================================
   Root Scope & Universal Reset Inside Widget
   ========================================== */
.fcb,
.fcb *,
.fcb *::before,
.fcb *::after {
  box-sizing: border-box !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

.fcb {
  font-family: var(--fcb-font) !important;
  color: var(--fcb-dark) !important;
  line-height: 1.4 !important;
}

/* Aggressively strip theme button overrides */
.fcb button {
  font-family: var(--fcb-font) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  box-sizing: border-box !important;
  border-style: solid !important;
  cursor: pointer !important;
  background-image: none !important;
  text-shadow: none !important;
}

.fcb input {
  font-family: var(--fcb-font) !important;
  box-sizing: border-box !important;
  letter-spacing: normal !important;
}

/* ==========================================
   Floating Launcher Widget
   ========================================== */
.fcb--floating {
  position: fixed !important;
  z-index: 999999 !important;
  right: 28px !important;
  bottom: 28px !important;
}

.fcb-launcher-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
  user-select: none !important;
}

/* Pill Tooltip: "👋 Chat with us 👋" */
.fcb-launcher-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #ffffff !important;
  color: #1e293b !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  padding: 8px 18px !important;
  border-radius: 9999px !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  white-space: nowrap !important;
  line-height: 1.3 !important;
}

.fcb-launcher-pill:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12) !important;
}

.fcb-launcher-pill span {
  font-size: 14px !important;
}

/* Circular Launcher Button */
.fcb-launcher {
  position: relative !important;
  width: 60px !important;
  height: 60px !important;
  min-width: 60px !important;
  min-height: 60px !important;
  max-width: 60px !important;
  max-height: 60px !important;
  border-radius: 50% !important;
  border: none !important;
  background: var(--fcb-royal-blue) !important;
  color: #ffffff !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: 0 8px 25px rgba(28, 68, 156, 0.38), 0 2px 6px rgba(28, 68, 156, 0.2) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, background 0.2s ease !important;
  outline: none !important;
}

.fcb-launcher:hover {
  transform: scale(1.06) !important;
  background: var(--fcb-royal-blue-hover) !important;
  box-shadow: 0 12px 30px rgba(28, 68, 156, 0.46) !important;
}

.fcb-launcher:active {
  transform: scale(0.96) !important;
}

.fcb-launcher__icon {
  display: grid !important;
  place-items: center !important;
  width: 28px !important;
  height: 28px !important;
  color: #ffffff !important;
}

.fcb-launcher__icon svg {
  width: 26px !important;
  height: 26px !important;
  fill: #ffffff !important;
}

/* Yellow Notification Dot on Launcher */
.fcb-notification {
  position: absolute !important;
  top: 2px !important;
  right: 2px !important;
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
  background: var(--fcb-yellow) !important;
  border: 2.5px solid #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  pointer-events: none !important;
  z-index: 10 !important;
  animation: fcb-pulse-glow 2.4s infinite !important;
}

@keyframes fcb-pulse-glow {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.18);
    box-shadow: 0 0 10px rgba(255, 210, 26, 0.7);
  }
}

/* ==========================================
   Chatbot Panel Container
   ========================================== */
.fcb-panel {
  width: 400px !important;
  max-width: calc(100vw - 32px) !important;
  height: 640px !important;
  max-height: min(650px, calc(100vh - 110px)) !important;
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  border-radius: 26px !important;
  overflow: hidden !important;
  box-shadow: 0 24px 60px -10px rgba(16, 38, 92, 0.32), 0 0 1px 1px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  animation: fcb-panel-slide-up 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.fcb--floating .fcb-panel {
  position: absolute !important;
  right: 0 !important;
  bottom: 76px !important;
  transform-origin: bottom right !important;
}

@keyframes fcb-panel-slide-up {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================
   Header Section (Royal Blue with Accents)
   ========================================== */
.fcb-header {
  position: relative !important;
  background: linear-gradient(140deg, #16367c 0%, #1c449c 55%, #2252ba 100%) !important;
  color: #ffffff !important;
  overflow: hidden !important;
  padding: 12px 18px 18px !important;
  flex-shrink: 0 !important;
  border-top-left-radius: 25px !important;
  border-top-right-radius: 25px !important;
}

/* Background Abstract Accents matching reference */
.fcb-header-bg-accent {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

.fcb-header-bg-accent::before {
  content: '' !important;
  position: absolute !important;
  top: -20px !important;
  right: -20px !important;
  width: 140px !important;
  height: 140px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(16, 38, 92, 0.7) 0%, rgba(16, 38, 92, 0) 70%) !important;
}

.fcb-header-bg-accent::after {
  content: '' !important;
  position: absolute !important;
  bottom: -36px !important;
  right: -24px !important;
  width: 100px !important;
  height: 100px !important;
  border-radius: 50% !important;
  background: var(--fcb-yellow) !important;
  opacity: 0.95 !important;
}

/* Header Top Controls (Minimize & Close) */
.fcb-header-top {
  display: flex !important;
  justify-content: flex-end !important;
  position: relative !important;
  z-index: 3 !important;
  margin-bottom: 2px !important;
}

.fcb-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.fcb-minimise,
.fcb-close {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  border-radius: 6px !important;
  border: none !important;
  background: transparent !important;
  color: #ffffff !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0.88 !important;
  box-shadow: none !important;
  transition: background 0.16s ease, opacity 0.16s ease !important;
}

.fcb-minimise svg,
.fcb-close svg {
  width: 16px !important;
  height: 16px !important;
  stroke: #ffffff !important;
}

.fcb-minimise:hover,
.fcb-close:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  opacity: 1 !important;
}

/* Header Hero (Mascot + Greeting) */
.fcb-header-hero {
  position: relative !important;
  z-index: 3 !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 2px 2px 4px !important;
}

.fcb-mascot {
  width: 70px !important;
  height: 70px !important;
  min-width: 70px !important;
  flex: 0 0 70px !important;
  display: grid !important;
  place-items: center !important;
}

.fcb-mascot-svg {
  width: 100% !important;
  height: 100% !important;
}

.fcb-mascot-wave {
  transform-origin: 24px 62px !important;
  animation: fcb-hand-wave 2.4s infinite ease-in-out !important;
}

@keyframes fcb-hand-wave {

  0%,
  100% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-14deg);
  }

  75% {
    transform: rotate(10deg);
  }
}

.fcb-header-text {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  text-align: left !important;
}

/* Bright, Crisp White Greeting */
.fcb-header-title {
  margin: 0 0 3px 0 !important;
  padding: 0 !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: #ffffff !important;
  line-height: 1.25 !important;
  text-shadow: 0 1px 3px rgba(10, 25, 65, 0.25) !important;
}

.fcb-header-subtitle {
  margin: 0 0 3px 0 !important;
  padding: 0 !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  line-height: 1.3 !important;
  opacity: 0.98 !important;
}

.fcb-header-desc {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 11.5px !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.84) !important;
  line-height: 1.35 !important;
}

/* ==========================================
   Chatbot Body & Scrollable Area
   ========================================== */
.fcb-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 16px 18px 10px !important;
  background: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Subtle, Polished Scrollbar */
.fcb-body::-webkit-scrollbar {
  width: 5px !important;
}

.fcb-body::-webkit-scrollbar-track {
  background: transparent !important;
}

.fcb-body::-webkit-scrollbar-thumb {
  background: #e2e8f0 !important;
  border-radius: 10px !important;
}

.fcb-body::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1 !important;
}

/* ==========================================
   2-Column Service Buttons Grid
   (Clean white card, royal-blue icon & text)
   ========================================== */
.fcb-services-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  margin-bottom: 16px !important;
  width: 100% !important;
}

.fcb-service-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 13px !important;
  padding: 0 10px !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  width: 100% !important;
  margin: 0 !important;
  cursor: pointer !important;
  text-align: left !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease !important;
  outline: none !important;
}

.fcb-service-card:hover {
  border-color: var(--fcb-royal-blue) !important;
  background: #f8faff !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 4px 14px rgba(28, 68, 156, 0.1) !important;
}

.fcb-service-card:active {
  transform: translateY(0) !important;
}

/* Consistent Circular Icon Container */
.fcb-service-icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  border-radius: 50% !important;
  background: var(--fcb-royal-blue-light) !important;
  color: var(--fcb-royal-blue) !important;
  display: grid !important;
  place-items: center !important;
  margin-right: 8px !important;
  flex-shrink: 0 !important;
}

.fcb-service-icon svg {
  width: 17px !important;
  height: 17px !important;
  stroke: var(--fcb-royal-blue) !important;
}

.fcb-service-card:hover .fcb-service-icon {
  background: var(--fcb-royal-blue) !important;
  color: #ffffff !important;
}

.fcb-service-card:hover .fcb-service-icon svg {
  stroke: #ffffff !important;
}

/* Service Label */
.fcb-service-text {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Right Chevron Arrow */
.fcb-service-arrow {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  display: grid !important;
  place-items: center !important;
  color: #94a3b8 !important;
  flex-shrink: 0 !important;
  margin-left: 4px !important;
}

.fcb-service-arrow svg {
  width: 13px !important;
  height: 13px !important;
  stroke: currentColor !important;
}

.fcb-service-card:hover .fcb-service-arrow {
  color: var(--fcb-royal-blue) !important;
}

/* ==========================================
   Conversation Messages & Avatars
   ========================================== */
.fcb-conversation {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
  width: 100% !important;
}

.fcb-message-row {
  display: flex !important;
  align-items: flex-end !important;
  gap: 8px !important;
  width: 100% !important;
}

.fcb-message-row--agent {
  justify-content: flex-start !important;
}

.fcb-message-row--visitor {
  justify-content: flex-end !important;
}

/* Avatar Containers */
.fcb-msg-avatar {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
}

.fcb-msg-avatar svg {
  width: 100% !important;
  height: 100% !important;
}

.fcb-msg-avatar--visitor {
  background: var(--fcb-yellow) !important;
  color: var(--fcb-royal-blue) !important;
}

.fcb-msg-avatar--visitor svg {
  width: 18px !important;
  height: 18px !important;
  fill: var(--fcb-royal-blue) !important;
}

/* Bubbles */
.fcb-bubble {
  max-width: 78% !important;
  font-size: 12.5px !important;
  line-height: 1.48 !important;
  word-break: break-word !important;
}

.fcb-bubble--agent {
  background: var(--fcb-bubble-agent) !important;
  color: #1e293b !important;
  border-radius: 16px 16px 16px 4px !important;
  padding: 10px 14px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.fcb-bubble--visitor {
  background: var(--fcb-royal-blue) !important;
  color: #ffffff !important;
  border-radius: 16px 16px 4px 16px !important;
  padding: 10px 14px !important;
  box-shadow: 0 2px 8px rgba(28, 68, 156, 0.28) !important;
}

/* ==========================================
   Quick-Reply Suggestion Chips
   ========================================== */
.fcb-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  padding: 2px 0 12px 40px !important;
  width: 100% !important;
}

.fcb-chip {
  background: #ffffff !important;
  border: 1.5px solid var(--fcb-royal-blue) !important;
  color: var(--fcb-royal-blue) !important;
  border-radius: 9999px !important;
  height: 34px !important;
  min-height: 34px !important;
  line-height: 32px !important;
  padding: 0 16px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  margin: 0 !important;
  cursor: pointer !important;
  text-transform: none !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.16s ease !important;
  white-space: nowrap !important;
  outline: none !important;
}

.fcb-chip:hover {
  background: var(--fcb-royal-blue) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(28, 68, 156, 0.2) !important;
}

.fcb-chip:active {
  transform: translateY(0) !important;
}

/* ==========================================
   Fast Contact Bar (WhatsApp & Direct Call)
   ========================================== */
.fcb-fast-contact {
  margin: 4px 0 12px 40px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  animation: fcb-panel-slide-up 0.22s ease forwards !important;
}

.fcb-fast-contact--dynamic {
  margin-top: 6px !important;
}

.fcb-fast-label {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  letter-spacing: 0.01em !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.fcb-fast-buttons {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.fcb-fast-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 14px !important;
  height: 32px !important;
  min-height: 32px !important;
  border-radius: 9999px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  line-height: 1 !important;
  border: 1px solid transparent !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
}

.fcb-fast-btn svg {
  display: block !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

/* WhatsApp Brand Button */
.fcb-fast-btn--wa {
  background: #25D366 !important;
  color: #ffffff !important;
  border-color: #20ba5a !important;
}

.fcb-fast-btn--wa svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  transform: translateY(0.5px) !important;
}

.fcb-fast-btn--wa:hover {
  background: #20ba5a !important;
  color: #ffffff !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.38) !important;
}

/* Direct Phone Call Button */
.fcb-fast-btn--call {
  background: #ffffff !important;
  color: var(--fcb-royal-blue) !important;
  border: 1.5px solid #dbe2ea !important;
}

.fcb-fast-btn--call svg {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
}

.fcb-fast-btn--call:hover {
  background: var(--fcb-royal-blue-light) !important;
  border-color: var(--fcb-royal-blue) !important;
  color: var(--fcb-royal-blue) !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 4px 12px rgba(28, 68, 156, 0.18) !important;
}

.fcb-fast-btn:active {
  transform: translateY(0) scale(0.98) !important;
}

/* ==========================================
   Inline Lead Capture Card
   ========================================== */
.fcb-lead-card {
  background: #ffffff !important;
  border: 1.5px solid #dbe2ea !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  margin: 4px 0 10px 40px !important;
  box-shadow: 0 4px 18px rgba(28, 68, 156, 0.08) !important;
  animation: fcb-panel-slide-up 0.22s ease forwards !important;
  max-width: 320px !important;
}

.fcb-lead-top {
  margin-bottom: 10px !important;
}

.fcb-lead-badge {
  display: inline-block !important;
  background: var(--fcb-royal-blue-light) !important;
  color: var(--fcb-royal-blue) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  border-radius: 9999px !important;
  letter-spacing: 0.03em !important;
  margin-bottom: 4px !important;
  text-transform: uppercase !important;
}

.fcb-lead-title {
  display: block !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  line-height: 1.3 !important;
}

.fcb-lead-subtitle {
  font-size: 11px !important;
  color: var(--fcb-muted) !important;
  margin: 3px 0 0 !important;
  line-height: 1.35 !important;
}

.fcb-lead-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin: 0 !important;
}

.fcb-lead-row {
  display: flex !important;
  align-items: center !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 2px 10px !important;
  transition: border-color 0.16s ease, background 0.16s ease !important;
}

.fcb-lead-row:focus-within {
  border-color: var(--fcb-royal-blue) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(28, 68, 156, 0.1) !important;
}

.fcb-lead-icon {
  font-size: 13px !important;
  margin-right: 8px !important;
  opacity: 0.75 !important;
}

.fcb-lead-row input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
  color: #1e293b !important;
  height: 34px !important;
  line-height: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
}

.fcb-lead-row input::placeholder {
  color: var(--fcb-light-muted) !important;
  font-size: 11.5px !important;
}

.fcb-lead-submit {
  background: var(--fcb-royal-blue) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  height: 36px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  margin-top: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-shadow: 0 2px 6px rgba(28, 68, 156, 0.28) !important;
  transition: background 0.16s ease, transform 0.16s ease !important;
}

.fcb-lead-submit:hover {
  background: var(--fcb-royal-blue-hover) !important;
  transform: translateY(-1px) !important;
}

.fcb-lead-submit:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
}

/* Success Confirmation State */
.fcb-lead-success {
  text-align: center !important;
  padding: 8px 4px !important;
}

.fcb-lead-check {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  color: #ffffff !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 auto 8px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

.fcb-lead-success strong {
  display: block !important;
  font-size: 13.5px !important;
  color: #1e293b !important;
  margin-bottom: 4px !important;
}

.fcb-lead-success p {
  font-size: 11.5px !important;
  color: #64748b !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

/* ==========================================
   Footer & Capsule Input Area
   ========================================== */
.fcb-footer {
  padding: 10px 18px 12px !important;
  background: #ffffff !important;
  border-top: 1px solid #f1f5f9 !important;
  flex-shrink: 0 !important;
  width: 100% !important;
}

.fcb-form {
  margin: 0 !important;
  padding: 0 !important;
}

/* Clean White Capsule with Subtle Border */
.fcb-input-capsule {
  display: flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border: 1.5px solid #dbe2ea !important;
  border-radius: 28px !important;
  padding: 3px 5px 3px 16px !important;
  width: 100% !important;
  height: 46px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.fcb-input-capsule:focus-within {
  border-color: var(--fcb-royal-blue) !important;
  box-shadow: 0 0 0 3px rgba(28, 68, 156, 0.12) !important;
}

/* Reset any theme input borders, backgrounds, or heights */
.fcb-input-capsule input[name="message"] {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px !important;
  color: #1e293b !important;
  padding: 0 !important;
  margin: 0 !important;
  height: 100% !important;
  line-height: 40px !important;
}

.fcb-input-capsule input[name="message"]::placeholder {
  color: var(--fcb-light-muted) !important;
  opacity: 1 !important;
}

/* Capsule Action Buttons Container */
.fcb-capsule-btns {
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  flex-shrink: 0 !important;
}

/* Attachment Button */
.fcb-attach {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  border-radius: 50% !important;
  border: none !important;
  background: transparent !important;
  color: var(--fcb-muted) !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
  transition: color 0.15s ease, background 0.15s ease !important;
}

.fcb-attach svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
}

.fcb-attach:hover {
  color: var(--fcb-royal-blue) !important;
  background: var(--fcb-royal-blue-light) !important;
}

/* Microphone Button */
.fcb-mic {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  border-radius: 50% !important;
  border: none !important;
  background: transparent !important;
  color: var(--fcb-muted) !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 2px 0 0 !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease !important;
}

.fcb-mic svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
}

.fcb-mic:hover {
  color: var(--fcb-royal-blue) !important;
  background: var(--fcb-royal-blue-light) !important;
  transform: scale(1.05) !important;
}

.fcb-mic:active {
  transform: scale(0.95) !important;
}

/* Send Button */
.fcb-send {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  border-radius: 50% !important;
  border: none !important;
  background: var(--fcb-royal-blue) !important;
  color: #ffffff !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 6px rgba(28, 68, 156, 0.3) !important;
  transition: background 0.16s ease, transform 0.16s ease !important;
}

.fcb-send svg {
  width: 16px !important;
  height: 16px !important;
  margin-left: 1px !important;
  fill: #ffffff !important;
}

.fcb-send:hover {
  background: var(--fcb-royal-blue-hover) !important;
  transform: scale(1.05) !important;
}

.fcb-send:active {
  transform: scale(0.95) !important;
}

/* ==========================================
   Voice Note Live Recording Bar (Hidden by default)
   ========================================== */
.fcb-voice-bar {
  display: none !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  height: 100% !important;
  gap: 8px !important;
}

/* Shown strictly when actively recording */
.fcb-input-capsule.is-recording .fcb-voice-bar,
.fcb-voice-bar.is-active {
  display: flex !important;
}

/* Hide standard text input & buttons when recording */
.fcb-input-capsule.is-recording input[name="message"],
.fcb-input-capsule.is-recording .fcb-capsule-btns {
  display: none !important;
}

.fcb-voice-live {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

/* Blinking Red Recording Indicator */
.fcb-voice-pulse {
  width: 10px !important;
  height: 10px !important;
  min-width: 10px !important;
  border-radius: 50% !important;
  background: #ef4444 !important;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7) !important;
  animation: fcb-rec-pulse 1.2s infinite cubic-bezier(0.66, 0, 0, 1) !important;
}

@keyframes fcb-rec-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 7px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.fcb-voice-timer {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #ef4444 !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: 0.02em !important;
}

/* Animated Sound Waveform Bars */
.fcb-voice-waves {
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  height: 16px !important;
}

.fcb-voice-waves span {
  display: inline-block !important;
  width: 3px !important;
  height: 6px !important;
  background: #ef4444 !important;
  border-radius: 2px !important;
  animation: fcb-wave-bounce 0.8s ease-in-out infinite alternate !important;
}

.fcb-voice-waves span:nth-child(2) { animation-delay: 0.15s !important; }
.fcb-voice-waves span:nth-child(3) { animation-delay: 0.3s !important; }
.fcb-voice-waves span:nth-child(4) { animation-delay: 0.45s !important; }
.fcb-voice-waves span:nth-child(5) { animation-delay: 0.6s !important; }

@keyframes fcb-wave-bounce {
  0% {
    height: 4px;
    opacity: 0.5;
  }
  100% {
    height: 16px;
    opacity: 1;
  }
}

.fcb-voice-controls {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}

/* Cancel / Discard Recording Button */
.fcb-voice-cancel {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 50% !important;
  border: none !important;
  background: #f1f5f9 !important;
  color: #64748b !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  transition: all 0.16s ease !important;
}

.fcb-voice-cancel svg {
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
}

.fcb-voice-cancel:hover {
  background: #fee2e2 !important;
  color: #ef4444 !important;
}

/* Send Voice Note Button */
.fcb-voice-send {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border-radius: 50% !important;
  border: none !important;
  background: var(--fcb-royal-blue) !important;
  color: #ffffff !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  box-shadow: 0 2px 6px rgba(28, 68, 156, 0.3) !important;
  transition: background 0.16s ease, transform 0.16s ease !important;
}

.fcb-voice-send svg {
  width: 16px !important;
  height: 16px !important;
  margin-left: 1px !important;
  fill: #ffffff !important;
}

.fcb-voice-send:hover {
  background: var(--fcb-royal-blue-hover) !important;
  transform: scale(1.05) !important;
}

/* ==========================================
   In-Chat Voice Message Player
   ========================================== */
.fcb-bubble--voice {
  padding: 8px 12px 10px !important;
  min-width: 200px !important;
  max-width: 82% !important;
}

.fcb-voice-msg-player {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
}

.fcb-voice-play-toggle {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  border-radius: 50% !important;
  border: none !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  transition: transform 0.15s ease, background 0.15s ease !important;
}

.fcb-bubble--visitor .fcb-voice-play-toggle {
  background: #ffffff !important;
  color: var(--fcb-royal-blue) !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15) !important;
}

.fcb-bubble--agent .fcb-voice-play-toggle {
  background: var(--fcb-royal-blue) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 5px rgba(28, 68, 156, 0.25) !important;
}

.fcb-voice-play-toggle:hover {
  transform: scale(1.08) !important;
}

.fcb-voice-play-toggle svg {
  width: 16px !important;
  height: 16px !important;
}

.fcb-voice-play-toggle .fcb-icon-play {
  margin-left: 2px !important;
}

.fcb-voice-track-wrap {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.fcb-voice-progress-wrap {
  position: relative !important;
  height: 6px !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  overflow: hidden !important;
}

.fcb-bubble--visitor .fcb-voice-progress-wrap {
  background: rgba(255, 255, 255, 0.35) !important;
}

.fcb-bubble--agent .fcb-voice-progress-wrap {
  background: rgba(0, 0, 0, 0.12) !important;
}

.fcb-voice-progress-fill {
  height: 100% !important;
  width: 0%;
  border-radius: 3px !important;
  transition: width 0.1s linear !important;
}

.fcb-bubble--visitor .fcb-voice-progress-fill {
  background: #ffffff !important;
}

.fcb-bubble--agent .fcb-voice-progress-fill {
  background: var(--fcb-royal-blue) !important;
}

.fcb-voice-msg-meta {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 10.5px !important;
  line-height: 1 !important;
}

.fcb-bubble--visitor .fcb-voice-msg-meta {
  color: rgba(255, 255, 255, 0.88) !important;
}

.fcb-bubble--agent .fcb-voice-msg-meta {
  color: var(--fcb-muted) !important;
}

.fcb-voice-msg-time {
  font-variant-numeric: tabular-nums !important;
  font-weight: 600 !important;
}

.fcb-voice-msg-tag {
  font-size: 9.5px !important;
  letter-spacing: 0.03em !important;
  opacity: 0.8 !important;
}

/* Form disabled states */
.fcb-form button:disabled,
.fcb-form input:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

/* Footer Attribution / Caption */
.fcb-privacy {
  margin: 8px 0 0 0 !important;
  padding: 0 !important;
  text-align: center !important;
  font-size: 11px !important;
  color: var(--fcb-light-muted) !important;
  letter-spacing: 0.02em !important;
  font-weight: 400 !important;
  line-height: 1 !important;
}

/* ==========================================
   Embedded Widget Mode
   ========================================== */
.fcb--embedded {
  max-width: 400px !important;
  margin: 0 auto !important;
}

.fcb--embedded .fcb-panel {
  width: 100% !important;
}

.fcb [hidden] {
  display: none !important;
}

/* ==========================================
   Responsive Optimizations
   ========================================== */
@media (max-width: 480px) {
  .fcb--floating {
    right: 14px !important;
    bottom: 14px !important;
  }

  .fcb-launcher-pill {
    display: none !important;
  }

  .fcb-launcher {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
  }

  .fcb-panel {
    width: calc(100vw - 28px) !important;
    height: calc(100vh - 90px) !important;
    max-height: calc(100vh - 90px) !important;
    border-radius: 20px !important;
  }

  .fcb--floating .fcb-panel {
    bottom: 68px !important;
  }

  .fcb-header-hero {
    gap: 10px !important;
  }

  .fcb-mascot {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    flex: 0 0 58px !important;
  }

  .fcb-header-title {
    font-size: 19px !important;
  }

  .fcb-header-subtitle {
    font-size: 13.5px !important;
  }

  .fcb-services-grid {
    gap: 6px !important;
  }

  .fcb-service-card {
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 8px !important;
  }

  .fcb-service-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    margin-right: 6px !important;
  }

  .fcb-service-text {
    font-size: 10.5px !important;
  }

  .fcb-chips {
    padding-left: 0 !important;
  }

  .fcb-input-capsule {
    padding: 2px 4px 2px 12px !important;
  }

  .fcb-voice-waves {
    display: none !important;
  }
}