Spaces:
Running
Running
Update assets/theme.py
Browse files- assets/theme.py +248 -275
assets/theme.py
CHANGED
|
@@ -1,281 +1,254 @@
|
|
| 1 |
-
|
| 2 |
|
| 3 |
-
from typing import Iterable
|
| 4 |
-
import gradio as gr
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
secondary_hue: colors.Color | str = colors.pink,
|
| 17 |
-
neutral_hue: colors.Color | str = colors.gray,
|
| 18 |
-
spacing_size: sizes.Size | str = sizes.spacing_md,
|
| 19 |
-
radius_size: sizes.Size | str = sizes.radius_md,
|
| 20 |
-
text_size: sizes.Size | str = sizes.text_lg,
|
| 21 |
-
font: fonts.Font | str | Iterable[fonts.Font | str] = (
|
| 22 |
-
"Syne V",
|
| 23 |
-
fonts.GoogleFont("Syne"),
|
| 24 |
-
"ui-sans-serif",
|
| 25 |
-
"system-ui",
|
| 26 |
-
),
|
| 27 |
-
font_mono: fonts.Font | str | Iterable[fonts.Font | str] = (
|
| 28 |
-
"ui-monospace",
|
| 29 |
-
fonts.GoogleFont("Nunito Sans"),
|
| 30 |
-
),
|
| 31 |
-
):
|
| 32 |
-
super().__init__(
|
| 33 |
-
primary_hue=primary_hue,
|
| 34 |
-
secondary_hue=secondary_hue,
|
| 35 |
-
neutral_hue=neutral_hue,
|
| 36 |
-
spacing_size=spacing_size,
|
| 37 |
-
radius_size=radius_size,
|
| 38 |
-
text_size=text_size,
|
| 39 |
-
font=font,
|
| 40 |
-
font_mono=font_mono,
|
| 41 |
-
)
|
| 42 |
-
self.name = ("Ilaria",)
|
| 43 |
-
self.pink_50 = "#FDF2F8"
|
| 44 |
-
self.pink_100 = "#FCE7F3"
|
| 45 |
-
self.pink_200 = "#FBCFE8"
|
| 46 |
-
self.pink_300 = "#F9A8D4"
|
| 47 |
-
self.pink_400 = "#F472B6"
|
| 48 |
-
self.pink_500 = "#EC4899"
|
| 49 |
-
self.pink_600 = "#DB2777"
|
| 50 |
-
self.pink_700 = "#BE185D"
|
| 51 |
-
self.pink_800 = "#9D174D"
|
| 52 |
-
self.pink_900 = "#831843"
|
| 53 |
-
self.pink_950 = "#500724"
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
block_border_width_dark="1px",
|
| 67 |
-
block_info_text_color="*body_text_color_subdued",
|
| 68 |
-
block_info_text_color_dark="*body_text_color_subdued",
|
| 69 |
-
block_info_text_size="*text_sm",
|
| 70 |
-
block_info_text_weight="400",
|
| 71 |
-
block_label_background_fill="*background_fill_primary",
|
| 72 |
-
block_label_background_fill_dark="*background_fill_secondary",
|
| 73 |
-
block_label_border_color="*border_color_primary",
|
| 74 |
-
block_label_border_color_dark="*border_color_primary",
|
| 75 |
-
block_label_border_width="1px",
|
| 76 |
-
block_label_border_width_dark="1px",
|
| 77 |
-
block_label_margin="0",
|
| 78 |
-
block_label_padding="*spacing_sm *spacing_lg",
|
| 79 |
-
block_label_radius="calc(*radius_lg - 1px) 0 calc(*radius_lg - 1px) 0",
|
| 80 |
-
block_label_right_radius="0 calc(*radius_lg - 1px) 0 calc(*radius_lg - 1px)",
|
| 81 |
-
block_label_shadow="*block_shadow",
|
| 82 |
-
block_label_text_color="*#110F0F",
|
| 83 |
-
block_label_text_color_dark="*#110F0F",
|
| 84 |
-
block_label_text_weight="400",
|
| 85 |
-
block_padding="*spacing_xl",
|
| 86 |
-
block_radius="*radius_md",
|
| 87 |
-
block_shadow="none",
|
| 88 |
-
block_shadow_dark="none",
|
| 89 |
-
block_title_background_fill="rgb(255,255,255)",
|
| 90 |
-
block_title_background_fill_dark="rgb(255,255,255)",
|
| 91 |
-
block_title_border_color="none",
|
| 92 |
-
block_title_border_color_dark="none",
|
| 93 |
-
block_title_border_width="0px",
|
| 94 |
-
block_title_padding="*block_label_padding",
|
| 95 |
-
block_title_radius="*block_label_radius",
|
| 96 |
-
block_title_text_color="#110F0F",
|
| 97 |
-
block_title_text_color_dark="#110F0F",
|
| 98 |
-
block_title_text_size="*text_md",
|
| 99 |
-
block_title_text_weight="600",
|
| 100 |
-
body_background_fill="#FFFFFF",
|
| 101 |
-
body_background_fill_dark="#110F0F",
|
| 102 |
-
body_text_color="white",
|
| 103 |
-
body_text_color_dark="white",
|
| 104 |
-
body_text_color_subdued="*neutral_400",
|
| 105 |
-
body_text_color_subdued_dark="*neutral_400",
|
| 106 |
-
body_text_size="*text_md",
|
| 107 |
-
body_text_weight="400",
|
| 108 |
-
border_color_accent="*neutral_600",
|
| 109 |
-
border_color_accent_dark="*neutral_600",
|
| 110 |
-
border_color_primary="*neutral_800",
|
| 111 |
-
border_color_primary_dark="*neutral_800",
|
| 112 |
-
button_border_width="*input_border_width",
|
| 113 |
-
button_border_width_dark="*input_border_width",
|
| 114 |
-
button_cancel_background_fill="*button_secondary_background_fill",
|
| 115 |
-
button_cancel_background_fill_dark="*button_secondary_background_fill",
|
| 116 |
-
button_cancel_background_fill_hover="*button_cancel_background_fill",
|
| 117 |
-
button_cancel_background_fill_hover_dark="*button_cancel_background_fill",
|
| 118 |
-
button_cancel_border_color="*button_secondary_border_color",
|
| 119 |
-
button_cancel_border_color_dark="*button_secondary_border_color",
|
| 120 |
-
button_cancel_border_color_hover="*button_cancel_border_color",
|
| 121 |
-
button_cancel_border_color_hover_dark="*button_cancel_border_color",
|
| 122 |
-
button_cancel_text_color="#110F0F",
|
| 123 |
-
button_cancel_text_color_dark="#110F0F",
|
| 124 |
-
button_cancel_text_color_hover="#110F0F",
|
| 125 |
-
button_cancel_text_color_hover_dark="#110F0F",
|
| 126 |
-
button_large_padding="*spacing_lg calc(2 * *spacing_lg)",
|
| 127 |
-
button_large_radius="*radius_lg",
|
| 128 |
-
button_large_text_size="*text_lg",
|
| 129 |
-
button_large_text_weight="600",
|
| 130 |
-
button_primary_background_fill="*primary_600",
|
| 131 |
-
button_primary_background_fill_dark="*primary_600",
|
| 132 |
-
button_primary_background_fill_hover="*primary_500",
|
| 133 |
-
button_primary_background_fill_hover_dark="*primary_500",
|
| 134 |
-
button_primary_border_color="*primary_500",
|
| 135 |
-
button_primary_border_color_dark="*primary_500",
|
| 136 |
-
button_primary_border_color_hover="*primary_400",
|
| 137 |
-
button_primary_border_color_hover_dark="*primary_400",
|
| 138 |
-
button_primary_text_color="white",
|
| 139 |
-
button_primary_text_color_dark="white",
|
| 140 |
-
button_primary_text_color_hover="#110F0F",
|
| 141 |
-
button_primary_text_color_hover_dark="#110F0F",
|
| 142 |
-
button_secondary_background_fill="transparent",
|
| 143 |
-
button_secondary_background_fill_dark="transparent",
|
| 144 |
-
button_secondary_background_fill_hover="*neutral_800",
|
| 145 |
-
button_secondary_background_fill_hover_dark="*neutral_800",
|
| 146 |
-
button_secondary_border_color="*neutral_700",
|
| 147 |
-
button_secondary_border_color_dark="*neutral_700",
|
| 148 |
-
button_secondary_border_color_hover="*neutral_600",
|
| 149 |
-
button_secondary_border_color_hover_dark="*neutral_600",
|
| 150 |
-
button_secondary_text_color="white",
|
| 151 |
-
button_secondary_text_color_dark="white",
|
| 152 |
-
button_secondary_text_color_hover="*button_secondary_text_color",
|
| 153 |
-
button_secondary_text_color_hover_dark="*button_secondary_text_color",
|
| 154 |
-
button_small_padding="*spacing_sm calc(2 * *spacing_sm)",
|
| 155 |
-
button_small_radius="*radius_lg",
|
| 156 |
-
button_small_text_size="*text_md",
|
| 157 |
-
button_small_text_weight="400",
|
| 158 |
-
button_transition="0.3s ease all",
|
| 159 |
-
checkbox_background_color="*neutral_700",
|
| 160 |
-
checkbox_background_color_dark="*neutral_700",
|
| 161 |
-
checkbox_background_color_focus="*checkbox_background_color",
|
| 162 |
-
checkbox_background_color_focus_dark="*checkbox_background_color",
|
| 163 |
-
checkbox_background_color_hover="*checkbox_background_color",
|
| 164 |
-
checkbox_background_color_hover_dark="*checkbox_background_color",
|
| 165 |
-
checkbox_background_color_selected="*pink_600",
|
| 166 |
-
checkbox_background_color_selected_dark="*pink_600",
|
| 167 |
-
checkbox_border_color="*neutral_700",
|
| 168 |
-
checkbox_border_color_dark="*neutral_700",
|
| 169 |
-
checkbox_border_color_focus="*pink_500",
|
| 170 |
-
checkbox_border_color_focus_dark="*pink_500",
|
| 171 |
-
checkbox_border_color_hover="*neutral_600",
|
| 172 |
-
checkbox_border_color_hover_dark="*neutral_600",
|
| 173 |
-
checkbox_border_color_selected="*pink_600",
|
| 174 |
-
checkbox_border_color_selected_dark="*pink_600",
|
| 175 |
-
checkbox_border_radius="*radius_sm",
|
| 176 |
-
checkbox_border_width="*input_border_width",
|
| 177 |
-
checkbox_border_width_dark="*input_border_width",
|
| 178 |
-
checkbox_check="url(\"data:image/svg+xml,%3csvg viewBox=\'0 0 16 16\' fill=\'white\' xmlns=\'http://www.w3.org/2000/svg\'%3e%3cpath d=\'M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z\'%3e%3c/path%3e%3c/svg%3e\")",
|
| 179 |
-
checkbox_label_background_fill="transparent",
|
| 180 |
-
checkbox_label_background_fill_dark="transparent",
|
| 181 |
-
checkbox_label_background_fill_hover="transparent",
|
| 182 |
-
checkbox_label_background_fill_hover_dark="transparent",
|
| 183 |
-
checkbox_label_background_fill_selected="transparent",
|
| 184 |
-
checkbox_label_background_fill_selected_dark="transparent",
|
| 185 |
-
checkbox_label_border_color="transparent",
|
| 186 |
-
checkbox_label_border_color_dark="transparent",
|
| 187 |
-
checkbox_label_border_color_hover="transparent",
|
| 188 |
-
checkbox_label_border_color_hover_dark="transparent",
|
| 189 |
-
checkbox_label_border_width="transparent",
|
| 190 |
-
checkbox_label_border_width_dark="transparent",
|
| 191 |
-
checkbox_label_gap="*spacing_lg",
|
| 192 |
-
checkbox_label_padding="*spacing_md calc(2 * *spacing_md)",
|
| 193 |
-
checkbox_label_shadow="none",
|
| 194 |
-
checkbox_label_text_color="*body_text_color",
|
| 195 |
-
checkbox_label_text_color_dark="*body_text_color",
|
| 196 |
-
checkbox_label_text_color_selected="*checkbox_label_text_color",
|
| 197 |
-
checkbox_label_text_color_selected_dark="*checkbox_label_text_color",
|
| 198 |
-
checkbox_label_text_size="*text_md",
|
| 199 |
-
checkbox_label_text_weight="400",
|
| 200 |
-
checkbox_shadow="*input_shadow",
|
| 201 |
-
color_accent="*primary_500",
|
| 202 |
-
color_accent_soft="*pink_50",
|
| 203 |
-
color_accent_soft_dark="*neutral_700",
|
| 204 |
-
container_radius="*radius_xl",
|
| 205 |
-
embed_radius="*radius_lg",
|
| 206 |
-
error_background_fill="*background_fill_primary",
|
| 207 |
-
error_background_fill_dark="*background_fill_primary",
|
| 208 |
-
error_border_color="*border_color_primary",
|
| 209 |
-
error_border_color_dark="*border_color_primary",
|
| 210 |
-
error_border_width="1px",
|
| 211 |
-
error_border_width_dark="1px",
|
| 212 |
-
error_text_color="#ef4444",
|
| 213 |
-
error_text_color_dark="#ef4444",
|
| 214 |
-
form_gap_width="0px",
|
| 215 |
-
input_background_fill="*neutral_900",
|
| 216 |
-
input_background_fill_dark="*neutral_900",
|
| 217 |
-
input_background_fill_focus="*pink_600",
|
| 218 |
-
input_background_fill_focus_dark="*pink_600",
|
| 219 |
-
input_background_fill_hover="*input_background_fill",
|
| 220 |
-
input_background_fill_hover_dark="*input_background_fill",
|
| 221 |
-
input_border_color="*neutral_700",
|
| 222 |
-
input_border_color_dark="*neutral_700",
|
| 223 |
-
input_border_color_focus="*pink_600",
|
| 224 |
-
input_border_color_focus_dark="*primary_600",
|
| 225 |
-
input_border_color_hover="*input_border_color",
|
| 226 |
-
input_border_color_hover_dark="*input_border_color",
|
| 227 |
-
input_border_width="1px",
|
| 228 |
-
input_border_width_dark="1px",
|
| 229 |
-
input_padding="*spacing_xl",
|
| 230 |
-
input_placeholder_color="*neutral_500",
|
| 231 |
-
input_placeholder_color_dark="*neutral_500",
|
| 232 |
-
input_radius="*radius_lg",
|
| 233 |
-
input_shadow="none",
|
| 234 |
-
input_shadow_dark="none",
|
| 235 |
-
input_shadow_focus="*input_shadow",
|
| 236 |
-
input_shadow_focus_dark="*input_shadow",
|
| 237 |
-
input_text_size="*text_md",
|
| 238 |
-
input_text_weight="400",
|
| 239 |
-
layout_gap="*spacing_xxl",
|
| 240 |
-
link_text_color="*pink_500",
|
| 241 |
-
link_text_color_active="*pink_500",
|
| 242 |
-
link_text_color_active_dark="*pink_500",
|
| 243 |
-
link_text_color_dark="*pink_500",
|
| 244 |
-
link_text_color_hover="*pink_400",
|
| 245 |
-
link_text_color_hover_dark="*pink_400",
|
| 246 |
-
link_text_color_visited="*pink_600",
|
| 247 |
-
link_text_color_visited_dark="*pink_600",
|
| 248 |
-
loader_color="*color_accent",
|
| 249 |
-
loader_color_dark="*color_accent",
|
| 250 |
-
panel_background_fill="*background_fill_secondary",
|
| 251 |
-
panel_background_fill_dark="*background_fill_secondary",
|
| 252 |
-
panel_border_color="*border_color_primary",
|
| 253 |
-
panel_border_color_dark="*border_color_primary",
|
| 254 |
-
panel_border_width="1px",
|
| 255 |
-
panel_border_width_dark="1px",
|
| 256 |
-
prose_header_text_weight="600",
|
| 257 |
-
prose_text_size="*text_md",
|
| 258 |
-
prose_text_weight="400",
|
| 259 |
-
radio_circle="url(\"data:image/svg+xml,%3csvg viewBox=\'0 0 16 16\' fill=\'white\' xmlns=\'http://www.w3.org/2000/svg\'%3e%3ccircle cx=\'8\' cy=\'8\' r=\'3\'%3e%3c/circle%3e%3c/svg%3e\")",
|
| 260 |
-
section_header_text_size="*text_md",
|
| 261 |
-
section_header_text_weight="400",
|
| 262 |
-
shadow_drop="rgba(0,0,0,0.05) 0px 1px 2px 0px",
|
| 263 |
-
shadow_drop_lg="0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
|
| 264 |
-
shadow_inset="rgba(0,0,0,0.05) 0px 2px 4px 0px inset",
|
| 265 |
-
shadow_spread="3px",
|
| 266 |
-
shadow_spread_dark="1px",
|
| 267 |
-
slider_color="#9E9E9E",
|
| 268 |
-
slider_color_dark="#9E9E9E",
|
| 269 |
-
stat_background_fill="*primary_500",
|
| 270 |
-
stat_background_fill_dark="*primary_500",
|
| 271 |
-
table_border_color="*neutral_700",
|
| 272 |
-
table_border_color_dark="*neutral_700",
|
| 273 |
-
table_even_background_fill="*neutral_950",
|
| 274 |
-
table_even_background_fill_dark="*neutral_950",
|
| 275 |
-
table_odd_background_fill="*neutral_900",
|
| 276 |
-
table_odd_background_fill_dark="*neutral_900",
|
| 277 |
-
table_radius="*radius_lg",
|
| 278 |
-
table_row_focus="*color_accent_soft",
|
| 279 |
-
table_row_focus_dark="*color_accent_soft",
|
| 280 |
-
)
|
| 281 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 11 |
+
--ios-card-light: #FFFFFF;
|
| 12 |
+
--ios-text-primary: #000000;
|
| 13 |
+
--ios-text-secondary: #8E8E93;
|
| 14 |
+
--ios-border-light: rgba(60, 60, 67, 0.12);
|
| 15 |
+
|
| 16 |
+
--ios-bg-dark: #000000;
|
| 17 |
+
--ios-card-dark: #1C1C1E;
|
| 18 |
+
--ios-text-primary-dark: #FFFFFF;
|
| 19 |
+
--ios-text-secondary-dark: #98989F;
|
| 20 |
+
--ios-border-dark: rgba(84, 84, 88, 0.35);
|
| 21 |
+
}
|
| 22 |
|
| 23 |
+
/* --- Global Reset & Typography --- */
|
| 24 |
+
body, .gradio-container {
|
| 25 |
+
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
|
| 26 |
+
-webkit-font-smoothing: antialiased !important;
|
| 27 |
+
color: var(--ios-text-primary);
|
| 28 |
+
}
|
| 29 |
|
| 30 |
+
.gradio-container {
|
| 31 |
+
max-width: 900px !important;
|
| 32 |
+
background-color: var(--ios-bg-light) !important;
|
| 33 |
+
padding: 24px !important;
|
| 34 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
+
/* --- Scrollbar --- */
|
| 37 |
+
::-webkit-scrollbar {
|
| 38 |
+
width: 8px;
|
| 39 |
+
}
|
| 40 |
+
::-webkit-scrollbar-track {
|
| 41 |
+
background: transparent;
|
| 42 |
+
}
|
| 43 |
+
::-webkit-scrollbar-thumb {
|
| 44 |
+
background: #c1c1c1;
|
| 45 |
+
border-radius: 4px;
|
| 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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
+
/* --- Header --- */
|
| 49 |
+
.header-container {
|
| 50 |
+
text-align: center;
|
| 51 |
+
margin-bottom: 32px;
|
| 52 |
+
margin-top: 16px;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.main-title {
|
| 56 |
+
font-size: 34px !important;
|
| 57 |
+
font-weight: 700 !important;
|
| 58 |
+
letter-spacing: -0.5px !important;
|
| 59 |
+
margin: 0 0 8px 0 !important;
|
| 60 |
+
color: var(--ios-text-primary) !important;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
.subtitle {
|
| 64 |
+
font-size: 17px !important;
|
| 65 |
+
font-weight: 400 !important;
|
| 66 |
+
color: var(--ios-text-secondary) !important;
|
| 67 |
+
margin: 0 !important;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
/* --- iOS Card Design --- */
|
| 71 |
+
.input-section, .output-section {
|
| 72 |
+
background: var(--ios-card-light);
|
| 73 |
+
border-radius: var(--ios-radius) !important;
|
| 74 |
+
padding: 24px !important;
|
| 75 |
+
margin-bottom: 20px !important;
|
| 76 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
|
| 77 |
+
border: 1px solid rgba(255,255,255,0.4) !important;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
/* --- Inputs (Text, Dropdowns, Sliders) --- */
|
| 81 |
+
textarea, input[type="text"], select, .gr-textbox, .gr-dropdown {
|
| 82 |
+
background-color: #EFEFF4 !important; /* iOS Input Background */
|
| 83 |
+
border: 1px solid transparent !important;
|
| 84 |
+
border-radius: 10px !important;
|
| 85 |
+
padding: 12px 14px !important;
|
| 86 |
+
font-size: 17px !important;
|
| 87 |
+
color: var(--ios-text-primary) !important;
|
| 88 |
+
transition: all 0.2s ease !important;
|
| 89 |
+
-webkit-appearance: none !important;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
textarea:focus, input:focus, select:focus {
|
| 93 |
+
outline: none !important;
|
| 94 |
+
background-color: #FFFFFF !important;
|
| 95 |
+
box-shadow: 0 0 0 2px var(--ios-blue) !important;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
/* Sliders */
|
| 99 |
+
input[type=range] {
|
| 100 |
+
-webkit-appearance: none;
|
| 101 |
+
background: transparent;
|
| 102 |
+
}
|
| 103 |
+
input[type=range]::-webkit-slider-thumb {
|
| 104 |
+
-webkit-appearance: none;
|
| 105 |
+
height: 24px;
|
| 106 |
+
width: 24px;
|
| 107 |
+
border-radius: 50%;
|
| 108 |
+
background: #FFFFFF;
|
| 109 |
+
box-shadow: 0 2px 6px rgba(0,0,0,0.3);
|
| 110 |
+
margin-top: -10px;
|
| 111 |
+
cursor: pointer;
|
| 112 |
+
}
|
| 113 |
+
input[type=range]::-webkit-slider-runnable-track {
|
| 114 |
+
width: 100%;
|
| 115 |
+
height: 4px;
|
| 116 |
+
background: #D1D1D6;
|
| 117 |
+
border-radius: 2px;
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
/* --- Tabs --- */
|
| 121 |
+
.tabs {
|
| 122 |
+
border-bottom: 1px solid transparent !important;
|
| 123 |
+
background: transparent !important;
|
| 124 |
+
}
|
| 125 |
+
.tabitem {
|
| 126 |
+
border: none !important;
|
| 127 |
+
font-size: 15px !important;
|
| 128 |
+
font-weight: 500 !important;
|
| 129 |
+
color: var(--ios-text-secondary) !important;
|
| 130 |
+
padding: 10px 16px !important;
|
| 131 |
+
background: transparent !important;
|
| 132 |
+
border-radius: 8px !important;
|
| 133 |
+
transition: all 0.2s ease !important;
|
| 134 |
+
}
|
| 135 |
+
.tabitem.selected {
|
| 136 |
+
color: var(--ios-blue) !important;
|
| 137 |
+
background: rgba(0, 122, 255, 0.1) !important;
|
| 138 |
+
font-weight: 600 !important;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
/* --- Buttons --- */
|
| 142 |
+
button.primary {
|
| 143 |
+
background-color: var(--ios-blue) !important;
|
| 144 |
+
color: white !important;
|
| 145 |
+
border: none !important;
|
| 146 |
+
border-radius: var(--ios-btn-radius) !important;
|
| 147 |
+
padding: 14px 24px !important;
|
| 148 |
+
font-size: 17px !important;
|
| 149 |
+
font-weight: 600 !important;
|
| 150 |
+
transition: transform 0.1s ease, background-color 0.2s ease !important;
|
| 151 |
+
box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25) !important;
|
| 152 |
+
cursor: pointer !important;
|
| 153 |
+
width: 100%;
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
button.primary:hover {
|
| 157 |
+
background-color: var(--ios-blue-hover) !important;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
button.primary:active {
|
| 161 |
+
transform: scale(0.97) !important;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
button.secondary {
|
| 165 |
+
background-color: rgba(118, 118, 128, 0.12) !important;
|
| 166 |
+
color: var(--ios-blue) !important;
|
| 167 |
+
border: none !important;
|
| 168 |
+
border-radius: var(--ios-btn-radius) !important;
|
| 169 |
+
padding: 12px 20px !important;
|
| 170 |
+
font-size: 17px !important;
|
| 171 |
+
font-weight: 600 !important;
|
| 172 |
+
transition: background-color 0.2s !important;
|
| 173 |
+
}
|
| 174 |
+
button.secondary:hover {
|
| 175 |
+
background-color: rgba(118, 118, 128, 0.2) !important;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
/* --- Accordions --- */
|
| 179 |
+
.gr-accordion {
|
| 180 |
+
border: none !important;
|
| 181 |
+
background: transparent !important;
|
| 182 |
+
}
|
| 183 |
+
.gr-accordion-label {
|
| 184 |
+
font-size: 16px !important;
|
| 185 |
+
font-weight: 600 !important;
|
| 186 |
+
padding: 12px 0 !important;
|
| 187 |
+
color: var(--ios-text-primary) !important;
|
| 188 |
+
border-bottom: 1px solid var(--ios-border-light) !important;
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
/* --- Footer --- */
|
| 192 |
+
.footer-text {
|
| 193 |
+
margin-top: 40px;
|
| 194 |
+
color: var(--ios-text-secondary) !important;
|
| 195 |
+
font-size: 13px !important;
|
| 196 |
+
text-align: center;
|
| 197 |
+
}
|
| 198 |
+
.attribution-link {
|
| 199 |
+
color: var(--ios-blue) !important;
|
| 200 |
+
text-decoration: none !important;
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
/* --- Dark Mode Overrides --- */
|
| 204 |
+
.dark .gradio-container {
|
| 205 |
+
background-color: var(--ios-bg-dark) !important;
|
| 206 |
+
}
|
| 207 |
+
.dark .main-title {
|
| 208 |
+
color: var(--ios-text-primary-dark) !important;
|
| 209 |
+
}
|
| 210 |
+
.dark .subtitle {
|
| 211 |
+
color: var(--ios-text-secondary-dark) !important;
|
| 212 |
+
}
|
| 213 |
+
.dark .input-section,
|
| 214 |
+
.dark .output-section {
|
| 215 |
+
background: var(--ios-card-dark) !important;
|
| 216 |
+
border-color: var(--ios-border-dark) !important;
|
| 217 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
|
| 218 |
+
}
|
| 219 |
+
.dark textarea,
|
| 220 |
+
.dark input,
|
| 221 |
+
.dark select {
|
| 222 |
+
background-color: #2C2C2E !important;
|
| 223 |
+
color: var(--ios-text-primary-dark) !important;
|
| 224 |
+
border-color: var(--ios-border-dark) !important;
|
| 225 |
+
}
|
| 226 |
+
.dark .gr-accordion-label {
|
| 227 |
+
color: var(--ios-text-primary-dark) !important;
|
| 228 |
+
border-color: var(--ios-border-dark) !important;
|
| 229 |
+
}
|
| 230 |
+
.dark .tabitem.selected {
|
| 231 |
+
background: rgba(10, 132, 255, 0.2) !important;
|
| 232 |
+
}
|
| 233 |
+
.dark button.primary {
|
| 234 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
/* --- Mobile Responsive --- */
|
| 238 |
+
@media (max-width: 768px) {
|
| 239 |
+
.gradio-container {
|
| 240 |
+
padding: 16px !important;
|
| 241 |
+
}
|
| 242 |
+
.main-title {
|
| 243 |
+
font-size: 28px !important;
|
| 244 |
+
}
|
| 245 |
+
.input-section, .output-section {
|
| 246 |
+
padding: 16px !important;
|
| 247 |
+
border-radius: 16px !important;
|
| 248 |
+
}
|
| 249 |
+
button.primary {
|
| 250 |
+
padding: 16px !important; /* Larger touch targets */
|
| 251 |
+
}
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
"""
|