/* ============================ GLOBAL THEME & VARIABLES ============================ */ :root { /* Text Colors */ --primarytext-color: #1a1a1a; --secondarytext-color: #555; /* Primary Colors */ --primary-dark: #345da8; --primary-light: #a8b5c9; /* Secondary Colors */ --secondary-dark: #063d80; --secondary-light: #6ea1fa; /* Chat & Container Colors */ --chathistory_area: #f0f1f4; --container-color: #f5f6f8; --Send: #6ea1fa; --Send-hover: #87d0d5; --clear: #b2b8c2; --clear-hover: #2c5be0; --text_areabackground: #fafafa; /* Chat Bubble Colors */ --bot-bubble-color: #b9c8e3; --user-bubble-color: #e3eaf6; /* Scrollbar Colors */ --scrollbar-bg: #d0d3d8; --scrollbar-thumb: #a2a6ad; --scrollbar-thumb-hover: #888d94; /* Border & Radius */ --border-thin: 1px; --border-medium: 2px; --border-default: 1px; --border-focus: 2px; --border-hover: 3px; --button-border: 2px; --radius-sm: 4px; --radius-md: 6px; } /* ============================ DARK MODE THEME (SOFTER) ============================ */ @media (prefers-color-scheme: dark) { :root { --primarytext-color: #f8f8f8; --secondarytext-color: #d0d3d8; --primary-dark: #27477d; --primary-light: #7d8da9; --secondary-dark: #042a59; --secondary-light: #5e88d6; --chathistory_area: #202327; --container-color: #1b1d20; --Send: #5e88d6; --Send-hover: #7ac4c9; --clear: #7a7f88; --clear-hover: #5e88d6; --text_areabackground: #25282c; --bot-bubble-color: #425575; --user-bubble-color: #566583; --scrollbar-bg: #2b2e33; --scrollbar-thumb: #4b4f56; --scrollbar-thumb-hover: #5e636b; } } /* ============================ FONT IMPORT & BASE STYLING ============================ */ @import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap'); body { background: var(--text_areabackground); color: var(--primarytext-color); font-family: "Oswald", sans-serif; margin: 0; } * { color: var(--primarytext-color) !important; font-family: "Oswald", sans-serif !important; box-sizing: border-box; } /* ============================ CUSTOM SCROLLBAR ============================ */ ::-webkit-scrollbar { width: 12px; } ::-webkit-scrollbar-track { background: var(--scrollbar-bg); } ::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb); border-radius: 6px; border: 2px solid var(--scrollbar-bg); } ::-webkit-scrollbar-thumb:hover { background-color: var(--scrollbar-thumb-hover); } /* ============================ GRADIO CONTAINER & LAYOUT ============================ */ .gradio-container, [data-testid="block-container"], .contain { background-color: var(--container-color) !important; font-family: "Oswald", sans-serif !important; display: flex !important; flex-direction: column !important; height: 100vh !important; max-height: 100vh !important; overflow: hidden !important; } /* ============================ HEADER & NAVIGATION ============================ */ .title-header { background-color: transparent; padding: 10px; border-bottom: var(--border-focus) solid var(--primary-dark); display: flex; align-items: center; height: 60px !important; } .title-header h1 { font-size: 3.5rem; font-weight: 700; color: var(--primarytext-color); margin: 0; } /* ============================ CHAT CONTAINER ============================ */ #main-chatbot, [data-testid="chatbot"], .gradio-chatbot, [role="log"] { border: var(--border-default) solid var(--primary-dark) !important; border-radius: var(--radius-md) !important; background-color: var(--chathistory_area) !important; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important; padding: 15px !important; margin: 15px 20px !important; flex: 1 !important; overflow-y: auto !important; } /* ============================ TEXT INPUT AREA ============================ */ textarea, .gradio-textbox textarea { background-color: var(--text_areabackground) !important; border: var(--border-default) solid var(--secondary-dark) !important; border-radius: var(--radius-md) !important; color: var(--primarytext-color) !important; padding: 10px !important; resize: none !important; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important; } textarea:focus { border-color: var(--secondary-light) !important; box-shadow: 0 0 0 var(--border-focus) rgba(96, 165, 250, 0.2) !important; } /* ============================ BUTTONS ============================ */ button.send-button { background-color: var(--Send) !important; color: var(--primarytext-color) !important; border: var(--button-border) solid var(--secondary-dark) !important; border-radius: var(--radius-md) !important; padding: 8px 16px !important; font-weight: 600 !important; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); width: 100%; } button.send-button:hover { background-color: var(--Send-hover) !important; } button.clear-button { background-color: var(--clear) !important; color: var(--primarytext-color) !important; border: var(--button-border) solid var(--secondary-dark) !important; border-radius: var(--radius-md) !important; padding: 8px 16px !important; font-weight: 600 !important; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); width: 100%; } button.clear-button:hover { background-color: var(--clear-hover) !important; } /* ============================ CHAT BUBBLES (VARIABLE COLORS) ============================ */ .message.user, .message.bot { background: none !important; border: none !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; } .message-row { display: flex; margin: 8px 12px; } .message.panel-full-width { max-width: 80%; min-width: 240px; padding: 14px 20px !important; border-radius: 18px !important; box-shadow: none !important; position: relative; line-height: 1.5; word-wrap: break-word; } /* Bot Bubble */ .message-row.bot-row .message.panel-full-width { background-color: var(--bot-bubble-color) !important; color: var(--primarytext-color) !important; margin-right: auto; margin-left: 0; } .message-row.bot-row .message.panel-full-width::before { content: ""; position: absolute; top: 12px; left: -10px; width: 0; height: 0; border-top: 10px solid transparent; border-right: 10px solid var(--bot-bubble-color); border-bottom: 10px solid transparent; } /* User Bubble */ .message-row.user-row .message.panel-full-width { background-color: var(--user-bubble-color) !important; color: var(--primarytext-color) !important; margin-left: auto; margin-right: 0; } .message-row.user-row .message.panel-full-width::before { content: ""; position: absolute; top: 12px; right: -10px; width: 0; height: 0; border-top: 10px solid transparent; border-left: 10px solid var(--user-bubble-color); border-bottom: 10px solid transparent; } /* ============================ RESPONSIVE ADJUSTMENTS ============================ */ @media (max-width: 768px) { .message.panel-full-width { max-width: 85%; } } /* ============================ FOOTER: RESTORE BUILT-IN GRADIO LINKS (settings, API, etc.) ============================ */ footer.svelte-czcr5b { display: flex !important; align-items: center !important; justify-content: center !important; gap: 12px !important; visibility: visible !important; position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important; background-color: var(--container-color) !important; backdrop-filter: blur(5px) !important; border-top: var(--border-default) solid rgba(0, 0, 0, 0.12) !important; padding: 8px 16px !important; z-index: 1000 !important; min-height: 36px !important; } footer.svelte-czcr5b a, footer.svelte-czcr5b button, footer.svelte-czcr5b span { color: var(--secondarytext-color) !important; font-size: 12px !important; font-family: "Oswald", sans-serif !important; text-decoration: none !important; background: none !important; border: none !important; cursor: pointer !important; opacity: 0.8; transition: opacity 0.15s ease; } footer.svelte-czcr5b a:hover, footer.svelte-czcr5b button:hover, footer.svelte-czcr5b span:hover { opacity: 1; color: var(--primarytext-color) !important; } /* Divider style between footer links */ footer.svelte-czcr5b .divider { color: var(--secondarytext-color) !important; opacity: 0.5; margin: 0 6px !important; } /* Make sure footer items never collapse */ footer.svelte-czcr5b > * { display: inline-flex !important; align-items: center !important; }