/* Java Lab v2 — ProgressiveKids Theme */
.jlab-root *, .jlab-root *::before, .jlab-root *::after { box-sizing:border-box; margin:0; padding:0; }
.jlab-root {
    font-family:'Roboto',-apple-system,sans-serif; font-size:13px;
    background:#0d1820; color:#c9d1d9;
    display:flex; flex-direction:column; overflow:hidden;
    border-radius:10px; border:1px solid #1e3a52; position:relative;
}
.jlab-root.jlab-light { background:#f0f4f8; color:#275372; border-color:#c5d8e8; }

/* Topbar */
.jlab-topbar {
    display:flex; align-items:center; gap:6px; padding:8px 12px;
    background:#0a1520; border-bottom:2px solid #f89820; flex-shrink:0; flex-wrap:wrap;
}
.jlab-root.jlab-light .jlab-topbar { background:#e8edf2; }
.jlab-brand { font-weight:700; font-size:15px; color:#f89820; display:flex; align-items:center; gap:5px; white-space:nowrap; }
.jlab-brand-dot { color:#00a1ff; }
.jlab-run-btn {
    display:inline-flex; align-items:center; gap:6px;
    padding:7px 18px; border-radius:22px; border:none;
    background:#f89820; color:#fff; font-size:13px; font-weight:700;
    cursor:pointer; font-family:inherit; transition:background .15s;
    box-shadow:0 2px 8px rgba(248,152,32,.3);
}
.jlab-run-btn:hover { background:#d97c10; }
.jlab-run-btn:disabled { background:#555; cursor:not-allowed; box-shadow:none; }
.jlab-run-btn.stop { background:#ef4444; box-shadow:0 2px 8px rgba(239,68,68,.3); }
.jlab-run-icon { width:14px; height:14px; fill:currentColor; }
.jlab-tool-btn {
    display:inline-flex; align-items:center; gap:4px;
    padding:5px 10px; border-radius:6px; border:1px solid #1e3a52;
    background:transparent; color:#7aa8c8; font-size:12px; font-weight:600;
    cursor:pointer; font-family:inherit; transition:all .15s; white-space:nowrap;
}
.jlab-root.jlab-light .jlab-tool-btn { border-color:#c5d8e8; color:#275372; }
.jlab-tool-btn:hover { background:#1a3a55; border-color:#f89820; color:#f89820; }
.jlab-root.jlab-light .jlab-tool-btn:hover { background:#cfe0ef; border-color:#f89820; }
.jlab-icon-toggle {
    width:30px; height:30px; border-radius:50%; border:1px solid #1e3a52;
    background:transparent; color:#7aa8c8; font-size:15px; cursor:pointer;
    display:flex; align-items:center; justify-content:center; transition:all .15s; flex-shrink:0;
}
.jlab-icon-toggle:hover { border-color:#f89820; color:#f89820; }
.jlab-sep { width:1px; height:22px; background:#1e3a52; margin:0 2px; flex-shrink:0; }
.jlab-root.jlab-light .jlab-sep { background:#c5d8e8; }
.jlab-status { display:flex; align-items:center; gap:6px; margin-left:auto; font-size:12px; color:#4a7090; white-space:nowrap; }
.jlab-dot { width:8px; height:8px; border-radius:50%; background:#2a4a6a; flex-shrink:0; }
.jlab-dot.loading { background:#facc15; animation:jlab-pulse 1.2s infinite; }
.jlab-dot.running { background:#22c55e; animation:jlab-pulse .9s infinite; }
.jlab-dot.error   { background:#ef4444; }
.jlab-dot.done    { background:#f89820; }
@keyframes jlab-pulse { 0%,100%{opacity:1;}50%{opacity:.2;} }
.jlab-loading-bar { height:3px; background:#1e3a52; flex-shrink:0; }
.jlab-loading-inner { height:100%; width:0; background:#f89820; transition:width .4s; }
.jlab-restore-banner {
    display:flex; align-items:center; justify-content:space-between;
    padding:6px 14px; background:rgba(248,152,32,.1);
    border-bottom:1px solid rgba(248,152,32,.2);
    font-size:12px; color:#f89820; flex-shrink:0; font-family:inherit;
}
.jlab-restore-clear {
    padding:2px 10px; border-radius:12px; border:1px solid rgba(248,152,32,.4);
    background:transparent; color:#f89820; font-size:11px; cursor:pointer; font-family:inherit;
}
.jlab-restore-clear:hover { background:#f89820; color:#fff; }

/* Layout */
.jlab-ide { display:flex; flex:1; overflow:hidden; flex-direction:column; min-height:0; }
.jlab-ide-main { display:flex; flex:1; overflow:hidden; min-height:0; }

/* Stdin pane */
.jlab-stdin-pane {
    width:200px; background:#0a1520; border-right:1px solid #1e3a52;
    display:flex; flex-direction:column; flex-shrink:0;
    transition:width .2s; overflow:hidden;
}
.jlab-root.jlab-light .jlab-stdin-pane { background:#e8edf2; border-color:#c5d8e8; }
.jlab-pane-label {
    font-size:11px; font-weight:700; color:#4a7090;
    text-transform:uppercase; letter-spacing:.07em;
    padding:7px 10px; border-bottom:1px solid #1e3a52;
    font-family:inherit; background:#0a1520; flex-shrink:0;
    display:flex; align-items:center; justify-content:space-between;
}
.jlab-root.jlab-light .jlab-pane-label { background:#e8edf2; border-color:#c5d8e8; color:#7a9ab0; }
.jlab-pane-toggle {
    background:none; border:none; cursor:pointer; color:#4a7090;
    font-size:14px; padding:0; line-height:1; transition:color .15s;
}
.jlab-pane-toggle:hover { color:#f89820; }
.jlab-stdin {
    flex:1; width:100%; background:#0d1820; color:#c9d1d9;
    border:none; outline:none; resize:none; padding:10px;
    font-family:"JetBrains Mono",Consolas,monospace; font-size:13px; line-height:1.65;
}
.jlab-root.jlab-light .jlab-stdin { background:#fff; color:#275372; }
.jlab-stdin-hint { font-size:11px; color:#2a5a7a; padding:6px 10px; border-top:1px solid #1e3a52; font-style:italic; flex-shrink:0; }

/* Editor area */
.jlab-editor-area { flex:1; display:flex; flex-direction:column; overflow:hidden; min-width:0; }
.jlab-tabs { display:flex; background:#0a1520; border-bottom:1px solid #1e3a52; flex-shrink:0; overflow-x:auto; scrollbar-width:none; }
.jlab-tabs::-webkit-scrollbar { display:none; }
.jlab-root.jlab-light .jlab-tabs { background:#e8edf2; border-color:#c5d8e8; }
.jlab-tab {
    display:flex; align-items:center; gap:6px;
    padding:7px 14px; font-size:13px; color:#4a7090;
    cursor:pointer; white-space:nowrap; border-right:1px solid #1e3a52;
    transition:all .1s; user-select:none; font-family:inherit; font-weight:600; flex-shrink:0;
}
.jlab-tab:hover { background:#0d1820; color:#c9d1d9; }
.jlab-tab.active { background:#0d1820; color:#f89820; border-bottom:2px solid #f89820; }
.jlab-root.jlab-light .jlab-tab.active { background:#fff; }
.jlab-tab-close { font-size:12px; line-height:1; background:none; border:none; color:#4a7090; cursor:pointer; padding:0 1px; opacity:0; }
.jlab-tab:hover .jlab-tab-close { opacity:1; }
.jlab-tab-close:hover { color:#ef4444; }
.jlab-cm-wrap { flex:1; overflow:hidden; min-height:0; }

/* Console */
.jlab-console-panel { border-top:2px solid #f89820; display:flex; flex-direction:column; flex-shrink:0; background:#080f18; overflow:hidden; }
.jlab-root.jlab-light .jlab-console-panel { background:#f8fafc; }
.jlab-console-head {
    display:flex; align-items:center; gap:6px; padding:5px 12px; background:#0a1520;
    border-bottom:1px solid #1e3a52; font-size:11px; font-weight:700;
    color:#4a7090; text-transform:uppercase; letter-spacing:.07em;
    cursor:ns-resize; flex-shrink:0; user-select:none; font-family:inherit;
}
.jlab-root.jlab-light .jlab-console-head { background:#e8edf2; border-color:#c5d8e8; }
.jlab-console-clear {
    margin-left:auto; background:none; border:1px solid #1e3a52;
    color:#4a7090; font-size:11px; padding:2px 8px; border-radius:10px;
    cursor:pointer; font-family:inherit; transition:all .15s;
}
.jlab-console-clear:hover { border-color:darkorange; color:darkorange; }
.jlab-console-body {
    flex:1; overflow-y:auto; padding:10px 14px;
    font-family:"JetBrains Mono",Consolas,monospace; font-size:13px; line-height:1.75;
}
.l-out  { color:#c9d1d9; white-space:pre-wrap; word-break:break-all; }
.l-err  { color:#ff6b6b; white-space:pre-wrap; }
.l-info { color:#2a5a7a; font-style:italic; }
.l-warn { color:#f9e2af; font-style:italic; }

@media(max-width:600px){ .jlab-stdin-pane { display:none; } }

/* ── Inline console input (like PyLab) ── */
.jlab-inline-input-row {
    display:flex; align-items:center; gap:6px; padding:2px 0;
}
.jlab-inline-prompt {
    color:#f89820; font-weight:700; white-space:pre; font-family:"JetBrains Mono",monospace; font-size:13px;
}
.jlab-inline-cin {
    flex:1; background:transparent; border:none;
    border-bottom:2px solid #f89820; outline:none;
    color:#50c878; caret-color:#f89820;
    font-family:"JetBrains Mono",Consolas,monospace;
    font-size:13px; padding:2px 4px; min-width:0;
}
.jlab-inline-cin::placeholder { color:#2a5a7a; }
.l-prompt { color:#f9e2af; white-space:pre-wrap; }
.l-in     { color:#50c878; white-space:pre-wrap; }

/* ── Inline console input ── */
.jlab-inline-input-row {
    display:flex; align-items:center; gap:4px; padding:1px 0;
}
.jlab-inline-prompt {
    color:#f89820; font-family:"JetBrains Mono",monospace; font-size:13px;
    white-space:pre; flex-shrink:0;
}
.jlab-inline-cin {
    flex:1; background:transparent; border:none;
    border-bottom:1px solid #f89820; outline:none;
    color:#50c878; caret-color:#f89820;
    font-family:"JetBrains Mono",Consolas,monospace;
    font-size:13px; padding:1px 4px; min-width:0;
}
.jlab-inline-cin::placeholder { color:#2a5a7a; }
.l-prompt { color:#f9e2af; white-space:pre-wrap; }
.l-in     { color:#50c878; white-space:pre-wrap; }
