:root {
    --chat_color1: #0078ff
}

.chat-box {
    width: 400px;
    overflow: hidden;
    box-shadow: 0 0 10px rgb(0 0 0 / .1);
    font-family: Arial,sans-serif;
    transition: background 0.3s,color 0.3s
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*background-color: var(--bs-card-cap-color);
    color: var(--bs-card-cap-color);
    padding: 8px 3px;*/
}

.chat-header h6 {
    margin-bottom: 0;
    margin-left: 2px
}

.chat-actions button {
    color: var(--chat_color1);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    padding: 5px;
}

.chat-actions button:hover {
    opacity: .8
}

.chat-messages {
    height: 450vh;
    max-height:40vh;
    padding: 10px;
    overflow-y: auto;
    background: #f5f5f5
}

#chat-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc
}

.light-theme #chat-input-area {
    background: #fff;
    color: #000
}

.dark-theme #chat-input-area {
    background: #000;
    color: #fff
}

#chat-input-wrapper {
    flex: 1;
    /* margin-right: 10px */
}

#send-btn {
    background: var(--chat_color1);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer
}

.light-theme {
    background: #fff;
    color: #000
}

.dark-theme {
    background: #222;
    color: #fff
}

.dark-theme .chat-header {
    background: #333
}

.dark-theme .chat-actions button {
    background: #555;
    color: #fff
}

.dark-theme .chat-messages {
    background: #111
}

#chat-container {
    height: 100%;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgb(0 0 0 / .1);
    display: flex;
    flex-direction: column;
    overflow: hidden
}

#chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column
}

.chat-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    margin: 6px 0;
    max-width: 80%;
    word-wrap: break-word
}

.light-theme .bot {
    background: #e9ecef;
    align-self: flex-start
}

.dark-theme .bot {
    background: #333;
    align-self: flex-start
}

.user {
    background: var(--chat_color1);
    color: #fff;
    align-self: flex-end
}

#chat-input-area {
    display: flex;
    align-items: center;
    padding: 0;
    gap: 8px;
    width: 100%;
    border-top: 1px solid #ddd
}

#chat-input-wrapper {
    flex: 1
}

#chat-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px
}

#chat-input {
    flex: 1;
    border: none;
    padding: 12px;
    outline: none
}

#send-btn {
    background: var(--chat_color1);
    color: #fff;
    border: none;
    padding: 8px 16px;
    cursor: pointer
}

#send-btn:hover {
    background: #0069d9
}

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px
}

.option-btn {
    background: var(--chat_color1);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer
}

.option-btn:hover {
    background: #0056b3
}

.image-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgb(0 0 0 / .8);
    justify-content: center;
    align-items: center
}

.image-popup img {
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;
    box-shadow: 0 0 15px rgb(255 255 255 / .3)
}

.image-popup .close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 30px;
    color: #fff;
    cursor: pointer
}

.file-link {
    text-decoration: none;
    font-weight: 700
}

.file-link:hover {
    text-decoration: underline
}
