:root {
    --background-color: #f0f2f5;
    --chat-container-bg: #ffffff;
    --header-bg: #009688; /* A different color for FastAPI */
    --header-text: #ffffff;
    --user-message-bg: #009688;
    --user-message-text: #ffffff;
    --bot-message-bg: #e9e9eb;
    --bot-message-text: #1c1e21;
    --input-bg: #f0f2f5;
    --border-color: #dcdfe3;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: #333;
}

.chat-container {
    width: 90vw;
    height: 90vh;
    background-color: var(--chat-container-bg);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 5px var(--shadow-color);
    z-index: 10;
}

.chat-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.chat-header p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

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

.chat-box::-webkit-scrollbar {
    width: 8px;
}

.chat-box::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

.message {
    max-width: 75%;
    padding: 1vw 2vw;
    border-radius: 18px;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-message {
    background-color: var(--user-message-bg);
    color: var(--user-message-text);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
 
.bot-message {
    background-color: var(--bot-message-bg);
    color: var(--bot-message-text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.loading-indicator {
    align-self: flex-start;
}

.loading-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #999;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-indicator span:nth-child(1) { animation-delay: -0.32s; }
.loading-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

.chat-input-area {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--chat-container-bg);
}

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

#user-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: none;
    background-color: var(--input-bg);
    border-radius: 20px;
    font-size: 1rem;
}

#user-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--header-bg);
}

#send-button {
    background-color: var(--header-bg);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

#send-button:hover {
    background-color: #00796b;
}

#send-button .icon {
    width: 24px;
    height: 24px;
}

/* Add these new rules to your existing style.css file */

.formatted-response h3 {
    margin-top: 10px;
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

.formatted-response ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0 0 15px 0;
}

.formatted-response li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.address-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.city-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: box-shadow 0.2s ease-in-out;
}

.city-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.city-card h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--header-bg, #009688);
}

.city-card ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.city-card li {
    font-size: 0.9rem;
    color: #555;
}

/* General container for the formatted bot response */
.bot-message .formatted-response {
    padding: 5px;
}

/* Styling for main headings like "Key Takeaways" */
.formatted-response h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1c1e21;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

/* Styling for lists (like in Key Takeaways) */
.formatted-response ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0 0 15px 0;
}

.formatted-response li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    line-height: 1.5;
    color: #555;
}

/* Creates a bullet point icon for list items */
.formatted-response li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--header-bg, #009688);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Container for the address cards */
.address-list {
    display: grid;
    grid-template-columns: 1fr; /* Single column layout */
    gap: 15px;
}

/* Remove the old .bot-message h4 rule and add these new styles */

/* General container for the formatted bot response */
.bot-message .formatted-response {
    padding: 5px;
}

/* Styling for main headings like "Key Takeaways" */
.formatted-response h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1c1e21;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

/* Styling for lists (like in Key Takeaways) */
.formatted-response ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0 0 15px 0;
}

.formatted-response li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    line-height: 1.5;
    color: #555;
}

/* Creates a bullet point icon for list items */
.formatted-response li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--header-bg, #009688);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Container for the address cards */
.address-list {
    display: grid;
    grid-template-columns: 1fr; /* Single column layout */
    gap: 15px;
}

/* Individual card for each city's location(s) */
.location-card {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 4px solid var(--header-bg, #009688);
    border-radius: 8px;
    padding: 16px;
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.location-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Header for the city name inside the card */
.location-card h4 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.contact-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #4b5563;
}

.contact-item .icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Unordered list specifically for addresses inside a card */
.location-card ul {
    margin: 0;
}

.location-card li {
    font-size: 0.95rem;
    color: #4b5563;
    padding-left: 22px;
}

/* Uses a pin icon for address list items */
.location-card li::before {
    content: '📍'; /* Location pin emoji */
    font-size: 1rem;
}



/* General container for the formatted bot response */
.bot-message .formatted-response {
    padding: 5px;
}

/* Styling for main headings */
.formatted-response h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1c1e21;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

/* General list styling */
.formatted-response ul, .formatted-response ol {
    padding-left: 0;
    margin: 10px 0 15px 0;
}

.formatted-response li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    line-height: 1.5;
    color: #555;
}

/* Custom bullet points for unordered lists */
.formatted-response ul {
    list-style-type: none;
}

.formatted-response ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--header-bg, #009688);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Custom numbering for ordered lists */
.formatted-response ol {
    list-style-type: none;
    counter-reset: list-counter;
}

.formatted-response ol li {
    counter-increment: list-counter;
}

.formatted-response ol li::before {
    content: counter(list-counter) ".";
    position: absolute;
    left: 0;
    font-weight: bold;
    color: var(--header-bg, #009688);
}

/* Container for the address cards */
.address-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 15px;
}

/* Individual card for each location */
.location-card {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 4px solid var(--header-bg, #009688);
    border-radius: 8px;
    padding: 16px;
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.location-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Header for the city name inside the card */
.location-card h4 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

/* Styling for the address list inside a card */
.location-card ul {
    margin-bottom: 12px;
}

.location-card ul li::before {
    content: '📍';
    font-size: 1rem;
}

/* Styling for the contact info section */
.contact-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #4b5563;
}

.contact-item .icon {
    width: 16px;
    height: 16px;
    fill: #6b7280;
}


/* static/style.css */

/* --- Styling for the Bot's Formatted Response --- */

/* Main container for the bot's response */
.bot-message .formatted-response {
    background-color: #f8f9fa; /* A very light grey background */
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    line-height: 1.6;
    color: #343a40;
}

/* Style the main headings like "Key Takeaways" and "Assistant Response" */
.formatted-response h3 {
    font-size: 1.1em;
    font-weight: 600;
    color: #009688; /* A distinct blue color for headings */
    margin-top: 16px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #dee2e6;
}
/* The first heading shouldn't have extra space on top */
.formatted-response h3:first-child {
    margin-top: 0;
}

/* Style for both ordered (numbered) and unordered (bullet) lists */
.formatted-response ul,
.formatted-response ol {
    padding-left: 20px; /* Standard indentation for lists */
    margin-bottom: 16px;
}

/* Style for individual list items */
.formatted-response li {
    margin-bottom: 8px; /* Space between list items */
}

/* Style for nested lists to ensure proper indentation */
.formatted-response ul ul,
.formatted-response ul ol,
.formatted-response ol ul,
.formatted-response ol ol {
    margin-top: 8px;
}

/* Style for regular paragraphs */
.formatted-response p {
    margin-bottom: 16px;
}
.formatted-response p:last-child {
    margin-bottom: 0;
}

/* static/style.css */

/* --- Styling for the Unified Bot Response Card --- */

/* The main container for the entire response */
.bot-message .formatted-response {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    line-height: 1.6;
    color: #212529;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Style for the main headings: "Assistant Response" and "Key Takeaways" */
.formatted-response h3 {
    font-size: 1.15em;
    font-weight: 600;
    color: #009688; /* A vibrant blue */
    margin-top: 0;
    margin-bottom: 12px;
}

/* Style for regular paragraphs in the main response */
.formatted-response p {
    margin-bottom: 16px;
}

/* Style for the horizontal line (---) that separates the sections */
.formatted-response hr {
    border: none;
    border-top: 2px solid #e9ecef;
    margin: 24px 0;
}

/* Styling for both ordered and unordered lists in the Key Takeaways */
.formatted-response ul,
.formatted-response ol {
    padding-left: 22px;
    margin-bottom: 0;
}

/* Styling for individual list items */
.formatted-response li {
    margin-bottom: 10px;
    padding-left: 20px; /* <-- This is the fix! */
}

/* Styling for nested lists to ensure clear indentation */
.formatted-response ul ul,
.formatted-response ul ol {
    margin-top: 10px;
}