
/* BeautyFlow Humanized Chat Layer — Dal Cotone Belém */
.bf-humanized .bf-chatbot-overlay{
  background:rgba(18,18,18,.38);
  backdrop-filter:blur(10px);
}
.bf-humanized .bf-chatbot-sheet{
  max-width:500px;
  background:#efe7dc;
  border-radius:26px 26px 0 0;
  box-shadow:0 -28px 90px rgba(31,31,31,.32);
  border:1px solid rgba(7,94,84,.14);
}
@media (min-width:768px){
  .bf-humanized .bf-chatbot-sheet{border-radius:26px;max-height:88vh;}
}
.bf-humanized .bf-chatbot-header{
  background:linear-gradient(135deg,#075E54 0%,#0E7C6B 56%,#9B1748 130%);
  border-bottom:0;
  color:#fff;
  padding:15px 16px;
}
.bf-humanized .bf-chatbot-head-left{gap:11px;min-width:0;}
.bf-humanized .bf-chatbot-avatar{
  width:46px;height:46px;
  background:#fff url('/images/brand/logo-dal-cotone-belem.png') center/82% auto no-repeat;
  color:transparent;
  border:2px solid rgba(255,255,255,.92);
  box-shadow:0 0 0 2px rgba(37,211,102,.55),0 8px 22px rgba(0,0,0,.18);
  flex:0 0 46px;
  position:relative;
}
.bf-humanized .bf-chatbot-avatar::after{
  content:"";
  width:11px;height:11px;border-radius:50%;background:#25D366;border:2px solid #075E54;
  position:absolute;right:0;bottom:1px;
}
.bf-humanized .bf-chatbot-header h3{
  color:#fff;
  font-family:Montserrat,Arial,sans-serif;
  font-size:14px;
  font-weight:800;
  letter-spacing:.01em;
  line-height:1.1;
  max-width:310px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.bf-humanized .bf-chatbot-header span{
  color:rgba(255,255,255,.82);
  font-size:10px;
  letter-spacing:.08em;
  text-transform:none;
  margin-top:3px;
}
.bf-humanized .bf-chatbot-header i{background:#25D366;box-shadow:0 0 0 4px rgba(37,211,102,.16);}
.bf-humanized .bf-chatbot-close,.bf-humanized .bf-sound-toggle{
  width:34px;height:34px;border-radius:50%;border:0;
  background:rgba(255,255,255,.14);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;
  cursor:pointer;backdrop-filter:blur(6px);
}
.bf-humanized .bf-chatbot-close{font-size:25px;}
.bf-humanized .bf-sound-toggle{font-size:15px;margin-right:6px;}
.bf-humanized .bf-sound-toggle[aria-pressed="false"]{opacity:.55;}
.bf-humanized .bf-chatbot-header-actions{display:flex;align-items:center;gap:4px;}
.bf-humanized .bf-chatbot-body{
  background-color:#efe7dc;
  background-image:
    radial-gradient(circle at 18% 20%,rgba(255,255,255,.34) 0 1px,transparent 1px),
    radial-gradient(circle at 76% 44%,rgba(255,255,255,.26) 0 1px,transparent 1px),
    linear-gradient(135deg,rgba(255,255,255,.32),rgba(255,255,255,0)),
    url("data:image/svg+xml,%3Csvg width='84' height='84' viewBox='0 0 84 84' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%239b8b7c' stroke-opacity='.14' stroke-width='1'%3E%3Cpath d='M14 22c8-9 20-9 28 0M42 62c8-9 20-9 28 0M23 54c7-7 15-7 22 0M9 71c4-5 9-5 13 0M58 18c4-5 9-5 13 0'/%3E%3Ccircle cx='19' cy='39' r='2'/%3E%3Ccircle cx='66' cy='39' r='2'/%3E%3Cpath d='M31 12h8M35 8v8M53 76h8M57 72v8'/%3E%3C/g%3E%3C/svg%3E");
  padding:18px 14px 16px;
  gap:10px;
  scroll-behavior:smooth;
}
.bf-humanized .bf-chatbot-body.bf-awaiting-name > *:not(.bf-name-gate):not(.bf-enhanced-typing){
  display:none!important;
}
.bf-humanized .bf-msg{font-size:13.5px;line-height:1.5;padding:11px 13px;max-width:88%;}
.bf-humanized .bf-msg-bot-bubble{
  background:#fff;color:#1f2d2b;border-radius:8px 16px 16px 16px;
  box-shadow:0 3px 10px rgba(0,0,0,.08);
  position:relative;
}
.bf-humanized .bf-msg-bot-bubble::before{
  content:"";position:absolute;left:-6px;top:0;border-top:9px solid #fff;border-left:7px solid transparent;
}
.bf-humanized .bf-msg-user-bubble{
  background:#DCF8C6;color:#102522;border-radius:16px 8px 16px 16px;
  box-shadow:0 3px 10px rgba(0,0,0,.08);
  position:relative;
}
.bf-humanized .bf-msg-user-bubble::after{
  content:"";position:absolute;right:-6px;top:0;border-top:9px solid #DCF8C6;border-right:7px solid transparent;
}
.bf-humanized .bf-options-wrap{
  background:rgba(255,255,255,.96);
  border:1px solid rgba(7,94,84,.13);
  border-radius:16px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
}
.bf-humanized .bf-question{color:#075E54;font-size:13px;}
.bf-humanized .bf-option{
  border:0;color:#fff;border-radius:14px;padding:12px 14px;
  font-size:12.5px;font-weight:800;line-height:1.25;
  box-shadow:0 8px 18px rgba(0,0,0,.10);
  display:flex;align-items:center;gap:8px;
}
.bf-humanized .bf-option::before{content:"›";font-size:19px;line-height:1;font-weight:900;}
.bf-humanized .bf-option:nth-child(4n+1){background:linear-gradient(135deg,#075E54,#128C7E);}
.bf-humanized .bf-option:nth-child(4n+2){background:linear-gradient(135deg,#9B1748,#C98291);}
.bf-humanized .bf-option:nth-child(4n+3){background:linear-gradient(135deg,#C8A45D,#9B7A34);color:#2f2716;}
.bf-humanized .bf-option:nth-child(4n+4){background:linear-gradient(135deg,#383838,#666);}
.bf-humanized .bf-option:hover{transform:translateY(-1px);filter:brightness(1.04);}
.bf-humanized .bf-treatment-card{
  background:linear-gradient(135deg,#ffffff 0%,#fff7e8 100%);
  border:1px solid rgba(200,164,93,.55);
  border-radius:18px;
}
.bf-humanized .bf-handoff{
  background:#fff;border-color:rgba(37,211,102,.28);border-radius:18px;
}
.bf-humanized .bf-whatsapp-btn{
  background:linear-gradient(135deg,#25D366,#128C7E);
  color:#fff;border-radius:14px;letter-spacing:.08em;
  box-shadow:0 14px 28px rgba(18,140,126,.25);
}
.bf-humanized .bf-whatsapp-btn:hover{background:linear-gradient(135deg,#128C7E,#075E54);color:#fff;}
.bf-humanized .bf-chatbot-footer{background:#f7f7f7;border-top:1px solid rgba(7,94,84,.12);}
.bf-humanized .bf-chatbot-footer p{color:#51706b;text-transform:none;letter-spacing:.02em;font-size:11px;}
.bf-humanized .bf-typing-hint{display:none;}
.bf-name-gate{
  background:rgba(255,255,255,.98);
  border:1px solid rgba(7,94,84,.12);
  border-radius:18px;
  padding:14px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  color:#18312d;
  animation:bfFadeInUp .28s ease-out both;
}
.bf-name-gate .bf-gate-kicker{
  font-size:10px;text-transform:uppercase;letter-spacing:.14em;color:#075E54;font-weight:900;margin-bottom:8px;
}
.bf-name-gate h4{margin:0 0 8px;font-size:15px;color:#075E54;font-weight:900;line-height:1.25;}
.bf-name-gate p{margin:0 0 12px;font-size:13px;line-height:1.45;color:#384b48;}
.bf-name-form{display:flex;gap:8px;align-items:center;}
.bf-name-form input{
  flex:1;border:1px solid rgba(7,94,84,.18);border-radius:14px;padding:12px 12px;font-size:13px;outline:none;background:#fff;color:#1f2d2b;
}
.bf-name-form input:focus{border-color:#128C7E;box-shadow:0 0 0 3px rgba(18,140,126,.12);}
.bf-name-form button,.bf-skip-name{
  border:0;border-radius:14px;padding:12px 13px;font-size:11px;font-weight:900;cursor:pointer;
}
.bf-name-form button{background:#075E54;color:#fff;}
.bf-skip-name{margin-top:8px;width:100%;background:#F8F5F2;color:#075E54;}
.bf-enhanced-typing{
  align-self:flex-start;display:inline-flex;gap:4px;align-items:center;
  background:#fff;border-radius:8px 16px 16px 16px;padding:11px 14px;
  box-shadow:0 3px 10px rgba(0,0,0,.08);max-width:92px;
}
.bf-enhanced-typing span{width:6px;height:6px;border-radius:50%;background:#8a9b98;animation:bfTypingDot 1.05s infinite ease-in-out;}
.bf-enhanced-typing span:nth-child(2){animation-delay:.14s}.bf-enhanced-typing span:nth-child(3){animation-delay:.28s}
.bf-message-hidden{opacity:0!important;transform:translateY(8px)!important;pointer-events:none!important;}
.bf-message-revealed{animation:bfFadeInUp .25s ease-out both;}
.bf-humanized .bf-conversion-pulse{animation:bfSoftPulse 1.8s ease-in-out infinite;}
@keyframes bfTypingDot{0%,80%,100%{transform:translateY(0);opacity:.38}40%{transform:translateY(-4px);opacity:1}}
@keyframes bfFadeInUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes bfSoftPulse{0%,100%{box-shadow:0 14px 28px rgba(18,140,126,.25)}50%{box-shadow:0 18px 36px rgba(37,211,102,.34)}}
@media (prefers-reduced-motion:reduce){
  .bf-humanized *{animation:none!important;transition:none!important;scroll-behavior:auto!important;}
}

/* Flow fix — WhatsApp-like bottom-anchored conversation */
.bf-humanized .bf-chatbot-body{
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  scroll-behavior:smooth;
}
.bf-humanized .bf-chatbot-body::before{
  content:"";
  flex:1 1 auto;
  min-height:0;
}
.bf-humanized .bf-chatbot-body > .bf-msg-row,
.bf-humanized .bf-chatbot-body > .bf-options-wrap,
.bf-humanized .bf-chatbot-body > .bf-treatment-card,
.bf-humanized .bf-chatbot-body > .bf-handoff,
.bf-humanized .bf-chatbot-body > .bf-typing-hint,
.bf-humanized .bf-chatbot-body > .bf-name-gate,
.bf-humanized .bf-chatbot-body > .bf-enhanced-typing{
  flex:0 0 auto;
}
.bf-humanized .bf-chatbot-body.bf-awaiting-name::before{
  flex:1 1 auto;
}
.bf-message-hidden{
  display:none!important;
  opacity:0!important;
  transform:translateY(8px)!important;
  pointer-events:none!important;
}
.bf-enhanced-typing{
  margin-top:2px;
  margin-bottom:2px;
}

/* HumanFlow Fix — real WhatsApp order, human delay and sequential options */
.bf-humanized .bf-chatbot-body{
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  overflow-y:auto!important;
  scroll-behavior:smooth;
}
.bf-humanized .bf-chatbot-body::before{
  content:"";
  flex:1 1 auto;
  min-height:0;
}
.bf-humanized .bf-chatbot-body > .bf-msg-row,
.bf-humanized .bf-chatbot-body > .bf-options-wrap,
.bf-humanized .bf-chatbot-body > .bf-treatment-card,
.bf-humanized .bf-chatbot-body > .bf-handoff,
.bf-humanized .bf-chatbot-body > .bf-name-gate,
.bf-humanized .bf-chatbot-body > .bf-enhanced-typing{
  flex:0 0 auto;
}
.bf-humanized .bf-enhanced-typing{
  max-width:none;
  min-width:92px;
  gap:7px;
  margin:2px 0;
}
.bf-humanized .bf-enhanced-typing .bf-typing-label{
  width:auto!important;
  height:auto!important;
  border-radius:0!important;
  background:transparent!important;
  color:#6a7a77;
  font-size:11px;
  line-height:1;
  animation:none!important;
}
.bf-humanized .bf-enhanced-typing .bf-typing-dots{
  display:inline-flex;
  gap:4px;
  width:auto!important;
  height:auto!important;
  background:transparent!important;
  animation:none!important;
}
.bf-humanized .bf-enhanced-typing .bf-typing-dots i{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#8a9b98;
  display:block;
  animation:bfTypingDot 1.05s infinite ease-in-out;
}
.bf-humanized .bf-enhanced-typing .bf-typing-dots i:nth-child(2){animation-delay:.14s}
.bf-humanized .bf-enhanced-typing .bf-typing-dots i:nth-child(3){animation-delay:.28s}
.bf-humanized .bf-option-hidden{
  opacity:0!important;
  transform:translateY(9px)!important;
  pointer-events:none!important;
}
.bf-humanized .bf-option-revealed{
  opacity:1!important;
  transform:translateY(0)!important;
  animation:bfOptionIn .24s ease-out both;
}
.bf-humanized .bf-direct-sales-option{
  background:linear-gradient(135deg,#25D366,#128C7E)!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.18)!important;
  position:relative;
}
.bf-humanized .bf-direct-sales-option::after{
  content:"WhatsApp";
  margin-left:auto;
  font-size:9px;
  letter-spacing:.08em;
  text-transform:uppercase;
  opacity:.82;
}
.bf-humanized .bf-name-gate{
  margin-top:auto;
}
@keyframes bfOptionIn{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}


/* V1.3 — encaminhamento automático */
.bf-auto-handoff{background:transparent!important;padding:0!important;border:0!important;box-shadow:none!important;}
.bf-auto-handoff-card{background:linear-gradient(135deg,#fff,#f8f5f2);border:1px solid rgba(200,164,93,.45);border-radius:22px;padding:18px;box-shadow:0 18px 48px rgba(155,23,72,.13);color:#333;}
.bf-auto-handoff-kicker{text-transform:uppercase;letter-spacing:.18em;color:#c8a45d;font-size:10px;font-weight:800;margin-bottom:8px;}
.bf-auto-handoff-card strong{display:block;color:#9B1748;font-size:17px;line-height:1.25;margin-bottom:8px;}
.bf-auto-handoff-card p{font-size:13px;line-height:1.45;color:#555;margin:0 0 14px;}
.bf-countdown-wrap{display:flex;align-items:center;gap:12px;background:#fff;border-radius:16px;padding:12px 14px;border:1px solid rgba(155,23,72,.10);}
.bf-countdown-number{width:42px;height:42px;border-radius:999px;background:#9B1748;color:#fff;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:900;box-shadow:0 12px 24px rgba(155,23,72,.20);}
.bf-countdown-wrap small{font-size:11px;color:#777;text-transform:uppercase;letter-spacing:.08em;font-weight:700;}
.bf-auto-cancel{margin-top:12px;border:0;background:transparent;color:#777;text-decoration:underline;text-underline-offset:3px;font-weight:700;font-size:12px;}
