html {
    box-sizing: border-box;
}

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

html,
body {
    height: 100%;
}

canvas {
    display: block;
}

body {
    margin: 0;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

::-webkit-scrollbar-track {
    background: transparent;
}

#unity-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

.canvas-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.popup {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.alert-popup {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 50%;
    background-color: #d3d2d2;
    border-radius: 10px;
    width: 260px;
    height: 160px;
    z-index: 1000;
    padding: 10px;
}

.alert-popup.hidden {
    display: none;
}

.popup.hidden {
    display: none;
}

#info-form {
    gap: 10px;
    display: flex;
    flex-direction: column;
}

input {
    margin-bottom: 10px;
}

.confirm-button-container {
    width: 100%;
    display: flex;
    justify-content: end;
}

#confirm-button {
    margin-top: 10px;
    height: 20px;
    width: 70px;
    border-radius: 5px;
    border: none;
    background-color: #96db98;
    cursor: pointer;
}

.popup-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    text-align: center;
}

.close-button {
    background-color: #ff7f7f;
    border: none;
    font-size: 18px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.angle-input-container {
    position: fixed;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.slider-container {
    width: 100%;
    height: 35px;
}

.slider {
    width: 100%;
    height: 25px;
    outline: none;
    opacity: 0.7;
}

.slider:hover {
    opacity: 1;
}

.angle-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.angle-button {
    background-color: #f5f5f5;
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.angle-button:hover {
    background-color: #e0e0e0;
}

.angle-button:active {
    background-color: #d6d6d6;
}

.angle-input {
    width: 80px;
    text-align: center;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: bold;
}

.angle-input:focus {
    background-color: #f9f9f9;
}

.close-button-container {
    width: 100%;
    display: flex;
    justify-content: end;
}

#unity-canvas {
    width: 100%;
    height: 100%;

    background: {
            {
                {
                BACKGROUND_COLOR
            }
        }
    }

    ;
}

#main-container {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#sidebar {
    background-color: white;
    color: black;
    display: flex;
    flex-direction: column;
    padding: 20px;
    padding-left: 0;
    transition: width 0.5s ease;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-right: 10px;
    max-height: 100%;
}

.item-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    overflow-y: auto;
    width: 100%;
    overflow-x: hidden;
    height: 90%;
}

.category-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    overflow-y: auto;
    width: 100%;
    overflow-x: hidden;
}

.item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100px;
    cursor: grab;
}

.floor-material {
    display: flex;
    flex-direction: column;
    max-width: 120px;
    margin-left: 20px;
    margin-right: 20px;
    text-align: center;
}

.objects-material {
    display: flex;
    flex-direction: column;
    max-width: 120px;
    margin-left: 20px;
    margin-right: 20px;
    text-align: center;
}

.item:active {
    cursor: grabbing;
}

.item-image {
    width: 100px;
    height: auto;
}

.floor-image {
    width: 100px;
    height: auto;
}

.item-label {
    margin-top: 5px;
}

#sidebar.large .item {
    width: 150px;
}

#sidebar.medium .item {
    width: 150px;
}

#sidebar.small .item-list {
    display: none;
}

.controls-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: start;
}

.sidebar-control {
    background-color: white;
    border: none;
    color: black;
    cursor: pointer;
    margin-bottom: 20px;
    width: 30px;
    height: 30px;
}

#sidebar.small {
    width: 130px;
    padding: 0;
    padding-top: 20px;
    align-items: center;
}

#sidebar.medium {
    width: 350px;
}

#sidebar.large {
    width: 550px;
}

.categories-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 100px;
    gap: 20px;
    margin-right: 0;
    margin-left: auto;
}

.category {
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e3e3e3;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
}

.painting-category .color-item {
    width: 100px;
    height: 100px;
    display: inline-block;
    margin: 5px;
    cursor: pointer;
    margin-left: 20px;
    margin-right: 20px;
    border-radius: 10px;
    border: 1px solid #646464;
}

.painting-category .color-item:hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, 0.2);
}

.category.selected {
    background-color: #f47575;
}

.content-container {
    display: flex;
    flex-direction: row;
    max-height: 100%;
}

.hidden {
    display: none;
}

#loading-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#unity-loading-bar {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#unity-logo {
    text-align: center;
}

#unity-logo img {
    max-width: 80%;
}

#unity-progress-bar-empty {
    width: 80%;
    height: 24px;
    margin: 10px 20px 20px 10px;
    text-align: left;
    border: 1px solid white;
    padding: 2px;
}

#unity-progress-bar-full {
    width: 0%;
    height: 100%;
    background: rgb(255, 255, 255);
}

.light #unity-progress-bar-empty {
    border-color: black;
}

.light #unity-progress-bar-full {
    background: black;
}

#unity-fullscreen-button {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    background: url('https://gitlab.com/trisgram/company-graphics/-/raw/main/Useful%20Images/fullscreen-button.png') no-repeat center;
    background-size: contain;
}

#delete-button {
    width: 60px;
}

#copy-button {
    width: 60px;
}

#info-button {
    width: 60px;
}

#mirror-button {
    width: 60px;
}

#transform-mode-button {
    width: 80px;
}

#walk-button {
    width: 90px;
    left: 10px;
    top: 10px;
}

#toggle-panning-button {
    width: 90px;
    left: 110px;
    top: 10px;
}

#focus-button {
    width: 90px;
    left: 210px;
    top: 10px;
}

#measurements-button {
    width: 130;
    left: 310px;
    top: 10px;
}

#logout-button {
    width: 90px;
    left: 410px;
    top: 70px;
}

#change-color-button {
    width: 110;
    left: 510px;
    top: 10px;
}

#wall-paint-button {
    width: 90px;
    left: 610px;
    top: 10px;
}

#zoom-plus {
    width: 40px;
    left: 860px;
    top: 10px;
    border-radius: 0;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

#zoom-info {
    width: 120px;
    left: 740px;
    top: 10px;
    border-radius: 0;
}

#zoom-minus {
    width: 40px;
    left: 710px;
    top: 10px;
    border-radius: 0;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

#deselect-button {
    width: 80px;
    left: 910px;
    top: 10px;
}

#save-button {
    width: 80px;
    left: 1130px;
    top: 10px;
}

#load-button {
    width: 80px;
    left: 1220px;
    top: 10px;
}

#local-save-button {
    width: 100px;
    left: 1130px;
    top: 50px;
}

#local-load-button {
    width: 100px;
    left: 1240px;
    top: 50px;
}

#multi-select-button {
    width: 80px;
    left: 1220px;
    top: 80px;
}

#group-button {
    width: 80px;
    left: 1300px;
    top: 80px;
}

#toggle-group-individual-button {
    width: 160px;
    left: 1380px;
    top: 80px;
}

#undo-button {
    width: 80px;
    left: 1220px;
    top: 160px;
}

#redo-button {
    width: 80px;
    left: 1300px;
    top: 160px;
}

#switch-colliders-button {
    width: 160px;
    left: 1380px;
    top: 160px;
}

#test-button {
    width: 100px;
    left: 200px;
    top: 200px;
}

.input-json-container {
    position: absolute;
    display: flex;
    flex-direction: row;
    left: 550px;
    top: 70px;
    gap: 20px;
}

.highlight-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    left: 50px;
    top: 70px;
    gap: 20px;
}

.json-input-button {
    width: 80px;
    height: 40px;
    background-color: rgb(255, 255, 255);
    border-radius: 10px;
    border: none;
    color: rgb(0, 0, 0);
    text-align: center;
    line-height: 38px;
    cursor: pointer;
}

highlight-button {
    width: 160px;
    height: 40px;
    background-color: rgb(255, 255, 255);
    border-radius: 10px;
    border: none;
    color: rgb(0, 0, 0);
    text-align: center;
    line-height: 38px;
    cursor: pointer;
}

.info-input-wrapper {
    display: flex;
    flex-direction: row;
}

.milimeters {
    max-width: 15px;
    align-items: center;
    margin-left: 20px;
}

.control-button {
    position: absolute;
    height: 38px;
    background-color: rgb(255, 255, 255);
    border-radius: 10px;
    color: rgb(0, 0, 0);
    text-align: center;
    line-height: 38px;
    cursor: pointer;
}

.input-url-container {
    position: absolute;
    display: flex;
    flex-direction: row;
    left: 550px;
    top: 140px;
    gap: 20px;
}

.url-input-button {
    width: 80px;
    height: 40px;
    background-color: rgb(255, 255, 255);
    border-radius: 10px;
    border: none;
    color: rgb(0, 0, 0);
    text-align: center;
    line-height: 38px;
    cursor: pointer;
}

.input-room-resize-container {
    position: absolute;
    display: flex;
    flex-direction: row;
    left: 50px;
    top: 210px;
    gap: 20px;
}

.create-test-container {
    position: absolute;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    left: 50px;
    top: 260px;
    gap: 8px;
}

.room-resize-input-button {
    width: 100px;
    height: 40px;
    background-color: rgb(255, 255, 255);
    border-radius: 10px;
    border: none;
    color: rgb(0, 0, 0);
    text-align: center;
    line-height: 38px;
    cursor: pointer;
}

.texture-input-url-container {
    position: absolute;
    display: flex;
    flex-direction: row;
    left: 250px;
    top: 140px;
    gap: 20px;
}

.texture-url-input-button {
    width: 100px;
    height: 40px;
    background-color: rgb(255, 255, 255);
    border-radius: 10px;
    border: none;
    color: rgb(0, 0, 0);
    text-align: center;
    line-height: 38px;
    cursor: pointer;
}

.switch-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 990px;
    top: 10px;
}

.label {
    font-size: 18px;
    margin: 0 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #4CAF50;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.spinner,
.spinner:after {
    border-radius: 50%;
    width: 5em;
    height: 5em;
}

.spinner {
    margin: 10px;
    font-size: 10px;
    position: relative;
    text-indent: -9999em;
    border-top: 1.1em solid rgba(255, 255, 255, 0.2);
    border-right: 1.1em solid rgba(255, 255, 255, 0.2);
    border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);
    border-left: 1.1em solid #ffffff;
    transform: translateZ(0);
    animation: spinner-spin 1.1s infinite linear;
}


@keyframes spinner-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.walkthrough-banner {
    height: 80px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.724);
    position: fixed;
    top: 0;
    left: 0;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.key-box {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    color: rgb(9, 9, 9);
    font-size: 12px;
    font-weight: bold;
    text-align: center;

    align-items: center;
    justify-content: center;

    line-height: 20px;
    margin: 0 25px;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}
