.ipkefu-root {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 9999;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: #17233d;
}

.ipkefu-toggle {
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  background: #f7fbff;
  color: #075aab;
  box-shadow: 0 12px 30px rgba(0, 92, 174, .22);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform .18s ease, box-shadow .18s ease;
}

.ipkefu-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 92, 174, .34);
}

.ipkefu-toggle-bot {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #0794e8;
  box-shadow: 0 4px 12px rgba(0, 92, 174, .16);
  display: block;
  overflow: hidden;
}

.ipkefu-toggle-bot-face {
  content: "";
  position: absolute;
  left: 8px;
  top: 14px;
  width: 30px;
  height: 17px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 0 rgba(0, 92, 174, .12);
}

.ipkefu-toggle-bot-base {
  position: absolute;
  left: 12px;
  bottom: 7px;
  width: 22px;
  height: 11px;
  border-radius: 4px;
  background: rgba(255,255,255,.95);
  box-shadow: inset 0 -1px 0 rgba(0, 92, 174, .16);
}

.ipkefu-toggle-bot-face::before {
  content: "";
  position: absolute;
  left: 5px;
  top: -7px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 10px 2px 0 #fff;
}

.ipkefu-toggle-bot-face::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #0b73d9;
  box-shadow: 9px 0 0 #0b73d9;
}

.ipkefu-toggle-bot-base::before,
.ipkefu-toggle-bot-base::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  height: 1px;
  background: #0b73d9;
  opacity: .72;
}

.ipkefu-toggle-bot-base::before {
  top: 4px;
}

.ipkefu-toggle-bot-base::after {
  top: 7px;
}

.ipkefu-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: 360px;
  max-width: calc(100vw - 28px);
  height: 520px;
  max-height: calc(100vh - 130px);
  background: #fff;
  border: 1px solid #e5eef8;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(12, 36, 72, .18);
  overflow: hidden;
  display: none;
}

.ipkefu-root.is-open .ipkefu-panel {
  display: flex;
  flex-direction: column;
}

.ipkefu-head {
  padding: 14px 16px;
  background: linear-gradient(135deg, #005cae, #0877d9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ipkefu-title {
  font-size: 15px;
  font-weight: 700;
}

.ipkefu-subtitle {
  margin-top: 3px;
  font-size: 12px;
  opacity: .86;
}

.ipkefu-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.ipkefu-body {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  background: #f6f9fc;
}

.ipkefu-msg {
  margin-bottom: 12px;
  display: flex;
}

.ipkefu-msg-user {
  justify-content: flex-end;
}

.ipkefu-bubble {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-line;
}

.ipkefu-msg-bot .ipkefu-bubble {
  background: #fff;
  border: 1px solid #e8eef5;
  color: #26384f;
}

.ipkefu-msg-user .ipkefu-bubble {
  background: #0067c8;
  color: #fff;
}

.ipkefu-links {
  margin-top: 9px;
  display: grid;
  gap: 7px;
}

.ipkefu-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid #dbeaf8;
  border-radius: 9px;
  background: #f8fbff;
  color: #075aab;
}

.ipkefu-link-main {
  text-decoration: none;
  color: #075aab;
  min-width: 0;
}

.ipkefu-link:hover {
  border-color: #0b73d9;
}

.ipkefu-link-main:hover {
  color: #004f99;
}

.ipkefu-link-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.ipkefu-link-desc {
  display: block;
  margin-top: 3px;
  color: #60758d;
  font-size: 12px;
  line-height: 1.45;
}

.ipkefu-link-url {
  display: block;
  margin-top: 4px;
  color: #8899aa;
  font-size: 11px;
  line-height: 1.35;
  word-break: break-all;
}

.ipkefu-link-copy {
  width: 46px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  border: 1px solid #cfe1f3;
  border-radius: 7px;
  background: #fff;
  color: #075aab;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.ipkefu-link-copy:hover {
  border-color: #0b73d9;
  background: #eef7ff;
}

.ipkefu-feedback {
  display: block;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7b8da3;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}

.ipkefu-feedback:hover {
  color: #075aab;
}

.ipkefu-feedback:disabled {
  color: #9aa8b8;
  cursor: default;
}

.ipkefu-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex: 0 0 36px;
  height: 36px;
  min-height: 36px;
  padding: 6px 14px;
  background: #f6f9fc;
  box-sizing: border-box;
}

.ipkefu-root.is-config-loading .ipkefu-actions {
  visibility: hidden;
}

.ipkefu-quick,
.ipkefu-manual {
  height: 24px;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8e7f5;
  background: #fff;
  color: #075aab;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1;
  box-sizing: border-box;
  cursor: pointer;
}

.ipkefu-manual {
  margin-left: auto;
  background: #fff7ed;
  border-color: #ffd6a8;
  color: #b45309;
}

.ipkefu-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border-top: 1px solid #e8eef5;
}

.ipkefu-input {
  min-width: 0;
  flex: 1;
  height: 38px;
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  padding: 0 11px;
  outline: none;
  font-size: 13px;
}

.ipkefu-input:focus {
  border-color: #0b73d9;
  box-shadow: 0 0 0 3px rgba(11, 115, 217, .12);
}

.ipkefu-submit {
  width: 64px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: #005cae;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ipkefu-submit:disabled {
  opacity: .55;
  cursor: default;
}

@media (max-width: 640px) {
  .ipkefu-root {
    right: 12px;
    bottom: 82px;
  }

  .ipkefu-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 78px;
    width: auto;
    height: min(520px, calc(100vh - 110px));
    max-width: none;
  }

  .ipkefu-toggle {
    width: 58px;
    height: 58px;
  }

  .ipkefu-root.is-open .ipkefu-toggle {
    display: none;
  }

  .ipkefu-toggle-bot {
    width: 45px;
    height: 45px;
  }
}
