:root {
	--med-blue: #364860;
	--orange: #f39d3a;
	--beige: rgb(252, 252, 244);
    --beige: beige;
    --designer-background: rgba(218, 212, 206, 0.61);/* rgb(244, 242,238); #f3f2f1; */
    --arrow-size: 16px;
    --bottom-menu-height: 150px;
    --thumb-shadow: #f5ab62; /* #c8ae90;  #d5954c; */
    --thumb-border: rgb(236, 144, 40);
    --outer-picket: rgb(16, 18, 19);
    --inner-picket: rgb(191, 197, 204);
    --inner-rivet: rgb(196, 204, 212);
    --outer-z: rgb(16, 18, 19);
    --controls-background-colour: whitesmoke;
    --gate-button-background: #374358;/* #4f5f75; */
    --gate-settings-shadow: rgba(54, 72, 96, 0.22) 0rem 0.3125rem 1.5625rem,rgba(244, 157, 58, 0.12) 0rem 0.3125rem 0.625rem;
    --invalid-input-colour: rgb(147, 73, 73);
}

@font-face {
	font-family: "Lucida Bright";
	src:
		url("/assets/fonts/lucida/lucida.ttf") format("truetype"),
		/* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
		url("/assets/fonts/lucida/lucida.woff2") format("woff2"),
		/* chrome、firefox */
		url("/assets/fonts/lucida/lucida.woff") format("woff"),
		/* chrome、firefox */
		url("/assets/fonts/lucida/lucida.svg#Lucida Bright V1") format("svg");
	/* iOS 4.1- */
}

*,
*:before,
*:after {
  box-sizing: border-box;
  font-family: "Lucida Bright";
}
/* remove above after complete 
https://www.freecodecamp.org/news/css-selectors-cheat-sheet-for-beginners/#combinators

https://blog.logrocket.com/understanding-min-content-max-content-fit-content-css/
*/

html {
    padding: 0;
    margin: 0;
    background-color: var(--designer-background);/* #f3f2f1; rgba(249, 244, 236, 0.87); */
}
body {
    padding: 0;
    margin: 0;
    height: 100vh;
}


.designer-wrapper::-webkit-scrollbar {
    display: none;
}
.designer-wrapper {
    padding-bottom: var(--bottom-menu-height);
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    display: flex;
    justify-content: space-around;
}
.gate-designer-container {
    /* scroll-snap-type: x proximity; */
    height: 100%;
    width: max-content;
    padding: 5px;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: flex-start;
    flex-wrap: nowrap;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    /* transform: scale(0.5); */
    /* transform-origin: left top; */
    user-select: none;
    
}
.gate-designer-container * {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none;
}
.gate-designer-outer {
    /* scroll-snap-align: start; */
    position:relative;/*necessary for delete gate container*/
    display: flex;
    flex-direction: column;
    align-items: center;
    width: max-content;
    min-width: fit-content;
    height: fit-content;
    margin: .4rem;
    padding: 0.5rem;
    box-shadow: 0 0 16px -9px rgba(0, 0, 0, 0.76);
    border-radius: 2rem;
    background-color: rgb(246, 245, 244);/* rgb(244, 240, 237);*/
}
.gate-designer {
    position: relative;
    /* user-select: none; */
}
.gate-designer canvas {
    /* touch-action: pinch-zoom; */
    /* user-select: none; */
    /* object-fit: contain; */
}

.gate-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem .6rem 1.3rem .6rem;
}

.gate-name-header {
    text-align: center;
    margin: .5rem 0 .1rem 0;
    color: #5a5f69;
}
.gate-close-button {
    background: none;
    background-image: url(/assets/img/icon/close-button.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 3rem 3rem;
    border: none;
    width: 3rem;
    height: 3rem;
}
.gate-close-button:hover {
    background: none;
    background-image: url(/assets/img/icon/close-button-hover.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 3rem 3rem;
    cursor: pointer;
}
.gate-delete-button {
    background: none;
    background-image: url(/assets/img/icon/delete-button.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 3rem 3rem;
    border: none;
    width: 3rem;
    height: 3rem;
}
.gate-delete-button:hover {
    background: none;
    background-image: url(/assets/img/icon/delete-button-hover.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 3rem 3rem;
    cursor: pointer;
}
.gate-dimensions-header {
    display: block;
    text-align: center;
    margin: .1rem 0 .5rem 0;
    color: rgb(111, 104, 104);
}
.gate-header-label {
    color: #888e95;
}
.gate-header-width,
.add-gategate-header-height {
    color: rgb(111, 104, 104);
}
.gate-dimensions-header .gate-header-label {
    font-size: .9rem;
}
.gate-name-header .gate-header-label {
    font-size: .9rem;
}


.delete-gate-dialog-background {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    z-index: 30;
    /* background-color: #a5aab000; */
    border-radius: 2rem;
    display: flex;
    justify-content: center;
}
.gate-designer-outer .delete-gate-dialog-background {
    animation: fade-delete-dialog-background 600ms cubic-bezier(0.64, 0.07, 0.44, 0.54) forwards;
}
@keyframes fade-delete-dialog-background {
    0% {
        background-color: #ffffff00;
    }
    100% {
        background-color: rgba(0, 0, 0, 0.6);
    }
}


.delete-gate-dialog {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    padding: 1rem;
    width: 100%;
    max-width: 650px;
    max-height: 240px;
    /* position: relative;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-50%); */
    z-index: 40;
    border: 1px solid rgb(191, 191, 191);
    background-color: white;
    border-radius: 2rem;
    /* transition: all 500ms ease-in-out; */
}
.gate-designer-outer  .delete-gate-dialog {
    animation: add-delete-dialog 700ms ease-in-out forwards;
}
@keyframes add-delete-dialog {
    0% {
        background-color: rgb(240, 240, 240);
        box-shadow: none; 
        transform: translateY(0px);
        border-radius: 2rem 2rem 1rem 1rem;
        border: 1px solid white;
    }
    25% {
        border-radius: 1.2rem;
    }
    50% {
        border-radius: 1.7rem 1.7rem 1.3rem 1.3rem;
    }
    75% {
        border-radius: 1.9rem 1.9rem 1.5rem 1.5rem;
    }
    100% {
        background-color: white;
        box-shadow: 0 0.3125rem 1.5625rem rgba(0, 0, 0, 0.22),0 0.3125rem 0.625rem rgba(0, 0, 0, 0.12); 
        transform: translateY(100px);
        border-radius: 2rem;
        border: 1px solid rgb(145, 145, 145);
    }
}
.delete-gate-dialog button {
    background: var(--gate-button-background);
    color: white;
    width: 6rem;
    height: 2.7rem;
    border-radius: 1.5rem;
    border: none;
    margin: 1rem;
    font-size: 1rem;
    box-shadow: var(--gate-settings-shadow);
}
.delete-gate-dialog button:hover {
    color: rgb(222, 229, 233);
    border: 2px solid var(--orange);
    box-shadow: none;
}
.delete-gate-dialog span {
    font-size: 1.7rem;
    margin: 1.6rem 0;
}









/* box-shadow: [horizontal-offset] [vertical-offset] [blur](optional) [spread](optional) [color] */
.gate-dialog {
    position: absolute;
    transform: translateX(-50%) translateY(calc(var(--arrow-size) / 2));
    z-index: 20;
    background-color: var(--med-blue);
    border-radius: 10px;
    border: 2px solid white;
}
.gate-dialog-component {
    box-shadow: var(--gate-settings-shadow); /*0 0 7px -2px white;*/
}
.gate-dialog-add-component {
    box-shadow: var(--gate-settings-shadow);/*0 0 7px -2px var(--orange);*/
}
.gate-dialog-centre {
    box-shadow: var(--gate-settings-shadow);/* 0 0 7px -2px var(--med-blue);*/
}
.gate-dialog-arrow {
    position: relative;
    width: var(--arrow-size);
    height: var(--arrow-size);
    left: 50%;
    transform: translateX(-8px) translateY(-9px) rotate(45deg);
    border-left: 2px solid white;
    border-top: 2px solid white;
    border-radius: 2px;
    background-color: var(--med-blue);
    box-shadow: -2px -2px 2px 0 white;
}
.gate-dialog-centre .gate-dialog-arrow {
    box-shadow:-2px -2px 4px -3px var(--med-blue);
}
.gate-dialog-component .gate-dialog-arrow {
    box-shadow: -2px -2px 4px -3px white;
}
.gate-dialog-add-component .gate-dialog-arrow {
    box-shadow: -2px -2px 4px -3px var(--orange);
}

.gate-dialog-content {
    width: min-content;
    padding: 9px 15px;
    transform: translateY(-6px);
}
.gate-dialog-content > div {  
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}
.dialog-content-component {
    height: 200px;
    width: min-content;
}
.dialog-content-add-component {
    height: 60px;
    width: min-content;
}
.dialog-content-offset {
    height: 160px;
    width: max-content;
}

.offset-shift {
    width: 40%;
    height: 1.9rem;
    border-radius: .7rem;
    color: white;
    font-size: 1rem;
    text-shadow: 0 0 2px var(--orange);
}
.offset-shift:hover {
    text-shadow: none;
}
.offset-shift-left {
    border-top-left-radius: 2rem;
    border-bottom-left-radius: 2rem;
}
.offset-shift-right {
    border-top-right-radius: 2rem;
    border-bottom-right-radius: 2rem;
}
.offset-shift-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.centre-input-fields {
    width: 100%;
    display: flex;
    justify-content: space-between;
}
.centre-input-fields .gate-dialog-number {
    height: 1.9rem;
}
.centralise-border-anim {
    transition: border 500ms ease-in-out;
}









.gate-dialog-button,
.gate-dialog-number,
.gate-dialog-number-button,
.gate-dialog-select,
.offset-shift {
    background-color: var(--med-blue);
    box-shadow: 0 0 1px var(--orange);
    border: 2px solid var(--orange);
    padding: 0 .5rem;
}
.gate-dialog-button:hover,
.gate-dialog-number-button:hover,
.gate-dialog-select:hover,
.offset-shift:hover {
    box-shadow: 0 0 2px var(--orange), 0 0 1px var(--orange);
}
.gate-dialog-select:focus {
    outline: none;
}

.gate-dialog-content span {
    color: white;
    display: block;
    text-align: center;
}
.gate-dialog-button {
    appearance: none;
    width: 100%;
    border-radius: 1.7rem;
    height: 1.9rem;
    font-size: .9em;
    color: white;
}

.position-input-fields {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gate-dialog-number {
    appearance: none;
    width: 6rem;
    border: none;
    box-shadow: none;
    text-align: center;
    height: 1.7rem;
    font-size: 1.4em;
    color: white;
}
.gate-dialog-number-button {
    appearance: none;
    width: max-content;
    height: 1.9rem;
    border-radius: 1.7rem;
    font-size: .9em;
    color: white;
}
.gate-dialog-number::-webkit-inner-spin-button, 
.gate-dialog-number::-webkit-outer-spin-button { 
    appearance: none;
    opacity: 0;

}
.gate-dialog-select {
    appearance: none;
    border-radius: 1.7rem;
    height: 1.9rem;
    font-size: .9em;
    color: white;
    text-align-last:center;
    direction: rtl;
}

.gate-dialog-number:active,
/* .component-dialog-select:active, */
/* .component-dialog-select:focus, */
.gate-dialog-number:focus {
    border: none;
    outline: none;
}



.single-pair-selection {
    display: flex;
    align-items: center;
    width: max-content;
    margin: .1em auto;
    padding: 1rem;
    border-radius: 1.7rem;
    border: 1px solid #e4e4e4;
    background-color: var(--controls-background-colour);
    box-shadow: var(--gate-settings-shadow);
    /* 0 0 16px -9px #bdafa2; */
}
.single-pair-selection label {
    margin: 0 .4rem;
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    color: grey;
}
.single-pair-selection input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    margin-left: .5em;
    color: white;
    width: 2.4em;
    height: 2.4em;
    border: 0.25em solid var(--med-blue);
    box-shadow: 0 0 2px var(--med-blue);
    border-radius: 50%;
    display: grid;
    place-content: center;
    transition: 550ms box-shadow ease-in-out;
    transition: 100ms border ease-in-out;
}
.single-pair-selection input[type="radio"]:checked {
    box-shadow: none;/* 0 0 .3px var(--orange); */
    border: 0.27em solid var(--med-blue);
}
.single-pair-selection input[type="radio"]::before {
    content: "";
    width: 0.7em;
    height: 0.7em;
    border-radius: 50%;
    transform: scale(0);
    transition: 320ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--orange);
}
.single-pair-selection input[type="radio"]:checked::before {
    transform: scale(1.8);
}

.gate-options-container {
    background-color: var(--controls-background-colour);
    box-shadow: var(--gate-settings-shadow);
    margin: 1.5rem;
    padding: 1rem;
    border-radius: 1.7rem;
    border: 1px solid #e4e4e4; 
}


.gate-options-container:hover, 
.single-pair-selection:hover {
    box-shadow: 0 0 3px white;
    transition: all 370ms;
    border: 1px solid #e7e7e7;
    /* --controls-background-colour: white; */
    /* animation: flicker-shadow 25ms linear 4 forwards; */
    transition: 230ms all ease-in;
    --controls-background-colour:white;
    box-shadow: 0 0 3px white;
}

/* @keyframes flicker-shadow {
    0% {box-shadow: 0 0 3px white;}
    10% {box-shadow: 0 0 5px rgb(183, 182, 182);}
    20% {box-shadow: 0 0 5px white;}
    30% {--controls-background-colour:whitesmoke;box-shadow: 0 0 6px rgb(198, 198, 198);}
    40% {box-shadow: 0 0 3px white;}
    60% {box-shadow: 0 0 3px rgb(155, 154, 154); }
    80% {box-shadow: 0 0 3px white;}
    90% {box-shadow: 0 0 2px rgb(117, 117, 117);}
    100% {--controls-background-colour:white;box-shadow: 0 0 3px white;}
} */





.picket-controls > div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: max-content;
    margin: .1em auto;
    padding: 10px;
    /* border-radius: 1.7rem;
    border: 1px solid #e4e4e4; */
    /* 0 0 16px -9px #bdafa2; */
}

.picket-constraints-checkbox {
    margin: 0 1.3rem;
}
.picket-constraints-checkbox label {
    display: flex;
    justify-content: center;
    align-items: center;
    color: grey;
}
.picket-constraints-checkbox input[type="checkbox"] { 
    -webkit-appearance: none;
    appearance: none;
    margin-left: .5rem;
    font: inherit;
    width: 1.3em;
    height: 1.3em;
    border: 0.15em solid var(--med-blue);
    box-shadow: 0 0 3px var(--med-blue);
    border-radius: 0.3em;
    display: grid;
    place-content: center;
    overflow: hidden;
}
.picket-constraints-checkbox input[type="checkbox"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    transform: scale(0) rotate(-200deg);
    transition: 240ms transform ease-in-out;
    background-color: CanvasText;
    box-shadow: inset 1em 1em var(--orange);
    transform-origin: bottom left;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.picket-constraints-checkbox input[type="checkbox"]:checked::before {
    transform: scale(1) rotate(0deg);
}


.picket-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    overflow: hidden;
}
.picket-buttons button {
    width: 3.4rem;
    border: 0.1em solid var(--orange);
    background-color: var(--controls-background-colour);
    color: var(--orange);
    margin: .3rem;
    padding-bottom: 5px;
    box-shadow:0 0 3px var(--orange);
    font-size: 1.3rem;
    text-shadow: 0 0 3px var(--orange);
    display: flex;
    align-items: center;
    justify-content: space-around;
}
.picket-buttons button[data-pickets-down] {
    border-radius: 2rem .7rem .7rem 2rem;
}
.picket-buttons button[data-pickets-up] {
    border-radius: .7rem 2rem 2rem .7rem;
}
.picket-buttons button:hover {
    transition: 200ms background-color ease-in-out;
    transition: 100ms text-shadow ease-in-out;
    background-color:white;/* rgb(241, 229, 216);*/
    text-shadow: 0 0 1px var(--orange);
}
.picket-buttons button:active {
    transition: 100ms text-shadow ease-in-out;
    transition: 100ms box-shadow ease-in-out;
    text-shadow: 0 0 2px whitesmoke;
    box-shadow: 0 0 1px var(--orange);
}


.gate-dimensions-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1em auto;
}
.gate-dimensions-container label {
    color: grey;
    margin-right: .5rem;
}
.gate-dimensions {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: max-content;
}
.gate-dimensions button {
    width: 3rem;
    border: 0.1em solid var(--orange);
    background-color: var(--controls-background-colour);
    color: var(--orange);
    margin: .3rem;
    padding-bottom: 5px;
    box-shadow:0 0 3px var(--orange);
    font-size: 1.3rem;
    text-shadow: 0 0 3px var(--orange);
    display: flex;
    align-items: center;
    justify-content: space-around;
}
input[data-gate-width] {
    height: 2rem;
    color: grey;
    border: 0.15rem solid var(--orange);
    border-radius: .4rem;
    background-color: var(--controls-background-colour);
    margin: .3rem;
    padding-left: 10px;
    box-shadow:0 0 3px var(--orange);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
}
button[data-width-up] {
    border-radius: .7rem 2rem 2rem .7rem;
}
button[data-width-down] {
    border-radius: 2rem .7rem .7rem 2rem;
}

input[data-gate-width]::-webkit-inner-spin-button, 
input[data-gate-width]::-webkit-outer-spin-button { 
    appearance: none;
    opacity: 0;
}




.gate-lockshield-container {
    display: flex;
    align-items: center;
    width: max-content;
    margin: .1em auto;
    padding: 1rem;
}
.z-strip-label {
    color: grey;
    margin-right: .4rem;
    font-size: 1.1rem;
}
.gate-lockshield {
    display: flex;
    align-items: center;
}
.gate-lockshield label {
    margin: 0 .1rem;
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: grey;
}
.gate-lockshield input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    margin-left: .5em;
    color: white;
    width: 2.4em;
    height: 2.4em;
    border: 0.25em solid var(--med-blue);
    box-shadow: 0 0 2px var(--med-blue);
    border-radius: 50%;
    display: grid;
    place-content: center;
    transition: 550ms box-shadow ease-in-out;
    transition: 100ms border ease-in-out;
}
.gate-lockshield input[type="radio"]:checked {
    box-shadow: none;/* 0 0 .3px var(--orange); */
    border: 0.27em solid var(--med-blue);
}
.gate-lockshield input[type="radio"]::before {
    content: "";
    width: 0.7em;
    height: 0.7em;
    border-radius: 50%;
    transform: scale(0);
    transition: 320ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--orange);
}
.gate-lockshield input[type="radio"]:checked::before {
    transform: scale(1.8);
}











.gate-measurements-container > div {
    display: flex;
    flex-direction: column;
    align-items: start;
    margin: 1em auto;
}

.measurements-checkbox {
    margin: 0 1.3rem;
}
.measurements-option {
    display: flex;
    justify-content: center;
    align-items: center;
    color: grey;
    margin: .3rem;
}
input[type="checkbox"] { 
    -webkit-appearance: none;
    appearance: none;
    margin-left: 1rem;
    font: inherit;
    width: 1.3em;
    height: 1.3em;
    border: 0.15em solid var(--med-blue);
    box-shadow: 0 0 3px var(--med-blue);
    border-radius: 0.3em;
    display: grid;
    place-content: center;
    overflow: hidden;
}
input[type="checkbox"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    transform: scale(0) rotate(-200deg);
    transition: 240ms transform ease-in-out;
    background-color: CanvasText;
    box-shadow: inset 1em 1em var(--orange);
    transform-origin: bottom left;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
input[type="checkbox"]:checked::before {
    transform: scale(1) rotate(0deg);
}


.gate-options-separator {
    display: block;
    border: none;
    height: 2px;
    background: linear-gradient(to right, #ffffff00, #efeeee, #ffffff00);
}


.save-container {
    width: 100%;
    height: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.save-button {
    width: max-content;
    height: max-content;
    font-size: 1rem;
    color: lightgrey;
    background-color: var(--gate-button-background);
    padding: .6rem .9rem;
    border: 1px solid grey;
    border-radius: 2rem;
    transition: 300ms all ease;
}
.save-button:hover {
    color: white;
    border: 2px solid white;
}
.save-button:active {
    color: darkgray;
    background-color: lightGrey;
}









.add-gate-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--med-blue);
    height: 0;
    opacity: 0;
    overflow: scroll;
    z-index: 300;
}
.add-gate-container h2 {
    color: white;
    font-size: 2.16rem;
    text-align: center;
    margin: .4rem;
}
.add-gate-container-visible {
    animation: 800ms show-add-gate-form ease-in-out forwards;
}
@keyframes show-add-gate-form {
    0% {
        z-index: 300;
        height: 0;
        opacity: 0;
    }
    1% {
        z-index: 300;
        height: calc(100% - var(--bottom-menu-height) + 1px);
        opacity: 0;
    }
    60% {
        z-index: 300;
        height: calc(100% - var(--bottom-menu-height) + 1px);
        opacity: 1;
    }
    100% {
        z-index: 301;
        height: calc(100% - var(--bottom-menu-height) + 1px);
        opacity: 1;
    }
}
.add-gate-container-hidden {
    animation: 800ms hide-add-gate-form ease-in-out forwards;
}
@keyframes hide-add-gate-form {
    0% {
        z-index: 301;
        height: calc(100% - var(--bottom-menu-height) + 1px);
        opacity: 1;
    }
    1% {
        z-index: 300;
        height: calc(100% - var(--bottom-menu-height) + 1px);
        opacity: 1;
    }
    60% {
        z-index: 300;
        height: calc(100% - var(--bottom-menu-height) + 1px);
        opacity: 0;
    }
    100% {
        z-index: 300;
        height: 0;
        opacity: 0;
    }
}



.add-gate-form-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1rem;
}
.add-gate-form-container form {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}
input[data-add-gate-form],
button[data-add-gate-form] {
    appearance: none;
    font-size: 2rem;
    width: 100%;
    height: 3rem;
    margin: .5rem 0 1.3rem 0;
    border: 2px var(--orange) solid;
    border-radius: 2rem;
    box-shadow: 0 0 2px var(--orange);
    background: none;
    padding: 0 1rem;
    color: white;
    text-align: center;
    background-color: var(--gate-button-background);
}
button[data-add-gate-form],
input[data-add-gate-form]::placeholder {
    color: white;
    font-size: 1.4rem;
    text-align: center;
}
button[data-add-gate-form] {
    margin: 1rem 0;
    width: 48%;
    transition: all 200ms ease-in-out;
}
button[data-add-gate-form]:hover {
    background-color: #374e6a;
}
button[data-add-gate-form]:active {
    color: var(--orange);
    border-color: white;
}
input[data-add-gate-form]:focus {
    transition: all 300ms ease-in-out;
    outline: none;
    background-color: #374e6a;
    border: 2px solid #f4a852;
    box-shadow: 0 0 3px 1px var(--orange); 
}
input[data-add-gate-form]::-webkit-inner-spin-button, 
input[data-add-gate-form]::-webkit-outer-spin-button { 
    appearance: none;
    opacity: 0;
}
input[data-add-gate-form].gate-form-input-invalid {
    box-shadow: 0 0 6px 1px var(--invalid-input-colour); 
    border-color: var(--invalid-input-colour);
}
span[data-add-gate-form] {
    color: #e4e4e4;
}
.add-gate-checkbox-container {
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 1.4rem 0;
}
.add-gate-checkbox-container label {
    display: flex;
    align-items: center;
}
.add-gate-form-container .submit-buttons {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.add-gate-checkbox-container label {
    color: white;
    font-size: 1.4rem;
}
.add-gate-checkbox-container input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    margin-left: .5em;
    color: white;
    width: 2.4em;
    height: 2.4em;
    background-color: white;
    border: 0.15em solid var(--orange);
    box-shadow: 0 0 2px var(--orange);
    border-radius: 50%;
    display: grid;
    place-content: center;
    transition: 550ms box-shadow ease-in-out;
    transition: 100ms border ease-in-out;
    transition: 200ms background-color ease-in;
}
.add-gate-checkbox-container input[type="radio"]:checked {
    box-shadow: none;/* 0 0 .3px var(--orange); */
    border: 0.27em solid white;
    background: none;
}
.add-gate-checkbox-container input[type="radio"]::before {
    content: "";
    width: 0.7em;
    height: 0.7em;
    border-radius: 50%;
    transform: scale(0);
    transition: 320ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--orange);
}
.add-gate-checkbox-container input[type="radio"]:checked::before {
    transform: scale(1.8);
}












#lower-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-menu-height);
    background-color: var(--med-blue);
    z-index: 300;
    /* box-shadow: 0 -6px 9px -9px white; */
    box-shadow: rgba(54, 72, 96, 0.22) 0rem 0rem 2rem,rgba(244, 157, 58, 0.12) 0rem 0.3125rem 0.625rem;
    display: flex;
    flex-direction: column;
}
.lower-controls {
    width: 100%;
    height: max-content;
    margin: 8px 10px 10px 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateY(-4px);
}

.open-close-range {
    width: 90%;
    max-width: 600px;
    display: block;
    margin: 0 auto;
    border: 4px solid var(--med-blue);
    background-color: white;
    box-shadow: 0 0 3px 0 rgb(113, 126, 154) inset;
    /* , 0 -5px 7px -7px white */
    transform: translateY(-7px);
    height: 20px;
    -webkit-appearance: none;
    border-radius: 15px;
    outline: none;
    z-index: 2;
    transition: all 350ms ease-in-out;
}
.open-close-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--orange);
    border: 1px solid var(--thumb-border);
    box-shadow: 0 0 10px 0px inset var(--thumb-shadow);
	cursor: pointer;
}
.open-close-range::-moz-range-thumb {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--orange);
    border: 1px solid #7a4100;
    box-shadow: 0 0 10px 0px inset var(--thumb-shadow);
	cursor: pointer;
}
.hide-open-close-range {
    transform: translateY(10px) rotateX(90deg) scale(70%);
}

.scale-buttons {
    width: min-content;
    margin: .4rem;
}
.scale-buttons>div {
    background-color: var(--gate-button-background);
}
button[data-scale-out],
button[data-scale-in] {
    background-color: var(--gate-button-background);
    color:white;
    border-radius: .3rem;
    height: 38px;
    width: 35px;
    margin: .2rem;
    padding: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
    border: 2px solid var(--orange);/* 1px solid rgb(169, 175, 194);*/
    box-shadow: 0 0 10px -6px white;
}
button[data-scale-in] {
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}
button[data-scale-out] {
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}
button[data-scale-out]:hover,
button[data-scale-in]:hover {
    border-color: white;
}

.add-gate {
    width: max-content;
    /* height: 100%; */
}
.gate-button-wrapper {
    border-radius: 50%;
    height: 100px;
    width: 100px;
    margin-left: 10px;
    box-shadow: 0 0 10px -6px white;
    flex-shrink: 0;
}
.add-gate .gate-button-wrapper {
    background-color: var(--gate-button-background);
    transition: all 260ms ease-in-out;
}
.add-gate .gate-button-wrapper:hover {
    transform-style: preserve-3d;
    transform: perspective(500px) translateZ(30px) rotate(180deg);
    box-shadow: none;
}
button[data-add-gate="add-button"] {
    padding: 4px;
    border-radius: 50%;
    background: var(--gate-button-background);
    width: 84px;
    height: 84px;
    border: 2px solid var(--orange);
    box-shadow: 0 0 8px -3px #f39d3a, #f39d3a 0 0 8px -6px inset;
    /* horizontal align */
    /* vertical align */
    position: relative;
    left: 50%;
    top: 50%;
    transform: translate(-50%) translateY(-50%);
    font-size: 4.4rem;
    color: white;
    display: flex;
    align-items: end;
    justify-content: center;
}
button[data-add-gate="add-button"]:hover {
    transition: all 260ms ease-in-out;
    border-color: white;
    box-shadow: none;
    color: var(--orange);
}
button[data-add-gate="add-button"]:active {
    transition: all 70ms ease-in-out;
    border-color: var(--orange);
    box-shadow: none;
    color: white;
}
.gate-list button[data-add-gate="add-button"] {
    box-shadow: none;
    transition: 200ms all; 
}
.gate-list button[data-add-gate="add-button"]:hover {
    box-shadow: 0 0 9px -3px #f39d3a, #f39d3a 0 0 8px -6px inset;
}
.gate-list .gate-button-wrapper:hover {
    transition: 200ms all; 
    transform-style: preserve-3d;
    transform: perspective(500px) translateZ(50px);
}
.add-gate,
.scale-buttons,
.gate-list {
    display: flex;
    align-items: center;
    padding: 5px;
}
.gate-list {
    overflow: scroll;
    -ms-overflow-style: none;
    scrollbar-width: none;
    margin: 0 10px;
}
.gate-list::-webkit-scrollbar {
    display: none;
}

.add-gate,
.scale-buttons {
    flex-direction: column;
    width: 120px;
}
.add-gate {
    z-index: 2;
    box-shadow: 5px 4px 9px 23px var(--med-blue);
}
.scale-buttons {
    box-shadow: -5px 4px 9px 23px var(--med-blue);
    padding-right: 15px;
}
.scale-buttons>div {
    width: max-content;
    height: max-content;
    padding: 4px;
    border-radius: 1.4rem;
    box-shadow: 0 0 10px -6px white;
}
.gate-list .gate-button-wrapper {
    box-shadow: none;
}
.gate-list .gate-button-wrapper button[data-add-gate="add-button"] {
    align-items: center;
}
.gate-list .gate-button-wrapper button[data-add-gate="add-button"] span {
    display: block;
    height: min-content;
    width: 100%;
    font-size: .8rem;
    font-style: bold;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}