File size: 10,083 Bytes
69fb41d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b9709b4
69fb41d
 
 
 
 
 
 
 
b9709b4
69fb41d
 
b9709b4
69fb41d
 
b9709b4
 
 
69fb41d
b9709b4
 
69fb41d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b9709b4
 
 
 
 
69fb41d
 
 
 
 
 
 
 
 
 
 
 
 
b9709b4
 
 
 
69fb41d
 
 
 
 
b9709b4
 
69fb41d
 
 
 
b9709b4
 
69fb41d
 
 
 
 
 
 
b9709b4
 
 
 
 
69fb41d
 
 
b9709b4
69fb41d
b9709b4
 
 
 
 
 
8d688d3
 
 
 
 
 
 
 
 
 
b9709b4
 
 
 
 
 
8d688d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3fa67e8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5e0ac66
 
 
 
 
 
 
 
 
 
 
 
 
 
3fa67e8
 
 
 
5e0ac66
3fa67e8
 
8d688d3
 
 
b9709b4
 
 
 
 
8d688d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b9709b4
 
 
 
 
69fb41d
 
 
 
 
b9709b4
 
 
 
69fb41d
 
 
 
 
b9709b4
 
 
 
 
 
 
 
 
 
 
 
 
5e0ac66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b9709b4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69fb41d
b9709b4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69fb41d
 
 
b9709b4
69fb41d
 
 
 
 
 
 
 
b9709b4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
/* === Fonts ================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@500;600;700&display=swap');

/* === Theme tokens — recolor Gradio's defaults with the Guarden palette ===== */
:root, .dark {
    --body-background-fill: linear-gradient(180deg, #eef7ee 0%, #f7f4ec 100%);
    --background-fill-primary: #ffffff;
    --background-fill-secondary: #f3f9f1;
    --border-color-primary: #e3efe0;
    --border-color-accent: #cfe8cf;
    --border-color-accent-subdued: #e3efe0;

    --body-text-color: #2f3e2f;
    --body-text-color-subdued: #7c9a7c;

    --block-background-fill: #ffffff;
    --block-border-color: #e6f0e3;
    --block-border-width: 1px;
    --block-radius: 18px;
    --block-shadow: 0 4px 18px rgba(76, 175, 80, 0.07);
    --block-label-background-fill: transparent;
    --block-label-border-width: 0px;
    --block-label-text-color: #6f9170;
    --block-title-text-color: #2f3e2f;
    --block-info-text-color: #84a584;

    --input-background-fill: #fbfdf9;
    --input-border-color: #dfeedb;
    --input-border-color-focus: #81c784;
    --input-border-width: 1.5px;
    --input-radius: 12px;
    --input-shadow: none;
    --input-shadow-focus: 0 0 0 3px rgba(76, 175, 80, 0.16);

    --button-primary-background-fill: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    --button-primary-background-fill-hover: linear-gradient(135deg, #5cb860 0%, #388e3c 100%);
    --button-primary-text-color: #ffffff;
    --button-primary-border-color: transparent;
    --button-primary-shadow: 0 3px 10px rgba(67, 160, 71, 0.25);
    --button-primary-shadow-hover: 0 5px 16px rgba(67, 160, 71, 0.32);

    --button-secondary-background-fill: #ffffff;
    --button-secondary-background-fill-hover: #f3f9f1;
    --button-secondary-border-color: #dfeedb;
    --button-secondary-text-color: #3f5b3f;

    --color-accent: #4caf50;
    --color-accent-soft: rgba(76, 175, 80, 0.12);
    --link-text-color: #2e7d32;
    --link-text-color-hover: #1b5e20;

    --shadow-drop: 0 4px 14px rgba(76, 175, 80, 0.08);
    --shadow-drop-lg: 0 10px 30px rgba(76, 175, 80, 0.12);
}

/* === App shell ============================================================ */
html, body {
    min-height: 100%;
}

body, .gradio-container {
    background: linear-gradient(180deg, #eef7ee 0%, #f7f4ec 100%) !important;
}

.gradio-container {
    max-width: 1680px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 1.5rem clamp(1rem, 3vw, 3rem) 3rem !important;
    min-height: 100vh;
}

.gradio-container, .gradio-container .prose {
    font-family: 'Quicksand', 'Segoe UI', sans-serif;
}

.gradio-container h1, .gradio-container h2, .gradio-container h3 {
    font-weight: 700;
}

/* Hide the default "Built with Gradio" footer for a cleaner, full-page feel */
footer {
    display: none !important;
}

/* === Buttons =============================================================== */
.gradio-container button {
    border-radius: 12px;
    font-weight: 600;
    transition: transform 0.08s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.gradio-container button:active {
    transform: scale(0.98);
}

/* === Header ================================================================ */
#header-bar {
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f3f9f1 100%);
    border: 1px solid #e3efe0;
    border-radius: 20px;
    box-shadow: 0 6px 24px rgba(76, 175, 80, 0.10);
    padding: 1.25rem 1.75rem;
    margin-bottom: 1.5rem;
}

#header-bar .prose {
    text-align: left;
}

#header-bar h1 {
    margin: 0 !important;
    font-size: 2rem;
    background: linear-gradient(135deg, #2e7d32 0%, #66bb6a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#header-bar .prose p {
    margin: 0.25rem 0 0 !important;
    color: #6f9170;
    font-size: 1rem;
}

/* === "Add a plant" call-to-action ========================================== */
#add-plant-fab {
    flex-shrink: 0;
    border-radius: 999px !important;
    padding: 0 1.75rem !important;
    height: 48px;
    font-size: 1rem;
}

/* === Add-plant drawer (inline card) ========================================= */
#add-drawer {
    background: #fffdf8;
    border: 1px solid #e6f0e3;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.12);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

#close-drawer-btn {
    margin-top: 0.5rem;
}

/* === Garden board (free drag & drop) ======================================= */
#garden-board {
    padding: 12px !important;
}

.garden-board-inner {
    position: relative;
    height: 440px;
    border-radius: 12px;
    overflow: hidden;
    background: repeating-linear-gradient(
        to bottom,
        #e7f3e3 0px, #e7f3e3 96px, #d9ecd2 96px, #d9ecd2 100px
    );
}

.garden-sprite {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    z-index: 1;
}

.garden-sprite.dragging {
    cursor: grabbing;
    z-index: 10;
    opacity: 0.85;
}

#garden-board.link-mode .garden-sprite {
    cursor: crosshair;
}

.garden-sprite.link-source img {
    outline: 3px solid #43a047;
    outline-offset: 2px;
    border-radius: 8px;
}

/* SVG overlay drawing lines between hand-linked ("neighbor") plants */
.garden-links {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.garden-links line {
    stroke: #8d6e63;
    stroke-width: 2;
    stroke-dasharray: 5 4;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

/* "Relier des plantes" toggle button */
#link-mode-btn {
    border-radius: 999px !important;
    padding: 0.45rem 1.25rem !important;
    background: #ffffff !important;
    border: 1.5px solid #cfe8cf !important;
    color: #3f5b3f !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.10);
}

#link-mode-btn:hover {
    background: #f3f9f1 !important;
    border-color: #81c784 !important;
}

#link-mode-btn.link-mode-active {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 3px 10px rgba(67, 160, 71, 0.25);
}

.garden-sprite img {
    width: 88px;
    height: 88px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.garden-caption {
    margin-top: 2px;
    padding: 1px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #3f5b3f;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    white-space: nowrap;
    pointer-events: none;
}

/* Hidden bridge widgets used by the garden board's drag/click JS */
.board-sync {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    border: none !important;
}

/* === Detail card =========================================================== */
#plant-detail {
    background: #ffffff;
    border: 1px solid #e6f0e3;
    border-radius: 16px;
    padding: 0.5rem 1.25rem;
    margin-top: 1rem;
}

/* === Sidebar ================================================================ */
#sidebar {
    background: #ffffff;
    border: 1px solid #e6f0e3;
    border-radius: 20px;
    box-shadow: 0 4px 18px rgba(76, 175, 80, 0.07);
    padding: 1.25rem !important;
}

#sidebar h3 {
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

/* Card-ify the recommendation / forecast tables */
#watering-cards .table-wrap, #forecast-strip .table-wrap {
    border: none !important;
    background: transparent !important;
}

#watering-cards .header-table thead {
    display: none;
}

/* Forecast table: show the column titles as a styled label row above the cards */
#forecast-strip .header-table {
    display: block;
    width: 100% !important;
    margin-bottom: 6px;
}

#forecast-strip .header-table thead {
    display: block;
}

#forecast-strip .header-table thead tr {
    display: flex;
    width: 100%;
    gap: 6px;
}

#forecast-strip .header-table tbody {
    display: none;
}

#forecast-strip .header-cell {
    border: none !important;
    background: #e3efe0 !important;
    border-radius: 10px !important;
    flex: 1 1 0% !important;
    width: auto !important;
    min-width: 0 !important;
}

#forecast-strip .header-cell .header-content span {
    font-size: 0.7rem;
    font-weight: 700;
    color: #2e7d32;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

#forecast-strip .header-cell .cell-menu-button {
    display: none;
}

#watering-cards .virtual-body, #forecast-strip .virtual-body {
    width: 100% !important;
}

#watering-cards .virtual-row, #forecast-strip .virtual-row {
    background: transparent !important;
    width: 100% !important;
}

#watering-cards .body-cell, #forecast-strip .body-cell {
    border: none !important;
    background: #f3f9f1 !important;
    border-radius: 10px !important;
    flex: 1 1 0% !important;
    width: auto !important;
    min-width: 0 !important;
}

#watering-cards .cell-wrap, #forecast-strip .cell-wrap {
    padding: 0.4rem 0.5rem !important;
    width: auto !important;
}

/* === Location gate (welcome card) ========================================== */
#location-gate {
    max-width: 480px;
    margin: 4rem auto !important;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e6f0e3;
    border-radius: 20px;
    padding: 2rem !important;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.12);
}

#location-gate h1 {
    background: linear-gradient(135deg, #2e7d32 0%, #66bb6a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}