/* =====================================================
   HONESTLY, E — Garden Panel (Ellie, THE GARDENER)
   Ellie's right-column shell — replaces the timeline when Ellie
   is active. The platform's first FORWARD-looking surface.

   A "garden bed" of vertical rows: each seed is a seedling glyph +
   title + the line of where-you-left-off. Click a row → the seed
   editor (the thread + the resume cue + the lifecycle picker).
   Composted seeds sink below a "set down" divider — dimmed, never
   gone (the rings).

   Per companion-surface-awareness principle: piece 1 of 4 (UI).
   Constitution / memoryContext / chat seed-tool land next.
   ===================================================== */

:root {
    --ellie-color: #6E8B5E;       /* garden green — the arbor/pathway shell */
    --ellie-color-dark: #566F49;
    --ellie-bloom: #C98AA6;       /* flowered accent */
    --ellie-compost: #9A8C72;     /* set-down / ring tone */
}

.garden-panel {
    display: none;
    width: var(--timeline-width, 280px);
    flex-shrink: 0;
    background: var(--bg-card);
    border-left: 1px solid var(--border-light);
    flex-direction: column;
    height: calc(100vh - var(--header-height));
    position: sticky;
    top: var(--header-height);
    overflow: hidden;
}

.ellie-active .garden-panel { display: flex; }
.ellie-active .timeline-sidebar { display: none; }
.ellie-active .timeline-fab { display: none !important; }

/* ----- Header ----- */
.garden-panel-header {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.garden-panel-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0;
}
.garden-panel-add-btn {
    background: none;
    border: 1px solid var(--ellie-color);
    color: var(--ellie-color-dark);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.garden-panel-add-btn:hover { background: var(--ellie-color); color: #fff; }

/* ----- The bed (scrolling rows) ----- */
.garden-panel-scroll { flex: 1; overflow-y: auto; padding: 0.5rem 0.6rem 1.5rem; }
.garden-panel-bed { display: flex; flex-direction: column; gap: 0.3rem; }

.garden-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 0.65rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    border: 1px solid transparent;
}
.garden-row:hover { background: var(--bg-hover); border-color: var(--border-light); }

.garden-row-glyph {
    font-size: 1.25rem;
    line-height: 1.4;
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}
.garden-row-body { min-width: 0; flex: 1; }
.garden-row-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}
.garden-row-left {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Stage tints — subtle left edge so the bed reads at a glance */
.garden-row--rooted   { box-shadow: inset 3px 0 0 var(--ellie-color); }
.garden-row--flowered { box-shadow: inset 3px 0 0 var(--ellie-bloom); }
.garden-row--seedling { box-shadow: inset 3px 0 0 var(--ellie-color-dark); }

/* Composted (set-down) seeds — dimmed rings at the bottom */
.garden-compost-divider {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ellie-compost);
    text-align: center;
    margin: 1rem 0 0.4rem;
    opacity: 0.8;
}
.garden-row--compost { opacity: 0.55; }
.garden-row--compost .garden-row-title { font-style: italic; }
.garden-row--compost:hover { opacity: 0.85; }

/* ----- Empty state ----- */
.garden-empty { text-align: center; padding: 2.5rem 1.25rem; }
.garden-empty-icon { font-size: 2.2rem; margin-bottom: 0.5rem; }
.garden-empty-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.garden-empty-text {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}
.garden-empty-cta {
    background: var(--ellie-color);
    color: #fff;
    border: none;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast);
}
.garden-empty-cta:hover { background: var(--ellie-color-dark); }

/* ===== Seed editor (plant / tend) ===== */
#garden-seed-editor {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}
#garden-seed-editor.active { display: flex; }
.gse-backdrop { position: absolute; inset: 0; background: rgba(20, 40, 71, 0.45); }
.gse-card {
    position: relative;
    background: var(--bg-card);
    width: min(540px, calc(100vw - 2rem));
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.75rem 1.75rem 1.5rem;
}
.gse-close {
    position: absolute;
    top: 0.9rem; right: 1rem;
    background: none; border: none;
    font-size: 1.1rem; color: var(--text-muted);
    cursor: pointer;
}
.gse-title {
    width: 100%;
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--text-primary);
    border: none;
    border-bottom: 1px solid var(--border-light);
    padding: 0.25rem 0 0.5rem;
    margin-bottom: 1rem;
    background: transparent;
}
.gse-title:focus { outline: none; border-bottom-color: var(--ellie-color); }

.gse-stages { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.gse-stage {
    display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.45rem 0.55rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 3.7rem;
}
.gse-stage-glyph { font-size: 1.1rem; }
.gse-stage-label { font-family: var(--font-sans); font-size: 0.68rem; color: var(--text-secondary); }
.gse-stage:hover { border-color: var(--ellie-color); }
.gse-stage.active {
    background: var(--ellie-color);
    border-color: var(--ellie-color);
}
.gse-stage.active .gse-stage-label { color: #fff; }

.gse-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}
.gse-hint { font-weight: 400; color: var(--text-muted); font-style: italic; }
.gse-body, .gse-left {
    width: 100%;
    font-family: var(--font-sans);
    font-size: 0.92rem;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.8rem;
    margin-bottom: 1.1rem;
    resize: vertical;
    line-height: 1.5;
    background: var(--warm-white);
}
.gse-body:focus, .gse-left:focus { outline: none; border-color: var(--ellie-color); }

.gse-actions { display: flex; justify-content: flex-end; }
.gse-save {
    background: var(--ellie-color);
    color: #fff;
    border: none;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast);
}
.gse-save:hover { background: var(--ellie-color-dark); }
.gse-save:disabled { opacity: 0.6; cursor: default; }
