/* BFF Sam webchat v3 CSS (Oct 19 2026, Dany 22:11 MT: launcher concept B; v2 colours, no teal). Brand colours from bffmedical.com Elementor kit post-4.css:
   --e-global-color-bffgold #C5963A, --e-global-color-bffblk1 #1A1A1A, --e-global-color-bffgld2 #8B6914 (focus on white).
   short_name BFF until Nov 1; never display_name; never mention AI */
#bff-webchat-root { all: initial; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
#bff-webchat-root * { box-sizing: border-box; }
#bff-webchat-launcher {
  /* v3: neutralise theme button rules (Hello Elementor: padding 8px 16px, border, radius, transition all .3s) */
  all: unset; box-sizing: border-box; -webkit-tap-highlight-color: transparent;
  position: fixed; z-index: 2147483000; right: 24px; bottom: 24px;
  width: 64px; height: 76px; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  cursor: pointer; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  transition: transform .15s ease;
}
#bff-webchat-launcher .bffw-badge {
  box-sizing: border-box; width: 64px; height: 64px; border-radius: 50%; flex: none;
  background: #1a1a1a; border: 2px solid #c5963a; box-shadow: 0 4px 14px rgba(0,0,0,.28);
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow .15s ease, border-color .15s ease;
}
#bff-webchat-launcher .bffw-badge svg { width: 48px; height: 42px; display: block; margin-top: -2px; }
#bff-webchat-launcher .bffw-label {
  box-sizing: border-box; position: relative; margin-top: -14px; flex: none;
  min-width: 46px; height: 20px; padding: 0 10px; border-radius: 10px;
  background: #c5963a; color: #1a1a1a; border: 1.5px solid #1a1a1a;
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em; line-height: 17px; text-align: center;
  transition: background-color .15s ease, color .15s ease;
}
#bff-webchat-launcher:hover { transform: translateY(-2px); }
#bff-webchat-launcher:hover .bffw-badge { box-shadow: 0 8px 22px rgba(0,0,0,.35), 0 0 0 3px rgba(197,150,58,.25); }
#bff-webchat-launcher:hover .bffw-label { background: #1a1a1a; color: #c5963a; border-color: #c5963a; }
#bff-webchat-launcher:active { transform: translateY(0) scale(.97); }
#bff-webchat-launcher:focus { outline: none; }
#bff-webchat-launcher:focus-visible .bffw-badge { outline: 2px solid #c5963a; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  #bff-webchat-launcher, #bff-webchat-launcher * { transition: none; }
  #bff-webchat-launcher:hover, #bff-webchat-launcher:active { transform: none; }
}
#bff-webchat-panel {
  position: fixed; z-index: 2147483001; right: 24px; bottom: 112px;
  width: min(360px, calc(100vw - 24px)); height: min(520px, calc(100vh - 140px));
  background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.28);
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #e5e7eb;
}
#bff-webchat-panel[hidden] { display: none !important; }
#bff-webchat-header {
  background: #1a1a1a; color: #c5963a; padding: 14px 16px; display: flex;
  border-bottom: 2px solid #c5963a;
  align-items: center; justify-content: space-between; gap: 8px;
}
#bff-webchat-header strong { font-size: 15px; font-weight: 600; }
#bff-webchat-header span { font-size: 12px; display: block; margin-top: 2px; }
#bff-webchat-close {
  background: transparent; border: 0; color: #c5963a; font-size: 22px; line-height: 1;
  cursor: pointer; padding: 4px 8px; margin: 0; border-radius: 6px; transition: none; box-shadow: none; text-transform: none;
}
#bff-webchat-log {
  flex: 1; overflow-y: auto; padding: 14px; background: #f7f8fa;
  display: flex; flex-direction: column; gap: 10px;
}
.bff-bubble {
  max-width: 88%; padding: 10px 12px; border-radius: 14px; font-size: 14px;
  line-height: 1.4; white-space: pre-wrap; word-break: break-word; color: #111;
}
.bff-bubble.sam { align-self: flex-start; background: #fff; border: 1px solid #e5e7eb; }
.bff-bubble.you { align-self: flex-end; background: #c5963a; color: #1a1a1a; border: 0; }
#bff-webchat-form {
  display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e5e7eb; background: #fff;
}
#bff-webchat-input {
  flex: 1; border: 1px solid #d1d5db; border-radius: 10px; padding: 10px 12px;
  font-size: 14px; resize: none; min-height: 42px; max-height: 96px; font-family: inherit;
}
#bff-webchat-send {
  background: #1a1a1a; color: #c5963a; border: 1px solid #c5963a; border-radius: 10px;
  padding: 0 14px; margin: 0; font-weight: 600; cursor: pointer; font-size: 14px; transition: none; box-shadow: none; text-transform: none; line-height: 1;
}
#bff-webchat-send:disabled { opacity: .5; cursor: default; }
#bff-webchat-input:focus { outline: 2px solid #8b6914; outline-offset: 1px; border-color: #8b6914; }
#bff-webchat-send:focus-visible, #bff-webchat-close:focus-visible { outline: 2px solid #c5963a; outline-offset: 2px; }
#bff-webchat-footer {
  font-size: 11px; color: #6b7280; text-align: center; padding: 0 12px 10px; background: #fff;
}
#bff-webchat-status { font-size: 12px; color: #6b7280; padding: 0 14px 8px; background: #f7f8fa; min-height: 18px; }
/* v3 mobile: launcher + panel clear the iPhone home indicator */
@media (max-width: 480px) {
  #bff-webchat-launcher {
    right: max(16px, calc(env(safe-area-inset-right) + 12px));
    bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
    width: 56px; height: 68px;
  }
  #bff-webchat-launcher .bffw-badge { width: 56px; height: 56px; }
  #bff-webchat-launcher .bffw-badge svg { width: 42px; height: 36px; }
  #bff-webchat-launcher .bffw-label { font-size: 10.5px; height: 18px; line-height: 15px; min-width: 42px; margin-top: -12px; }
  #bff-webchat-panel {
    right: 12px; left: 12px; width: auto;
    bottom: calc(max(16px, calc(env(safe-area-inset-bottom) + 12px)) + 80px);
    height: min(520px, calc(100vh - 120px));
  }
}
