/* css/layout.css */
/* 2026-10-31 11:44 AM MDT */
/* RULE: No function, feature, button, or file may be removed, changed, or edited by any AI tool unless Eric named that specific thing in his request. Anything not named stays exactly as it is. */
/* Last change: the menu's lines have no disabled look (nothing locks), and the list is called the menu (Eric, 27 and 31 Oct). */
/*
WHAT THIS FILE IS
Where things go. Two windows, the chat and the menu (Eric, 27 Oct), each at the place and size it was left
(ui/boxmove.js), side by side to start; the list scrolls on its own. A box docked on the left (Eric, 25 Oct) still
works for anything that asks for it. On a screen narrower than 700 pixels
the chat fills the screen and the menu opens over it from the Menu button. How things look is in css/styles.css.
*/

/* page */
html, body { margin: 0; height: 100%; overflow: hidden; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }

/* the chat box */
.box { position: fixed; display: flex; flex-direction: column; min-width: 320px; min-height: 260px; }
.box-bar { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; cursor: move; user-select: none; touch-action: none; }
.box-handle { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; }

/* docked beside the move list */
.box.docked { left: 0; top: 0; bottom: 0; width: 46vw; min-width: 340px; }
.box.docked .box-bar { cursor: default; }
.box-tools { display: flex; align-items: center; gap: 8px; }
.moves-toggle { display: none; padding: 2px 10px; cursor: pointer; }
.moves-panel { position: fixed; display: flex; flex-direction: column; min-width: 320px; min-height: 260px; }
.moves-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px 10px 24px; cursor: move; user-select: none; touch-action: none; }
.moves-list { flex: 1; overflow-y: auto; padding: 0 26px 40px; container-type: inline-size; }
.moves-practice { padding: 6px 14px; cursor: pointer; }
.moves-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.moves-extra { padding: 6px 12px; cursor: pointer; }
.see-also { margin: 34px 0 0; padding-top: 12px; }
.feedback-text { display: block; width: 100%; margin-top: 8px; padding: 8px 10px; resize: vertical; }
.feedback-buttons { display: flex; gap: 10px; margin-top: 8px; }
.feedback-send, .feedback-cancel { padding: 6px 16px; cursor: pointer; }
.feedback-said { margin-top: 6px; }
.moves-cat { margin: 18px 0 6px; }
.moves-cat-name { margin: 0 0 8px; }
.moves-grid { column-count: 3; column-gap: 22px; }
.sets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.moves-move { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left; padding: 3px 6px; margin: 0 0 2px; break-inside: avoid; cursor: pointer; }
.moves-name { flex: 1; }
.moves-count { flex: none; min-width: 1.6em; padding: 0 5px; text-align: center; }
@container (max-width: 760px) { .moves-grid { column-count: 2; } }
@container (max-width: 440px) { .moves-grid { column-count: 1; } }
@media (max-width: 1299px) { .moves-grid { column-count: 2; } }

/* the Aa font menu */
.aa-wrap { position: relative; }
.aa { padding: 2px 10px; cursor: pointer; }
.aa-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; display: flex; flex-direction: column; min-width: 160px; padding: 4px 0; }
.aa-item { text-align: left; padding: 6px 14px; cursor: pointer; }

/* posts */
.posts { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.post { max-width: 88%; padding: 10px 14px; }
.post-you { align-self: flex-end; }
.post-ai, .post-note { align-self: flex-start; }
.post-card { align-self: stretch; max-width: 100%; }
.nav-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.nav-btn { padding: 4px 12px; cursor: pointer; }
.past-list { max-height: 320px; overflow-y: auto; margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.card-move { margin-top: 10px; }
.card-row { margin-top: 4px; }
.signin { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 40px 10px; }
.signin-btn { padding: 10px 22px; cursor: pointer; }

/* typing */
.input-row { flex: none; display: flex; gap: 8px; padding: 10px; align-items: flex-end; }
.input { flex: 1; resize: none; max-height: 220px; padding: 8px 10px; overflow-y: hidden; }
.mic, .send { flex: none; padding: 8px 12px; cursor: pointer; }

/* phones: the box fills the screen */
@media (max-width: 699px) {
    .box { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; height: 100dvh !important; min-width: 0; }
    .box-bar { cursor: default; }
    .box-handle { display: none; }
    .post { max-width: 94%; }
    .moves-toggle { display: inline-block; }
    .moves-panel { display: none; left: 0 !important; top: 44px !important; width: 100% !important; height: calc(100dvh - 44px) !important; z-index: 10 !important; min-width: 0; }
    .moves-head { cursor: default; padding: 10px 16px; }
    .moves-list { padding: 0 16px 30px; }
    .moves-panel .box-handle { display: none; }
    .moves-panel.open { display: flex; }
    .moves-grid { column-count: 1; }
}
.proposal-buttons { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.proposal-buttons button { padding: 8px 18px; cursor: pointer; }
.proposal-text { margin: 4px 0 8px; }
.action { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; } .action-btn { padding: 8px 18px; cursor: pointer; }

/* the Claude Code box (ui/codebox.js) */
.code-box { position: fixed; display: flex; flex-direction: column; min-width: 420px; min-height: 300px; z-index: 20; }
.code-bar { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; cursor: move; user-select: none; touch-action: none; }
.code-row { flex: none; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 10px; }
.code-switch, .code-tabs, .code-cmds { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.code-cmds { margin-left: auto; }
.code-btn, .code-tab-name, .code-tab-close, .code-hide, .code-toggle { cursor: pointer; padding: 3px 10px; }
.code-tab { display: inline-flex; }
.code-news { flex: none; padding: 2px 12px 6px; min-height: 1.4em; }
.code-view { flex: 1; position: relative; min-height: 0; margin: 0 8px 8px; }
.code-term { position: absolute; inset: 0; }
@media (max-width: 699px) {
    .code-box { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; height: 100dvh !important; min-width: 0; min-height: 0; z-index: 30 !important; }
    .code-bar { cursor: default; }
    .code-box .box-handle { display: none; }
    .code-row { flex-wrap: nowrap; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px 8px; }
    .code-switch, .code-tabs, .code-cmds { flex-wrap: nowrap; overflow-x: auto; margin-left: 0; padding-bottom: 2px; }
    .code-btn, .code-tab-name, .code-tab-close { flex: none; padding: 8px 12px; }
    .code-view { margin: 0 4px 4px; }
}
