/* 23/09/2018 */

* {
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    font-family: var(--theme-font-family-base);
    font-size: var(--theme-font-size-base);
    line-height: var(--theme-line-height-base);
    color: var(--theme-color-text);
    background-color: var(--theme-color-bg);
}

@layer base, components, utilities;

@layer base {
    :root {
        --theme-color-bg: #ffffff;
        --theme-color-surface: #ffffff;
        --theme-color-surface-muted: #f5f5f5;
        --theme-color-border: #d9d9d9;
        --theme-color-text: #1a1a1a;
        --theme-color-text-muted: #5a5a5a;
        --theme-color-primary: #1f5fcc;
        --theme-color-primary-contrast: #ffffff;
        --theme-color-accent: #0f766e;
        --theme-color-focus: var(--theme-color-primary);

        --theme-space-1: 4px;
        --theme-space-2: 8px;
        --theme-space-3: 12px;
        --theme-space-4: 16px;
        --theme-space-5: 24px;
        --theme-space-6: 32px;

        --theme-radius-1: 2px;
        --theme-radius-2: 4px;
        --theme-radius-3: 8px;

        --theme-font-family-base: Arial, sans-serif;
        --theme-font-family-mono: "Courier New", monospace;
        --theme-font-size-base: 16px;
        --theme-line-height-base: 1.4;
        --theme-font-weight-regular: 400;
        --theme-font-weight-semibold: 600;

        --theme-focus-ring-offset: 2px;
        --focus-ring-color: var(--theme-color-focus);
        --focus-ring-offset: var(--theme-focus-ring-offset);

        --motion-duration-fast: 120ms;
        --motion-duration-standard: 200ms;
        --motion-duration-slow: 320ms;
        --motion-ease-standard: ease;
    }

    [data-theme="light"] {
        --theme-color-bg: #ffffff;
        --theme-color-surface: #ffffff;
        --theme-color-surface-muted: #f5f5f5;
        --theme-color-border: #d9d9d9;
        --theme-color-text: #1a1a1a;
        --theme-color-text-muted: #5a5a5a;
        --theme-color-primary: #1f5fcc;
        --theme-color-primary-contrast: #ffffff;
        --theme-color-accent: #0f766e;
        --theme-color-focus: var(--theme-color-primary);
    }

    [data-theme="dark"] {
        --theme-color-bg: #0f172a;
        --theme-color-surface: #111827;
        --theme-color-surface-muted: #1f2937;
        --theme-color-border: #2f3b52;
        --theme-color-text: #e5e7eb;
        --theme-color-text-muted: #9ca3af;
        --theme-color-primary: #60a5fa;
        --theme-color-primary-contrast: #0f172a;
        --theme-color-accent: #2dd4bf;
        --theme-color-focus: var(--theme-color-primary);
    }
}

@layer components {
    .theme-surface {
        background-color: var(--theme-color-surface);
        color: var(--theme-color-text);
        border: 1px solid var(--theme-color-border);
        border-radius: var(--theme-radius-2);
    }

    .theme-surface-muted {
        background-color: var(--theme-color-surface-muted);
        color: var(--theme-color-text);
        border: 1px solid var(--theme-color-border);
        border-radius: var(--theme-radius-2);
    }
}

@layer utilities {
    .focus-ring:focus {
        outline: 2px solid var(--focus-ring-color);
        outline-offset: var(--focus-ring-offset);
    }

    .focus-ring:focus:not(:focus-visible) {
        outline: none;
    }

    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .u-text-muted {
        color: var(--theme-color-text-muted);
    }

    .u-border {
        border: 1px solid var(--theme-color-border);
    }
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --motion-duration-fast: 0ms;
        --motion-duration-standard: 0ms;
        --motion-duration-slow: 0ms;
    }

    * {
        animation-duration: 0ms !important;
        transition-duration: 0ms !important;
        scroll-behavior: auto !important;
    }
}

.clearall {
    clear: both;
}

.relative {
    position: relative;
}

.hidden {
    /* display: none; */
    display: none !important;
}

.invisible {
    visibility: hidden !important;
}

.popup-layer {
    position: absolute;
    top: 0px;
    left: 0px;
}

.multi-layout-mode.fluid-fixed .top.panel {
    height: 6px;
}

.multi-layout-mode.fluid-fixed .left-wrapper {
    float: left;
    width: 100%;
}

.multi-layout-mode.fluid-fixed .left-wrapper .left.panel {
    margin-right: 200px;
}

.multi-layout-mode.fluid-fixed .right.panel {
    float: left;
    width: 200px;
    margin-left: -200px;
}

.multi-layout-mode.fluid-fixed .bottom.panel {
    clear: left;
}

.cover {
    width: 100%;
    height: 100%;
}

.cover .background {
    width: 100%;
    height: 100%;
    position: absolute;
}

.cover .foreground {
    width: 100%;
    height: 100%;
    position: absolute;
}

.field {
    /* clear: both; */
}

.field .left {
    float: left;
    /* width: 8em; */
}

.field .right {
    float: left;
    /* width: 8em; */
}

.login button .login {
    margin-left: 18em;
}

.link-menu ul li {
    list-style: none;
}

.link-menu.horizontal ul {
    clear: both;
}

.link-menu.horizontal ul li {
    float: left;
}

.link-menu.horizontal ul li:not(:first-child) {
    margin-left: 1em;
}

.object-editor *:focus {
    outline: none;
}

.object-viewer,
.object-editor {
    font-family: 'Courier New', monospace;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/*
	Could have a way of specifying in a jsgui control that it needs to be monotype.
	// Should have some sort of styling systems, but needs to work nicely with HTML.
	//  Some methods that greatly simplify some things.

*/

.array-viewer,
.array-editor {
    font-family: 'Courier New', monospace;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.object-kvp-key-viewer,
.object-kvp-key-editor {
    display: inline;
}

.object-kvp-value-viewer,
.object-kvp-value-editor {
    display: inline;
}

.string-viewer,
.string-editor {
    display: inline;
}

.string-viewer,
.string-editor div {
    display: inline;
}

.object-viewer,
.object-editor {
    display: inline;
}

.array-viewer,
.array-editor {
    display: inline;
}

.object-kvp-key-viewer {
    /* margin-left: 2em; */
}

.object-kvp-key-viewer,
.object-kvp-key-editor div {
    /* margin-left: 2em; */
    display: inline;
}

.object-inner {
    margin-left: 2em;
}

.object-open {
    display: inline;
}

.object-close {
    display: inline;
}

.array-open {
    display: inline;
}

.array-close {
    display: inline;
}

.array-inner {
    display: inline;
}

.number-viewer,
.number-editor {
    display: inline;
}

.selected div {
    /* background-color: #ABCDEF; */
}

.bg-light-yellow {
    background-color: #FFFF7E !important;
}

/* [contenteditable="true"] */

.single-line {
    white-space: nowrap;
    width: 200px;
    overflow: hidden;
}

/* [contenteditable="true"] */

.single-line br {
    display: none;
}

/* [contenteditable="true"] */

.single-line * {
    display: inline;
    white-space: nowrap;
}

.admin.control {}

.admin.control .left.panel {
    height: 100%;
    width: 30%;
    background-color: #EEEEEE;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    border-right: 1px solid #AAAAAA;
    float: left;
}

.admin.control .right.panel {
    height: 100%;
    width: 70%;
    float: left;
}

div.single-line {
    height: 32px;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    border-bottom: 1px solid #CCCCCC;
    width: 100%;
    background-color: #FFFFFF;
}

div.single-line span {
    line-height: 32px;
    text-align: middle;
    margin-left: 16px;
}

div.single-line.selected {
    background-color: #FDD017;
}

/*
	Can have a top band
	// Then the flexiboard would be positioned in the right of that.

	// A top, absolutely positioned band.
	//
*/

.flexiboard {
    position: absolute;
    top: 0px;
    right: 0px;
    height: 400px;
    width: 220px;
    background-color: #DDDDDD;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.flexiboard .top-bar {
    height: 16px;
    width: 100%;
    background-color: #00008B;
}

.grid_9 {
    height: 100%;
    width: 100%;
}

/*
	Default settings where the vertical middle stripe takes 100% height.

*/

.grid_9 .v-middle {
    height: 100%;
}

.grid_9 .left {
    float: left;
}

.grid_9 .h-middle {
    float: left;
    /*
		Not always width 100%....
	*/
    width: 100%;
    height: 100%;
}

.grid_9 .right {
    float: left;
}

.grid_9 .v-middle .left.dock-placeholder {
    width: 180px;
    height: 100%;
    background-color: #DDDDDD;
}

.grid_9 .v-middle .right.dock-placeholder {
    width: 180px;
    height: 100%;
    background-color: #DDDDDD;
}

.grid_9 .top .h-middle.dock-placeholder {
    width: 180%;
    height: 120px;
    background-color: #DDDDDD;
}

.grid_9 .bottom .h-middle.dock-placeholder {
    width: 180%;
    height: 100px;
    background-color: #DDDDDD;
}

.grid_9 .v-middle .left.open {
    width: 180px;
    height: 100%;
}

.grid_9 .v-middle .right.open {
    width: 180px;
    height: 100%;
}

.grid_9 .top .h-middle.open {
    width: 100%;
    height: 120px;
}

.grid_9 .bottom .h-middle.open {
    width: 100%;
    height: 120px;
}

.anchored {
    position: static;
}

.grid_9 .h-middle .flexiboard.anchored {
    width: 100%;
    height: 120px;
}

.grid_9 .left .flexiboard.anchored {
    width: 180px;
    height: 100%;
}

.title.bar {
    height: 32px;
    /* width: 100%; */
    padding-left: 8px;
    /* text-align: center; */
    background-color: #FFFFFF;
    -webkit-box-shadow: inset 0px -2px 2px -2px rgba(0, 0, 0, 0.75);
    -moz-box-shadow: inset 0px -2px 2px -2px rgba(0, 0, 0, 0.75);
    box-shadow: inset 0px -2px 2px -2px rgba(0, 0, 0, 0.75);
}

.title.bar span {
    vertical-align: middle;
    line-height: 32px;
}

.window {
    position: absolute;
    border: 1px solid #CCCCCC;
}

.window .title.bar {
    height: 28px;
    background-color: #0D4F8B;
    color: #FFFFFF;
    font-size: 13px;
    line-height: 28px;
    text-indent: 4px;
}

.tree-node {
    border-bottom: #CCCCCC;
    /* position: relative; */
    clear: both;
    cursor: default;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    max-width: 520px;
}



.tree-node img {}

.tree-node .inner {
    /* float: left; */
    position: relative;
    /* width: 120px; */
    /* background-color: #EEEEEE; */
    left: 20px;
}

.toggle-button.plus-minus {
    width: 14px;
    height: 14px;
    border: 1px solid #888888;
    float: left;
    font-family: monospace;
    text-indent: 3px;
    line-height: 14px;
    position: relative;
    top: 4px;
}

.toggle-button.start-stop {
    width: 50px;
    height: 32px;
    border: 1px solid #888888;
    float: left;
    font-family: monospace;
    text-indent: 6px;
    line-height: 32px;
    position: relative;
    top: 4px;
}

.tree-node .expander {
    /* padding-left: 18px; */
    /* margin-top: 2px; */
    position: relative;
}

.tree-node .top-line img {
    position: absolute;
    left: 24px;
    width: 24px;
    height: 24px;
    /* margin-left: 4px; */
    /* display: inline; */
    /* float:left; */
}

.tree-node .top-line {
    /* clear: both; */
    height: 24px;
    position: relative;
}

.tree-node.selected .top-line {

    /* ABCDEF  DCEBFA  */
    /* height: 22px; */
    background-color: #DCEBFA;
    box-sizing: border-box;
    border: 1px solid #ABCDEF;
    border-radius: 4px;

}

.tree-node .toggle-button {
    /* position: absolute; */
    position: absolute;
    left: 2px;
    height: 16px;
    width: 16px;
    border: 1px solid #666666;
    border-radius: 2px;
    top: 3px;
}

.tree-node.selected .top-line span.text {
    position: absolute;
    left: 23px;
    line-height: 22px;
}

.tree-node .top-line span.text {
    position: absolute;
    left: 24px;
    line-height: 24px;
}

.tree-node .toggle-button>span {
    display: block;
    text-align: center;
    line-height: 15px;
}

.tree-node .top-line>span {
    /* clear: both; */
    /*
	line-height: 24px;
	margin-left: 4px;
    */
    position: absolute;
    left: 40px;
    top: 1px;
    /*
    position: absolute;
    left: 54px;
    */
}

.tree-node .main-box {
    height: 24px;
    margin-left: 24px;
}

.tree-node .file .top-line span {
    /* width: 300px; */
}

.tree-node .file .top-line .toggle-button span {
    width: 16px;
}

.horizontal.menu {
    cursor: default;
}

.horizontal.menu .menu-node {
    float: left;
    width: 94px;
    background: #EEEEEE;
    border-right: 1px solid #CCCCCC;
    border-bottom: 1px solid #CCCCCC;
    height: 24px;
    line-height: 24px;
    /* padding-left: 6px; */
}

.horizontal.menu .menu-node .main {
    padding-left: 6px;
}

.context.menu {
    /* Working out their size could be tricky though, could use overflow visible */
    position: absolute;
    z-index: 1000000;
    background-color: #FFFFFF;
    padding: 4px;
    border: 1px solid #CCCCCC;
    cursor: default;
}

.context.menu .menu-node {
    padding-left: 18px;
}

.relative {
    position: relative;
}

/* Custom CSS, just for the moment */

/*

.window {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.tweets {
	background-color: #FFFFFF;
	margin-left: 10px;
	margin-top: 10px;
	width: 760px;
	height: 500px;
	padding: 10px;
	overflow-y: scroll;

	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.window .inner {
	margin-top: 10px;
}

label {
	margin-left: 10px;
}

input {
	margin-left: 10px;
}

button {
	margin-left: 10px;
	padding-left: 2px;
	padding-right: 2px;
}

.tweet {
	margin-bottom: 10px;

}

.tweet .user {
	color: #CC9999;
}

*/

.resize-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #FF0000;
}

/* Audio Player */

/* Could have audio player in different size modes

Full screen desktop - tablet landscape
Full screen tablet portrait
Full screen iPhone 5 portrait & landscape
Full screen iPhone 4 portrait & landscape

Smaller / compact modes such as when there is an audio player acting as a component of a web page, rather than having the page be the player

*/

.cursor-pointer {
    cursor: pointer;
}

.cursor-default {
    cursor: default;
}

.web-admin-images .list {
    width: 500px;
}

.web-admin-images .list .item {
    width: 500px;
    background-color: #EEEEEE;
}

.web-admin-images .list .item .id {
    width: 70px;
    float: left;
}

.web-admin-images .list .item .value {
    width: 400px;
    float: left;
}

.no-text-select {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -khtml-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

.default-cursor {
    cursor: default;
}

/* Stuff for flexidoc */

/*
.flexidoc-editor .blank-components
*/

.flexidoc-component.icon {
    width: 180px;
    height: 28px;
    background-color: #FDFDFD;
    border: 1px solid #DDDDDD;
    text-align: center;
    padding-top: 12px;
    margin-bottom: 1px;
}

.file-manager {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
}

.file-manager .expansion.button {
    width: 16px;
    height: 16px;
    background-color: #FF0000;
    float: left;
}

.file-manager .icon {
    margin-left: 2px;
}

.file-manager .directory .icon {
    width: 24px;
    height: 24px;
    background-color: #00FF00;
    float: left;
}

.file-manager .file .icon {
    width: 24px;
    height: 24px;
    background-color: #0000AA;
    float: left;
}

.file-manager .info {
    width: 400px;
    height: 32px;
    background-color: #DFDFDF;
    float: left;
    margin-left: 2px;
}

.tree .subitems {
    padding-left: 18px;
}

.file-manager .item .name {
    margin-left: 2px;
    line-height: 24px;
}

.radio-button-group.horizontal>div.radio-button {
    display: inline;
    margin-left: 4px;
    margin-right: 4px;
}

div.radio-button>input {
    position: relative;
    top: 1px;
    margin-left: 1px;
    margin-right: 1px;
}

table.grid {
    background-color: #eceff1;
    border: 1px solid #546e7a;
    padding: 2px;
    cursor: default;
}

table.grid tbody {
    overflow: hidden;
    display: block;
}

table.grid td {
    padding: 1px;
}

.data-row .data-item {
    display: inline;
    margin-left: 2px;
    padding: 2px;
}

.mid-width {
    width: 450px;
}

/* Want to set the grid size in CSS, and have it read by jsgui.
Client side we can get the info through css API
Server-side we need to look at parsed CSS object.


*/

div.grid {
    user-select: none;
    clear: both;
    overflow: auto;

}

div.grid .header.row .cell {
    text-align: center;
    background-color: #ffeba8;
    width: 24px;
    height: 24px;
}

div.grid .row {
    clear: both;
}

div.grid .header.row .cell span {
    position: relative;
    top: 4px;
    left: 0px;
    font-size: 11pt;
}

div.grid .row .cell {
    float: left;
    box-sizing: border-box;
    border-right: 1px solid #AAAAAA;
    border-bottom: 1px solid #999999;
}



div.grid .row .row-header.cell {
    background-color: #ffeba8;
}



div.grid .row .cell.selected {
    float: left;
    box-sizing: border-box;
    /*
    border-right: 1px solid #AAAAAA;
    border-bottom: 1px solid #999999;
    */

    /*
    border: 2px solid #2046df;
    border-radius: 4px;
    */

    outline: 2px solid #0000FF;
    outline-offset: -2px;
}

div.grid .row .cell.selected span {
    position: relative;
    /* top: 4px; */
    left: 3px;
    top: -1px;
    font-size: 16pt;
}

div.grid .row .cell span {
    position: relative;
    /* top: 4px; */
    left: 5px;
    top: 1px;
    font-size: 12pt;
    line-height: 20px;
}

:is(.jsgui-dark-mode, [data-theme="dark"]) table.grid {
    background-color: #1f2937;
    border-color: #4b5563;
    color: #e5e7eb;
}

:is(.jsgui-dark-mode, [data-theme="dark"]) div.grid .header.row .cell,
:is(.jsgui-dark-mode, [data-theme="dark"]) div.grid .row .row-header.cell {
    background-color: #374151;
}

:is(.jsgui-dark-mode, [data-theme="dark"]) div.grid .row .cell {
    border-right-color: #4b5563;
    border-bottom-color: #4b5563;
}

:is(.jsgui-dark-mode, [data-theme="dark"]) div.grid .row .cell span,
:is(.jsgui-dark-mode, [data-theme="dark"]) div.grid .header.row .cell span,
:is(.jsgui-dark-mode, [data-theme="dark"]) .color-grid .cell span {
    color: #e5e7eb;
}

/*
div.grid .row .cell span {
    font-size: 12px;
}
*/

.item-selector .item-view {
    width: 120px;
    text-align: center;
    height: 32px;
    line-height: 32px;
    user-select: none;
}

.item-selector.list .item {
    text-align: center;
    user-select: none;
    height: 28px;
    line-height: 28px;
    border-bottom: 1px solid #AAAAAA;
    width: 120px;
}


.item-selector.list .item:hover {
    background-color: #EEEEEE;
}

.item-selector.list .item.selected {
    background-color: #ABCDEF;
}


.list.item-selector {
    background-color: #FFFFFF;
    box-shadow: 5px 5px 3px #888888;
    border: 1px solid #AAAAAA;
}

.item-selector .item-view span {
    text-align: center;
}

.left-right.arrows-selector {
    height: 36px;
}

.arrows-selector .button {
    float: left;
}

.arrows-selector .item-selector {
    float: left;
}

.date-picker .month-picker {
    clear: both;
}

.date-picker .year-picker {
    clear: both;
}

.date-picker .arrows-selector {
    width: 360px;
}

.date-picker .arrows-selector .button:first-child {
    margin-left: 90px;
}

.arrow svg line {
    stroke: #000000;
}

.arrow.disabled svg line {
    stroke: #CCCCCC;
}

.arrow.disabled svg polygon {
    fill: #CCCCCC;
}

.tabbed-panel .tab {
    float: left;
    margin-left: 6px;
    margin-right: 6px;
    background-color: #BBBBBB;
    border-left: 1px solid #999999;
    border-top: 1px solid #999999;
    border-right: 1px solid #999999;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    user-select: none;
}

.tabbed-panel .tab span {
    margin-left: 6px;
    margin-right: 6px;
    line-height: 28px;
}

.tabbed-panel .tab.selected {
    float: left;
    margin-left: 6px;
    margin-right: 6px;
    background-color: #EEEEEE;
}

.selection-box {
    background-color: #ABCDEF;
    position: absolute;
    opacity: 0.4;
}

button.button, div.button {
    /*
    min-width: 60px;
    max-width: 120px;
    min-height: 22px;
    max-height: 60px;
    */
    background-color: #CCCCCC;
};

.search-bar {
    padding-top: 8px;
    padding-bottom: 8px;
};

.search-bar * {
    display: inline-block;
    vertical-align: top;
};

.search-bar input {
    
};

span.string.editing {
    background-color: #FFFFC2
};

