Mock-app / src /static /css /gradio_styles.css
mohdomer's picture
Update src/static/css/gradio_styles.css
49ad39e verified
Raw History Blame Contribute Delete
14 kB
/*
* PTEra β€” Gradio Component Overrides
* Complements the base design system in PROFESSIONAL_CSS (main.py).
* All Streamlit (.st*) rules removed β€” they have no effect in Gradio.
*
* Design tokens (--gold, --ink, --teal, etc.) are defined in main.py
* and cascade here automatically.
*/
/* ─── GRADIO SHELL ───────────────────────────────────────────── */
/* Remove Gradio's default white page wrapper */
.gradio-container,
.gradio-container .main,
.gradio-container .wrap {
background: transparent !important;
box-shadow: none !important;
border: none !important;
max-width: 1280px !important;
margin: 0 auto !important;
padding: 0 1.25rem !important;
}
/* Hide Gradio branding footer */
footer,
.gradio-container > footer,
.svelte-1ax1toq {
display: none !important;
}
/* ─── GRADIO PANELS & BLOCKS ─────────────────────────────────── */
.gr-panel,
.gr-box,
.gr-form,
.gr-column,
.gr-group {
background: transparent !important;
border: none !important;
box-shadow: none !important;
padding: 0 !important;
}
/* Block-level container spacing */
.gr-block.gr-box {
gap: 1rem !important;
}
/* ─── GRADIO TABS ────────────────────────────────────────────── */
/* Hide the default Gradio tab bar everywhere except where we explicitly show it */
.gr-tab-nav,
.tabs > .tab-nav {
display: none !important;
}
/* Active tab content pane β€” no extra chrome */
.gr-tab-item,
.tabitem {
background: transparent !important;
border: none !important;
padding: 0 !important;
}
/* ─── GRADIO TEXTBOX ─────────────────────────────────────────── */
.gr-textbox,
.gr-text-input {
background: rgba(255,255,255,0.05) !important;
border: 1px solid rgba(255,255,255,0.10) !important;
border-radius: 14px !important;
color: #e2e8f0 !important;
font-size: 0.95rem !important;
transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
}
.gr-textbox:focus-within,
.gr-text-input:focus-within {
border-color: var(--gold, #c9a84c) !important;
box-shadow: 0 0 0 3px rgba(201,168,76,0.18) !important;
}
.gr-textbox textarea,
.gr-textbox input {
background: transparent !important;
border: none !important;
color: #e2e8f0 !important;
font-size: 0.95rem !important;
caret-color: var(--gold, #c9a84c) !important;
padding: 0.85rem 1.1rem !important;
}
.gr-textbox textarea::placeholder,
.gr-textbox input::placeholder {
color: #475569 !important;
}
/* Character count / label row */
.gr-textbox .gr-block-label,
.gr-text-input .gr-block-label {
color: #64748b !important;
font-size: 0.72rem !important;
font-weight: 600 !important;
letter-spacing: 0.08em !important;
text-transform: uppercase !important;
}
/* ─── GRADIO DROPDOWN / SELECT ───────────────────────────────── */
.gr-dropdown,
.gr-dropdown .wrap-inner {
background: rgba(255,255,255,0.05) !important;
border: 1px solid rgba(255,255,255,0.10) !important;
border-radius: 14px !important;
color: #e2e8f0 !important;
}
.gr-dropdown:focus-within {
border-color: var(--gold, #c9a84c) !important;
box-shadow: 0 0 0 3px rgba(201,168,76,0.18) !important;
}
/* Dropdown popup panel */
.gr-dropdown ul,
.gr-dropdown .options {
background: #1a1d26 !important;
border: 1px solid rgba(255,255,255,0.10) !important;
border-radius: 12px !important;
box-shadow: 0 16px 40px rgba(0,0,0,0.45) !important;
overflow: hidden !important;
}
.gr-dropdown li,
.gr-dropdown .item {
color: #94a3b8 !important;
font-size: 0.9rem !important;
padding: 0.75rem 1.1rem !important;
transition: background 0.14s ease, color 0.14s ease !important;
}
.gr-dropdown li:hover,
.gr-dropdown .item:hover {
background: rgba(201,168,76,0.10) !important;
color: var(--gold-light, #e2c46a) !important;
}
.gr-dropdown li.selected,
.gr-dropdown .item.selected {
background: rgba(201,168,76,0.15) !important;
color: var(--gold-light, #e2c46a) !important;
font-weight: 600 !important;
}
/* ─── GRADIO RADIO ───────────────────────────────────────────── */
.gr-radio-row,
.gr-radio {
gap: 0.5rem !important;
}
/* Individual radio item container */
.gr-radio label,
.gr-radio .label-wrap {
background: rgba(255,255,255,0.03) !important;
border: 1px solid rgba(255,255,255,0.08) !important;
border-radius: 10px !important;
padding: 0.85rem 1.1rem !important;
color: #94a3b8 !important;
font-size: 0.9rem !important;
font-weight: 500 !important;
cursor: pointer !important;
transition: all 0.16s ease !important;
}
.gr-radio label:hover {
background: rgba(201,168,76,0.07) !important;
border-color: rgba(201,168,76,0.22) !important;
color: var(--gold-light, #e2c46a) !important;
transform: translateX(3px) !important;
}
/* Checked state */
.gr-radio input[type="radio"]:checked + label,
.gr-radio .selected {
background: rgba(201,168,76,0.12) !important;
border-color: rgba(201,168,76,0.35) !important;
color: var(--gold-light, #e2c46a) !important;
font-weight: 600 !important;
}
/* Native radio dot β€” hide in favour of the border highlight */
.gr-radio input[type="radio"] {
accent-color: var(--gold, #c9a84c) !important;
}
/* ─── GRADIO SLIDER ──────────────────────────────────────────── */
.gr-slider input[type="range"] {
accent-color: var(--gold, #c9a84c) !important;
}
.gr-slider .output-class {
color: var(--gold-light, #e2c46a) !important;
font-weight: 600 !important;
}
/* ─── GRADIO CHECKBOX ────────────────────────────────────────── */
.gr-checkbox input[type="checkbox"] {
accent-color: var(--gold, #c9a84c) !important;
}
.gr-checkbox label {
color: #94a3b8 !important;
font-size: 0.9rem !important;
}
/* ─── GRADIO MARKDOWN OUTPUT ─────────────────────────────────── */
.gr-markdown,
.gr-markdown p,
.prose p {
color: #94a3b8 !important;
font-size: 0.95rem !important;
line-height: 1.72 !important;
}
.gr-markdown h1, .gr-markdown h2, .gr-markdown h3,
.gr-markdown h4, .gr-markdown h5, .gr-markdown h6 {
font-family: 'DM Serif Display', Georgia, serif !important;
color: #e2e8f0 !important;
-webkit-text-fill-color: #e2e8f0 !important;
background: none !important;
}
.gr-markdown strong, .gr-markdown b {
color: var(--gold-light, #e2c46a) !important;
font-weight: 700 !important;
}
.gr-markdown em, .gr-markdown i {
color: #cbd5e1 !important;
}
.gr-markdown code {
background: rgba(255,255,255,0.07) !important;
border: 1px solid rgba(255,255,255,0.10) !important;
border-radius: 5px !important;
padding: 0.15em 0.45em !important;
font-family: 'JetBrains Mono', monospace !important;
font-size: 0.85em !important;
color: var(--teal, #2dd4bf) !important;
}
.gr-markdown pre {
background: rgba(13,15,20,0.8) !important;
border: 1px solid rgba(255,255,255,0.08) !important;
border-radius: 12px !important;
padding: 1.25rem !important;
}
.gr-markdown ul,
.gr-markdown ol {
padding-left: 1.4rem !important;
}
.gr-markdown li {
color: #94a3b8 !important;
margin-bottom: 0.4rem !important;
}
.gr-markdown a {
color: var(--gold-light, #e2c46a) !important;
text-decoration: none !important;
border-bottom: 1px solid rgba(201,168,76,0.3) !important;
transition: border-color 0.14s ease !important;
}
.gr-markdown a:hover {
border-bottom-color: var(--gold-light, #e2c46a) !important;
}
.gr-markdown hr {
border: none !important;
border-top: 1px solid rgba(255,255,255,0.08) !important;
margin: 1.5rem 0 !important;
}
.gr-markdown blockquote {
border-left: 3px solid var(--gold, #c9a84c) !important;
background: rgba(201,168,76,0.05) !important;
padding: 0.75rem 1.25rem !important;
border-radius: 0 8px 8px 0 !important;
margin: 1rem 0 !important;
color: #cbd5e1 !important;
}
/* ─── GRADIO AUDIO COMPONENT ─────────────────────────────────── */
.gr-audio,
.gr-audio audio {
background: rgba(255,255,255,0.04) !important;
border: 1px solid rgba(255,255,255,0.08) !important;
border-radius: 14px !important;
padding: 0.75rem !important;
width: 100% !important;
}
.gr-audio .controls {
filter: invert(1) hue-rotate(180deg) !important;
}
/* ─── GRADIO FILE / IMAGE UPLOAD ─────────────────────────────── */
.gr-file,
.gr-image {
background: rgba(255,255,255,0.03) !important;
border: 1px dashed rgba(255,255,255,0.12) !important;
border-radius: 14px !important;
transition: border-color 0.18s ease !important;
}
.gr-file:hover,
.gr-image:hover {
border-color: rgba(201,168,76,0.35) !important;
background: rgba(201,168,76,0.04) !important;
}
.gr-file .upload-text,
.gr-image .upload-text {
color: #475569 !important;
}
/* ─── GRADIO DATAFRAME / TABLE ───────────────────────────────── */
.gr-dataframe table {
border-collapse: collapse !important;
width: 100% !important;
}
.gr-dataframe th {
background: rgba(201,168,76,0.10) !important;
color: var(--gold-light, #e2c46a) !important;
font-size: 0.75rem !important;
font-weight: 700 !important;
letter-spacing: 0.08em !important;
text-transform: uppercase !important;
padding: 0.75rem 1rem !important;
border-bottom: 1px solid rgba(201,168,76,0.2) !important;
}
.gr-dataframe td {
color: #94a3b8 !important;
padding: 0.7rem 1rem !important;
border-bottom: 1px solid rgba(255,255,255,0.05) !important;
font-size: 0.88rem !important;
}
.gr-dataframe tr:hover td {
background: rgba(255,255,255,0.025) !important;
color: #e2e8f0 !important;
}
/* ─── GRADIO PROGRESS / LOADING ──────────────────────────────── */
/* Spinner */
.gr-loading .loader {
border-color: rgba(255,255,255,0.12) !important;
border-top-color: var(--gold, #c9a84c) !important;
}
/* Generation progress bar (streaming) */
.generating {
border: none !important;
background: linear-gradient(90deg, var(--gold, #c9a84c), var(--teal, #2dd4bf)) !important;
height: 2px !important;
}
/* ─── GRADIO ROW SPACING ─────────────────────────────────────── */
.gr-row {
gap: 1rem !important;
align-items: stretch !important;
}
/* ─── GRADIO ACCORDION ───────────────────────────────────────── */
.gr-accordion {
background: rgba(255,255,255,0.03) !important;
border: 1px solid rgba(255,255,255,0.08) !important;
border-radius: 14px !important;
overflow: hidden !important;
}
.gr-accordion .label-wrap {
padding: 1rem 1.25rem !important;
color: #94a3b8 !important;
font-weight: 600 !important;
font-size: 0.9rem !important;
transition: background 0.16s ease !important;
}
.gr-accordion .label-wrap:hover {
background: rgba(201,168,76,0.07) !important;
color: var(--gold-light, #e2c46a) !important;
}
.gr-accordion .inner {
padding: 1rem 1.25rem 1.25rem !important;
border-top: 1px solid rgba(255,255,255,0.07) !important;
}
/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,168,76,0.35); }
/* ─── SELECTION HIGHLIGHT ────────────────────────────────────── */
::selection {
background: rgba(201,168,76,0.28) !important;
color: #f0f2f7 !important;
}
/* ─── FOCUS RING (accessibility) ─────────────────────────────── */
*:focus-visible {
outline: 2px solid var(--gold, #c9a84c) !important;
outline-offset: 2px !important;
}
/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
.gradio-container,
.gradio-container .main {
padding: 0 0.75rem !important;
}
.gr-row {
flex-direction: column !important;
}
}