html, body {
    margin: 0;
    height: 100%;
    font-size: 12px;
    font-family: Verdana, Helvetica, Arial, sans-serif;
    color: #484848;
    min-width: 500px;
}
img { border: none; }
h1 { font-size: 1.8em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.2em; }
h4 { font-size: 1em; }
h5 { font-size: 0.8em; }
h6 { font-size: 0.7em; }

/**** PANEL / FLEX BOXES ****/

#toolbar, #app { display: flex; flex-flow: row; width: 100%; }
#toolbar { position: absolute; height: 24px; z-index: 10; }
#app { height: 100%; }
#panel-toolbar, #panel {
    order: 1;
    flex: 3 30%;
    align-self: stretch;
    max-width: 20em;
    white-space: nowrap;
    border-right: 0.2em solid #847c77;
}
#panel { overflow: auto; background-color: #e3dbd6; margin-top: 24px; }
#panel.dragMode { background-color: #c1b9b4; }
#item-toolbar, #content { order: 2; flex: 7 70%; align-self: stretch; }
#content {
    position: relative;
    overflow: auto;
    background-color: #e3dbd6;
    margin-top: 24px;
    padding: 0 0.5em;
}
#content > h1, #content > h2, #content > h3,
#content > h4, #content > h5, #content > h6,
#content > form, #content > p
{ margin-left: 1em; margin-right: 1em; }

/**** ACTIONS LISTS ****/

#panel-toolbar .actions, #item-toolbar .actions:first-child {
    background-color: #c1b9b4;
}
.actions {
    list-style-type: none;
    margin: 0;
    padding: 0;
    height: 24px;
    border-left: 0.2em solid #e3dbd6;
    border-right: 0.2em solid #e3dbd6;
}
.actions li {
    float: left;
    border-right: 0.2em solid #e3dbd6;
    background-color: #e3dbd6;
}
.actions li.secondary { float: right; border-left: 0.2em solid #e3dbd6; border-right: none; }
.actions a, .actions span {
    display: block;
    height: 16px;
    min-width: 16px;
    padding: 2px;
    text-align: center;
    border: 2px solid #cec6c1;
    border-radius: 5px;
    background-color: #c1b9b4;
    text-decoration: none;
    color: #484848;
    /*font-size: 0.5em;*/
    line-height: 16px;
    vertical-align: baseline;
}
.actions a.disabled { background-color: #e3dbd6; }
.actions li.active span, .actions li.active a, .actions li a#selected { background-color: #fff1e7; }
.actions a:hover { background-color: #e3dbd6; }

.actions #hidden-picture-button {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

/**** TREE PANEL ****/

#notebookSelect { width: 100%; }
#panel img { vertical-align: text-bottom; }
#panel h3 { margin: 0.2em; }
#panel h3, #root { background-color: #e3dbd6; border-radius: 0.2em; }
#panel a { text-decoration: none; color: #484848; outline: 0; }
#panel h3 > a, #panel a.item, #panel .buttons a { display: block; }
#panel h3 > a {
    padding: 0.1em 0.5em 0.1em 1.6em;
    background-repeat: no-repeat;
    background-position: 0.2em 0.2em;
    background-image: url('img/folders-stack.png');
}
#panel h3 > a:hover, #panel a.item:hover, a.item.hover, #panel .buttons a:hover
{ background-color: #f4ece7; border-radius: 0.2em; }
#panel #selected > a.item { background-color: #fff1e7; border-radius: 0.2em; }

.item-menu ul, #root, #root ul, #panel .buttons {
    list-style-type: none;
    padding: 0; margin: 0;
}
#root { margin: 0 0.2em; }
#root li { margin: 0.2em 0; padding: 0 0 0 1.2em; position: relative; }
#root li > a.item { background-repeat: no-repeat; padding: 0.1em 0.5em 0.1em 1.6em; background-position: 0.1em 0.2em; }
#root .file > a.item, #root .directory > a { height: 1.5em; line-height: 1.4em; }
#root .file > a.item { background-image: url('img/document.png'); }
#root .directory > a.item { background-image: url('img/folder.png'); }
#root .directory.open > a.item { background-image: url('img/folder-open.png'); }

/* arrow to fold/unfold subtrees */
#root .arrow {
    position: absolute;
    left: 0;
    margin: 0 0 0 0.5em;
}

/* dropdown menu for each item */
#panel .item-menu {
    float: right;
    position: relative;
    right: 0;
    margin: 0.2em 0;
    text-align: right;
}
#panel > .item-menu { margin: 0.4em 0.2em 0; }
#panel .dropdown-arrow {
    z-index: 10;
    margin: 0.1em 0.2em 0 0.2em;
    border: 0.3em solid #cec6c1;
    border-radius: 3px;
    background-color: #c1b9b4;
    cursor: pointer;
}
#panel .dropdown-arrow:hover { background-color: #e3dbd6; }
#panel .dropdown {
    z-index: 9;
    display: none;
    position: absolute;
    right: 0.2em;
    top: 1.1em;
    margin: 0;
    background-color: #cec6c1;
    border: 3px solid #847c77;
    border-radius: 5px;
    box-shadow: 0 0 0.2em 0.2em #cec6c1;
}
#panel .dropdown li {
    margin: 0;
    padding: 0;
    border-bottom: 3px solid #cec6c1;
    text-align:center;
}
#panel .dropdown li:last-child { border-bottom: none; }
#panel .dropdown a {
    display: block;
    text-align: left;
    padding: 0.2em 0.5em;
    background-color: #e3dbd6;
}
#panel .dropdown a:hover { background-color: #f4ece7; }

#panel .buttons { margin: 1em 0.2em 0 0.2em; }
#panel .buttons a { padding: 0.2em; }

/**** CONTENT ****/

.path {
    font-size: 0.8em;
    font-style: italic;
    margin-bottom: 0.5em;
    padding: 0 0.5em;
    text-align: right;
    clear: both;
    background-color: #e3dbd6;
}

#editor {
    min-height: 1em;
    /*border-bottom: 1px dotted #847c77;*/
    /*margin: 0.5em;*/
    padding: 0.5em;
    outline: 0;
    background-color: #fff1e7;
    box-shadow: 0 0 0.2em 0.2em #fff1e7;
}
textarea#editor {
    font-size: 12px;
    font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    width: 100%;
    resize: none;
    border: 0;
}
#editor p { text-indent: 1em; margin: 0.2em; }
pre { white-space: pre-wrap; word-wrap: break-word; }

label { display: inline-block; width: 8em; }
input[type=checkbox], input[type=radio] {
    vertical-align: sub;
}
input[type=checkbox] + label, input[type=radio] + label {
    display: inline;
}

.success { color: blue; }
.error { color: red; }