/* Greenlings components: web renditions of the SwiftUI views (from the design canvas, ds/greenlings/components/bundle.css). */
.gl-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box; min-width: var(--size-touch-target); min-height: var(--size-primary-button); padding: 10px 18px; border-radius: var(--radius-pill); border: 1px solid var(--primary-border); background: var(--button-ink); color: #ffffff; font-family: var(--font-text); font-size: 17px; line-height: 22px; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); }
.gl-button:hover { color: #ffffff; }
.gl-button:active { transform: scale(0.97); }
.gl-button:focus-visible { outline: 3px solid var(--water-fill); outline-offset: 3px; }
.gl-button--water { background: var(--green); border-color: transparent; }
.gl-button--secondary { min-height: var(--size-secondary-button); background: transparent; color: var(--foreground); border: 2px solid var(--foreground); }
.gl-button--secondary:hover { color: var(--foreground); }
.gl-button svg { flex: none; }
@media (prefers-reduced-motion: reduce) { .gl-button { transition: none; } .gl-button:active { transform: none; } }

.gl-pill { --state: var(--state-happy); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 8px 12px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--state) 12%, transparent); color: var(--foreground); font-family: var(--font-text); font-size: 13px; line-height: 18px; font-weight: 800; }
.gl-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--state); flex: none; }
.gl-pill--compact { padding: 5px 9px; font-size: 12px; line-height: 16px; }
.gl-pill--thriving { --state: var(--state-thriving); }
.gl-pill--happy { --state: var(--state-happy); }
.gl-pill--thirsty { --state: var(--state-thirsty); }
.gl-pill--unhappy { --state: var(--state-unhappy); }

.gl-meter { display: flex; flex-direction: column; gap: 10px; font-family: var(--font-text); }
.gl-meter__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--foreground); }
.gl-meter__value { color: var(--water-text); }
.gl-meter__track { height: var(--size-thirst-meter); border-radius: var(--radius-pill); background: var(--water-track); overflow: hidden; }
.gl-meter__fill { height: 100%; border-radius: var(--radius-pill); background: var(--water-fill); }

/* Avatar crops (canvas 820 x 795, never recolored) */
.gl-avatar { position: relative; overflow: hidden; }
.gl-avatar > img { position: absolute; display: block; width: auto; max-width: none; aspect-ratio: 820 / 795; }
.gl-avatar--full > img { left: 50%; top: 50%; height: auto; width: 100%; max-height: 100%; object-fit: contain; transform: translate(-50%, -50%); }
.gl-avatar--card > img { height: 135%; top: -23%; left: 65%; transform: translateX(-50%); }
.gl-avatar--tile > img { height: 130%; top: -15%; left: 50%; transform: translateX(-50%); }
.gl-avatar--thumb > img { height: 180%; top: -67%; left: 50%; transform: translateX(-50%); }
.gl-avatar--thumb { width: var(--size-thumbnail); height: var(--size-thumbnail); border-radius: var(--radius-thumbnail); flex: none; }

.gl-tile { display: flex; flex-direction: column; gap: 4px; font-family: var(--font-text); color: var(--foreground); }

/* Shelf scene */
.gl-scene-wall { background: var(--wall); }
.gl-window { position: relative; background: var(--window-frame); border-radius: 90px 90px 12px 12px; padding: 10px; box-sizing: border-box; }
.gl-window__glass { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--window-glass); border-radius: 80px 80px 6px 6px; }
.gl-window__glass::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 7px; margin-left: -3.5px; background: var(--window-frame); }
.gl-window__glass::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 7px; margin-top: -3.5px; background: var(--window-frame); }
.gl-window__sun { position: absolute; width: 34px; height: 34px; border-radius: 50%; background: var(--sun); right: 22%; top: 18%; }
.gl-shelf { height: 22px; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-shelf); background: linear-gradient(var(--wood-top) 0 13px, var(--wood-edge) 13px 22px); }
