/* General Body & Font */
body {
    background-color: #f5f5f5;
    font-family: "Roboto", sans-serif;
}

/* Container */
.container {
    max-width: 700px;
}

/* Card */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Chat Box */
.chat-box {
    height: 500px;
    overflow-y: auto;
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
}

/* Chat Message Container */
.chat-message {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

/* User messages align right */
.chat-message.user {
    flex-direction: row-reverse;
    text-align: right;
}

/* Chat Bubble */
.chat-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 85%;
    font-size: 0.95rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
}

/* Bot message bubble style */
.chat-message.bot .chat-bubble {
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
    color: #333;
}

/* User message bubble style */
.chat-message.user .chat-bubble {
    background-color: #1976d2;
    color: #fff;
}

/* Avatar styles */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin: 0 10px;
    flex-shrink: 0;
    object-fit: cover;
}

/* Footer padding */
.chat-footer {
    padding-top: 12px;
}

/* Input field */
input.form-control {
    border-radius: 12px;
    border: 1px solid #ced4da;
    box-shadow: none;
    transition: box-shadow 0.2s;
}

/* Input focus style */
input.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
    border-color: #1976d2;
}

/* Send button */
button.btn {
    border-radius: 12px;
    background-color: #1976d2;
    border-color: #1976d2;
    transition: background-color 0.2s, box-shadow 0.2s;
}

/* Send button hover */
button.btn:hover {
    background-color: #125ea6;
    border-color: #125ea6;
}

/* Add consistent spacing between messages */
.chat-box .chat-message + .chat-message {
    margin-top: 10px;
}

.loading-message .chat-bubble {
    font-style: italic;
    color: #777;
}

.loading-message .chat-bubble {
    font-weight: bold;
    font-size: 1.4rem;
    color: #1976d2;
    letter-spacing: 6px; /* spacing between dots */
    user-select: none;
}

.chat-bubble h1,
.chat-bubble h2,
.chat-bubble h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.5rem 0 0.3rem;
}

.chat-bubble ul,
.chat-bubble ol {
    padding-left: 1.2rem;
    margin: 0.5rem 0;
}

.chat-bubble li {
    margin-bottom: 0.3rem;
}

.chat-bubble p {
    margin-bottom: 0.5rem;
}

.chat-bubble a {
    color: #1976d2;
    text-decoration: none;
}

.chat-bubble a:hover {
    text-decoration: underline;
}

.chat-bubble strong {
    font-weight: bold;
}

.chat-bubble em {
    font-style: italic;
}
