.bfc-chatbot {
  --bfc-primary: #0E2A3B;
  --bfc-primary-dark: #071923;
  --bfc-accent: #FF6748;
  --bfc-accent-dark: #eb5235;
  --bfc-bg: #F6F8FA;
  --bfc-card: #FFFFFF;
  --bfc-border: rgba(14, 42, 59, .12);
  --bfc-text: #132735;
  --bfc-muted: #6B7B86;
  --bfc-shadow: 0 22px 60px rgba(7, 25, 35, .24);
  font-family: Inter, Arial, Helvetica, sans-serif !important;
  color: var(--bfc-text) !important;
}
.bfc-chatbot,
.bfc-chatbot * { box-sizing: border-box !important; }

.bfc-floating {
  position: fixed !important;
  left: 22px !important;
  right: auto !important;
  bottom: 22px !important;
  z-index: 999999 !important;
  direction: ltr !important;
}
.bfc-floating.bfc-left {
  left: 22px !important;
  right: auto !important;
}
.bfc-floating.bfc-right {
  left: 22px !important;
  right: auto !important;
}

.bfc-chat-toggle {
  border: 0 !important;
  min-height: 58px !important;
  background: var(--bfc-primary) !important;
  color: #fff !important;
  padding: 10px 20px 10px 10px !important;
  border-radius: 18px !important;
  cursor: pointer !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: .01em !important;
  box-shadow: 0 16px 36px rgba(7, 25, 35, .32) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease !important;
}
.bfc-chat-toggle:hover,
.bfc-chat-toggle:focus {
  background: var(--bfc-primary-dark) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 20px 46px rgba(7, 25, 35, .40) !important;
  outline: none !important;
}
.bfc-chat-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 14px !important;
  background: var(--bfc-accent) !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  line-height: 1 !important;
  box-shadow: 0 10px 22px rgba(255, 103, 72, .36) !important;
}

.bfc-chat-panel {
  width: 372px !important;
  max-width: calc(100vw - 32px) !important;
  background: var(--bfc-card) !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  margin-bottom: 14px !important;
  box-shadow: var(--bfc-shadow) !important;
  border: 1px solid var(--bfc-border) !important;
}
.bfc-inline .bfc-chat-panel {
  width: 100% !important;
  max-width: 600px !important;
  margin: 0 auto !important;
  box-shadow: 0 14px 38px rgba(7, 25, 35, .12) !important;
}

.bfc-chat-header {
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, var(--bfc-primary) 0%, #12394D 72%, #174960 100%) !important;
  color: #fff !important;
  padding: 18px !important;
  min-height: 92px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}
.bfc-chat-header:before {
  content: '' !important;
  position: absolute !important;
  width: 148px !important;
  height: 148px !important;
  right: -72px !important;
  top: -72px !important;
  border-radius: 999px !important;
  background: rgba(255, 103, 72, .28) !important;
}
.bfc-chat-header:after {
  content: '' !important;
  position: absolute !important;
  width: 78px !important;
  height: 78px !important;
  left: -36px !important;
  bottom: -38px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .08) !important;
}
.bfc-chat-brand {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
}
.bfc-bot-avatar {
  flex: 0 0 auto !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 15px !important;
  background: var(--bfc-accent) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 19px !important;
  line-height: 1 !important;
  box-shadow: 0 10px 24px rgba(255, 103, 72, .34) !important;
}
.bfc-chat-header strong {
  display: block !important;
  font-size: 19px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  letter-spacing: -.02em !important;
  color: #fff !important;
  margin: 0 !important;
}
.bfc-chat-header small {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  opacity: .95 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  margin-top: 6px !important;
  color: rgba(255,255,255,.92) !important;
  max-width: 220px !important;
}
.bfc-status-dot {
  flex: 0 0 auto !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: #4ADE80 !important;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, .16) !important;
}
.bfc-chat-close {
  position: relative !important;
  z-index: 2 !important;
  flex: 0 0 auto !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 12px !important;
  background: var(--bfc-accent) !important;
  border: 0 !important;
  color: #fff !important;
  font-size: 23px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background .2s ease, transform .2s ease !important;
}
.bfc-chat-close:hover,
.bfc-chat-close:focus {
  background: var(--bfc-accent-dark) !important;
  transform: rotate(90deg) !important;
  outline: none !important;
}

.bfc-chat-body {
  padding: 16px !important;
  max-height: min(650px, calc(100vh - 165px)) !important;
  overflow-y: auto !important;
  background: linear-gradient(180deg, #fff 0%, var(--bfc-bg) 100%) !important;
}
.bfc-chat-body::-webkit-scrollbar { width: 6px !important; }
.bfc-chat-body::-webkit-scrollbar-track { background: transparent !important; }
.bfc-chat-body::-webkit-scrollbar-thumb {
  background: rgba(14, 42, 59, .22) !important;
  border-radius: 999px !important;
}

.bfc-message {
  padding: 12px 14px !important;
  border-radius: 16px !important;
  margin: 0 0 12px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}
.bfc-message-bot {
  background: #fff !important;
  color: var(--bfc-text) !important;
  border: 1px solid var(--bfc-border) !important;
  box-shadow: 0 8px 22px rgba(14, 42, 59, .06) !important;
}
.bfc-message-user {
  background: var(--bfc-primary) !important;
  color: #fff !important;
  margin-left: 48px !important;
  border-bottom-right-radius: 6px !important;
}
.bfc-small {
  font-size: 13px !important;
  color: var(--bfc-muted) !important;
}
.bfc-section-title {
  margin: 16px 0 10px !important;
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  color: var(--bfc-primary) !important;
  line-height: 1.2 !important;
  letter-spacing: -.01em !important;
}
.bfc-section-title:before {
  content: '' !important;
  flex: 0 0 auto !important;
  width: 9px !important;
  height: 9px !important;
  border-radius: 50% !important;
  background: var(--bfc-accent) !important;
  box-shadow: 0 0 0 5px rgba(255, 103, 72, .12) !important;
}

.bfc-lead-form,
.bfc-question-form { margin-top: 8px !important; }
.bfc-lead-form label,
.bfc-question-form label {
  display: block !important;
  font-size: 11.5px !important;
  font-weight: 900 !important;
  color: var(--bfc-primary) !important;
  margin: 11px 0 6px !important;
  text-transform: uppercase !important;
  letter-spacing: .055em !important;
}
.bfc-lead-form input,
.bfc-question-form input {
  width: 100% !important;
  min-height: 43px !important;
  border: 1px solid rgba(14, 42, 59, .15) !important;
  border-radius: 13px !important;
  padding: 11px 13px !important;
  font-size: 14px !important;
  outline: none !important;
  background: #fff !important;
  color: var(--bfc-text) !important;
  box-shadow: 0 6px 16px rgba(14, 42, 59, .045) !important;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease !important;
}
.bfc-lead-form input::placeholder,
.bfc-question-form input::placeholder { color: #94A3AD !important; }
.bfc-lead-form input:focus,
.bfc-question-form input:focus {
  border-color: var(--bfc-accent) !important;
  box-shadow: 0 0 0 4px rgba(255, 103, 72, .14) !important;
  background: #fff !important;
}
.bfc-inline-field {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 82px !important;
  gap: 9px !important;
  align-items: stretch !important;
}
.bfc-inline-field input { min-width: 0 !important; }
.bfc-inline-field button,
.bfc-submit-btn {
  border: 0 !important;
  border-radius: 13px !important;
  background: var(--bfc-accent) !important;
  color: #fff !important;
  padding: 12px 14px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  min-height: 43px !important;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease !important;
}
.bfc-inline-field button:hover,
.bfc-inline-field button:focus,
.bfc-submit-btn:hover,
.bfc-submit-btn:focus {
  background: var(--bfc-accent-dark) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 10px 22px rgba(255, 103, 72, .24) !important;
  outline: none !important;
}
.bfc-submit-btn {
  width: 100% !important;
  margin-top: 15px !important;
  min-height: 50px !important;
  font-size: 15px !important;
  border-radius: 14px !important;
}
.bfc-submit-btn[disabled] {
  opacity: .7 !important;
  cursor: not-allowed !important;
  transform: none !important;
}
.bfc-form-note {
  margin: 10px 0 0 !important;
  color: var(--bfc-muted) !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  text-align: center !important;
}
.bfc-form-response {
  margin-top: 12px !important;
  font-size: 14px !important;
}
.bfc-success,
.bfc-error {
  padding: 12px 13px !important;
  border-radius: 14px !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
}
.bfc-success {
  background: #EEF9F2 !important;
  border: 1px solid #BDEBC9 !important;
  color: #0E6A2E !important;
}
.bfc-error {
  background: #FFF1EE !important;
  border: 1px solid rgba(255, 103, 72, .34) !important;
  color: #A33523 !important;
}
.bfc-answer-area .bfc-message { margin-top: 10px !important; }

@media (max-width: 480px) {
  .bfc-floating,
  .bfc-floating.bfc-left,
  .bfc-floating.bfc-right {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
  }
  .bfc-chat-panel {
    width: 100% !important;
    border-radius: 20px !important;
    margin-bottom: 12px !important;
  }
  .bfc-chat-header {
    padding: 16px !important;
    min-height: 86px !important;
  }
  .bfc-chat-header small { max-width: 190px !important; }
  .bfc-chat-body {
    padding: 14px !important;
    max-height: calc(100vh - 145px) !important;
  }
  .bfc-chat-toggle {
    width: auto !important;
    max-width: 100% !important;
    justify-content: flex-start !important;
  }
  .bfc-inline-field {
    grid-template-columns: 1fr !important;
  }
  .bfc-inline-field button {
    width: 100% !important;
  }
}

.bfc-chat-panel[hidden] { display: none !important; }
