/* ###### BEGIN Chatbot Premium ###### */

/* ###### BEGIN Chatbot Premium Position Refinement ###### */
.kp-chatbot {
  position: fixed;
  right: max(24px, calc((100vw - 1320px) / 2 + 18px));
  top: 52%;
  transform: translateY(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  pointer-events: none;
}
/* ###### END Chatbot Premium Position Refinement ###### */

.kp-chatbot > * {
  pointer-events: auto;
}

/* Defensive cleanup in case old teaser markup is still cached or included somewhere */
.kp-chatbot__teaser,
.kp-chatbot__teaserGlow,
.kp-chatbot__teaserAvatar,
.kp-chatbot__teaserBody,
.kp-chatbot__teaserBadge,
.kp-chatbot__teaserTitle,
.kp-chatbot__teaserText,
.kp-chatbot__teaserAction {
  display: none !important;
}

/* ###### BEGIN Chatbot Premium Robot Trigger ###### */
.kp-chatbot__trigger {
  position: relative;
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(10,20,31,0.98) 0%, rgba(6,13,22,0.96) 100%),
    radial-gradient(circle at 72% 24%, rgba(79,215,255,0.20) 0%, rgba(79,215,255,0.00) 42%);
  box-shadow:
    0 22px 54px rgba(0,0,0,0.36),
    0 0 28px rgba(79,215,255,0.14),
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -10px 22px rgba(0,0,0,0.20);
  backdrop-filter: blur(14px);
  cursor: pointer;
  overflow: visible;
  transition:
    transform .22s cubic-bezier(.22,.88,.22,1),
    border-color .18s ease,
    box-shadow .22s ease,
    opacity .18s ease;
}

.kp-chatbot__trigger:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(79,215,255,0.28);
  box-shadow:
    0 26px 62px rgba(0,0,0,0.40),
    0 0 38px rgba(79,215,255,0.20),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -10px 22px rgba(0,0,0,0.22);
}

.kp-chatbot__trigger:focus-visible,
.kp-chatbot__close:focus-visible,
.kp-chatbot__quickBtn:focus-visible,
.kp-chatbot__send:focus-visible,
.kp-chatbot__input:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 2px rgba(7, 16, 25, 0.9),
    0 0 0 4px rgba(79, 215, 255, 0.30);
}

.kp-chatbot__triggerGlow {
  position: absolute;
  inset: auto -20px -20px auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(79,215,255,0.30) 0%, rgba(79,215,255,0.08) 38%, rgba(79,215,255,0.00) 72%);
  filter: blur(2px);
  pointer-events: none;
}

.kp-chatbot__triggerPulse {
  position: absolute;
  inset: -10px;
  border-radius: 32px;
  border: 1px solid rgba(79,215,255,0.16);
  box-shadow:
    0 0 18px rgba(79,215,255,0.08),
    inset 0 0 14px rgba(79,215,255,0.03);
  animation: kpChatPulse 2.8s ease-in-out infinite;
  pointer-events: none;
}

.kp-chatbot__triggerBadge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: linear-gradient(180deg, #31e7ff 0%, #67f4af 100%);
  box-shadow:
    0 0 0 4px rgba(7,16,25,0.94),
    0 0 16px rgba(49,231,255,0.30);
}

@keyframes kpChatPulse {
  0%,
  100% {
    opacity: 0.62;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes kpChatPanelIn {
  0% {
    opacity: 0;
    transform: translateX(18px) scale(0.975);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
/* ###### END Chatbot Premium Robot Trigger ###### */

.kp-chatbot__triggerAvatar,
.kp-chatbot__botAvatar {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.03) 30%, rgba(255,255,255,0.00) 68%),
    linear-gradient(180deg, rgba(18,39,55,0.96), rgba(8,18,28,0.98));
  border: 1px solid rgba(79,215,255,0.26);
  box-shadow:
    0 0 18px rgba(79,215,255,0.16),
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -8px 14px rgba(0,0,0,0.18);
}

/* ###### BEGIN Chatbot Premium Robot Avatar V2 ###### */

.kp-chatbot__robot {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.kp-chatbot__robot--small {
  transform: scale(0.92);
}

.kp-chatbot__robot--large {
  transform: scale(1);
}

.kp-chatbot__robotAntenna {
  position: absolute;
  top: -6px;
  width: 4px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(160,245,255,0.95), rgba(79,215,255,0.55));
  box-shadow: 0 0 8px rgba(79,215,255,0.22);
}

.kp-chatbot__robotAntenna::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, #7ef0ff 0%, #37dfff 100%);
  box-shadow: 0 0 10px rgba(79,215,255,0.28);
}

.kp-chatbot__robotHead {
  position: relative;
  width: 34px;
  height: 28px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(236,244,250,0.96) 0%, rgba(193,207,220,0.94) 100%);
  border: 1px solid rgba(255,255,255,0.70);
  box-shadow:
    0 3px 10px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.75);
}

.kp-chatbot__robotHead::before {
  content: "";
  position: absolute;
  inset: 4px 5px 8px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18,31,46,0.98), rgba(8,18,29,0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 0 10px rgba(79,215,255,0.08);
}

.kp-chatbot__robotEyes {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 1;
  display: flex;
  gap: 6px;
  transform: translateX(-50%);
}

.kp-chatbot__robotEye {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8af7ff 0%, #33e2ff 100%);
  box-shadow:
    0 0 8px rgba(79,215,255,0.45),
    0 0 12px rgba(79,215,255,0.24);
}

.kp-chatbot__robotMouth {
  position: absolute;
  left: 50%;
  bottom: 6px;
  z-index: 1;
  width: 12px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(111,234,255,0.86);
  box-shadow: 0 0 8px rgba(79,215,255,0.20);
}

/* ###### END Chatbot Premium Robot Avatar V2 ###### */

.kp-chatbot__panel {
  position: relative;
  width: min(430px, calc(100vw - 28px));
  min-height: 640px;
  max-height: min(78vh, 860px);
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    linear-gradient(180deg, rgba(7,16,25,0.96) 0%, rgba(5,12,20,0.95) 100%),
    radial-gradient(circle at top right, rgba(79,215,255,0.15) 0%, rgba(79,215,255,0.00) 40%);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.40),
    0 0 34px rgba(79,215,255,0.14),
    inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
  overflow: hidden;
  transform-origin: right center;
  animation: kpChatPanelIn .26s cubic-bezier(.20,.90,.24,1);
}

/* ###### BEGIN Chatbot Premium Hidden-State Fix ###### */
.kp-chatbot__panel[hidden] {
  display: none !important;
}

.kp-chatbot:not(.is-open) .kp-chatbot__panel {
  display: none !important;
}

.kp-chatbot.is-open .kp-chatbot__panel {
  display: flex !important;
}

.kp-chatbot.is-open .kp-chatbot__trigger {
  display: none !important;
  gap: 0;
}
/* ###### END Chatbot Premium Hidden-State Fix ###### */

.kp-chatbot__panelGlow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.00) 18%),
    radial-gradient(circle at top right, rgba(79, 215, 255, 0.14) 0%, rgba(79, 215, 255, 0.00) 36%);
}

.kp-chatbot__head,
.kp-chatbot__intro,
.kp-chatbot__quickActions,
.kp-chatbot__messages,
.kp-chatbot__inputRow,
.kp-chatbot__legal {
  position: relative;
  z-index: 1;
}

.kp-chatbot__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.00) 100%),
    radial-gradient(circle at right top, rgba(79,215,255,0.10) 0%, rgba(79,215,255,0.00) 42%);
}

.kp-chatbot__headLeft {
  display: flex;
  align-items: center;
  gap: 14px;
}

.kp-chatbot__headText {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kp-chatbot__headText strong {
  color: #f6fbff;
  font-size: 1.35rem;
  line-height: 1.15;
}

.kp-chatbot__headText span {
  color: rgba(225, 236, 244, 0.78);
  line-height: 1.45;
  font-size: 0.92rem;
}

.kp-chatbot__close {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #eaf8ff;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.kp-chatbot__intro {
  padding: 18px 18px 6px;
}

.kp-chatbot__intro h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 1.9rem;
  line-height: 1.08;
}

.kp-chatbot__intro p {
  margin: 0;
  color: rgba(225, 236, 244, 0.80);
  line-height: 1.55;
}

.kp-chatbot__quickActions {
  display: grid;
  gap: 12px;
  padding: 16px 18px 14px;
}

.kp-chatbot__quickBtn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 58px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(79, 215, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  color: #effbff;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.kp-chatbot__quickBtn:hover,
.kp-chatbot__close:hover {
  border-color: rgba(79, 215, 255, 0.32);
  box-shadow: 0 0 20px rgba(79, 215, 255, 0.10);
}

.kp-chatbot__quickBtn:hover {
  transform: translateY(-1px);
}

.kp-chatbot__messages {
  flex: 1;
  min-height: 130px;
  overflow: auto;
  padding: 4px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kp-chatbot__msg {
  max-width: 92%;
  padding: 14px 15px;
  border-radius: 18px;
  line-height: 1.55;
  font-size: 0.96rem;
}

.kp-chatbot__msg--bot {
  align-self: flex-start;
  color: #ebf8ff;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
}

.kp-chatbot__msg--user {
  align-self: flex-end;
  color: #eefdff;
  border: 1px solid rgba(79, 215, 255, 0.18);
  background: rgba(79, 215, 255, 0.10);
}

.kp-chatbot__msgActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.kp-chatbot__msgLink {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(79, 215, 255, 0.18);
  color: #deffff;
  text-decoration: none;
  background: rgba(79, 215, 255, 0.08);
  font-weight: 700;
}

.kp-chatbot__inputRow {
  display: flex;
  gap: 10px;
  padding: 14px 18px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.kp-chatbot__input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 16, 25, 0.88);
  color: #effbff;
}

.kp-chatbot__send {
  min-width: 104px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(90deg, #31e7ff 0%, #67f4af 100%);
  color: #07141b;
  font-weight: 800;
  cursor: pointer;
}

.kp-chatbot__legal {
  padding: 0 18px 18px;
  color: rgba(225, 236, 244, 0.66);
  font-size: 0.8rem;
  line-height: 1.45;
}

.kp-chatbot__legal a {
  color: #7defff;
  text-decoration: none;
}

@media (max-width: 980px) {
  .kp-chatbot {
    top: auto;
    bottom: 18px;
    right: 14px;
    left: 14px;
    transform: none;
    align-items: stretch;
  }

  .kp-chatbot__trigger {
    align-self: flex-end;
  }

  .kp-chatbot__panel {
    width: 100%;
    min-height: 72vh;
    max-height: 72vh;
  }
}

/* ###### END Chatbot Premium ###### */
