@font-face {
    font-family: Poppins;
    font-weight: normal;
    src: url(assets/Poppins-Regular.woff2);
}

@font-face {
    font-family: Poppins;
    font-weight: 600;
    src: url(assets/Poppins-SemiBold.woff2);
}

@font-face {
    font-family: Poppins;
    font-weight: bold;
    src: url(assets/Poppins-Bold.woff2);
}

:root {
    --main-font: #2b556c;
    --blue: #78b2df;
    --slightly-darker-blue: #6da8d4;
    --light-blue: #eef6fd;
    --very-light-blue: #f6fbfe;
    --text-input-background: #f0f5fa;
    --slider-center: #8bb2d8;
    --light-grey: #e0e0e0;
    --almost-white: #fafafa;
    --toggle-green: #a2ecb9;
    --toggle-red: #eca2a2;
    --disabled-color: #c8cbcd;
    --disabled-blue: #abd3f0;
}

html,
body {
    margin: 0px;
    padding: 0px;
    color: var(--main-font);
    font-family: Poppins;
    font-size: 18px;
    width: 100%;
    height: 100%;
}

input[type=text],
select,
textarea,
button {
    font-family: Poppins;
}

div,
label {
    user-select: none;
}

#main-container {
    width: 100%;
    height: 100%;
    overflow: hidden;

    display: flex;
    flex-direction: row-reverse;
}

#left-panel {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 512px;
    height: 100%;
    background-color: var(--almost-white);
    filter: drop-shadow(0px 0px 20px var(--light-grey));
}

#left-panel>* {
    flex-shrink: 0;
}

#scene-panel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #f0f0f0;
}

#top-bar {
    height: 50px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    background-color: white;
    font-size: 20px;
    font-weight: 600;
    filter: drop-shadow(0px 0px 20px var(--light-grey));
}

#canvas-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#canvas-container>canvas {
    position: absolute;
    top: 0px;
    left: 0px;
}

.top-bar-element {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
}

.top-bar-element>* {
    border-left: 1px solid var(--light-grey);
    width: 100%;
    padding: 0px 20px;
}

.top-bar-element:first-child>* {
    border-left: none;
}

.top-bar-element:hover {
    background-color: var(--light-blue);
}

.top-bar-element-unchecked {
    color: var(--disabled-color);
}

.top-bar-element-unchecked:hover {
    background-color: white;
}

#powered-by {
    font-weight: normal;
    font-size: 12px;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    flex-grow: 1;
    flex-shrink: 0;
    padding: 0px 10px;
}

#powered-by>div:first-child {
    border-left: 1px solid var(--light-grey);
    padding: 0px 5px 0px 20px;
}

#insole-tools-text {
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--light-blue);
    font-size: 30px;
    font-weight: bold;
    color: var(--blue);
    border-top: 1px solid var(--light-grey);
    border-bottom: 1px solid var(--light-grey);
}

#tools-container {
    display: flex;
    flex-direction: column;
    flex-shrink: 1;
    height: 100%;
    overflow: auto;
}

.tool:not(.tool-expanded) {
    height: 70px;
    cursor: pointer;
    border-bottom: 1px solid var(--light-grey);
    font-size: 24px;
}

.tool:not(.tool-expanded)>:not(.tool-name) {
    display: none;
}

.tool:not(.tool-expanded)>.tool-name::after {
    content: "";
    width: 10px;
    height: 10px;
    transform: translateY(-2px) rotate(45deg);
    border-bottom: 3px solid var(--main-font);
    border-right: 3px solid var(--main-font);
}

.tool-expanded>.tool-name::after {
    content: "";
    width: 12px;
    height: 12px;
    transform: translateY(2px) rotate(-135deg);
    border-bottom: 4px solid var(--almost-white);
    border-right: 4px solid var(--almost-white);
}

.tool:not(.tool-expanded)>.tool-name:hover {
    background-color: var(--light-blue);
}

.tool-expanded {
    font-size: 18px;
}

.tool-expanded>.tool-name {
    background-color: var(--blue);
    cursor: pointer;
    font-size: 30px;
    font-weight: 600;
    color: var(--almost-white);
}

.tool-name {
    height: 70px;
    padding: 0px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.tool-expanded>.tool-name:hover {
    background-color: var(--slightly-darker-blue);
}

.tool-disabled {
    color: var(--disabled-color);
}

.tool-input-container {
    display: flex;
    flex-direction: column;

    background-color: var(--very-light-blue);
    padding: 8px 30px;
}

.tool-input-container>* {
    margin-top: 10px;
    margin-bottom: 20px;
}

.tool-input-container-nested {
    display: flex;
    flex-direction: column;
    background-color: var(--light-blue);
    border: 1px solid var(--light-grey);
    border-top: none;
    padding: 16px;
}

.tool-name-nested {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background-color: var(--light-blue);
    border: 1px solid var(--light-grey);
    padding-left: 8px;
}

.tool-name-nested>.arrow {
    width: 29px;
    height: 29px;
    background-color: var(--blue);
    display: flex;
    justify-content: center;
    align-items: center;
}

.tool-nested:not(.tool-expanded-nested)>.tool-name-nested>.arrow::after {
    content: "";
    width: 8px;
    height: 8px;
    transform: translateY(-2px) rotate(45deg);
    border-bottom: 3px solid var(--almost-white);
    border-right: 3px solid var(--almost-white);
}

.tool-expanded-nested>.tool-name-nested>.arrow::after {
    content: "";
    width: 8px;
    height: 8px;
    transform: translateY(2px) rotate(-135deg);
    border-bottom: 4px solid var(--almost-white);
    border-right: 4px solid var(--almost-white);
}

.tool-nested:not(.tool-expanded-nested)>:not(.tool-name-nested) {
    display: none;
}

.tool-toggle {
    display: inline-flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    align-self: flex-start;
}

.tool-toggle>input {
    display: none;
}

.tool-toggle>input+div::after {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    overflow: visible;
    justify-content: center;
    width: 60px;
    height: 25px;
    border-radius: 5px;
    font-size: 14px;
    color: var(--almost-white);
    filter: drop-shadow(0px 0px 6px rgba(0, 0, 0, 0.3));
}

.tool-toggle>input:checked+div::after {
    content: "ON";
    background-color: var(--toggle-green);
}

.tool-toggle>input:not(:checked)+div::after {
    content: "OFF";
    background-color: var(--toggle-red);
}

.tool-toggle-background {
    display: flex;
    flex-direction: row;
    /* justify-content: center; */
    align-items: center;

    cursor: pointer;
    border-radius: 5px;
    width: 100px;
    height: 20px;
    margin-left: 20px;
    background: linear-gradient(#939393 20%, #d1d1d1 80%);
}

input:checked+.tool-toggle-background {
    justify-content: flex-end;
}

input:not(:checked)+.tool-toggle-background {
    justify-content: flex-start;
}

.tool-slider {
    display: grid;
    grid-template-columns: auto 150px 50px;
    grid-template-rows: auto auto;
}

.tool-slider>div {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.tool-slider>.slider-unit {
    font-size: 18px;
    padding-left: 6px;
}

.tool-slider>input[type=range] {
    background-color: transparent;
    grid-area: 2 / 1 / 2 / 4;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    margin: 18px 0px;
    width: 100%;
    height: 26px;
}

.tool-slider>input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;

    background: linear-gradient(90deg, transparent, var(--slider-center) 30%, var(--slider-center) 70%, transparent);
}

.tool-slider>input[type=range]:disabled::-webkit-slider-runnable-track {
    background: linear-gradient(90deg, transparent, var(--disabled-color) 30%, var(--disabled-color) 70%, transparent);
}

.tool-slider>input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;

    background-color: var(--main-font);
    border: none;
    width: 10px;
    height: 26px;
    border-radius: 50px;
    margin-top: -11px;
}

.tool-slider>input[type=range]:disabled::-webkit-slider-thumb {
    background-color: var(--disabled-color);
}

.tool-slider>input[type=range]:not(:disabled)::-webkit-slider-thumb:hover {
    background-color: var(--slightly-darker-blue);
}

.tool-slider>input[type=range]::-moz-range-track {
    width: 100%;
    height: 4px;

    background: linear-gradient(90deg, transparent, var(--slider-center) 30%, var(--slider-center) 70%, transparent);
}

.tool-slider>input[type=range]:disabled::-moz-range-track {
    background: linear-gradient(90deg, transparent, var(--disabled-color) 30%, var(--disabled-color) 70%, transparent);
}

.tool-slider>input[type=range]::-moz-range-thumb {
    -moz-appearance: none;
    appearance: none;

    background-color: var(--main-font);
    border: none;
    width: 10px;
    height: 26px;
    border-radius: 50px;
}

.tool-slider>input[type=range]:disabled::-moz-range-thumb {
    background-color: var(--disabled-color);
}

.tool-slider>input[type=range]:not(:disabled)::-moz-range-thumb:hover {
    background-color: var(--slightly-darker-blue);
}

.tool-slider>input[type=text] {
    height: 25px;
}

.tool-textinputmultiline>div {
    margin-bottom: 6px;
}

#embossed-text-input {
    height: 90px;
}

input[type=text] {
    text-align: center;
}

input[type=text]:disabled {
    color: var(--disabled-color);
}

input[type=text],
select,
textarea {
    font-size: 18px;
    padding: 4px 10px;
    border: 1px solid var(--light-grey);
    color: var(--main-font);
    background-color: var(--text-input-background);
}

textarea {
    resize: none;
    width: calc(100% - 22px);
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

option {
    color: var(--main-font);
    background-color: var(--very-light-blue);
}

.styled-select {
    position: relative;
    margin-top: 8px;
}

.styled-select>.dropdown-arrow {
    position: absolute;
    pointer-events: none;
    width: 30px;
    height: 100%;
    top: 0px;
    right: 0px;
    background-color: var(--blue);
}

.styled-select>.dropdown-arrow::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(-3px) rotate(45deg);
    border-bottom: 3px solid var(--almost-white);
    border-right: 3px solid var(--almost-white);
}

.tool-dropdown {
    margin-bottom: 20px;
}

.tool-dropdown>.styled-select {
    width: 100%;
}

.tool-dropdown>.styled-select>select {
    width: 100%;
}

button {
    border: none;
    background-color: var(--blue);
    font-size: 18px;
    color: var(--almost-white);
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    background-color: var(--disabled-blue);
}

button:hover:not(:disabled) {
    background-color: var(--slightly-darker-blue);
}

.tool-counter {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.tool-counter>.inputs {
    display: flex;
    flex-direction: row;
}

.tool-counter>.inputs>input[type="text"] {
    width: 80px;
    height: 22px;
}

.tool-counter>.inputs>button {
    height: 32px;
    width: 32px;
    text-align: center;
    vertical-align: middle;
}

.tool-location-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tool-location-selector>button {
    width: 250px;
    height: 30px;
}

.tool-file-input {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    min-width: 0;
}

.tool-file-input>button {
    padding: 0px 12px;
    margin-right: 12px;
    flex-shrink: 0;
}

.tool-settle-button {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
}

.tool-settle-button>button {
    padding: 0px 12px;
    margin-right: 12px;
    flex-shrink: 0;
}

.fullscreen-overlay {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);

    overflow: hidden;
}

.fullscreen-overlay>div {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    background-color: var(--almost-white);
    box-sizing: border-box;
}

.fullscreen-overlay .title {
    font-size: 30px;
    font-weight: bold;
    color: var(--almost-white);
    background-color: var(--blue);
    flex-grow: 0;
    flex-shrink: 0;
    padding: 10px 25px;
}

.fullscreen-overlay .content {
    background-color: var(--almost-white);
    padding: 15px;
}

.fullscreen-overlay .content>button {
    width: 140px;
    height: 30px;
}

#file-panel-overlay .content {
    display: flex;
    flex-direction: column;
    row-gap: 12px;
}

#file-panel-overlay .content>button:not(.cancel-button) {
    width: 100%;
}

#foot-scan-selector-overlay>div {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--almost-white);
    box-sizing: border-box;
}

#foot-scan-selector-overlay .content {
    overflow: auto;
    max-height: calc(90vh - 60px);
}

#settle-foot-scan-canvas {
    display: block;
    border: 1px solid #c0c0c0;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

#settle-foot-scan-panel-overlay>div {
    width: 800px;
    display: flex;
    flex-direction: column;
    background-color: var(--almost-white);
}

#settle-foot-scan-panel-overlay .content {
    display: flex;
    flex-direction: column;
    row-gap: 12px;
}

#settle-foot-scan-panel-overlay .content>button:not(.cancel-button) {
    width: 100%;
}

.button-row {
    margin-top: 10px;
    margin-bottom: 10px;
}

.hideable {
    visibility: visible;
    opacity: 1;
    transition: visibility 0.15s linear, opacity 0.15s linear;
}

.hidden {
    visibility: hidden;
    opacity: 0;
}

#loading-indicator {
    pointer-events: none;
    position: absolute;
    bottom: 0px;
    right: 0px;
    margin: 20px;
    font-size: 24px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.lds-ellipsis {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 12px;
}

.lds-ellipsis div {
    position: absolute;
    top: 0px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--main-font);
}

.lds-ellipsis div:nth-child(1) {
    left: 8px;
    animation: lds-ellipsis1 0.6s infinite;
}

.lds-ellipsis div:nth-child(2) {
    left: 8px;
    animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(3) {
    left: 32px;
    animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(4) {
    left: 56px;
    animation: lds-ellipsis3 0.6s infinite;
}

@keyframes lds-ellipsis1 {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes lds-ellipsis3 {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0);
    }
}

@keyframes lds-ellipsis2 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(24px, 0);
    }
}

#insole-error-notification {
    pointer-events: none;
    position: absolute;
    top: 0px;
    left: 0px;
    margin: 16px;
    padding: 16px;
    gap: 16px;
    width: 60%;
    color: var(--toggle-red);
    background-color: var(--almost-white);
    border: 2px solid var(--toggle-red);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

#foot-scan-import-axes-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

#foot-scan-import-axes-container-inner {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
}

#foot-scan-import-axes-container-inner>.tool-dropdown {
    flex-basis: 100%;
    margin-bottom: 8px;
}

.error-text {
    color: var(--toggle-red);
}

/* Floating panel styling with 4 icons, each with 3-3-2-2 icons */

#floating-panel {
    position: fixed;
    top: 80%;
    left: 97%;
    transform: translate(-50%, -50%);
    width: auto;
}

.subpanel {
    position: relative;
    display: flex;
    flex-direction: row;
    width: auto;
}

.hideable-panel {
    position: absolute;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    top: 0;
    right: 100%;
    width: auto;
}

.icon-container {
    width: 50px;
    height: 50px;
    margin: 10px;
    padding: 20px;
    background-color: white;
    background-repeat: no-repeat;
    background-size: 35px;
    background-position: center;
    border: 1px solid var(--light-grey);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

.subpanel button:hover {
    cursor: pointer;
    background-color: var(--light-blue);
}

#foot-weight-image-main-button:disabled {
    background-image: url("assets/footWeightMapDisabled.png");
    background-color: var(--disabled-color);
}

#landmark-main-button:disabled {
    background-image: url("assets/landmarkDisabled.png");
    background-color: var(--disabled-color);
}

#foot-scan-main-button:disabled {
    background-image: url("assets/footDisabled.png");
    background-color: var(--disabled-color);
}

#foot-weight-image-main-button {
    background-image: url("assets/footWeightImage.png");
}

#landmark-main-button {
    background-image: url("assets/landmark.png");
}

#foot-scan-main-button {
    background-image: url("assets/foot.png");
}

#insole-main-button {
    background-image: url("assets/insoles.png");
}

.translate-button-checked {
    background-color: var(--blue);
}

.translate-button {
    background-image: url("assets/translate.png");
}

.rotate-button-checked {
    background-color: var(--blue);
}

.rotate-button {
    background-image: url("assets/rotation.png");
}

.visibility-button-checked {
    background-image: url("assets/visible.png");
}

.visibility-button-unchecked {
    background-image: url("assets/invisible.png");
}

.transparency-button-checked {
    background-image: url("assets/visible.png");
}

.transparency-button-unchecked {
    background-image: url("assets/invisible.png");
}

.translate-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: auto;
}

.translate-control-panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: absolute; 
    width: auto;
    vertical-align: middle;
    right: calc(100%);
}

.next-button {
    background-image: url("assets/next.png");
    display: block;
}

.previous-button {
    background-image: url("assets/previous.png");
    position: absolute; 
    vertical-align: middle;
    right: calc(100%);
}

.transparency-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: auto;
}

.transparency-slider-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute; 
    width: auto;
    vertical-align: middle;
    bottom: calc(100% + 50px);
}

.transparency-slider {
    display: block;
    transform: rotate(-90deg);
}

.transparency-checkbox {
    display: none;
    position: absolute; 
    width: auto;
    vertical-align: middle;
    bottom: calc(100% + 55px);
}