/* Floating Chat Toggle Button */
#chatToggleBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ffc107, #e0a800);
  color: #000;
  border: none;
  border-radius: 50%;
  width: 65px;
  height: 65px;
  font-size: 24px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
  z-index: 9999;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#chatToggleBtn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* Toggle Badge */
#chatToggleBtn .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: red;
  color: white;
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 50%;
  display: none;
}

/* Chat Box */
#chatBox {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 360px;
  height: 560px;
  display: none;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  border: 1px solid #ddd;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  z-index: 2000;
}

/* Mobile Fullscreen */
@media (max-width: 768px) {
  #chatBox {
    width: 100%;
    height: 100%;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
}

/* Chat Header */
.chat-header {
  background: linear-gradient(135deg, #007bff, #0056d6);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  border-bottom: 4px solid #FFF;
}
.chat-header button {
  background: none;
  border: none;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.chat-header button:hover { opacity: 0.8; }

/* Chat Messages Area (premium golden gradient) */
#chatMessages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;  
  background: #EFEFEF; 
  position: relative;
}


/* #chatMessages::before {
  content: "";
  position: absolute;
  inset: 0;  
  border-radius: 16px;
  pointer-events: none;
} */


/* Conversation List Rows */
.conversation-row {
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  transition: background 0.2s ease;
}
.conversation-row:hover { background: #e9f2ff; }

/* Chat Bubbles */
.chat-message {
  max-width: 80%;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 16px;
  line-height: 1.4;
  font-size: 14px;
  word-wrap: break-word;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.chat-message.sent {
  background: #007bff;
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.chat-message.received {
  background: #fff;
  color: #333;
  margin-right: auto;
  border-bottom-left-radius: 4px;
}
.convo-p {
  text-align: center;
  margin-top: 10px;
  background: #FFF !important;
  color: #333;
  padding: 40px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
/* Input Area */
#chatInputArea {
  display: flex;
  padding: 10px;
  border-top: 4px solid #FFF;
  background: #C6C9D3;
}
#chatInput {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 24px;
  outline: none;
  font-size: 14px;
  transition: border-color 0.2s;
}
#chatInput:focus { border-color: #007bff; }
#sendBtn {
  margin-left: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #007bff, #0056d6);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
#sendBtn:hover { background: linear-gradient(135deg, #006ae0, #004bbd); }

/* Typing Indicator */
#typingIndicator {
  font-size: 13px;
  color: gray;
  padding: 6px 14px;
}