// ── Buddy btn (bottom-left mirror of #id_kit_btn) ───────────────────────── // // Lives on post.html only — slide-out recipient field for the share-post // async flow. Mutually exclusive w. #id_kit_btn (bottom-right): when one is // active (.active class on btn + html.{kit|buddy}-open class on root), the // other quickly fades to opacity 0. // // Spec: functional_tests/test_buddy_btn.py. #id_buddy_btn { position: fixed; bottom: 0.5rem; left: 0.5rem; @media (orientation: landscape) { left: 1rem; bottom: 0.5rem; top: auto; } @media (orientation: landscape) and (min-width: 1800px) { left: 2.5rem; // mirror the doubled 8rem sidebar centring } z-index: 318; font-size: 1.75rem; cursor: pointer; color: rgba(var(--secUser), 1); display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; background-color: rgba(var(--priUser), 1); border: 0.15rem solid rgba(var(--secUser), 1); transition: opacity 0.15s ease; &.active { color: rgba(var(--quaUser), 1); border-color: rgba(var(--quaUser), 1); } } // Slide-out panel: collapsed by default; opens to span ~viewport - 3rem. #id_buddy_panel { position: fixed; bottom: 0.5rem; // align bottom edge w. buddy btn left: 1.5rem; right: 1.5rem; height: 3rem; // match buddy btn height for vertical-centre alignment z-index: 317; display: flex; align-items: center; gap: 0.5rem; pointer-events: none; overflow: hidden; // Closed state — collapse leftward into the buddy btn transform-origin: left center; transform: scaleX(0); transition: transform 0.2s ease-out, opacity 0.15s ease; opacity: 0; @media (orientation: landscape) { left: calc(4rem + 0.5rem); // clear the navbar sidebar right: calc(4rem + 0.5rem); // clear the footer sidebar } @media (orientation: landscape) and (min-width: 1800px) { left: calc(8rem + 0.5rem); right: calc(8rem + 0.5rem); } #id_recipient { flex: 1; min-width: 0; height: 100%; // Generous left padding so the buddy btn glyph (3rem circle pinned // at left:1.5rem) doesn't visually overlap the placeholder/typed text. padding: 0 1rem 0 3.5rem; background-color: rgba(var(--priUser), 1); color: rgba(var(--secUser), 1); border: 0.1rem solid rgba(var(--secUser), 0.5); border-radius: 1.5rem; font-family: inherit; &:focus { outline: none; border-color: rgba(var(--terUser), 0.75); box-shadow: 0 0 0.75rem rgba(var(--terUser), 0.5); } } .btn.btn-confirm { flex-shrink: 0; } } // html.buddy-open: slide the panel out, fade the kit btn away. html.buddy-open { #id_buddy_panel { transform: scaleX(1); opacity: 1; pointer-events: auto; } #id_kit_btn { opacity: 0; pointer-events: none; } } // Kit dialog open: hide the buddy btn. We don't add an `html.kit-open` // class (game-kit.js uses [open] on the dialog + .active on the btn), so // the mutual-exclusion is driven by `:has()` against the open dialog. html:has(#id_kit_bag_dialog[open]) #id_buddy_btn { opacity: 0; pointer-events: none; }