body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    --theme-color: #330a92;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 89vh;
}

.conversation-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f0f0f0;
}

.conversation-selector select,
.conversation-selector button {
    margin: 5px;
    padding: 10px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.chat-box {
    background-color: #f9f9f9;
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    margin-bottom: 10px;
    max-width: 70%;
    word-wrap: break-word;
    padding: 10px;
}

.user .message {
    align-self: flex-end;
    background-color: #dcf8c6;
    border-radius: 10px 10px 0 10px;
}

.bot .message {
    align-self: flex-start;
    background-color: #e5e5ea;
    border-radius: 10px 10px 10px 0;
}

.message::before {
    content: '';
    display: table;
    clear: both;
}

.user .message::after {
    content: '';
    display: block;
    clear: both;
}

input[type="text"] {
    width: calc(100% - 80px);
    margin: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    margin: 5px;
    padding: 10px;
    font-size: 16px;
    background-color: var(--theme-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: var(--theme-color);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.control-icon {
    margin-left: 5px;
    font-size: 20px;
    cursor: pointer;
}

.control-icon:hover {
    color: var(--theme-color);
    /* Change color on hover if needed */
}

/* CSS for bot messages */
.bot {
    text-align: left;
    background-color: #e5e5ea;
    border-radius: 10px 10px 10px 0;
}

/* CSS for user messages */
.user {
    text-align: right;
    background-color: #dcf8c6;
    border-radius: 10px 10px 0 10px;

}

.message {
    padding: 10px;
    margin: 5px;
}

/* Title bar styles */
.title-bar {
    background-color: var(--theme-color);
    color: white;
    padding: 10px;
    text-align: center;
}

.title-bar h1 {
    margin: 0;
    font-size: 1.5em;
    font-weight: bold;
}

.title-bar {
    display: flex;
    align-items: center;
}

.logo-container {
    margin-right: 10px;
}

.app-logo {
    width: 40px;
    height: 40px;
}

.title-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.title-text h1,
.title-text p {
    margin: 0;
}

.title-text p {
    font-size: 14px;
    color: #e0e0e0; /* Lighter shade of white for better contrast */
}

/* Adjust the size of the send button */
.send-btn {
    padding: 1px 8px;
    font-size: 30px;
    height: 40px;
    margin-top: auto;
    margin-bottom: auto;
}

.get-key-txt {
    font-size: small;
}

.api-key-txt {
    color: #575757;
    font-weight: 700;
}

/* Ensure the input and button are displayed on the same line */
.input-send {
    display: flex;
    /* Display as inline-block elements */
    margin-bottom: 5px;
}

.input-text {
    width: 95%;
    align-items: self-start;
}

.footer {
    text-align: center;
    bottom: 0;
    /* Place it at the bottom of the viewport */
    left: 0;
    width: 100%;
    /* Make it span the full width */
    background-color: var(--theme-color);
    /* Adjust the background color as needed */
    color: white;
    padding: 10px 0;
    /* Add some padding for spacing */
    font-size: 14px;
    /* Adjust the font size as needed */
}

.footer a {
    color: unset;
    text-decoration: none;
    font-weight: 900;
    border-bottom: 2px dotted;
    /* Add an underline on hover for the hyperlink */
}

.footer a:hover {
    border-bottom: 2px dotted;
    /* Add an underline on hover for the hyperlink */
}

a.external::after {
    content: "↗";
    color: white;
    position: relative;
    top: -3px;
    right: -2px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .chat-container {
        height: auto;
        min-height: 89vh;
    }

    .conversation-selector {
        flex-wrap: wrap;
        justify-content: center;
    }

    .conversation-selector select,
    .conversation-selector button,
    #configure-key-btn {
        margin: 5px;
    }

    .conversation-controls {
        flex-direction: column;
        align-items: center;
    }

    .conversation-options {
        margin-bottom: 5px;
    }

    .message {
        max-width: 80%;
    }

    .input-send {
        flex-direction: column;
        align-items: center;
    }

    .input-text {
        width: 90%;
        margin-bottom: 5px;
    }

    .send-btn {
        margin-top: 0;
        margin-bottom: 0;
    }

    .footer {
        font-size: 12px;
    }

    .modal-content {
        width: 90%;
        margin: 10% auto;
    }

    .title-bar h1 {
        font-size: 1.2em;
    }

    .app-logo {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .message {
        max-width: 90%;
        font-size: 14px;
    }

    .input-text {
        width: 100%;
    }

    .footer {
        font-size: 10px;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .title-bar {
        padding: 5px;
    }

    .title-bar h1 {
        font-size: 1em;
    }

    .app-logo {
        width: 25px;
        height: 25px;
    }

    .title-text p {
        font-size: 12px;
    }
}

/* Custom select styles */
.custom-select {
    position: relative;
    display: inline-block;
}

.custom-select select {
    display: none;
}

.select-selected {
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.select-items {
    position: absolute;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1;
    max-height: 200px;
    overflow-y: auto;
}

.select-items div {
    padding: 8px 16px;
    cursor: pointer;
}

.select-items div:hover {
    background-color: #e5e5e5;
}

.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: flex;
    align-items: center;
  }
  
  .install-prompt button {
    margin-left: 10px;
    padding: 5px 10px;
    background-color: #45a049;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
  }

  /* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.model-label {
    display: block;
    font-size: 0.8em;
    color: #888;
    margin-top: 5px;
  }