/* Console Linux mobile - feuille de style */
/* Les classes .term* sont reprises du terminal d'origine (licence MIT,
   voir les en-tetes de term.js et jslinux.js). */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #000000;
    overscroll-behavior: none;
    overflow: hidden;
}

#term_wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#term_container {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    touch-action: none;
}

#term_bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #14161a;
    border-top: 1px solid #2c313a;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    user-select: none;
    -webkit-user-select: none;
}

#keybar {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#sysbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

#net_progress {
    display: none;
}

/* barre de defilement du terminal (structure creee par term.js) */
.term_scrollbar {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 15px;
    background: #101114;
}

.term_track {
    position: absolute;
    left: 3px;
    right: 3px;
    top: 0;
    bottom: 0;
}

.term_thumb {
    position: absolute;
    left: 0;
    right: 0;
    background: #4a5058;
    border-radius: 4px;
}

.term_end {
    position: absolute;
}

.barbtn {
    flex: 0 0 auto;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background: #23272e;
    color: #e8eaf0;
    border: 1px solid #3a4048;
    border-radius: 9px;
    font-size: 16px;
    font-family: monospace;
    line-height: 38px;
    text-align: center;
    cursor: pointer;
}

.barbtn:active, .barbtn.armed {
    background: #0a84ff;
    border-color: #0a84ff;
    color: #ffffff;
}

#files {
    display: none;
}

#net_progress {
    visibility: hidden;
    width: 60px;
}

label.barbtn {
    margin: 0;
}

/* terminal */

.term {
    font-family: monospace,courier,fixed,swiss,sans-serif;
    font-weight: normal;
    font-variant-ligatures: none;
    color: #f0f0f0;
    background: #000000;
    line-height: normal;
    overflow: hidden;
    white-space: nowrap;
}

.term_content a {
    color: inherit;
    text-decoration: none;
}

.term_content a:hover {
    color: inherit;
    text-decoration: underline;
}

.term_cursor {
    color: #000000;
    background: #00ff00;
}

.term_char_size {
    display: inline-block;
    visibility: hidden;
    position: absolute;
    top: 0px;
    left: -1000px;
    padding: 0px;
}

.term_textarea {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 0px;
    height: 0px;
    padding: 0px;
    border: 0px;
    margin: 0px;
    opacity: 0;
    resize: none;
}

.noSelect { user-select: none; -o-user-select: none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; }

/* petits ecrans : la barre systeme passe sur une deuxieme ligne pour
   que tous les boutons (persistance incluse) restent accessibles */
@media (max-width: 600px) {
    #term_bar {
        flex-wrap: wrap;
    }
    #keybar {
        flex: 1 0 100%;
    }
    #sysbar {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        row-gap: 4px;
    }
}
