/* UNIVERSAL RESET */
.kms-chat, .kms-bot-btn {
  font-family: 'Poppins', sans-serif;
}

/* Floating Button */
.kms-bot-btn {
  position: fixed;
  bottom: 22px;
  right: 84px;
  width: 70px;
  height: 70px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(0,0,0,.2);
  z-index: 9999;
  cursor: pointer;
}

/* Chat Window */
.kms-chat {
  position: fixed;
  top:10px ;
  bottom: 24px;
  right: 24px;
  width: 360px;
  max-width: 95%;
  background: white;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0,0,0,.25);
  overflow: hidden;
  z-index: 9999;
}

/* Header */
.kms-header {
  background: linear-gradient(135deg,#f97316,#fb923c);
  color: white;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kms-header h3 {
  font-weight: 600;
}
.kms-header p {
  font-size: 12px;
  opacity: .9;
}

/* Body */
.kms-body {
  height: 250px;
  padding: 14px;
  overflow-y: auto;
  background: #f9fafb;
  overflow-y: auto;

}

.bot-msg {
  background: white;
  padding: 10px 14px;
  border-radius: 14px 14px 14px 4px;
  max-width: 80%;
  margin-bottom: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,.08);
}

.user-msg {
  background: #f97316;
  color: white;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  max-width: 80%;
  margin-left: auto;
  margin-bottom: 10px;
}

/* Options */
.kms-options {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #eee;
}

.kms-options button {
  background: #f3f4f6;
  padding: 8px;
  font-size: 13px;
  border-radius: 10px;
  transition: .3s;
}

.kms-options button:hover {
  background: #f97316;
  color: white;
}

.kms-options .primary {
  grid-column: span 2;
  background: #f97316;
  color: white;
}

/* Input */
.kms-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #eee;
}

.kms-input input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
}

.kms-input button {
  background: #f97316;
  color: white;
  padding: 8px 16px;
  border-radius: 10px;
}

/* Mobile */
@media(max-width:480px){
  .kms-chat{
    right: 2.5%;
    width: 95%;
    height: auto;
    bottom: auto;
    top: 20%;
  }


}


.bot-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-svg {
  width: 100%;
  height: 100%;
  animation: floatBot 3s ease-in-out infinite;
}

/* Floating animation */
@keyframes floatBot {
  0%,100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

/* Blinking eyes */
.eye {
  transform-origin: center;
  animation: blink 4s infinite;
}

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

/* Talking mouth when chat open */
.mouth.talk {
  animation: talk 0.4s infinite alternate;
}

@keyframes talk {
  from { height: 18px; }
  to { height: 26px; }
}


.bot-welcome {
  position: absolute;
  right: 85px;
  bottom: 18px;
  background: white;
  color: #111;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(20px);
  animation: welcomeIn 1s ease forwards 1s, pulseMsg 2.5s infinite 2.5s;
}

/* Arrow */
.bot-welcome::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent transparent white;
}

/* Slide in */
@keyframes welcomeIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Gentle pulse */
@keyframes pulseMsg {
  0%,100% { transform: translateX(0) scale(1); }
  50% { transform: translateX(0) scale(1.04); }
}

/* Mobile adjust */
@media(max-width:480px){
  .bot-welcome{
    right: 75px;
    font-size: 12px;
  }
}
