Spaces:
Running
Running
| @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@800&display=swap'); | |
| .full-height { | |
| min-height: 0; | |
| } | |
| /* ── Default: centered layout (no class needed — avoids load flash) ── */ | |
| #chat-col-inner { | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: center; | |
| padding-top: 12vh; | |
| } | |
| /* Chatbot shrinks to content by default (shows examples, hides empty space) */ | |
| #main-chatbot { | |
| flex: 0 0 auto ; | |
| min-height: 0 ; | |
| transition: flex 0.4s ease; | |
| } | |
| /* ChatInterface wrapper: narrower by default (targets the non-chatbot child) */ | |
| #chat-col-inner > div:not(#main-chatbot) { | |
| max-width: 780px; | |
| width: 75%; | |
| margin: 0 auto; | |
| transition: max-width 0.4s ease, width 0.4s ease, margin 0.4s ease; | |
| } | |
| /* ── Active state: input at bottom, full layout ───────────── */ | |
| #chat-col-inner.chat-active { | |
| justify-content: flex-start ; | |
| padding-top: 0 ; | |
| } | |
| #chat-col-inner.chat-active #main-chatbot { | |
| flex: 1 1 auto ; | |
| min-height: unset ; | |
| } | |
| #chat-col-inner.chat-active > div:not(#main-chatbot) { | |
| max-width: none ; | |
| width: 100% ; | |
| margin: 0 ; | |
| } | |
| @media (max-width: 768px) { | |
| #chat-col-inner { | |
| padding-top: 6vh; | |
| } | |
| #chat-col-inner > div:not(#main-chatbot) { | |
| width: 90% ; | |
| } | |
| #chat-col-inner.chat-active > div:not(#main-chatbot) { | |
| width: 100% ; | |
| } | |
| } | |
| /* ── Title: large mono in centered mode, compact h1 in active mode ── */ | |
| .title-big { | |
| overflow: hidden; | |
| max-height: 160px; | |
| opacity: 1; | |
| transition: max-height 0.4s ease, opacity 0.3s ease; | |
| text-align: center; | |
| padding: 0.5rem 0 0.8rem; | |
| } | |
| .title-big-name { | |
| font-family: 'JetBrains Mono', 'Courier New', monospace; | |
| font-size: 3.8rem; | |
| font-weight: 900; | |
| letter-spacing: 0.06em; | |
| line-height: 1; | |
| } | |
| .title-big-sub { | |
| margin-top: 0.45em; | |
| font-size: 0.92rem; | |
| color: #999; | |
| letter-spacing: 0.01em; | |
| } | |
| .title-small { | |
| overflow: hidden; | |
| max-height: 0; | |
| opacity: 0; | |
| transition: max-height 0.4s ease, opacity 0.3s ease; | |
| text-align: center; | |
| } | |
| body.chat-active .title-big { | |
| max-height: 0; | |
| opacity: 0; | |
| } | |
| body.chat-active .title-small { | |
| max-height: 80px; | |
| opacity: 1; | |
| } | |
| /* Map panel: propagate height through Gradio's wrapper divs */ | |
| .map-panel { | |
| height: 100%; | |
| } | |
| .map-panel .prose, | |
| .map-panel > div { | |
| height: 100% ; | |
| max-height: 100% ; | |
| } | |
| /* Override folium's padding-bottom aspect-ratio trick */ | |
| .map-panel div[style*="padding-bottom"] { | |
| padding-bottom: 0 ; | |
| height: 100% ; | |
| } | |
| /* Hide folium's Jupyter notebook trust fallback message */ | |
| .map-panel div[style*="padding-bottom"] > span { | |
| display: none; | |
| } | |
| .map-panel iframe { | |
| height: 100% ; | |
| position: relative ; | |
| } | |
| @media (max-width: 768px) { | |
| /* Fixed-height app layout — keeps input pinned at the bottom */ | |
| html, body { | |
| height: 100dvh ; | |
| overflow: hidden ; | |
| } | |
| .gradio-container, | |
| .gradio-container > .main, | |
| .gradio-container > .main > .wrap { | |
| height: 100% ; | |
| min-height: unset ; | |
| overflow: hidden ; | |
| } | |
| /* Main row fills remaining height; other rows stay auto */ | |
| .full-height { | |
| flex: 1 1 auto ; | |
| height: auto ; | |
| min-height: 0 ; | |
| overflow: hidden ; | |
| } | |
| /* Map panel: hidden on mobile (map-col is hidden) */ | |
| .map-panel { display: none ; } | |
| /* Reduce side padding */ | |
| #chat-col-inner { | |
| padding-left: 4px ; | |
| padding-right: 4px ; | |
| } | |
| /* Prevent footer row from growing alongside the main row */ | |
| #footer-row { | |
| flex: 0 0 auto ; | |
| min-height: unset ; | |
| height: auto ; | |
| } | |
| #footer-row > *, | |
| #footer-row .grow-children { | |
| height: auto ; | |
| min-height: unset ; | |
| align-items: center ; | |
| } | |
| } | |
| /* Dynamic split layout: map column hidden until a real map is available */ | |
| @media (min-width: 769px) { | |
| #map-col { | |
| flex: 0 0 0% ; | |
| width: 0 ; | |
| max-width: 0 ; | |
| min-width: 0 ; | |
| overflow: hidden ; | |
| opacity: 0; | |
| transition: flex-basis 0.5s cubic-bezier(0.4, 0, 0.2, 1), | |
| max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1), | |
| opacity 0.4s ease 0.1s; | |
| } | |
| #map-col.map-active { | |
| flex: 1 1 50% ; | |
| width: auto ; | |
| max-width: 50% ; | |
| min-width: 0 ; | |
| overflow: visible ; | |
| opacity: 1; | |
| } | |
| } | |
| /* ── Mobile: hide title row + map column ── */ | |
| @media (max-width: 768px) { | |
| #title-row { display: none ; } | |
| #map-col { display: none ; } | |
| } | |
| /* ── In-chat map button (mobile only) ── */ | |
| #map-chat-btn { | |
| padding: 4px 8px 6px; | |
| } | |
| #map-chat-btn button { | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 8px; | |
| padding: 9px 16px; | |
| background: var(--background-fill-secondary, #f3f4f6); | |
| border: 1px solid var(--border-color-primary, rgba(0, 0, 0, 0.1)); | |
| border-radius: 14px; | |
| cursor: pointer; | |
| font-size: 0.875rem; | |
| font-weight: 500; | |
| color: var(--body-text-color, #374151); | |
| font-family: inherit; | |
| transition: background 0.15s ease; | |
| } | |
| #map-chat-btn button:hover { | |
| background: var(--background-fill-primary, #e5e7eb); | |
| } | |
| /* Never show on desktop */ | |
| @media (min-width: 769px) { | |
| #map-chat-btn { display: none ; } | |
| } | |
| /* ── Fullscreen map overlay (mobile) ── */ | |
| #map-overlay { | |
| display: flex; | |
| flex-direction: column; | |
| position: fixed; | |
| inset: 0; | |
| z-index: 10000; | |
| background: #000; | |
| /* Hidden: slid off-screen below */ | |
| visibility: hidden; | |
| transform: translateY(100%); | |
| transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), | |
| visibility 0s linear 0.35s; | |
| pointer-events: none; | |
| } | |
| #map-overlay.active { | |
| visibility: visible; | |
| transform: translateY(0); | |
| pointer-events: auto; | |
| transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), | |
| visibility 0s linear 0s; | |
| } | |
| #map-overlay-bar { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| padding: 10px 16px; | |
| background: #1f2937; | |
| color: #f9fafb; | |
| flex-shrink: 0; | |
| min-height: 48px; | |
| } | |
| .map-overlay-title { | |
| font-size: 1rem; | |
| font-weight: 600; | |
| letter-spacing: 0.02em; | |
| } | |
| #map-overlay-close { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| background: none; | |
| border: none; | |
| color: #f9fafb; | |
| cursor: pointer; | |
| padding: 6px; | |
| border-radius: 8px; | |
| transition: background 0.15s ease; | |
| } | |
| #map-overlay-close:hover, | |
| #map-overlay-close:focus-visible { | |
| background: rgba(255, 255, 255, 0.12); | |
| outline: none; | |
| } | |
| #map-overlay-content { | |
| flex: 1; | |
| overflow: hidden; | |
| background: #fff; | |
| } | |
| /* Never show the overlay on desktop */ | |
| @media (min-width: 769px) { | |
| #map-overlay { display: none ; } | |
| } | |
| /* ── Footer bar ── */ | |
| #footer-bar { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| width: 100%; | |
| padding: 0.2rem 0; | |
| } | |
| .footer-attribution { | |
| text-align: center; | |
| color: #b0b8c1; | |
| font-size: 0.8rem; | |
| margin: 0.4rem 0 0.2rem; | |
| } | |
| .footer-mobile-btns { | |
| display: none; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 10px; | |
| padding: 4px 0; | |
| } | |
| @media (max-width: 768px) { | |
| .footer-attribution { display: none; } | |
| .footer-mobile-btns { display: flex; } | |
| } | |
| #footer-info-btn { | |
| display: inline-flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 5px; | |
| height: 30px; | |
| padding: 0 14px; | |
| line-height: 1; | |
| background: transparent; | |
| border: 1px solid var(--border-color-primary, rgba(0, 0, 0, 0.15)); | |
| border-radius: 15px; | |
| font-size: 0.82rem; | |
| font-family: inherit; | |
| color: var(--body-text-color-subdued, #6b7280); | |
| cursor: pointer; | |
| transition: background 0.15s ease; | |
| } | |
| #footer-info-btn:hover { | |
| background: var(--background-fill-secondary, rgba(0, 0, 0, 0.05)); | |
| } | |
| #footer-info-btn svg { | |
| display: block; | |
| flex-shrink: 0; | |
| } | |
| /* ── Info modal ── */ | |
| #info-modal-backdrop { | |
| display: none; | |
| position: fixed; | |
| inset: 0; | |
| background: rgba(0, 0, 0, 0.45); | |
| z-index: 10001; | |
| align-items: flex-end; | |
| justify-content: center; | |
| padding: 0; | |
| } | |
| #info-modal-backdrop.active { | |
| display: flex; | |
| } | |
| #info-modal { | |
| background: var(--background-fill-primary, #fff); | |
| border-radius: 20px 20px 0 0; | |
| padding: 28px 24px 32px; | |
| width: 100%; | |
| max-width: 540px; | |
| position: relative; | |
| max-height: 60vh; | |
| overflow-y: auto; | |
| } | |
| #info-modal p { | |
| font-size: 0.82rem; | |
| color: #6b7280; | |
| line-height: 1.6; | |
| margin: 0 0 0.75rem; | |
| } | |
| #info-modal p:last-child { margin-bottom: 0; } | |
| /* ── Image lightbox for chatbot charts ── */ | |
| #img-lightbox { | |
| display: none; | |
| position: fixed; | |
| inset: 0; | |
| z-index: 20000; | |
| background: rgba(0, 0, 0, 0.85); | |
| align-items: center; | |
| justify-content: center; | |
| cursor: zoom-out; | |
| } | |
| #img-lightbox.active { | |
| display: flex; | |
| } | |
| #img-lightbox img { | |
| max-width: 92vw; | |
| max-height: 92vh; | |
| object-fit: contain; | |
| border-radius: 4px; | |
| box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5); | |
| cursor: default; | |
| } | |
| /* Make chatbot area blend with page background */ | |
| #main-chatbot { | |
| background: #f9fafb ; | |
| border: none ; | |
| box-shadow: none ; | |
| } | |
| #main-chatbot > div, | |
| #main-chatbot .bubble-wrap { | |
| background: transparent ; | |
| } | |
| /* Dark mode */ | |
| .dark #main-chatbot, | |
| [data-theme="dark"] #main-chatbot { | |
| background: #0c0f18 ; | |
| } | |
| /* Cap example grid at 2 columns (1 on narrow screens) */ | |
| #main-chatbot .examples { | |
| grid-template-columns: 1fr ; | |
| max-width: none ; | |
| } | |
| @media (min-width: 600px) { | |
| #main-chatbot .examples { | |
| grid-template-columns: 1fr 1fr ; | |
| } | |
| } | |
| /* Keep example buttons with their own card background */ | |
| #main-chatbot button.example { | |
| background: #fff ; | |
| } | |
| .dark #main-chatbot button.example, | |
| [data-theme="dark"] #main-chatbot button.example { | |
| background: #222936 ; | |
| } | |
| /* Zoom cursor hint on the image */ | |
| #main-chatbot .image-frame { | |
| cursor: zoom-in; | |
| } | |
| /* Hide Chrome's default scrollbar arrows on the chat input textarea */ | |
| .multimodal-textbox textarea { | |
| overflow-y: auto ; | |
| } | |