/* Main styles for E-lon chat interface */

/* Base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

/* Main chat container */
#chat-container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    height: 80vh;
    overflow: hidden;
}

/* Chat header */
#chat-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: #1e3a8a;
    color: white;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

#logo {
    height: 40px;
    margin-right: 15px;
}

#chat-header h1 {
    font-size: 1.5rem;
    font-weight: 500;
}

/* Chat area */
#chat-box {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Message styles */
.message {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.4;
}

.user-message {
    background-color: #1e3a8a;
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background-color: #e9e9eb;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

/* Style for "thinking" indicator */
.thinking {
    color: #888;
    font-style: italic;
    background-color: #f0f0f0;
}

/* Input area */
#input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #fff;
}

#user-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 24px;
    margin-right: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

#user-input:focus {
    border-color: #1e3a8a;
}

#send-button {
    padding: 12px 24px;
    background-color: #1e3a8a;
    color: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

#send-button:hover {
    background-color: #152a62;
}

/* Responsive styles */
@media (max-width: 600px) {
    #chat-container {
        width: 100%;
        height: 90vh;
        border-radius: 0;
    }
    
    #chat-header {
        border-radius: 0;
    }
    
    .message {
        max-width: 90%;
    }
}

/* Text formatting styles in messages */
.bot-message strong, 
.bot-message b {
    font-weight: 600;
}

.bot-message em,
.bot-message i {
    font-style: italic;
}

.bot-message a {
    color: #1e3a8a;
    text-decoration: underline;
}

/* Styles for lists in bot messages */
.bot-message ul, 
.bot-message ol {
    margin-left: 20px;
    margin-top: 5px;
    margin-bottom: 5px;
}

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