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

body {
    background-color: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* Main content styles */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.main-content h1 {
    color: #0056b3;
    margin-bottom: 20px;
}

.main-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Chat button styles */
.chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0056b3;
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    transition: transform 0.3s, background-color 0.3s;
}

.chat-button:hover {
    background-color: #003d82;
    transform: scale(1.05);
}

.chat-button svg {
    width: 28px;
    height: 28px;
}

/* Chat container styles */
.chat-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    height: 600px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transform: translateX(420px); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
}

.chat-container.open {
    transform: translateX(0); /* Slide in when open */
}

.chat-header {
    background-color: #0056b3;
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chat-header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.chat-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.close-button:hover {
    opacity: 1;
}

.close-button svg {
    width: 16px;
    height: 16px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    max-width: 85%;
}

.message.bot {
    max-width: 90%;
}

.message.user {
    align-self: flex-end;
}

.message.bot {
    align-self: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 100%;
}

.message.user .message-content {
    background-color: #0056b3;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.bot .message-content {
    background-color: #f0f0f0;
    color: #333;
    border-bottom-left-radius: 4px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Styling for formatted bot messages */
.message.bot .message-content p {
    margin-bottom: 10px;
}

.message.bot .message-content p:last-child {
    margin-bottom: 0;
}

.message.bot .message-content .section-header {
    font-weight: 600;
    margin-top: 12px;
    margin-bottom: 8px;
    color: #0056b3;
}

.message.bot .message-content .list-item {
    padding-left: 8px;
    margin-bottom: 6px;
    position: relative;
}

.message.bot .message-content strong {
    color: #0056b3;
    font-weight: 600;
}

.message.bot .message-content ol.numbered-list {
    list-style-type: decimal;
    padding-left: 25px;
    margin-bottom: 12px;
    counter-reset: list-counter; /* Reset the counter for each list */
}

.message.bot .message-content .numbered-list li {
    margin-bottom: 8px;
    padding-left: 5px;
    display: list-item; /* Ensure proper display */
    list-style-position: outside; /* Position numbers outside the content box */
}

.message.bot .message-content .numbered-list li ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 4px;
}

/* Add more spacing between list items */
.message.bot .message-content ol li + li {
    margin-top: 8px;
}

/* Style for bold text */
.message.bot .message-content strong {
    color: #0056b3;
    font-weight: 600;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #eaeaea;
}

#chat-form {
    display: flex;
    gap: 10px;
}

#user-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

#user-input:focus {
    border-color: #0056b3;
}

#chat-form button {
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

#chat-form button:hover {
    background-color: #003d82;
}

#chat-form button svg {
    width: 20px;
    height: 20px;
}

/* Loading indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    background-color: #f0f0f0;
    border-radius: 18px;
    width: fit-content;
    margin-top: 5px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #aaa;
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.5s infinite ease-in-out;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-5px);
    }
}
