/* Online support widget (js/chat.*.js) */
.kf-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--teal, #0f766e);
  color: #fff;
  font: 600 15px/1 var(--font, system-ui, sans-serif);
  box-shadow: 0 10px 30px rgba(11, 18, 32, 0.22);
  cursor: pointer;
}

.kf-fab:hover {
  filter: brightness(1.08);
}

.kf-fab .kf-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f97316;
  display: none;
}

.kf-fab.kf-unread .kf-dot {
  display: inline-block;
}

.kf-panel {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 61;
  width: min(380px, calc(100vw - 24px));
  height: min(600px, calc(100vh - 110px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line, #e6eaf0);
  border-radius: var(--radius, 16px);
  background: var(--surface, #fff);
  box-shadow: 0 20px 50px rgba(11, 18, 32, 0.25);
  font-family: var(--font, system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink, #0b1220);
}

.kf-panel.kf-open {
  display: flex;
}

.kf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: var(--navy, #0b1b2b);
  color: #fff;
}

.kf-head strong {
  font-size: 15px;
}

.kf-head small {
  display: block;
  opacity: 0.75;
  font-size: 12px;
}

.kf-x {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}

.kf-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  background: var(--bg, #f7f8fa);
}

.kf-note {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--teal-soft, #ecfdf8);
  color: var(--ink-2, #243044);
  font-size: 13px;
}

.kf-note a {
  color: var(--teal, #0f766e);
}

.kf-note.kf-safety {
  background: #fff7ed;
  color: #9a3412;
  font-weight: 600;
}

.kf-typing {
  margin: 0 0 8px;
  color: var(--muted, #667085);
  font-size: 12px;
  font-style: italic;
}

.kf-msg {
  max-width: 85%;
  margin: 0 0 8px;
  padding: 8px 11px;
  border-radius: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.kf-msg small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted, #667085);
  font-size: 11px;
}

.kf-msg.kf-me {
  margin-left: auto;
  background: var(--teal, #0f766e);
  color: #fff;
}

.kf-msg.kf-me small {
  color: rgba(255, 255, 255, 0.75);
}

.kf-msg.kf-staff {
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e6eaf0);
}

.kf-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line, #e6eaf0);
  background: var(--surface, #fff);
}

.kf-form input,
.kf-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line, #e6eaf0);
  border-radius: 10px;
  font: inherit;
  color: inherit;
  background: #fff;
}

.kf-form textarea {
  min-height: 64px;
  resize: vertical;
}

.kf-row {
  display: flex;
  gap: 6px;
}

.kf-row > * {
  flex: 1;
}

.kf-captcha {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kf-code-img {
  flex: none;
  width: 150px;
  height: 50px;
  border: 1px solid var(--line, #e6eaf0);
  border-radius: 8px;
  background: #f1f5f9;
}

.kf-code-new {
  flex: none;
  padding: 6px 8px;
  border: 1px solid var(--line, #e6eaf0);
  border-radius: 8px;
  background: #fff;
  color: var(--teal, #0f766e);
  font-size: 12px;
  cursor: pointer;
}

.kf-form .kf-code-in {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.kf-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kf-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kf-send {
  padding: 8px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--teal, #0f766e);
  color: #fff;
  font: 600 14px/1.2 var(--font, system-ui, sans-serif);
  cursor: pointer;
}

.kf-send[disabled],
.kf-human[disabled] {
  opacity: 0.6;
  cursor: default;
}

.kf-human {
  padding: 6px 10px;
  border: 1px solid var(--teal, #0f766e);
  border-radius: 999px;
  background: #fff;
  color: var(--teal, #0f766e);
  font: 600 12px/1.2 var(--font, system-ui, sans-serif);
  cursor: pointer;
}

.kf-end {
  border: 0;
  background: transparent;
  color: var(--muted, #667085);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.kf-err {
  min-height: 1em;
  color: #b42318;
  font-size: 12px;
}

.kf-hidden {
  display: none !important;
}

@media (max-width: 520px) {
  .kf-fab {
    right: 12px;
    bottom: 12px;
  }

  .kf-panel {
    right: 12px;
    bottom: 68px;
  }
}
