@media screen and (min-width: 100ch) {

    :root {
        --container-width: 26em;
        --container-height: var(--viewport-height, 100vh);
        --container-top: 0px;
        --canvas-left: calc(var(--container-width) / 2);
        --canvas-top: 0px;
        --left-joystick-position: var(--container-width);
        --left-close-icon-position: calc(var(--container-width) + 6em);
        --float-gui-top: 1vh;
        --sidebar-icon-container-top: 0px;
        --joystick-bottom: 2em;
    }
}

@media screen and (max-width:100ch) {
    :root {
        --container-width: var(--viewport-width, 100vw);
        --container-height: calc(var(--viewport-height, 100vh) * 0.6);
        --container-top: calc(var(--viewport-height, 100vh) - var(--container-height) + 3em);
        --canvas-left: 0px;
        --canvas-top: calc((var(--viewport-height, 100vh) - var(--container-height))/-1.2);
        --left-joystick-position: 0vw;
        --left-close-icon-position: calc(var(--viewport-width, 100vw) - 1.5em);
        --float-gui-top: 1em;
        --sidebar-icon-container-top: calc(var(--container-top) - 3em);
        --joystick-bottom: calc(2em + var(--container-height));
    }
}




@media (hover: none) {
    .is-not-touch-screen {
        display: none;
    }
}

@media not all and (hover: none) {
    .is-touch-screen {
        display: none;
    }
}

@media screen and (max-width:100ch) {
    #vsl-box {
        top: calc(var(--sidebar-icon-container-top) - 4em);
        bottom: unset;
    }
}

#vsl-box {
    left: unset;
    right: 0em;
    position: fixed;

}

body {
    position: relative;
    top: 0px;
    left: 0px;
    width: var(--viewport-width, 100vw);
    height: var(--viewport-height, 100vh);
    font-family: -apple-system, BlinkMacSystemFont, segoe ui, Roboto, helvetica neue, Arial, noto sans, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol, noto color emoji;
    color: #212529;
    overflow: hidden;
    margin: 0px;
}

canvas {
    position: fixed;
    top: var(--canvas-top);
    left: var(--canvas-left);
    width: var(--viewport-width, 100vw);
    height: var(--viewport-height, 100vh);
    cursor: grab;
}

canvas:active:hover {
    cursor: grabbing;
}

.sidebar-container {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 0px;
    height: 0px;
    z-index: 2;
}

.sidebar-container>* {
    width: var(--container-width);
}

.sidebar-container.collapsed .sidebar-icon-container {
    top: calc(var(--viewport-height) - 4em);
    position: fixed;
    opacity: 0.45;
}

.sidebar-container.collapsed .sidebar-icon-container:hover {
    opacity: 1;
}

.sidebar-container.collapsed~canvas {
    top: 0px;
    left: 0px;
}

.sidebar-icon-container {
    padding: 0.5em;
    background-color: #eceeef;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16),
        0 2px 10px 0 rgba(0, 0, 0, 0.12);


    height: 3em;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 0.2em;
    margin: 0em;
    position: fixed;
    top: var(--sidebar-icon-container-top);
    z-index: 1;
}

.sidebar-icon-container>.sidebar-icons>.sidebar-icon {
    border-bottom: 1px dashed #d3d3d3;
    width: 2.5em;
    height: 2.5em;
    border-radius: 1.5em;
    background-color: #fff;
    display: inline-block;
    padding-top: .1em;
    box-shadow: 0 2px 5px 0 rgb(0 0 0 / 16%),
        0 2px 10px 0 rgb(0 0 0 / 12%);
    margin-left: 0.4em;
    cursor: pointer;
}

.sidebar-icon-container>.sidebar-icons>.sidebar-icon>.fa {
    font-size: 150%;
    padding-top: 0em;
    height: 100%;
    width: 100%;
    overflow: hidden;
    opacity: 0.4;
    text-align: center;
    vertical-align: middle;
}

.sidebar-icon-container>.sidebar-icons>.sidebar-icon>input[type=radio]:checked+.fa {
    opacity: 1;
}

.sidebar-icon-container>.sidebar-icons>.sidebar-icon>input[type=radio] {
    display: none;
}

.sidebar-icon-container>.sidebar-icons>.sidebar-icon>.fa {
    width: 2em;
    height: 2em;
    text-align: center;
    vertical-align: middle;
    margin-left: -0.2em;
    margin-top: 0.25em;
}

.sidebar-item {
    height: 0px;
    width: 0px;
}

.sidebar-item>.sidebar-close {
    position: fixed;
    top: calc(var(--sidebar-icon-container-top));
    left: var(--left-close-icon-position);
    width: 1em;
    height: 1em;
    font-size: 0.8em;
    text-align: center;
    vertical-align: bottom;
    z-index: 2;
}

.sidebar-item>.sidebar-close>input[type=checkbox] {
    display: none;
}

.sidebar-item>.sidebar-close>label {
    position: static;
    width: 4em;
    height: 4em;
}

.sidebar-content {
    padding: 1em 1em 1em 1em;
    width: calc(var(--container-width) - 1.6em);
    height: calc(var(--container-height) - 9em);
    /* min-height: 100%; */
    bottom: 4em;
    left: 0em;
    background-color: white;
    margin-top: 1em;
    margin-bottom: 0px;
    overflow-x: hidden;
    position: fixed;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), white),
        linear-gradient(to top, rgba(20, 20, 20, .25), rgba(255, 255, 255, 0));
    background-position: bottom center, bottom center;
    background-repeat: no-repeat;
    background-color: white;
    background-size: 100% 10em, 100% 3em;
    background-attachment: local, scroll;
}

/* .sidebar-content .vsl-input-container {
    border: 1px solid #eee;
} */

.float-gui {
    display: block;
    position: absolute;
    top: var(--float-gui-top);
    right: 1vw;
    position: absolute;
    z-index: 2;
    background-color: rgba(255, 255, 255, .7);
    /* border-radius: 0.2em; */
    text-align: center;
    padding: 1em;
    width: min(22em, 100vw);
    border-radius: 0.25em;
}

.float-gui:not(:has(div)) {
    width: 0.5em;
    cursor: pointer;
    display: block;
    filter: invert(1);
    border: .1em solid black;
}

.float-gui:not(:has(div)) i {
    position: relative;
    margin-left: -1em;
    margin-right: -1em;
}

i.fa-times {
    cursor: pointer;
}

.popup {
    width: auto;
    min-width: 22em;
    background-color: rgba(255, 255, 255, .7);
    border-radius: 0.2em;
    text-align: center;
    z-index: 1000;
    border: 1px gray solid;
    padding: 1em;
}

.popup-background {
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, .7);
    z-index: 999;
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
}

.float-gui .vsl-input-container {
    width: min(100%, 22em);
    padding: 0.2em;
    text-align: left;
}

.float-gui~.vsl-joystick-container {
    border: 10px green dotted;
}

.float-gui h4 {
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
    text-align: left;
}

.float-gui>div>i:first-child {
    display: none;
}

.sidebar-item-buttons {
    width: var(--container-width);
    bottom: 0em;
    left: 0px;
    height: 4em;
    display: flex;
    background-color: white;
    position: absolute;
    padding: 0em 0.2em;
    justify-content: center;
    align-items: flex-start;
    align-content: flex-start;
    flex-wrap: wrap;
    flex-direction: row;
    position: fixed;
}

.sidebar-item-buttons>.btn {
    text-align: center;

}


.btn,
input[type="button"],
input[type=submit] {
    background-color: #007bff;
    color: white;
    margin: .1em .1em;
    border-radius: .3em;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.5;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    border: 2px solid white;
}

.btn.disabled {
    filter: grayscale(100%);
    cursor: not-allowed;

}

.btn:hover,
input[type="button"]:hover,
input[type=submit]:hover {
    border: 2px solid gray;
}

.sidebar-content img {
    max-width: 25vw;
    max-height: 20vh;
}

.vsl-input-container {
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.2em 0em;
}

.vsl-draggables {
    user-select: none;
}

.vsl-ral-picker .vsl-ral-picker-inner-container {
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    max-height: 25vh;
}

.vsl-ral-picker .vsl-ral-picker-inner-container>input {
    width: 4.8em;
}

.vsl-imagelist {
    display: grid;
    grid-gap: 1em;
    grid-template-columns: repeat(auto-fit, minmax(6em, 1fr));
    padding: 1em 0em;
}

.vsl-imagelist:has(label:nth-of-type(3)) {
    grid-template-columns: repeat(auto-fit, minmax(6.8em, 1fr));
}

.vsl-imagelist:has(label:nth-of-type(4)):not(:has(label:nth-of-type(5))) {
    grid-template-columns: repeat(auto-fit, minmax(8em, 1fr));
}

.vsl-imagelist img {
    max-width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.vsl-imagelist>label {
    text-align: center;
    background-color: white;
    cursor: pointer;
}


@media (max-width:100ch) {
    body {
        font-size: 80%;
    }

}

.vsl-imagelist input[type=radio] {
    display: none;
}

.vsl-imagelist input[type=radio]+img {
    opacity: 0.50;
    transition: ease 300ms all;
}

.vsl-imagelist input[type=radio]:checked+img {
    opacity: unset;
    transition: ease 300ms all;
}

.vsl-imagelist-label {
    height: 2.5em;
    text-overflow: ellipsis;
    overflow: hidden;
}

.vsl-imagelist label {
    border: 2px dashed darkgray;
    transition: ease 300ms all;
}

.vsl-imagelist input[type=radio]+img:hover {
    opacity: 1;
    transition: ease 300ms all;
}

.vsl-imagelist label:has(input[type=radio]:checked) {
    border: 2px solid darkgray;
    transition: ease 300ms all;
}

.vsl-draggables .vsl-imagelist>label {
    cursor: move;
    position: relative;

}

.vsl-draggables .vsl-imagelist i.fa {
    left: 0.1em;
    top: 0.1em;
    width: 1em;
    height: 1em;
    font-size: 1.5em;
    display: block;
    position: absolute;
    opacity: .5;
    /* border:1px red dashed; */
}


.vsl-joystick-container {
    display: block;
    width: 100px;
    height: 100px;
    border: 2px solid gray;
    background-color: rgba(128, 128, 128, 0.5);
    padding: 1em;
    cursor: move;
    display: inline-block;
    position: fixed !important;
    bottom: var(--joystick-bottom);
    z-index: 10;
}

.vsl-joystick-container {
    margin-right: -24vw;
    margin-bottom: -2vh;
}

.vsl-joystick-container.vsl-joystick-round {
    margin-left: calc(-24vw + var(--left-joystick-position));
}

.vsl-perspective-scaler {
    position: fixed;
    bottom: var(--joystick-bottom);
    width: 10em;
    text-align: center;
    left: calc(50% + var(--left-joystick-position) / 2);
    margin-left: -5em;
}

@media (max-width: 100ch) {
    .vsl-joystick-container {
        transform: scale(0.5);
        margin-right: -19vw;
        margin-bottom: -1.6em;
    }

    .vsl-joystick-container.vsl-joystick-round {
        margin-left: calc(-19vw + var(--left-joystick-position));
    }

}



.vsl-joystick-container.dragging,
.vsl-joystick-container:hover {
    border: 2px solid white;
}

.vsl-joystick-inner-container {
    width: 75px;
    height: 75px;
    border: 2px solid gray;
    position: relative;
    margin-left: 10px;
    margin-top: 10px;
}

.vsl-joystick-round {
    border-radius: 50%;
}

.vsl-joystick-container .joystick-handle {
    position: relative;
    width: 2em;
    height: 2em;
    background-color: red;
    text-align: center;
    vertical-align: middle;
    color: white;
    font-weight: lighter;
    padding: 0em;
    margin-top: -124.6px;
    margin-left: -16.8px;
}

.vsl-joystick-container .joystick-handle.vsl-joystick-round {
    margin-top: -119px;
    margin-left: -0.8em;

}

.vsl-joystick-container .joystick-center {
    position: absolute;
    width: 2em;
    height: 2em;
    top: 50%;
    left: 50%;
    margin-top: -1em;
    margin-left: -1em;
    border: 2px dashed gray;
}

.contact-form form {
    display: grid;
    grid-template-columns: repeat(3, 32%);
    grid-gap: 0.25em;
    width: 100%;
}

.contact-form input,
.contact-form textarea,
.contact-form form>div {
    grid-column: span 3;
    font-size: 1em;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .status {
    display: none;
}

.contact-form input {
    background-repeat: no-repeat;
    background-position: top right;
    background-size: auto 50%;
    border: solid 1px gray;
}

.contact-form input:invalid {
    background-image: url("/Content/images/icons/error.webp");
    background-repeat: no-repeat;
    background-position: top right;
    background-size: auto 50%;
}

.contact-form input:not([type=button], [type=submit]):valid {
    background-image: url("/Content/images/icons/checkmark.webp");
}


.contact-form input[type="button"]:invalid {
    background-color: #ccc;
}

.contact-form input[type="submit"],
.contact-form .gdpr-line {
    grid-column: span 3;
}

.contact-form input.two-thirds {
    grid-column: span 2;
}

.contact-form input.one-third {
    grid-column: span 1;
}

.saving .contact-form .btn-primary {
    background-color: gray;
}

.error {
    background-color: red;
    color: white;
    border-radius: 2px;
}

@keyframes pulse_animation {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.saving .contact-form {
    animation-name: pulse_animation;
    animation-duration: 1.5s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-out;
}

/* Extra to fix formatting issues for patioroof */
.contact-form input,
.contact-form textarea {
    margin-left: 0em;
    margin-right: 0em;
}

.contact-form textarea {
    height: 6em;
    font: inherit;
}

form#pars>fieldset img {
    max-width: 8em;
    padding: 0em;
    display: inline-block;
}

form#pars #next,
form#pars #back {
    display: inline-block;
    width: 7em;
    margin-top: 1em;
    margin-right: 1em;
}

.vsl-slider label {
    width: 40%;
    display: inline-block;
    word-wrap: break-word;
}

.vsl-slider input[type="range"] {
    width: 29%;
}

.vsl-slider input[type="number"] {
    width: 16%;
    text-align: right;
}

/* When showArrows is true */

.vsl-slider:has(.arrow-button) label {
    width: 33%;
    display: inline-block;
    word-wrap: break-word;
}

.vsl-slider .arrow-button {
    display: inline-block;
    margin-bottom: 0.2em;
    translate: 0 -0.2em;
    cursor: pointer;
    user-select: none;
    color: gray;
}

.vsl-slider .arrow-button:hover {
    color: initial;
}

.vsl-slider:has(.arrow-button) input[type=range] {
    width: 22%;
}

/* When hideNumberInput is true */

.vsl-slider:not(:has(input[type=number])) {
    display: grid;
    grid-template-columns: 33% auto 33%;
    gap: 0.25em;
}

.vsl-slider:not(:has(input[type=number]))>* {
    width: 100%;
}


.vsl-slider:not(:has(input[type=number]))>label {
    grid-column: 1;
}

.vsl-slider:not(:has(input[type=number]))>span {
    grid-column: 3;
    text-align: left;
}

.vsl-slider:not(:has(input[type=number]))>input {
    grid-column: 2;
    width: auto;
}

svg.vsl-polygon-editor {
    pointer-events: all;
    stroke-width: 3;
    width: calc(var(--viewport-width, 100vw) - var(--container-width) - 6em);
    height: calc(var(--viewport-height, 100vh) - var(--canvas-top) - 6em);
    position: fixed;
    right: 3em;
    bottom: 3em;
    background-image: url(/Content/images/papergrid.png);
    background-size: 100px 100px;
    background-color: rgba(255, 255, 255, 0.6);
}

/* Saved designs */

.share-container~canvas {
    left: 0px;
}

div.share-container {
    width: 14em;
    height: 22em;
    display: block;
    position: absolute;
    left: 1em;
    top: 1em;
    background-color: rgba(255, 255, 255, .7);
    z-index: 100;
    padding: 1em;
    border-radius: 0.4em;
}

div.share-container img {
    max-width: 10em;
}

.vsl-navigator3d table {
    width: min(100%, 20em);
    table-layout: fixed;
}

.vsl-navigator3d table a {
    width: 100%;
    padding: 0px;
    display: block;
    margin: 2px;
    border: none;
}

.vsl-segment-editor {
    font-family: sans-serif;
    position: relative;
}


.vsl-segment-editor input[type=button] {
    font-size: 1em;
    font-weight: bolder;
    padding: 0px;
    margin: 0px;
    width: 1.5em;
    height: 1.5em;
    text-align: center;
    line-height: 1.5em;
}

.vsl-segment-editor .position-container {
    position: relative;
    right: 0.5em;
    top: 0.5em;
    height: 15vmin;
    width: 15vmin;
    border: 1px black solid;
    background-color: #eee;
}

.vsl-segment-editor .position-element {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: grey;
    cursor: move;
}


.vsl-segment-editor svg {
    background-image: url(/Content/images/papergrid_bg.png);
    pointer-events: all;
    stroke-width: 2;
    width: calc(var(--viewport-width, 100vw) - var(--container-width) - 6em);
    height: calc(var(--viewport-height, 100vh) - var(--canvas-top) - 6em);
    position: fixed;
    right: 3em;
    bottom: 3em;
    background-size: 100px 100px;
    background-color: rgba(255, 255, 255, .6);
    background-repeat: repeat;
    background-position: center center;
    background-size: 32cm auto;
    opacity: 0.6;
}

.vsl-segment-editor svg .allow-drag {
    fill: #8f0;
    stroke: #bbb;
    cursor: move;
}


.vsl-segment-editor svg line.allow-drag:hover {
    stroke: blueviolet;
}

.vsl-segment-editor svg text {
    font-size: 0.4rem;
}


.vsl-segment-editor svg .selected {
    fill: blue;
    stroke: black;
}


label.collapse-next-element-if-checked>input {
    display: inline-block;
    width: 0em;
    margin-left: 1em;
    margin-right: 3em;
}

label.collapse-next-element-if-checked>input::after {
    display: inline-block;
    width: 0em;
    height: 0em;
    content: " ";
    border: 1em transparent solid;
    border-top: white 1em solid;
    border-bottom: none;
}


label.collapse-next-element-if-checked {
    width: 100%;
    display: block;
    cursor: pointer;
    padding: 1em 0em;
    background-color: #ccc;
    color: white;
    margin-top: 0.1em;
}

label.collapse-next-element-if-checked>input:checked::after {
    border-bottom: white 1em solid;
    border-top: none;
}

label.collapse-next-element-if-checked:has(input:not(:checked))+div {
    display: none;
}

.vsl-image-uploader {
    background-color: #f0f0f0;
    outline: 1px dashed #333;
    outline-offset: 0px;

    text-align: center;
    padding: 2em;
    display: block;
}

.vsl-image-uploader.is-dragging {
    background-color: #eee;
}

.vsl-image-uploader i {
    display: block;
    margin-bottom: 0.5em;
    font-size: 200%;
}

.vsl-image-uploader input[type=file]#file-upload {
    display: none;
}

.vsl-image-uploader label[for=file-upload] {
    cursor: pointer;
    background-color: #212529;
    color: #f0f0f0;
    font-weight: bolder;
    margin-top: 0.5em;
    padding: 0.5em 1em;
    display: inline-block;
}

.vsl-input-container input[type=checkbox] {
    display: inline-block;
    width: 3em;
    position: relative;
}

.vsl-input-container input[type=checkbox]::before {
    background-color: rgb(90, 90, 90);
    border-radius: 0.75em;
    width: 3em;
    height: 1.5em;
    display: inline-block;
    content: "";
    border: 1px solid #333;
    translate: -0.25em -0.25em;
    transition: 100ms ease-in;
    overflow: hidden;
    position: absolute;
}

.vsl-input-container.vsl-checkbox label {
    display: inline-block;
    position: relative;
    max-width: 100%;
}

.vsl-input-container.vsl-checkbox span {
    display: inline-block;
    width: calc(100% - 3em);
    vertical-align: middle;
}

.vsl-input-container input[type=checkbox]:checked::before {
    background-color: rgb(14, 94, 185);
    transition: 100ms ease-in;
    position: absolute;
}

.vsl-input-container input[type=checkbox]::after {
    background-color: #fff;
    border-radius: 1.125em;
    width: 1.25em;
    height: 1.25em;
    display: inline-block;
    content: "";
    translate: 0em -0.05em;
    transition: 100ms ease-in;
    overflow: hidden;
    position: absolute;
}

.vsl-input-container input[type=checkbox]:checked::after {
    translate: 1.35em -0.05em;
    transition: 100ms ease-in;
}

.wall-selector {
    display: grid;
    grid-template-columns: 20% auto 20%;
    justify-items: center;
    align-items: center;
    border: 1px solid gray;
    width: 18em;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center -0.6em;
    height: 12em;
    background-image: url(/Content/designers/patioroof3/images/walls/none.png);
}

.wall-selector>label {
    text-align: center;
}


.wall-selector>label>.vsl-input-container {
    max-width: auto;
    border: none;
    padding: reset;
}

.wall-selector:has(.wall-selector__1 input:checked):has(.wall-selector__2 input:checked):has(.wall-selector__3 input:checked) {
    background-image: url(/Content/designers/patioroof3/images/walls/leftRightBack.png);
}

.wall-selector:has(.wall-selector__1 input:checked):not(:has(.wall-selector__2 input:checked)):has(.wall-selector__3 input:checked) {
    background-image: url(/Content/designers/patioroof3/images/walls/leftRight.png);
}

.wall-selector:not(:has(.wall-selector__1 input:checked)):has(.wall-selector__2 input:checked):has(.wall-selector__3 input:checked) {
    background-image: url(/Content/designers/patioroof3/images/walls/rightBack.png);
}

.wall-selector:not(:has(.wall-selector__1 input:checked)):not(:has(.wall-selector__2 input:checked)):has(.wall-selector__3 input:checked) {
    background-image: url(/Content/designers/patioroof3/images/walls/right.png);
}

.wall-selector:has(.wall-selector__1 input:checked):not(:has(.wall-selector__2 input:checked)):not(:has(.wall-selector__3 input:checked)) {
    background-image: url(/Content/designers/patioroof3/images/walls/left.png);
}

.wall-selector:has(.wall-selector__1 input:checked):has(.wall-selector__2 input:checked):not(:has(.wall-selector__3 input:checked)) {
    background-image: url(/Content/designers/patioroof3/images/walls/leftBack.png);
}

.wall-selector:not(:has(.wall-selector__1 input:checked)):has(.wall-selector__2 input:checked):not(:has(.wall-selector__3 input:checked)) {
    background-image: url(/Content/designers/patioroof3/images/walls/back.png);
}