
@charset "utf-8";

html, body {
	height: 100%;
}
body {
	overflow: hidden;
}
main {
	height: 90%;
}
#selfile {
	display: none;
}
#code {
	width: 100%;
    height: 100vh;
}
#terminal {
    height: 100vh;
}

/* resizer */
div.flex > .flex-item:first-child {
	flex: 3.5;	/* 2026/10/11 下の動作ペインを以前 (2.0 : 1) の 2/3 の高さに (3.5 : 1) */
}
div.flex > .flex-item:first-child > div {
    height: 100vh;
}
div.flex > .resizer {
    flex: 0 0 12px;
}

/* qum-connect button */
.connected {
	background-color: paleturquoise;
}

.disconnect {
	background-color: ivory;
}

.connecting {
	background-color: wheat;
}

/* input */
@keyframes input-take-notice {
	  0% { background-color: white; }
	100% { background-color: lightsalmon; }
}
.take-notice {
	animation: input-take-notice 1s infinite;
}

.CodeMirror {
	font-family: Monaco, 'Andale Mono', 'Lucida Console', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;
	font-size: 11pt;
	min-height: 100px;
}
.CodeMirror-scroll {
/*	height: auto;*/
	width: auto;
/*	overflow-x: inherit;*/
}

/*
body {
	display: flex;
	flex-flow: column;
	min-height: 400px;
}
header {

}
*/

main {
	border-top: 1px solid black;
	border-bottom: 1px solid black;
/*	overflow: scroll;*/
    overflow: inherit;
}

footer {
	position: relative;
/*	height: 170px;*/
	height: 30px;
}

.terminal {
	font-family: Monaco, 'Andale Mono', 'Lucida Console', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;
}

.status {
	font-family: Monaco, 'Andale Mono', 'Lucida Console', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;
    text-align: left;
	border-top: 1px solid black;
	height: 30px;
    color: darkgreen;
/*    border: double;*/
}

.btn-qumcum {
	width: 120px;
	white-space: nowrap;
	text-align: left;
}

/* 2026/10/11 メニューを Scratch と同じ青に。右端に [状態][Run][Stop][Hello][Robot] (Scratch のメニューと同じボタン) */
.qum-navbar { background-color: #4c97ff; padding-top: 4px; padding-bottom: 4px; }
.qum-navbar .navbar-brand { color: #fff; font-weight: bold; }
.qum-navbar .nav-link, .qum-navbar .nav-link:focus { color: #fff; }
.qum-navbar .nav-link:hover, .qum-navbar .nav-link.show { color: #fff; background-color: rgba(0,0,0,0.12); border-radius: 4px; }
.qum-navbar .input-group-text { font-size: 12px; }
.qum-robo { display: flex; align-items: center; gap: 4px; }
.qum-robo-status { color: #fff; font-weight: bold; font-size: 13px; white-space: nowrap; margin-right: 6px; }
.qum-btn { width: 84px; height: 24px; box-sizing: border-box; margin: 0 2px; padding: 0; font-size: 10pt; font-weight: bold;
           border-radius: 10px; border: none; background: #3373cc; color: #fff; cursor: pointer; white-space: nowrap;
           display: inline-flex; align-items: center; justify-content: center; }
.qum-btn:hover:not(:disabled) { background: #2a5fa8; }
.qum-btn:disabled { opacity: 0.45; cursor: default; }
/* 3D ボタン (Scratch と同じ: 白地に青文字) */
.qum-btn.qum-btn-3d { width: 48px; background: #fff; color: #4c97ff; }
.qum-btn.qum-btn-3d:hover:not(:disabled) { background: #f0f0f0; }
/* Robot: 未接続=灰 / 接続中=オレンジ / 通信中=緑 (Scratch の Robot ボタンと同じ) */
#navbarBleConnect.qum-robot { height: 24px; box-sizing: border-box; margin: 0 0 0 2px; padding: 0; border: none; border-radius: 10px;
           background: tomato; color: #fff; font-size: 10pt; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; }
#navbarBleConnect.qum-robot.disconnect { background-color: tomato; filter: grayscale(1); }
#navbarBleConnect.qum-robot.connecting { background-color: tomato; filter: none; cursor: progress; }
#navbarBleConnect.qum-robot.connected  { background-color: limegreen; filter: none; }

/* 2026/10/11 一番下の帯: 左に状態、右端にクリアボタン */
.footer-body { display: flex; align-items: center; border-top: 1px solid black; height: 30px; }
.footer-body .status { flex: 1; border-top: none; line-height: 30px; padding-left: 4px; }
.footer-body .qum-btn { margin-right: 8px; }
#btnClearConsole { background: #555; }            /* 濃い灰色 */
#btnClearConsole:hover:not(:disabled) { background: #333; }

/* 2026/10/11 横ゲージ (エディター上端の文字位置の目盛り)。文字の幅をそろえるためエディターと同じ字体・大きさ */
.cm-col-ruler { position: relative; box-sizing: border-box; height: 19px; overflow: hidden; background: #f7f7f7; border-bottom: 1px solid #ddd;
	font-family: Monaco, 'Andale Mono', 'Lucida Console', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;
	font-size: 11pt; line-height: 18px; color: #999; user-select: none; }
.cm-col-ruler-inner { position: absolute; top: 0; white-space: pre; letter-spacing: 0; }
.cm-col-ruler-mark  { position: absolute; top: 0; bottom: 0; background: rgba(76,151,255,0.30); }
.cm-col-ruler-cover { position: absolute; left: 0; top: 0; bottom: 0; background: #f7f7f7; border-right: 1px solid #ddd; z-index: 2; }

/* 2026/10/12 左: エディターと動作ペイン (幅 160 列は app-editor.js が .main-left に設定)、
   右: クムクムのコマンド一覧 (右端まで、上から下まで)。画面が狭いときも右ペインは 240px 残し、エディターは横にスクロールする */
.main-row { display: flex; height: 100%; }
.main-left { flex: 0 1 auto; min-width: 0; max-width: calc(100% - 240px); height: 100%; display: flex; }
div.flex > .flex-item:first-child > div.code-row { display: flex; height: 100%; }
.code-col { flex: 1 1 auto; min-width: 0; height: 100%; }
.cmd-help { flex: 1 1 240px; min-width: 240px; height: 100%; overflow-y: auto; box-sizing: border-box; padding: 10px 14px 24px;
	border-left: 1px solid #ccc; background: #f7f9fc; color: #333; font-size: 12.5px; line-height: 1.6; }
.cmd-help__title { margin: 0 0 8px; font-size: 14px; font-weight: bold; color: #2a5fa8; }
.cmd-help__group { margin: 0 0 12px; }
.cmd-help__group h3 { margin: 10px 0 6px; padding: 2px 8px; font-size: 12.5px; font-weight: bold; color: #fff; background: #4c97ff; border-radius: 4px; }
.cmd-help__item { margin: 0 0 6px; padding: 4px 6px 8px; border-bottom: 1px dashed #d5dce8; border-radius: 4px; cursor: pointer; }
.cmd-help__item:hover, .cmd-help__item:focus { background: #e3eeff; outline: none; }
.cmd-help__item:active { background: #cfe0ff; }
.cmd-help__hint { margin: 0 0 6px; color: #666; font-size: 12px; }
.cmd-help__ex { margin: 2px 0 0 8px; color: #555; }
.cmd-help__ex code { color: #2a5fa8; font-family: Monaco, 'Lucida Console', 'Courier New', monospace; font-size: 11.5px; background: none; padding: 0; }
/* 貼り付けた部分を一瞬色付け */
.cm-inserted-flash { background: rgba(76,151,255,0.35); }
.cmd-help__sig { display: block; margin: 0 0 2px; color: #b5370b; font-family: Monaco, 'Andale Mono', 'Lucida Console', 'Courier New', Courier, monospace;
	font-size: 12px; font-weight: bold; white-space: pre-wrap; word-break: break-all; background: none; padding: 0; }
.cmd-help__desc { margin: 0; }
.cmd-help__params { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; margin: 2px 0 0 8px; }
.cmd-help__params dt { font-family: Monaco, 'Lucida Console', 'Courier New', monospace; font-size: 11.5px; font-weight: normal; color: #555; white-space: nowrap; }
.cmd-help__params dd { margin: 0; color: #444; }
.cmd-help__ret  { margin: 2px 0 0 8px; color: #555; }
.cmd-help__note { margin: 2px 0 0 8px; color: #c0392b; }
