Spaces:
Sleeping
Sleeping
| /* ====================== | |
| THEME β edit :root only to retheme the entire app. | |
| Every color in the file is a variable reference β nothing hardcoded below this block. | |
| ====================== */ | |
| :root { | |
| /* Brand */ | |
| --color-primary: #4f46e5; /* main accent β borders, buttons, user bubble */ | |
| --color-primary-dark: #4338ca; /* hover and focus states */ | |
| --color-primary-glow: rgba(79,70,229,0.15); /* soft focus ring shadow */ | |
| /* Backgrounds */ | |
| --color-bg: #f8fafc; /* page, chat area */ | |
| --color-bg-surface: white; /* header, input box, button fills */ | |
| /* Text */ | |
| --color-text: #0f172a; /* body text */ | |
| --color-text-dark: #1e293b; /* message text, labels */ | |
| --color-text-on-primary: white; /* text on colored backgrounds (user bubble, hover) */ | |
| /* Borders */ | |
| --color-border: #e2e8f0; /* header divider */ | |
| --color-border-input: gray; /* textarea inner border */ | |
| /* Chat bubbles */ | |
| --color-bubble-bot: lightblue; /* assistant bubble fill */ | |
| --color-bubble-user: #4f46e5; /* user bubble fill β usually matches primary */ | |
| /* Carousel β indigoβteal gradient theme */ | |
| --arc-bg-from: #EEEDFE; /* gradient start β lightest indigo */ | |
| --arc-bg-to: #E1F5EE; /* gradient end β lightest teal */ | |
| --arc-border: #9FE1CB; /* carousel border and dot inactive */ | |
| --arc-title: #26215C; /* slide title β darkest indigo */ | |
| --arc-body: #085041; /* slide body β darkest teal */ | |
| --arc-creds: #0F6E56; /* credentials line β mid teal */ | |
| --arc-dot-active: #0F6E56; /* active dot */ | |
| --arc-btn: #0F6E56; /* arrow button text */ | |
| --arc-quote: #3C3489; /* quote text β dark indigo */ | |
| --arc-attr: #534AB7; /* attribution β mid indigo */ | |
| --arc-sep: #9FE1CB; /* Β· separator in credentials */ | |
| --arc-btn-hover: rgba(255,255,255,0.5);/* arrow hover fill */ | |
| --arc-dot-inactive: #9FE1CB; /* inactive dot */ | |
| } | |
| /* ====================== | |
| GLOBAL | |
| ====================== */ | |
| body, .gradio-container { | |
| font-family: "Inter","Segoe UI",Roboto,Arial,sans-serif; | |
| font-size: 16px; | |
| background: var(--color-bg); | |
| color: var(--color-text); | |
| } | |
| .gradio-container { | |
| max-width: 1250px; | |
| margin: auto; | |
| } | |
| /* ====================== | |
| HIDE IMAGE TOOLBAR | |
| Using only stable selectors β no Svelte hash classes (e.g. svelte-phx28p) | |
| which change on every Gradio build. | |
| Strategy: hide any div that appears after the <figure> (the image element) | |
| inside the header, using the structural [data-testid] and sibling selectors | |
| which are tied to Gradio's public API, not its internal build output. | |
| If the toolbar reappears after a Gradio upgrade, inspect the DOM and add | |
| the new structural selector here β never copy a svelte-* class. | |
| ====================== */ | |
| /* Any overlay or toolbar div adjacent to the image figure */ | |
| #header-bar figure + div, | |
| #header-bar figure ~ div, | |
| #header-bar [data-testid="image"] ~ div, | |
| #header-bar [data-testid="image"] + div { | |
| display: none ; | |
| pointer-events: none ; | |
| } | |
| /* Gradio's named icon button container β stable across versions */ | |
| #header-bar .icon-button-wrapper { | |
| display: none ; | |
| } | |
| /* ====================== | |
| STICKY HEADER | |
| ====================== */ | |
| #header-bar { | |
| position: sticky; | |
| top: 0; | |
| z-index: 1000; | |
| background: var(--color-bg-surface); | |
| border-bottom: none ; | |
| padding-bottom: 0 ; | |
| } | |
| /* Target the actual Gradio flex row inside the header β align columns to top */ | |
| #header-bar > div, | |
| #header-bar > div > div { | |
| align-items: flex-start ; | |
| } | |
| /* Remove ALL Gradio block padding/border/shadow inside header */ | |
| #header-bar .block, | |
| #header-bar .column, | |
| #header-bar .gap { | |
| padding: 0 ; | |
| border: none ; | |
| box-shadow: none ; | |
| background: none ; | |
| margin: 0 ; | |
| } | |
| /* Constrain image */ | |
| #header-bar [data-testid="image"] { | |
| margin: 0 ; | |
| padding: 0 ; | |
| } | |
| #header-bar figure { | |
| margin: 0 ; | |
| padding: 0 ; | |
| } | |
| #header-bar [data-testid="image"] img, | |
| #header-bar figure img { | |
| max-height: 120px ; | |
| width: auto ; | |
| display: block; | |
| object-fit: cover; | |
| border-radius: 8px; | |
| } | |
| #header-bar .html-container { | |
| padding-top: 0 ; | |
| } | |
| /* ====================== | |
| CHAT CONTAINER | |
| Outer wrapper clips β scroll lives inside .bubble-wrap[role="log"]. | |
| scroll-behavior: smooth intentionally absent β fights JS scrollTop. | |
| ====================== */ | |
| #chatbot { | |
| border: 2px solid var(--color-primary); | |
| border-radius: 12px; | |
| padding: 15px; | |
| background: var(--color-bg); | |
| height: 480px; | |
| overflow: hidden ; | |
| } | |
| #chatbot [role="log"] { | |
| overflow-y: auto ; | |
| height: 100% ; | |
| scroll-behavior: auto ; | |
| } | |
| /* ====================== | |
| MESSAGE STRUCTURE | |
| ====================== */ | |
| #chatbot .message-row { | |
| width: 100% ; | |
| } | |
| #chatbot .wrap { | |
| width: 100% ; | |
| max-width: 100% ; | |
| display: flex; | |
| } | |
| /* shared bubble base */ | |
| #chatbot .message { | |
| width: 100% ; | |
| max-width: 100% ; | |
| padding: 12px 16px; | |
| border-radius: 14px; | |
| font-size: 14px; | |
| line-height: 1.6; | |
| word-break: break-word; | |
| } | |
| /* assistant bubble */ | |
| #chatbot .message.assistant { | |
| background: var(--color-bubble-bot); | |
| border: 2px solid var(--color-primary); | |
| max-width: 95% ; | |
| width: fit-content; | |
| margin-right: auto; | |
| color: var(--color-text-dark); | |
| } | |
| /* user bubble */ | |
| #chatbot .message.user { | |
| background: var(--color-bubble-user); | |
| margin-left: auto; | |
| max-width: 90% ; | |
| width: 100% ; | |
| } | |
| #chatbot .message.user, | |
| #chatbot .message.user * { | |
| color: var(--color-text-on-primary) ; | |
| } | |
| /* ====================== | |
| REMOVE EXTRA TEXT WRAP | |
| ====================== */ | |
| #chatbot p { | |
| margin: 0; | |
| white-space: normal; | |
| } | |
| /* ====================== | |
| QUESTION INPUT | |
| ====================== */ | |
| #question-box { | |
| border: 1px solid var(--color-primary) ; | |
| border-radius: 12px; | |
| padding: 10px 14px; | |
| background: var(--color-bg-surface); | |
| } | |
| #question-box textarea { | |
| border: 1px solid var(--color-border-input) ; | |
| outline: none ; | |
| box-shadow: none ; | |
| resize: none; | |
| overflow-y: auto ; | |
| min-height: 28px; | |
| line-height: 1.5; | |
| font-size: 14px; | |
| width: 100%; | |
| } | |
| #question-box [data-testid="block-info"], | |
| #question-box .label-container { | |
| font-weight: 700; | |
| color: var(--color-text-dark); | |
| margin-bottom: 6px; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| gap: 12px; | |
| } | |
| .char-counter { | |
| font-size: 12px; | |
| color: #999; | |
| font-weight: 400; | |
| white-space: nowrap; | |
| } | |
| .char-counter.warning { | |
| color: #ffa500; | |
| font-weight: 500; | |
| } | |
| .char-counter.critical { | |
| color: #ff6b6b; | |
| font-weight: 600; | |
| } | |
| #question-box:focus-within { | |
| border-color: var(--color-primary-dark) ; | |
| box-shadow: 0 0 0 2px var(--color-primary-glow); | |
| } | |
| /* ====================== | |
| FOLLOWUP BUTTONS | |
| ====================== */ | |
| #followups { | |
| margin-top: 10px; | |
| display: flex; | |
| flex-wrap: wrap; | |
| gap: 10px; | |
| } | |
| #followups button { | |
| border-radius: 18px ; | |
| border: 1px solid var(--color-primary) ; | |
| background: var(--color-bg-surface) ; | |
| color: var(--color-primary) ; | |
| padding: 6px 12px; | |
| font-size: 12px; | |
| cursor: pointer; | |
| transition: all 0.2s ease; | |
| } | |
| #followups button:hover { | |
| background: var(--color-primary) ; | |
| color: var(--color-text-on-primary) ; | |
| transform: translateY(-2px); | |
| } | |
| /* ====================== | |
| HEADER CAROUSEL | |
| ====================== */ | |
| .arc-hook { | |
| font-size: 18px; | |
| font-weight: 500; | |
| color: var(--color-text); | |
| margin: 0 0 3px; | |
| } | |
| .arc-hook-sub { | |
| font-size: 15px; | |
| color: var(--color-text-dark); | |
| margin: 0 0 12px; | |
| } | |
| .arc-divider { | |
| display: none ; | |
| } | |
| .arc-wrap { | |
| background: linear-gradient(135deg, var(--arc-bg-from) 0%, var(--arc-bg-to) 100%); | |
| border: 0.5px solid var(--arc-border); | |
| border-radius: 12px; | |
| padding: 16px 16px 12px; | |
| } | |
| .arc-overflow { | |
| overflow: hidden; | |
| } | |
| .arc-slides { | |
| display: flex; | |
| transition: transform 0.38s ease; | |
| } | |
| .arc-slide { | |
| min-width: 100%; | |
| box-sizing: border-box; | |
| min-height: 55px; | |
| } | |
| .arc-title { | |
| font-size: 15px; | |
| font-weight: 700; | |
| color: var(--arc-title); | |
| margin: 0 0 5px; | |
| } | |
| .arc-body { | |
| font-size: 12px; | |
| color: var(--arc-body); | |
| line-height: 1.6; | |
| margin: 0; | |
| } | |
| .arc-body-spaced { | |
| margin-top: 6px; | |
| } | |
| .arc-creds { | |
| font-size: 11px; | |
| font-weight: 500; | |
| color: var(--arc-creds); | |
| margin: 0; | |
| } | |
| .arc-sep { | |
| margin: 0 5px; | |
| color: var(--arc-sep); | |
| font-weight: 400; | |
| } | |
| .arc-quote { | |
| font-size: 12px; | |
| color: var(--arc-quote); | |
| line-height: 1.65; | |
| margin: 0 0 5px; | |
| font-style: italic; | |
| } | |
| .arc-attr { | |
| font-size: 11px; | |
| color: var(--arc-attr); | |
| margin: 0; | |
| } | |
| /* ββ Nav row ββ */ | |
| .arc-nav { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 10px; | |
| margin-top: 8px; | |
| margin-bottom: 0; | |
| height: 28px; | |
| line-height: 0; | |
| } | |
| /* ββ Dots ββ */ | |
| .arc-dots { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 6px; | |
| height: 28px; | |
| padding: 0; | |
| margin: 0; | |
| line-height: 0; | |
| } | |
| .arc-dots button { | |
| appearance: none ; | |
| -webkit-appearance: none ; | |
| border: none ; | |
| outline: none ; | |
| box-shadow: none ; | |
| padding: 0 ; | |
| margin: 0 ; | |
| width: 6px ; | |
| height: 6px ; | |
| min-width: 6px ; | |
| min-height: 6px ; | |
| border-radius: 50% ; | |
| cursor: pointer; | |
| flex-shrink: 0 ; | |
| display: block ; | |
| align-self: center; | |
| transform-origin: center center; | |
| background: var(--arc-dot-inactive) ; | |
| transition: background 0.2s, width 0.2s, height 0.2s; | |
| } | |
| .arc-dots button.active { | |
| background: var(--arc-dot-active) ; | |
| width: 8px ; | |
| height: 8px ; | |
| min-width: 8px ; | |
| min-height: 8px ; | |
| } | |
| /* ββ Arrow buttons β HF-hardened with all:unset ββ */ | |
| .arc-wrap .arc-nav .arc-btn { | |
| all: unset; | |
| display: inline-flex; | |
| align-items: center; | |
| justify-content: center; | |
| align-self: center; | |
| width: 28px; | |
| height: 28px; | |
| padding: 0; | |
| background: none; | |
| border: 0.5px solid var(--arc-border); | |
| border-radius: 6px; | |
| color: var(--arc-btn); | |
| font-size: 13px; | |
| cursor: pointer; | |
| line-height: 1; | |
| transition: background 0.15s; | |
| box-sizing: border-box; | |
| } | |
| .arc-wrap .arc-nav .arc-btn:hover, | |
| .arc-wrap .arc-nav .arc-btn:focus, | |
| .arc-wrap .arc-nav .arc-btn:active, | |
| .arc-wrap .arc-nav .arc-btn:focus-visible { | |
| background: var(--arc-btn-hover); | |
| outline: none; | |
| box-shadow: none; | |
| } |