:root {
    --bg-color: #0099cc0a;
    --main-content-bg: #ffffff;
    --text-color: #222;
    --border-color: #e5e5e5;
    --accent-color: #09c;
    --reason-color: #c30;
    --placeholder-color: #8e8ea0;
    --max-width: 800px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.hidden { display: none !important; }

.poc-banner {
    background-color: #fffbe6;
    color: #5d4c0c;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 1px solid #f0e4b8;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.close-banner-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #5d4c0c;
}

header {
    background-color: none;
    border: none;
    width: 100%;
}
.header-content {
    padding: 10px 20px;
    display: flex;
    align-items: center;
}
.header-logo {
    width: 80px;
    position: fixed;
    margin-top: 0px;
}
#header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    padding-left: 80px;
}
#header-links a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 15px;
    font-size: .75rem;
	flex-grow: 1;
}
#header-links a:hover { text-decoration: underline; }
.header-btn {
    background-color: #09c;
    color: #fff;
    border: 1px solid #09c;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
	white-space: nowrap;
}
.header-btn:hover { background-color: #036; }
#header-actions { white-space: nowrap; }

main {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}
#initial-view {
    max-width: var(--max-width);
    margin: 40px auto;
    text-align: center;
}
.center-logo {
	width: 100%;
	max-width: 400px;
	margin-bottom: 24px;
}
.welcome-text h1 {
	font-size: 2.5rem;
	margin-bottom: 1rem;
}
.welcome-text p {
	margin-bottom: 1rem;
	line-height: 1.6;
}
.welcome-text .question-prompt {
	margin-top: 2rem;
	font-weight: 500;
}
.welcome-text ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.welcome-text ul li {
    background-color: #0099cc10;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}
.welcome-text ul li:hover {
    background-color: #0099cc20;
}

#conversation-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    padding: 15px;
    border-radius: 16px;
    line-height: 1.6;
    width: 100%;
}
.user-message {
    background-color: #0099cc11;
    align-self: flex-end;
    border-top-right-radius: 0;
    text-align: right;
}
.ai-message {
    background-color: var(--main-content-bg);
    border: 1px solid var(--border-color);
    align-self: flex-start;
    border-top-left-radius: 0;
    animation: fadeIn 1s ease-in-out;
}
.processing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--placeholder-color);
    font-style: italic;
    align-self: flex-start;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sources-container {
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}
.sources-toggle {
    background: none;
    border: none;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    text-align: left;
    padding: 5px 0;
}
.sources-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.source-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background-color: #0099cc08;
    padding: 12px;
    border-radius: 8px;
}
.source-score-meter { font-size: 20px; }
.source-details { flex-grow: 1; }
.source-details strong { font-weight: 700; color: #036;}
.source-details .meta-info {
    font-style: italic;
    color: #6c757d;
    font-size: 13px;
    margin: 4px 0;
}
.source-details .reason {
    color: var(--reason-color);
    font-size: 14px;
    margin-top: 5px;
}
.source-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 20px;
}

#chat-footer {
    padding: 10px 20px 20px 20px;
    width: 100%;
    background: none;
    border: none;
}
#chat-footer.initial-pos {
    max-width: var(--max-width);
    margin: 0 auto;
}
#chat-footer.fixed-bottom {
    position: sticky;
    bottom: 0;
    border-top: none;
    background: none;
}

.chat-form {
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    background-color: var(--main-content-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
#query-input {
    width: 100%;
    border: none;
    background: none;
    padding: 16px 60px 16px 20px;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    resize: none;
    outline: none;
    max-height: 200px;
    overflow-y: auto;
}
#send-button {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background-color: var(--accent-color);
    color: white;
    cursor: pointer;
    font-size: 16px;
}
#send-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
.footer-note {
    text-align: center;
    font-size: 12px;
    color: var(--placeholder-color);
    margin-top: 10px;
}

@media (max-width: 720px) {
    #header-links { visibility: hidden; }
    .header-btn>span { display: none; }
    .welcome-text h1 { font-size: 2rem; }
    .welcome-text ul { flex-direction: column; }
    .message { max-width: 95%; }
}