@font-face {
    font-family: "ks-configurator-icons";
    src: url("fonts/ks-configurator-icons.woff") format("woff"),
         url("fonts/ks-configurator-icons.ttf") format("truetype"),
         url("fonts/ks-configurator-icons.svg#ks-configurator-icons") format("svg");
    font-weight: normal;
    font-style: normal;
}

:root {
    --color-panel-background: rgba(50,50,50,0.25);
    --color-panel-border: rgba(85,85,85,1);
    --color-title-text: rgba(255,255,255,1);
    --color-title-background: rgba(80,80,80,0.3);
    --color-title-text-selected: rgba(255,255,255,1);
    --color-title-background-selected: rgba(0,153,255,1);
    --color-title-text-hover: rgba(255,255,255,1);
    --color-title-background-hover: rgba(0,102,255,1);
    --color-thumbnail-text: rgba(90,90,90,1);
    --color-thumbnail-background: rgba(255,255,255,0);
    --color-thumbnail-border: rgba(255,255,255,0);
    --color-thumbnail-text-selected: rgba(90,90,90,1);
    --color-thumbnail-background-selected: rgba(255,255,255,0.1);
    --color-thumbnail-border-selected: rgba(255,255,255,0);
    --color-thumbnail-text-hover: rgba(90,90,90,1);
    --color-thumbnail-background-hover: rgba(255,255,255,0.1);
    --color-thumbnail-border-hover: rgba(0,153,255,1);
    --size-titles-font: 11;
    --size-thumbnail-font: 9;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
}

#main {
    height: 100%;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    --image-top: 0;
    --image-left: 0;
    --image-zoom-factor: 1;
}

.mainimg {
    flex: 0 0 auto;
    position: relative;
    top: calc(var(--image-top) * 1px);
    left: calc(var(--image-left) * 1px);
    transform: scale(var(--image-zoom-factor));
}

.movablecursor {
    cursor: move;
}

.toolbar {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    background: var(--color-panel-background);
}

.toolbarbutton {
    font-family: "ks-configurator-icons";
    font-size: 20pt;
    user-select: none;
    -webkit-user-select: none;
    padding-bottom: 10px;
    color: #8A8A8A;
}
.toolbarbutton:hover {
    color: #73B0F0;
}

.panelarea {
    position: absolute;
    min-width: 0;
    min-height: 0;
    display: flex;
    background: var(--color-panel-background);
    --flow-thumbnail-margin: 3px;
    --thumbnail-label-height: 25px;
}

.panelarea.layouthorizontal {
    left: 0;
    bottom: 0;
    height: calc(var(--touch-ui-height) * 1%);
    width: calc(100% - 40px);
    flex-direction: row;
}

.panelarea.layoutvertical {
    top: 0;
    right: 40px;
    height: 100%;
    width: calc(var(--touch-ui-height) * 1%);
    flex-direction: column;
}

.panelarea > div {
    flex: 1 1 0;
}

.flowselectionbody {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    height: 100%;
    overflow: auto;
    border: none;
    background: transparent;
    color: white;
    font-size: calc(var(--size-thumbnail-font) * 1pt);
    --thumbnail-size-percentage: 50%;
}

.flowthumbnailitem {
    margin: var(--flow-thumbnail-margin);
    text-align: center;
    border-width: 2px;
    border-radius: 2px;
    border-style: solid;
    background: var(--color-thumbnail-background);
    border-color: var(--color-thumbnail-border);
    color: var(--color-thumbnail-text);
    box-sizing: border-box;
    min-width: 0;
}
.flowthumbnailitem > * {
    display: block;
}
.flowthumbnailitem > span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding: 2px
}

.hidethumbnailtext .flowthumbnailitem > span {
    display: none;
}

.flowthumbnailitem:hover {
    background: var(--color-thumbnail-background-hover);
    border-color: var(--color-thumbnail-border-hover);
    color: var(--color-thumbnail-text-hover);
}
.flowthumbnailitem.selected, .flowthumbnailitem.selected:hover {
    background: var(--color-thumbnail-background-selected);
    border-color: var(--color-thumbnail-border-selected);
    color: var(--color-thumbnail-text-selected);
}

.flowselectionbody > .flowthumbnailitem {
    height: calc(var(--thumbnail-size-percentage) - 2 * var(--flow-thumbnail-margin));
}
.flowselectionbody > .flowthumbnailitem > img {
    height: calc(100% - var(--thumbnail-label-height));
}
.flowaccordiongroupbody > .flowthumbnailitem {
    width: calc(var(--thumbnail-size-percentage) - 2 * var(--flow-thumbnail-margin));
    display: inline-block;
}
.flowaccordiongroupbody > .flowthumbnailitem > img {
    width: 100%;
}

.hidden {
    visibility: hidden;
}

.flowselection {
    width: 100%;
    height: 100%;
    position: relative;
}

.flowselectionheaderbox {
    position: absolute;
    bottom: 100%;
}

.flowselectionheaderbox > div {
    display: inline-block;
    vertical-align: bottom;
}

.boldtext {
    font-weight: bold;
}

.flowheadertext {
    padding: 0.5em;
    font-size: calc(var(--size-titles-font) * 1pt);
    border: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--color-title-text);
    background-color: var(--color-title-background);
}
.flowheadertext:hover {
    color: var(--color-title-text-hover);
    background-color: var(--color-title-background-hover);
}
.flowselectionheaderscrollbox > div {
    display: inline-block;
    vertical-align: bottom;
}

.flowheadertext.selected, .flowaccordiongroup.selected > .flowheadertext {
    color: var(--color-title-text-selected);
    background: var(--color-title-background-selected);
}

.flowheadertext.selected:hover, .flowaccordiongroup.selected > .flowheadertext:hover {
    color: var(--color-title-text-hover);
    background: var(--color-title-background-hover);
}

.flowselectionheaderscroller > span {
    font-family: "ks-configurator-icons";
    font-size: 15pt;
    color: var(--color-title-text);
    user-select: none;
    -webkit-user-select: none;
    line-height: 1px;
    vertical-align: middle;
}
.flowselectionheaderscrollbox {
    border-left: 1px solid var(--color-panel-border);
}

.flowaccordion {
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.flowaccordiongroup {
    flex: 0 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.flowaccordiongroup.selected {
    flex: 1 1 auto;
}
.flowaccordiongroup > .flowaccordionheader {
    flex: 0 0 auto;
}
.flowaccordiongroup > .flowaccordiongroupbody {
    flex: 0 1 auto;
}

.flowaccordiongroupbody {
    display: none;
}

.flowaccordiongroup.selected > .flowaccordiongroupbody {
    display: block;
    overflow: auto;
}

.flowaccordionheader {
    position: relative;
    padding-right: 30px;
}
.flowaccordionheadermarker {
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px;
    font-family: "ks-configurator-icons";
    font-size: 20pt;
    line-height: calc(var(--size-thumbnail-font) * 1.5pt);
    vertical-align: middle;
}
.flowaccordiongroup.selected .flowaccordionheadermarker:first-of-type {
    display: none;
}
.flowaccordiongroup:not(.selected) .flowaccordionheadermarker:last-of-type {
    display: none;
}
.flowaccordiongroup:only-child .flowaccordionheader .flowaccordionheadermarker {
    display: none;
}
