:root {
    --text-color: #555;
    --font-size: 16px;
    --max-font-size: 22px;
}

html {
    margin: 0;
    padding: 0;
    font-family: Arial, serif;
    font-size: var(--font-size);
    color: var(--text-color);
    line-height: 1.5em;
}

@media screen and (min-width: 320px) {
    html {
        /*noinspection CssInvalidFunction*/
        font-size: min(var(--max-font-size), calc(var(--font-size) + 8 * ((100vw - 320px) / 680)));
    }
}

@media screen and (min-width: 1000px) {
    html {
        font-size: var(--max-font-size);
    }
}

body {
    margin: 0;
    padding: 0;
}

*, *::before, *::after {
    box-sizing: border-box;
}

textarea {
    resize: none
}
button:focus {outline:0;}

.hupMainDiv {
    display: grid;
    grid-auto-columns: 1fr;
    grid-template-columns: 1fr;
    grid-template-rows: 100px 1fr;
    gap: 0 0;
    min-height: 100vH;
}

.hupHeadDiv { grid-area: 1 / 1 / 2 / 2; }
.hupContent { grid-area: 2 / 1 / 3 / 2; }

.hupHeadDiv {
    position: relative;
    background: url(../../img/eworxx/head_banner_bg.jpg) center left no-repeat;
    background-color: rgba(0, 0, 0, 0);
    background-blend-mode: multiply;
    background-size: cover;
    background-color: #5F5F5F;
}

.hupHeadLogo {
    display: block;
    margin: 0 auto;
    max-height: 100%;
    max-width: 100%;
    box-shadow: 0 0 50px #fff;
}

.hupInfoTextOpener {
    display: none;
}

.hupContent {
    background-color: #fff;
    width: 100%;
}

.hupContentDiv {
    display: grid;
    grid-auto-columns: 1fr;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 0 0;
    height: 100%;
    padding: 0 10px 10px 10px;
}

.hupIntro {
    grid-area: 1 / 1 / 2 / 2;
}

.hupIntroText, .hupTitle, .hupPreviewStatic, .hupConfirmPreview, .hupControlPanel {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.hupPreviewStatic, .hupConfirmPreview {
    position: relative;
    grid-area: 2 / 1 / 3 / 2;
    width: 100%;
    margin-bottom: 10px;
    border: 1px solid #999;
    color: var(--text-color);
    transition: opacity 125ms;
}

.hupControlPanel{
    grid-area: 3 / 1 / 4 / 2;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.hupFormOverlay {
    background: url(../../img/ajax_bar.gif) no-repeat center center #fff;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 20;
}

.controls {
    display: none;
}

.textFields {
    overflow-y: auto;
    max-height: 60px;
    margin-bottom: 10px;
}

.textFields label {
    display: block;
}

.textFields textarea {
    display: block;
}

.textFields ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.textFields ul li {
    position: relative;
    margin: 5px 0;
}

.textFields ul li:before{
    position: absolute;
    content: attr(data-nr);
    margin-left: 7px;
}

.textFields ul li input {
    width: 100%;
    height: 30px;
    color: var(--text-color);
    padding-left: 30px;
    font-size: 20px;
}

.textFields ul li span {
    background-color: #DDDDDD;
    display: block;
    float: right;
    width: 30px;
    height: 22px;
    margin: 0 0 0 5px;
    padding: 2px 0 0 0;
    border: 1px solid #AAA;
    font-size: 16px;
    text-align: center;
}

.textFields ul li span:hover {
    cursor: pointer;
    -webkit-box-shadow: 0 0 5px 0 rgba(0, 116, 217, 1);
    -moz-box-shadow: 0 0 5px 0 rgba(0, 116, 217, 1);
    box-shadow: 0 0 5px 0 rgba(0, 116, 217, 1);
}

.middleButton {
    background-color: #DDD;
    min-width: 70px;
    height: 40px;
    margin: 5px;
    border: 1px solid #AAA;
    cursor: pointer;
}

.middleButton:hover {
    border: 1px solid #777;
}

.bigButton {
    background: rgba(255, 255, 255, 1);
    min-width: 200px;
    height: 50px;
    padding: 2px 10px 2px 10px;
    margin: 5px 0 0 0;
    border-radius: 4px;
    border: 1px solid #AAA;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-color);
}

.bigButton:hover {
    border: 1px solid #777;
}

.actionPanel_submitArea{
    display: flex;
    justify-content: space-around;
}

.formErrorBox {
    display: none;
    position: absolute;
    background-color: #BDE5F8;
    padding: 10px;
    margin: 0 0 5px 0;
    border: 1px solid #00529B;
}

.formErrorNoInput {
    font-size: 14px;
    color: #00529B;
    font-weight: bold;
}

.formErrorText {
    display: inline-block;
    float: left;
    width: 80%;
}

.formErrorButtons {
    display: inline-block;
    float: left;
    width: 20%;
}

.actionPanel {
    display: flex;
    justify-content: space-around;
    align-items: start;
    width: 100%;
}

.spezOder {
    margin: 10px 20px 5px;
    text-align: center;
    font-size: 18px;
}

.hupTitle {
    font-weight: bold
}

.hupPreviewImage, .hupConfirmPreview {
    margin: auto;
    overflow: auto;
    background: #ddd
}

.hupStateDiv {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 10px 10px;
    background: none #fafafa no-repeat center calc(50% - 40px);
    text-align: center;
    color: var(--text-color);
}

.hupStateDivAjax {
    background-image: url(../../img/ajax_bar.gif);
}

.hupStatusFailed, .hupStatusFailedAlreadyDone, .hupStatusFailedDb, .hupPreviewFailed,
.hupPreviewImageFailed, .hupPreviewImagePossibleFailed, .hupStatusFailedNotYetPossible {
    background-image: url(../../img/warn.gif);
}

.hupStatusFailed, .hupStatusFailedAlreadyDone, .hupStatusFailedDb, .hupPreviewFailed, .hupStatusFailedNotYetPossible {
    background-position-y: calc(50% - 100px);
}

/** Zoom-Slider */
.hupPreviewZoom, .hupConfirmZoom {
    float: right;
    margin-right: -1px;
    border: 1px solid #999;
    border-top: 1px solid #eee;
    border-radius: 0 0 5px 5px;
    padding: 5px
}

.hupConfirmZoom {
    right: 0
}

.zoomPlus:after {
    content: attr(data-zoom);
    position: absolute;
    margin-top: 8px;
    margin-left: -7px;
    font-size: 0.7em;
    width: 30px;
    text-align: center;
}

.hupZoomSliderPanel, #hupZoomMinus, #hupZoomPlus {
    float: left
}

.hupZoomSliderPanel {
    width: 120px;
    margin: 4px 5px 0 5px
}

.ui-slider-horizontal {
    height: 0.5em
}

.ui-slider-horizontal .ui-slider-handle {
    height: 1em;
    width: 1em
}

#hupZoomMinus, #hupZoomPlus {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 15px;
    text-align: center;
    cursor: pointer
}

#hupZoomMinus:hover, #hupZoomPlus:hover {
    border: 1px solid #FBCB09
}

.hupConfirmAjax {
    background: url(../../img/ajax_bar.gif) #eee no-repeat;
    height: 19px;
    width: 220px
}

.hupControlPanel {
    background: url(../../img/bg_panel.png) repeat-x;
    border: 1px solid #ddd;
    padding: 10px
}

.hupLeftInput {
    width: 400px
}

.hupInputHint, .hupError {
    background: url(../../img/warn.gif) no-repeat 10px 50%;
    border: 1px solid red;
    font-weight: bold;
    margin-top: 20px;
    padding: 5px 5px 5px 50px
}

.hupConfirmInputs {
    padding: 20px 20px 45px 20px;
    background: #eee;
    border: 1px solid #ddd;
    margin-bottom: 10px
}

.hupConfirmSubmit {
    display: inline-block;
    padding: 5px;
    border: 1px solid #999;
    background: #eee;
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold
}

.hupConfirmHint {
    font-family: Courier, serif;
    font-size: 11px;
    padding: 10px;
    border: 1px solid #ccc;
    background: #fff
}

/* HTML5-Scribble */
.scribbleApplet {
    height: 100%;
    position: relative;
    background: #F5F5F5;
}

.scribbleUploadMsgPanel {
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    background: #eee
}

.scribbleUploadMsgInProgress, .scribbleUploadMsgDone, .scribbleUploadMsgFailed {
    text-align: center;
    margin-top: -60px;
    font-size: 14px;
    top: 50%;
    position: relative
}

.scribbleProgressOut {
    width: 70%;
    margin: 20px auto;
    height: 33px;
    background: #fff;
    border: 1px solid #999;
    position: relative;
}

.scribbleProgressIn {
    background: #33a;
    position: absolute;
    height: 33px
}

.scribbleTopPanel {
    position: absolute;
    top: 0;
    bottom: 46px;
    width: 100%;
}

.scribbleScrollPanel {
    position: relative;
    display: block;
    height: 100%;
    overflow: auto;
}

.scribbleTempCanvas {
    position: absolute;
    display: none;
    z-index: 10;
}

.scribbleTempCanvas, .scribbleCanvas {
    margin: 0 auto;
    left: 50%;
    -webkit-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    -o-transform: translateX(-50%);
    transform: translateX(-50%);
}

.scribbleFreeCanvas {
    z-index: 9;
    display: block;
}

.scribbleFallbackDiv {
    text-align: center;
    margin-top: 40px;
}

.scribbleToolbar {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-flow: row-reverse wrap;
    position: absolute;
    bottom: 0;
    width: 100%;
    border-top: 1px solid #999;
    font-size: 22px;
    z-index: 11;
    background-color: #F5F5F5;
}

.scribbleToolbar button {
    max-width: 5vW;
    max-height: 5vW;
}

.scribbleToolName {
    display: none;
    background-color: #F5F5F588;
    position: absolute;
    top: 0;
    left: 0;
    font-size: 0.7em;
    padding: 0 5px;
    border: 1px solid #999;
    border-left: none;
    z-index: 12;
    height: 26px;
    margin-top: -26px;
    line-height: 26px;
}

.scribblePaintMode {
    display: flex;
}

.scribblePaintMode button {
    background-color: #FFF;
    margin: 5px;
    padding: 5px;
    border: 2px solid #EEE;
    cursor: pointer;
}

.scribblePaintMode .active {
    border-color: #BBB;
    box-shadow: none;
}

.colorDiv button{
    background-position: center;
}

.colorPanel {
    background-color: #F0F0F0;
    bottom: 55px;
    position: absolute;
    border: solid 1px #BBBBBB;
    z-index: 12;
}

.colorButton {
    margin: 0 5px 2px 5px;
    cursor: pointer;
}

.scribbleDrag {
    margin: 5px;
}

.scribbleToolPanel {
    display: flex;
}

.scribbleToolbar button{
    background-color: #f5f5f5;
    width: 40px;
    height: 40px;
    margin: 5px;
    border: 1px solid #f5f5f5;
    cursor: pointer;
}

.scribbleToolbar .colorDiv button {
    background-size: 100%;
}

.scribbleToolbar button:not(.dummyBtn):hover, .scribbleToolbar button:not(.dummyBtn).active {
    box-shadow: #8888 0 0 6px;
}

button.dummyBtn {
    border: none;
    cursor: unset;
}

/*Helper Classes*/
.hidden {
    display: none;
}

.clearBoth {
    clear: both
}

.grabbable {
    /*noinspection CssOverwrittenProperties*/
    cursor: move; /* fallback if grab cursor is unsupported */
    /*noinspection CssOverwrittenProperties*/
    cursor: grab;
    cursor: -moz-grab;
    cursor: -webkit-grab;
}

/* (Optional) Apply a "closed-hand" cursor during drag operation. */
.grabbable:active {
    cursor: grabbing;
    cursor: -moz-grabbing;
    cursor: -webkit-grabbing;
}

.exception-Info-opener {
	margin-top: 10px;
	opacity: 0.5;
	cursor: pointer;
	font-size: 0.75em;
}

.exception-Info {
	opacity: 0;
	height: 0;
	transition: none;
}

.exception-Info > * {
	display: none;
}

.exception-Info.open {
	opacity: 1;
	height: initial;
	transition: opacity 0.25s ease-in;
}

.exception-Info.open > * {
	display: block;
}

@media only screen and (max-width: 512px) and (orientation: portrait) {
    .hupInfoTextOpener {
        position: absolute;
        display: block;
        width: 28px;
        height: 28px;
        right: 10px;
        bottom: -9px;
        border-radius: 50%;
        background-color: white;
        border: 1px solid var(--text-color);
        color: var(--text-color);
        text-align: center;
        font-size: 1em;
        line-height: 1.5em;
        cursor: pointer;
    }

    .hupContentDiv {
        grid-template-rows: 1fr auto;
        padding-top: 10px;
    }

    .hupPreviewStatic, .hupConfirmPreview {
        grid-area: 1 / 1 / 2 / 2;
    }

    .hupControlPanel {
        grid-area: 2 / 1 / 3 / 2;
        min-height: 180px;
    }

    .hupPreviewTitle, .hupIntroText {
        display: none;
    }

    .hupIntroText {
        position: absolute;
        left: 10px;
        right: 10px;
        border: 1px solid #cccccc;
        z-index: 10;
        background-color: white;
        padding: 10px;
        margin-top: 0;
    }

    .hupPreviewStatic {
        min-height: unset !important;
    }

    .actionPanel {
        display: grid;
        justify-content: space-evenly;
        min-width: initial;
    }

    .scribbleToolbar button {
        max-width: 10vW;
        max-height: 10vW;
    }

    .colorPanel {
        bottom: 90px;
    }

    .bigButton {
        min-width: 300px;
    }

    .textFields {
        overflow-y: scroll;
    }

    .textFields ul li:before {
        margin-top: 2px;
    }

    .textFields ul li input {
        font-size: 16px;
    }
}