@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');


.osbs-chatbot,
.bot-msg,
.user-msg,
.chat-footer input,
.opt-btn {
    font-family: 'Poppins', sans-serif;
}

@media (max-width: 600px) {
  .osbs-chatbot.keyboard-open {
    height: 45vh !important;
    bottom: 0 !important;
  }
}



.osbs-chatbot {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 360px;
  height: 80vh;
  max-height: 600px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 100000;
  transition: all 0.3s ease;
  color-scheme: light dark;
}

.chat-header {
  background: linear-gradient(45deg, #ff7017, #e85d0e);
  color: #fff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: bold;
}

.chat-header img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 8px;
}

.chat-body {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background: #fdfdfd;
  font-size: 14px;
  display: flex;
  flex-direction: column;
}

.chat-footer {
  display: flex;
  border-top: 1px solid #ddd;
  background: #fff;
}

.chat-footer input {
  flex: 1;
  border: none;
  padding: 8px;
  font-size: 14px;
  outline: none;
}

.chat-footer button {
  background: #ff7017;
  color: #fff;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 18px;
  border-radius: 0 8px 8px 0;
}

/* ============================
   MODERN FLOATING CHAT BUTTON
   ============================ */
.chat-float {
  position: fixed;
  bottom: 150px;
  right: 10px;
  z-index: 9999;
  border: none;
  background: transparent;
  cursor: pointer;
}

.chat-float-inner {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #ff6a00, #ff9300);
  color: white;
  padding: 12px 18px;
  border-radius: 40px;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  transition: 0.25s ease;
  position: relative;
  z-index: 2;
}

.chat-float-inner img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #ffffff;
  padding: 0px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.chat-float-inner:hover {
  transform: translateY(-8px) scale(1.03);
  background: linear-gradient(135deg, #ff7f26, #ffa640);
}

.chat-float-inner span {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.chat-float-inner:hover {
  transform: translateY(-3px);
  background: #ff7c20;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.chat-glow {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255,140,0,0.3);
  filter: blur(10px);
  animation: glowPulse 2.5s infinite ease-in-out;
  z-index: 1;
}

@keyframes glowPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.chat-tooltip {
  position: absolute;
  bottom: 80px;
  right: 10px;
  background: #1a1a1a;
  color: white;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 0.3s ease;
  white-space: nowrap;
}

.chat-float:hover .chat-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.chat-float-inner {
  animation: microBounce 4s infinite;
}

@keyframes microBounce {
  0% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0); }
}



/* Message styles */
.user-msg, .bot-msg {
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 10px;
  max-width: 80%;
  line-height: 1.4;
  animation: fadeIn 0.3s ease;
}

.user-msg {
  background: #e8f0ff;
  align-self: flex-end;
}

.bot-msg {
  background: #ffe9d9;
  align-self: flex-start;
}

.typing-indicator {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  background: #ffe9d9;
  border-radius: 10px;
  margin: 5px 0;
  width: fit-content;
}
.typing-indicator span {
  height: 6px;
  width: 6px;
  margin: 0 2px;
  background: #ff7017;
  border-radius: 50%;
  display: inline-block;
  animation: blink 1.3s infinite both;
}

.bot-msg {
  text-align: left;
  line-height: 1.35;
  word-spacing: normal;
  letter-spacing: normal;
}

.bot-msg a {
  color: #ff7017;
  text-decoration: none;
  font-weight: 500;
  background: #fff3e6;
  padding: 4px 6px;
  border-radius: 6px;
  word-break: break-word;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.bot-msg a:hover {
  background: #ffe0cc;
  text-decoration: underline;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .osbs-chatbot {
    width: 90%;
    height: 80%;
    right: 5%;
    bottom: 70px;
  }
}


@keyframes pulseGlow {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 112, 23, 0.9);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 20px 15px rgba(255, 112, 23, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 112, 23, 1);
  }
}


/* buttons container */
.bot-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.opt-btn {
  background: #fff;
  border: 1px solid #ff7017;
  color: #ff7017;
  padding: 8px 12px;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 600;
}
.opt-btn:hover { background:#ff7a00;
   color:#fff; }
@media (max-width:600px) {
  .opt-btn { flex: 1 1 100%; text-align: center; }
}


.opt-btn:hover .opt-icon {
    color: #fff !important;
}



/* Close button style (red modern) */
.opt-btn.opt-close {
  background: #e53935;
  color: #fff;
  border-color: #e53935;
}

/* small disabled look for options once chat is locked */
.opt-btn.opt-btn-disabled {
  background: #f5f5f5 !important;
  color: #bdbdbd !important;
  border-color: #f5f5f5 !important;
  cursor: default !important;
  opacity: 0.9;
  pointer-events: none;
}

/* ensure the close button stands out on hover (unless disabled) */
.opt-btn.opt-close:hover { background: #d32f2f; color: #fff; }

/* small tweak: more visible link background for bot links */
.bot-msg a {
  color: #ff7017;
  text-decoration: none;
  font-weight: 600;
  background: #fff7f1;
  padding: 4px 6px; 
  border-radius: 6px;
}


/* ============================================
   FURNITURE INCREMENT / DECREMENT UI STYLING
   ============================================ */
.bot-furniture {
  background: #fff7f1;
  padding: 10px;
  border-radius: 10px;
  margin: 10px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  animation: fadeIn 0.3s ease;
  font-size: 14px;
}

.bot-furniture .frow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff3e6;
  padding: 6px 10px;
  margin-bottom: 6px;
  border-radius: 8px;
}

.frow span {
  font-weight: 600;
  color: #ff7017;
}

.f-btn {
  background: #fff;
  border: 1px solid #ff7017;
  color: #ff7017;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  line-height: 26px;
  text-align: center;
}

.f-btn:hover {
  background: #ff7017;
  color: #fff;
}

.f-toggle {
  background: #ff7017;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 600;
}

.f-toggle:hover {
  opacity: 0.9;
}

.f-val {
  display: inline-block;
  width: 26px;
  text-align: center;
  font-weight: bold;
  color: #333;
}

/* Action buttons under furniture section */
.control-confirm {
  width: 100%;
  background: #ff7017;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
  cursor: pointer;
  font-weight: bold;
}

.control-confirm:hover {
  background: #e85d0e;
}

.control-back,
.control-human {
  background: #fff;
  color: #ff7017;
  border: 1px solid #ff7017;
  padding: 8px 10px;
  border-radius: 8px;
  margin-top: 8px;
  margin-right: 5px;
  cursor: pointer;
  font-weight: 600;
}

.control-back:hover,
.control-human:hover {
  background: #ff7017;
  color: #fff;
}


.msg-time {
    font-size: 10px;
    color: #999;
    text-align: right;
    margin-top: 3px;
}

.msg-row {
    display: flex;
    align-items: flex-end;
    margin: 6px 0;
}

.msg-row.left { flex-direction: row; }
.msg-row.right { flex-direction: row-reverse; }

.msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin: 0 6px;
}

.msg-bubble {
    background: #ffe9d9; /* bot */
    padding: 8px 12px;
    border-radius: 10px;
    max-width: 75%;
}

.user-msg .msg-bubble {
    background: #e8f0ff !important; /* user */
}

/* ============================
   WHATSAPP STYLE BUBBLES
   ============================ */

/* Common bubble */
.bot-msg, .user-msg {
    position: relative;
    max-width: 72%;
    padding: 10px 12px 18px; /* extra bottom space for time */
    border-radius: 12px;
    margin: 10px;
    font-family: 'Poppins', sans-serif;
}

/* BOT bubble */
.bot-msg {
    background: #ffe9d9;
    align-self: flex-start;
    margin-left: 45px;
    border-bottom-left-radius: 0;
}

/* USER bubble */
.user-msg {
    background: #e8f0ff;
    align-self: flex-end;
    margin-right: 45px;
    border-bottom-right-radius: 0;
    min-width: 80px;
}

/* TIME (WhatsApp style) */
.msg-time {
    position: absolute;
    right: 8px;
    bottom: 3px;
    font-size: 11px;
    color: #777;
    user-select: none;
}

/* Bot avatar */
.bot-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    position: absolute;
    left: -40px;
    bottom: 0;
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    position: absolute;
    right: -40px;
    bottom: 0;
    opacity: 0.8;
}

/* ============================
   PREMIUM CLOSE BUTTON (round)
   ============================ */
#closeChat {
  width: 28px;
  height: 28px;
  background: #ffefe6;
  border: none;
  border-radius: 50%;
  color: #ff5a1f;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

#closeChat:hover {
  background: #ff5a1f;
  color: white;
  transform: scale(1.08);
}

#closeChat:active {
  transform: scale(0.95);
}

/* MOBILE FIX — Hide “Ask Sia” text, show only round bubble */
@media (max-width: 600px) {

  /* Make floating button circular on mobile */
  .chat-float-inner {
    padding: 10px !important;
    border-radius: 50% !important;
    width: 66px !important;
    height: 66px !important;
    justify-content: center !important;
  }

  /* Hide the Ask Sia text on mobile */
  .chat-float-inner span {
    display: none !important;
  }

  /* Adjust avatar inside bubble */
  .chat-float-inner img {
    width: 48px !important;
    height: 48px !important;
    padding: 3px !important;
  }

  /* Hide tooltip on mobile (optional) */
  .chat-tooltip {
    display: none !important;
  }

  /* Fix glow position for circular bubble */
  .chat-glow {
    width: 70px !important;
    height: 70px !important;
    bottom: 4px !important;
    right: 4px !important;
  }
}

.opt-btn {
  display: flex;
  align-items: center;
  gap: 10px;
}

.opt-icon {
  font-size: 18px;
  color: #ff6f00;
}

.opt-text {
  font-size: 15px;
  font-weight: 500;
}

/* Tooltip for Close button */

.close-btn {
  position: relative;  /* needed for tooltip positioning */
}

.close-tooltip {
  position: absolute;
  bottom: -30px;
  left: -20px;
  background: #1a1a1a;
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: all 0.25s ease-out;
  z-index: 99999;
}

.close-btn:hover .close-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.chat-header {
  overflow: visible !important;
}


/* Hide close tooltip on mobile */
@media (max-width: 600px) {
  .close-tooltip {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .user-msg, .bot-msg {
    min-width: 80px;
  }
}


/* ============================
   NEW BADGE STYLING
   ============================ */

.chat-new-badge {
  position: absolute;
  top: -18px;
  left: -30px;
  background: #ff0000;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px 12px 0 12px;
  animation: blinkFast 0.6s infinite, microBounce 4s infinite;
  z-index: 99999;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

@keyframes blinkFast {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}

/* Prevent hiding badge on mobile */
@media (max-width: 600px) {
  .chat-new-badge {
    top: -18px;
    left: -32px;
    font-size: 15px;
  }
}
