/* Chat Container */
.chat-container {
    width: 100%;
    max-width: 350px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: fixed;
    left: 10px;
    bottom: 80px;
    z-index: 1000000000000000;
}

/* Chat Box */
.chat-box {
  background-color: #fff;
  border-radius: 10px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: relative; /* To position the close button */
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 5px;
  right: 15px;
}

.close-btn button {
  background-color: #ff4d4d;
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 50%;
  font-weight: bold;
}

.close-btn button:hover {
  background-color: #ff1a1a;
}

/* Message Area */
.messages {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Individual Messages */
.message {
    max-width: 80%;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 20px;
    font-size: 14px;
}

.received {
    background-color: #e2e2e2;
    align-self: flex-start;
}

.sent {
    background-color: #007bff;
    color: white !important;
    align-self: flex-end;
}

/* Chat Input Section */
.chat-input {
    display: flex;
    padding: 10px;
    background-color: #f1f1f1;
    border-top: 1px solid #ddd;
    position: relative; /* For spinner positioning */
}

/* Chat Input Box */
.chat-box .chat-input input.confuse-chat {
    width: 70% !important;
    padding: 10px !important;
    border: 1px solid #ddd !important;
    font-size: 14px !important;
    border-radius: 0px 0px 0px 0px !important;
    height: 50px;
}

/* Text Input Button */
.chat-input button.textmode {
    width: 15%;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 0px 10px 10px 0px;
    font-size: 14px;
    cursor: pointer;
    height: 50px;
}

/* Voice Mode Button */
.chat-input button.voicemode {
    width: 15%;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 10px 0px 0px 10px;
    font-size: 14px;
    cursor: pointer;
    height: 50px;
}

/* Disable Buttons and Input While Waiting */
.chat-input input.confuse-chat:disabled,
.chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Chat Input Hover Effects */
.chat-input button:hover {
    background-color: #0056b3;
}

/* Loading Spinner Next to Chat Input */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #4CAF50; /* Green spinner */
    margin-left: -100px; /* Space between input and spinner */
    position: absolute; /* Position next to input */
    left: 180px; /* Adjust based on layout needs */
    margin-top: 15px;
}

.loading-spinner i {
    margin-right: 5px;
}