Spaces:
Sleeping
Sleeping
| /* === 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%) ; | |
| } | |
| .gradio-container { | |
| max-width: 1680px ; | |
| width: 100% ; | |
| margin: 0 auto ; | |
| padding: 1.5rem clamp(1rem, 3vw, 3rem) 3rem ; | |
| 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 ; | |
| } | |
| /* === 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 ; | |
| 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 ; | |
| color: #6f9170; | |
| font-size: 1rem; | |
| } | |
| /* === "Add a plant" call-to-action ========================================== */ | |
| #add-plant-fab { | |
| flex-shrink: 0; | |
| border-radius: 999px ; | |
| padding: 0 1.75rem ; | |
| 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 ; | |
| } | |
| .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 ; | |
| padding: 0.45rem 1.25rem ; | |
| background: #ffffff ; | |
| border: 1.5px solid #cfe8cf ; | |
| color: #3f5b3f ; | |
| box-shadow: 0 2px 8px rgba(76, 175, 80, 0.10); | |
| } | |
| #link-mode-btn:hover { | |
| background: #f3f9f1 ; | |
| border-color: #81c784 ; | |
| } | |
| #link-mode-btn.link-mode-active { | |
| background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%) ; | |
| color: #ffffff ; | |
| border-color: transparent ; | |
| 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 ; | |
| width: 1px ; | |
| height: 1px ; | |
| min-width: 1px ; | |
| padding: 0 ; | |
| margin: 0 ; | |
| overflow: hidden ; | |
| opacity: 0 ; | |
| pointer-events: none ; | |
| border: none ; | |
| } | |
| /* === 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 ; | |
| } | |
| #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 ; | |
| background: transparent ; | |
| } | |
| #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% ; | |
| 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 ; | |
| background: #e3efe0 ; | |
| border-radius: 10px ; | |
| flex: 1 1 0% ; | |
| width: auto ; | |
| min-width: 0 ; | |
| } | |
| #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% ; | |
| } | |
| #watering-cards .virtual-row, #forecast-strip .virtual-row { | |
| background: transparent ; | |
| width: 100% ; | |
| } | |
| #watering-cards .body-cell, #forecast-strip .body-cell { | |
| border: none ; | |
| background: #f3f9f1 ; | |
| border-radius: 10px ; | |
| flex: 1 1 0% ; | |
| width: auto ; | |
| min-width: 0 ; | |
| } | |
| #watering-cards .cell-wrap, #forecast-strip .cell-wrap { | |
| padding: 0.4rem 0.5rem ; | |
| width: auto ; | |
| } | |
| /* === Location gate (welcome card) ========================================== */ | |
| #location-gate { | |
| max-width: 480px; | |
| margin: 4rem auto ; | |
| text-align: center; | |
| background: #ffffff; | |
| border: 1px solid #e6f0e3; | |
| border-radius: 20px; | |
| padding: 2rem ; | |
| 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; | |
| } | |