body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: #e5ddd5;
    display: flex;
    flex-direction: column; 
    height: 100vh; 
    overflow: hidden;
    box-sizing: border-box;
}

/* Chat Header Styles */
.chat-header {
    background-color: #007bff; 
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%; 
    box-sizing: border-box; 
    overflow: hidden; 
}

.chat-title {
    font-size: 1.2em;
    font-weight: bold;
}

.home-link {
    color: white;
    text-decoration: none;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.home-link svg {
    display: block; 
}

.home-link:hover {
    background-color: rgba(255,255,255,0.2);
}

#chat-container {
    flex-grow: 1; 
    background-color: #fff;
    border-radius: 0; 
    box-shadow: none; 
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}

#chat-box {
    flex-grow: 1;
    padding: 20px 20px 10px 20px; 
    overflow-y: auto; 
    display: flex;
    flex-direction: column;
    background-color: #e5ddd5; 
}

.message-row {
    display: flex;
    margin-bottom: 10px;
}

.message {
    padding: 10px 15px;
    border-radius: 18px; 
    line-height: 1.4;
    white-space: pre-wrap; 
    max-width: 75%; 
    word-wrap: break-word; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message ul {
    margin-top: 5px; 
    margin-bottom: 5px; 
    padding-left: 20px; 
}

.message li {
    margin-bottom: 3px; 
}

.user-message-row {
    justify-content: flex-end; 
}

.user-message {
    background-color: #dcf8c6; 
    color: #303030;
    border-top-right-radius: 6px; 
}

.bot-message-row {
    justify-content: flex-start; 
    flex-direction: column; 
    align-items: flex-start; 
}

.bot-message {
    background-color: #ffffff; 
    color: #303030;
    border-top-left-radius: 6px; 
}

#input-area {
    display: flex;
    padding: 10px 15px;
    background-color: #f0f0f0; 
    border-top: 1px solid #ddd;
    align-items: center; 
}

#user-input {
    flex-grow: 1;
    border: none;
    padding: 10px 15px;
    font-size: 0.95em;
    border-radius: 20px; 
    margin-right: 10px;
    outline: none;
    box-sizing: border-box; 
}

#send-button {
    background-color: #007bff; 
    color: white;
    width: 44px; 
    height: 44px; 
    border: none;
    border-radius: 50%; 
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; 
    flex-shrink: 0; 
}

/* New Disclaimer Text Styles */
.disclaimer-text {
    background-color: #f0f0f0; 
    color: #666; 
    text-align: center;
    padding: 8px 15px;
    font-size: 0.75em;
    border-top: 1px solid #ddd; 
    width: 100%;
    box-sizing: border-box;
}

.disclaimer-text p {
    margin: 0;
}

/* Scrollbar styling (optional, for a more polished look) */
#chat-box::-webkit-scrollbar {
    width: 6px;
}

#chat-box::-webkit-scrollbar-track {
    background: transparent; 
}

#chat-box::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* Loading indicator styles */
.loading-dots-row {
    justify-content: flex-start; 
}

.loading-dots {
    background-color: #ffffff; 
    color: #303030;
    border-top-left-radius: 6px;
    padding: 10px 15px;
    border-radius: 18px;
    display: inline-flex; 
    align-items: center; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #8e8e8e; 
    margin: 0 2px;
    animation: blink 1.4s infinite both;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0% {
        opacity: 0.2;
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0.2;
    }
}

/* Styles for Message Sources */
.message-sources-container {
    font-size: 0.8em;
    margin-top: 5px; 
    margin-bottom: 5px; 
    padding: 8px 12px;
    background-color: #f8f9fa; 
    border-radius: 10px;
    border-top: 1px solid #eee;
    max-width: 75%; 
    
}

.message-sources-container h4 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #555;
}

.message-sources-container ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 0;
    margin-top: 0;
}

.message-sources-container li {
    margin-bottom: 4px;
}

.message-sources-container a {
    color: #0056b3;
    text-decoration: none;
}

.message-sources-container a:hover {
    text-decoration: underline;
} 