/* Base reset for margin and padding */
body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #e5e5e5;
}

/* Main chat container styling */
.chat-container {
    display: flex;
    height: 60vh;
    max-height: 100vh;
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
}

/* Columns styling */
.left-column, .right-column {
    padding: 20px;
    background-color: #f2f2f2;
    border-radius: 8px;
    overflow-y: auto;
}

.left-column {
    flex-basis: 20%;
    margin-right: 10px;
}

.middle-column {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 0 20px;
    height: 100%;
    overflow: hidden;
    max-height: 100%;
    align-content: center;
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.right-column {
    flex-basis: 20%;
    margin-left: 10px;
}

/* New conversation and controls styling */
.new-conversation-container, .conversation-controls {
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

#new-conversation, .start-conversation-button {
    padding: 8px 16px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    display: inline-block;
    transition: background-color 0.2s;
    height: auto; /* Ensure height adjusts according to content */
    line-height: normal; /* Reset line height */
/
}

#new-conversation:hover, .start-conversation-button:hover {
    background-color: #0056b3;
}

/* Message area styling */
/* Enhanced .messages styling for improved display */
.messages {
    flex-grow: 1;
    max-height: calc(100% - 100px);
    overflow-y: scroll;
    overflow-x: clip;
    /* margin: 10px 0; */
    margin: 0 0 10px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    width: 100%;
}


.message-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
    width: 100%;
}


/* Message input styling */
.message-input {
    display: flex;
    align-items: center;
    padding: 10px;
    position: sticky;
    margin-top: 10px;
    background-color: #f2f2f2;
    border: 2px solid #ddd;
    border-radius: 20px;
    min-height: 80px;
}

.message-input input[type="text"] {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    margin-right: 10px;
}

.message-input button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
}

.message-input button:hover {
    background-color: #0056b3;
}

/* Model and Mode selector styling */
.model-selector, .mode-selector {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    margin-top: 10px;
}

/* Conversation links styling */
.conversation-links-container a {
    display: block;
    padding: 10px;
    margin: 5px 0;
    background-color: #ffffff;
    color: #007bff;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.conversation-links-container a:hover {
    background-color: #f0f0f0;
    border-color: #bbb;
}

.xpu-tag {
    display: inline-flex;
    background-color: #B0E0E6;
    padding: 3px 6px;
    margin-right: 5px;
    border-radius: 3px;
    font-size: 14px;
    color: #333;
}

.xpu-price-tag {
    display: inline-flex;
    background-color: #FFCCCB;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 14px;
    color: #333;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
    }

    .left-column, .right-column {
        width: 100%;
        margin: 10px 0;
    }

    .middle-column {
        order: -1;
        padding: 0;
    }

    .conversation-controls, .message-input {
        flex-direction: column;
    }

    .message-input input[type="text"], .message-input button {
        width: 100%;
        margin: 5px 0;
    }
}

@media (max-width: 600px) {
    .model-selector, .mode-selector {
        margin-bottom: 10px;
    }
}

.start-conversation-button {
    padding: 12px 24px;
    background-color: #4CAF50;
    border: none;
    color: white;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    transition-duration: 0.4s;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.start-conversation-button:hover {
    background-color: #45a049;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.conversation-links-container a.selected {
    background-color: #007bff;
    color: #fff;
}

/* Adjust the width of the mode selector container */
.mode-selector-container {
    display: flex;
    align-items: center;
}


/* Adjust the styling for the new conversation container */
.new-conversation-container,
.conversation-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

/* Adjust the styling for the new conversation button */
#new-conversation,
.start-conversation-button {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#new-conversation:hover,
.start-conversation-button:hover {
    background-color: #0056b3;
}

/* Adjust the styling for the model selector container */
.model-selector-container {
    display: flex;
    align-items: center;
}

/* Adjust the styling for the mode selector container */
.mode-selector-container {
    display: flex;
    align-items: center;
}


/* Adjust the styling for conversation links */
.conversation-links-container a {
    display: block;
    padding: 10px;
    margin: 5px 0;
    background-color: #ffffff;
    color: #007bff;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.conversation-links-container a:hover {
    background-color: #f0f0f0;
    border-color: #bbb;
}

/*!* Add some basic styling to the messages area *!*/
/*.messages {*/
/*    flex: 1;*/
/*    border: 1px solid #ddd;*/
/*    border-radius: 5px;*/
/*    background-color: #f9f9f9;*/
/*    padding: 10px;*/
/*    max-height: calc(100% - 80px); !* Subtract height of message input *!*/
/*    overflow-y: auto;*/
/*}*/

/* Style each message container */
.message-container {
    display: flex;
    justify-content: flex-end; /* Right-align by default */
}

/* Style the received message container to appear on the left */
.message-container.left {
    justify-content: flex-start;
}

/* Style each individual message bubble */
.message-bubble {
    border-radius: 10px;
    padding: 8px 12px;
    margin: 6px 0;
    max-width: 60%;
    background-color: #dcf8c6; /* Default background color for sent messages */
    text-align: right; /* Right-align sent messages */
    text-wrap: wrap;
}

/* Style the received message bubble */
.message-container.left .message-bubble {
    background-color: #e2f0ff;
    text-align: left; /* Left-align received messages */
}

/* Style the typing indicator bubble */
.typing-indicator {
    background-color: #f2f2f2;
    border-radius: 10px;
    padding: 8px 12px;
    margin: 6px 0;
    max-width: 70%;
    animation: blink 1s infinite;
}

/* Keyframes for blinking animation */
@keyframes blink {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

/* Style the message input area */
.message-input {
    display: flex;
    align-items: center;
    padding: 10px; /* Add some padding around the message input */
    /* Set the input area at the bottom */
    position: sticky;
    margin-top: 10px;
    background-color: #f2f2f2;
    border: 2px solid #ddd; /* Add a border */
    border-radius: 20px; /* Add border radius to match the input */
}

.message-input input[type="text"] {
    flex: 1;
    padding: 8px;
    border: none;
    background-color: transparent;
}

/* General responsive adjustments */
@media (max-width: 767px) {
  body {
    font-size: 14px;
  }

  h1, h2, h3, h4, h5, h6 {
    font-size: 90%;
  }

  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  section {
    padding: 30px 0;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  button, .nav-link, .quote-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Chat container and column_details */
.chat-container {
  display: flex;
  flex-direction: row;
  height: 80vh;
}

.left-column, .middle-column, .right-column {
  padding: 10px;
  overflow-y: auto;
}

.left-column {
  flex: 1;
  background-color: #f0f0f0;
}

.middle-column {
  flex: 2;
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
}

.right-column {
  flex: 1;
}

/* Model selection area */
.conversation-links-container {
  display: flex;
  flex-direction: column;
}

.conversation-links-container div {
  padding: 10px;
  margin-bottom: 5px;
  background-color: #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.conversation-links-container div:hover {
  background-color: #d0d0d0;
}

/* Message area */
.message-area {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 10px;
}

.message-input {
  display: flex;
  padding: 10px;
}

.message-input input[type="text"] {
  flex-grow: 1;
  margin-right: 10px;
  padding: 5px;
}

.message-input button {
  padding: 5px 15px;
}

/* Mobile-specific adjustments */
@media (max-width: 767px) {
  .chat-container {
    flex-direction: column;
    height: auto;
  }

  .left-column, .middle-column, .right-column {
    width: 100%;
    min-width: unset;
    max-height: 300px;
  }

  .left-column {
    order: 1;
    margin-top: 20px;
  }

  .middle-column {
    order: 2;
    border-left: none;
    border-right: none;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
  }

  .right-column {
    order: 3;
    margin-top: 20px;
  }

  .message-input {
    flex-direction: column;
  }

  .message-input input[type="text"] {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }

  .message-input button {
    width: 100%;
  }

  /* Model selection area for mobile */
  .conversation-links-container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
  }

  .conversation-links-container div {
    flex-basis: calc(50% - 10px);
    margin: 5px;
    text-align: center;
  }
}

/* Navbar adjustments */
@media (max-width: 767px) {
  .navbar-nav {
    flex-direction: column;
  }

  .nav-item {
    margin: 10px 0;
  }

  .expand-btn-inner {
    margin-top: 10px;
  }
}