@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
    /* GLOBAL CSS PROPS */

    --primary-color: #446cb3;
    --primary-btn-press-color: #34495e;

    --results-yellow-color: #f9bf3b;
    --results-green-color: #3FC380;
    --results-blue-color: #89C4F4;
    --results-red-color: #E26A6A;

    --navbar-color: rgba(0, 0, 0, 0.75);
    --navbar-height: 3rem;

    --scene-height: 500px;

    --building-part-height: 200px;
    --building-part-width: 250px;
    --building-roof-height: 45px;

    --standard-roof-offsetX: -20px;
    --standard-roof-offsetY: 38px;

    --office-roof-offsetY: 85px;
    --office-roof-offsetX: -15px;

    --ground-height: 40px;
    --ground-color: #34495E;
}

html, body {
    margin: 0;
    padding: 0;
    max-width: 100vw;

    box-sizing: border-box;

    /* overflow-x: hidden; */
    
    font-family: "Rajdhani", sans-serif;
}

body.scroll-lock {
    overflow-y: hidden; 
    height: 100vh;
}

#navbar {
    background-color: var(--navbar-color);
    width: 100%;
    max-width: 100vw;
    height: var(--navbar-height);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;

    position: fixed;
    top: 0;
    z-index: 999;

    display: flex;
    flex-direction: row;
    align-items: center;
}

#navbar #nav-start {
    display:flex;
    width: 40%;
    padding-left: 1rem;
}

#navbar #nav-end {
    display:flex;
    width: 60%;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
}

#navbar #navTitle {
    color: whitesmoke;
    margin: 0;
}

#navbar #fullScreenBtn {
    margin-top: 0;
    padding: 0.5rem 0.75rem;
    width: max-content;
    height: 2.5rem;

    text-align: center;
}

#navbar #fullScreenBtn h3 {
    font-weight: 600;
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

/* SCENE VIEW */
#sceneView {
    position: relative;
    /* background-color: paleturquoise; */

    height: var(--scene-height);
    width: 100%;

    overflow-x: scroll;
    overflow-y: scroll;

    --ms-overflow-style: none;
}

#sceneView #sceneBG {
    height: 100%;
    width: 100%;
    left: 0;

    position: absolute;
    z-index: 1;
}

#sceneView #sceneBGImage {
    height: 100%;
    width: 100%;

    z-index: 1;
}

#sceneView #sceneBG #sceneBGStars {
    position: absolute;
    top: 0;
    left: 50%;

    transform: translateX(-50%);

    z-index: 2;

    width: 0;
    max-height: 800px;
}

#sceneView #sceneBG #sceneBGSun {
    position: absolute;

    top: 40%;

    transform: translateX(-50%) translateY(-40%) scale(0.4, 0.4);
    opacity: 0.65;

    z-index: 2;
}

#sceneView #heightDefiner {
    background-color: var(--navbar-color);
    height: 10px;
    width: 0;
    visibility: hidden;
}

#sceneView .buildingContainer {
    position: absolute;
    /* bottom: var(--ground-height); */
    z-index: 3;
}

#sceneView .buildingContainer[data-sunsetVisible="false"] {
    filter: grayscale(1) opacity(0.8);
}

#sceneView .buildingContainer .building-part {
    height: var(--building-part-height);
    width: var(--building-part-width);
}

#sceneView .buildingContainer[data-buildingType="standard"] .building-part #building-roof{
    transform: translate(var(--standard-roof-offsetX), calc(var(--building-part-height) - var(--standard-roof-offsetY)));
}

#sceneView .buildingContainer[data-buildingType="office"] .building-part #building-roof{
    transform: translate(var(--office-roof-offsetX), calc(var(--building-part-height) - var(--office-roof-offsetY)));
}

#sceneView #groundPart {
    width: 100%;
    height: var(--ground-height);
    position: absolute;

    background-color: var(--ground-color);
}
/* SCENE VIEW */

/* RESULTS VIEW */

#resultsContainer {
    order: 0;
    position: relative;

    width: 100%;
    max-width: 90vw;

    min-height: 5rem;
    height: max-content;

    background-color: var(--ground-color);
    color: white;
    border-radius: 5px;

    /* margin-top: 1rem; */
    margin-left: auto;
    margin-right: auto;
}

#resultsContainer #resultsContent {
    box-sizing: border-box;
    padding: 1rem;
    width: 100%;
    height: 100%;

    text-align: center;
}

#resultsContainer #resultItemsWrapper {
    width: 90%;
    height: max-content;

    margin-top: 1rem;
    margin-left: auto;
    margin-right: auto;

    display: flex;
    justify-content: space-between;
    align-items: center;

    flex-direction: row;
    flex-wrap: wrap;

}

#resultsContainer #resultsContent .resultItemContainer {
    /* margin-top: 0.5rem; */
    margin-left: auto;
    margin-right: auto;

    width: 100%;
    height: max-content;
    padding: 0.75rem;

    border-radius: 5px;
    position: relative;
}

#resultsContainer #resultsContent .resultItemContainer:not(:first-child){
    margin-top: 1rem;
}

#resultsContainer #resultsContent .resultItemContainer:last-child {
    /* margin-bottom: 0.5rem; */
}

#resultsContainer #resultsContent .resultItemContainer .resultValueText {
    font-size: 2rem;
    font-weight: bold;
}

#resultsContainer #resultsContent #numBuildingResultContainer {
    background-color: var(--results-yellow-color);
    /* color: */
}

#resultsContainer #resultsContent #visibleBuildingResultContainer {
    background-color: var(--results-green-color);
}

#resultsContainer #visibleBuildingResultContainer #visibleBuildingInfoBtn {
    position: absolute;
    top: 0.5rem;
    right: 0.3rem;

    background-color: transparent;
    outline: none;
    border: none;
}

#resultsContainer #visibleBuildingResultContainer #visibleBuildingInfoBtn:hover {
    cursor: pointer;
}

#resultsContainer #visibleBuildingResultContainer #visibleBuildingInfoBtn i {
    color: white;
}

#resultsContainer #visibleBuildingResultContainer #visibleBuildingInfoBtn:hover i {
    color: var(--primary-btn-press-color);
}

#resultsContainer #resultsContent #tallestBuildingResultContainer {
    background-color: var(--results-blue-color);
}

#resultsContainer #clearSceneBtn {
    margin-top: 1rem;
    background-color: var(--results-red-color);
}

/* RESULTS VIEW */

/* PANELS */
#panels-container {
    width: 90%;
    min-height: 100px;

    margin-top: 1rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;

    display: grid;

    grid-template-columns: 100%;
    row-gap: 1.25rem;
    grid-template-rows: repeat(2, minmax(200px, max-content));
}

#panels-container h1, h2, h3, p {
    margin-top: 0;
    margin-bottom: 0;
}

#panels-container .panel {
    background-color: #fff;
    width: 100%;

    height: 100%;

    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

#panels-container .panel .panel-content {
    height: 100%;
    width: 100%;
    padding-bottom: 1rem;
    text-align: center;
}

.panel-content .panel-title {
    margin-top: 0.5rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.75rem;
}

.panel-content .panel-section-heading {}

.panel-content .panel-section-heading.heading-bottom {
    margin-top: 0.5rem;
}
/* PANELS */

/* Building Editor */
#buildingEditorPanel {
    order: 2;
}

#buildingEditorPanel #buildingPreview {
    width: 100%;
    height: max-content;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}

#buildingPreview .buildingContainer {
    position: relative;
    margin-left: auto;
    margin-right: auto;
    width: max-content;
    height: max-content !important;
}

#buildingPreview .buildingContainer .building-part {
    height: var(--building-part-height);
    width: var(--building-part-width);
    position: relative;
}

#buildingPreview .buildingContainer .building-part:first-of-type {
    height: var(--building-roof-height);
    width: var(--building-part-width);
    z-index: 1;
}

#buildingPreview .buildingContainer[data-buildingType="office"] {
    margin-top: 3rem;
}

#buildingPreview .buildingContainer[data-buildingType="standard"] .building-part #building-roof{
    transform: translate(var(--standard-roof-offsetX), 7px);
}

#buildingPreview .buildingContainer[data-buildingType="office"] .building-part #building-roof{
    transform: translate(var(--office-roof-offsetX), -40px);
}

#buildingEditorPanel #buildingTypeContainer {
    padding: 0 1rem;
    display: flex;

    justify-content: center;
    align-items: center;
    flex-basis: 33.3%;
}

#buildingEditorPanel #buildingTypeContainer .row{

}

#buildingEditorPanel #buildingTypeContainer .row#typeLabelRow {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
}

#buildingTypeContainer .row .iconBtn {
    background-color: transparent;
    outline: none;
    border: none;
}

#buildingTypeContainer .row .iconBtn:hover {
    cursor: pointer;
}

#buildingTypeContainer .row .iconBtn i {
    font-size: 1.75rem;
}

#buildingEditorPanel #buildingColorsContainer {
    margin-top: 0.75rem;
    width: 100%;
    height: max-content;

    text-align: center;
    
}

#buildingEditorPanel #buildingColorsContainer .colorSelectBtn {
    width: 3.25rem;
    height: 2rem;

    background-color: #fff;
    border-radius: 3px;
    border: none;
    outline: none;
    vertical-align: middle;
}

#buildingEditorPanel #buildingColorsContainer .colorSelectBtn:not(:first-child) {
    margin-left: 0.75rem;
}

#buildingEditorPanel #buildingColorsContainer .colorSelectBtn.is-selected {
    border: 3px solid #303030;
}

#buildingEditorPanel #buildingColorsContainer .colorSelectBtn:hover {
    cursor: pointer;
}

#buildingEditorPanel .standardBtn {}

#buildingEditorPanel #buildingHeightTextField {
    margin-top: 0.5rem;
    width: 2.5rem;
    height: 2rem;
    text-align: center;
    
    font-size: 1.2rem;
}

#buildingEditorPanel #storyLabel {
    margin-left: 0.25rem;
    font-size: 1.1rem;
    font-weight: bold;
}

#buildingEditorPanel #buildingHeightSlider {
    margin-top: 0.5rem;
}

/* Building Editor */

/* RANDOMIZER */

#randomizerPanel {
    order: 1;
}

#randomizerPanel .formItem {
    width: 100%;
    height: max-content;

    display: flex;
    flex-basis: 50%;

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

#randomizerPanel .formItem:first-of-type {
    margin-top: 0.5rem;
}

#randomizerPanel .formItem:not(:first-of-type){
    margin-top: 0.5rem;
}

#randomizerPanel .formItem .horizontal-slider {
    margin-left: 1rem;
}

#randomizerPanel .standard-text-field {
    height: 2rem;
    text-align: center;
    font-size: 1.2rem;
}

/* RANDOMIZER */

/* OTHER/MISC. */
.standardBtn {
    background-color: var(--primary-color);
    color: white;
    font-weight: bolder;
    font-size: 0.9rem;

    padding: 0.75rem 2rem;
    
    border-radius: 3px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.08);

    border: none;
    outline: none;

    margin-top: 0.5rem;
    
    transition: background-color 200ms ease-in;
}

.standardBtn:hover {
    cursor: pointer;
    background-color: var(--primary-btn-press-color);
}

.standardBtn.iconBtn {
    padding: 0.5rem 0.75rem;
    width: max-content;
    height: 2.5rem;
    text-align: center;
}

.standardBtn.iconBtn h3 {
    font-weight: 600;
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

.standard-text-field {
    outline: none;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;

    font-family: "Rajdhani";
    font-weight: bold;
}

.horizontal-slider {
    min-width: 10rem;
}

#emptyStateMessage {
    margin-top: calc(var(--navbar-height) + 1rem);
    padding: 1.5rem;
    margin-left: auto;
    margin-right: auto;

    background-color: var(--primary-color);
}

#emptyStateMessage p {
    color: white;
    font-size: 1.2em;
}

/* RESPONSIVE */

@media only screen and (min-width: 768px) and (max-width: 991px) {
    #panels-container {
        grid-template-columns: repeat(2, minmax(200px, 50%));
        column-gap: 1rem;
    }

    #resultsContainer {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    #randomizerPanel {
        order: 1;
        max-width: 100%;
    }

    body[data-sceneVisible="false"] #randomizerPanel {
        grid-column: 1/ span 2;
    }

    body[data-sceneVisible="true"] #randomizerPanel {
        grid-column: 2;
    }

    #buildingEditorPanel {
        order: 2;
        grid-column: 1/3;
    }
}

@media only screen and (min-width: 992px) {
    
    #panels-container {
        grid-template-columns: repeat(2,  50%);
        column-gap: 1rem;
    }

    #resultsContainer {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    #randomizerPanel {
        order: 1;
        max-width: 100%;
    }

    body[data-sceneVisible="false"] #randomizerPanel {
        grid-column: 1/ span 2;
    }

    body[data-sceneVisible="true"] #randomizerPanel {
        grid-column: 2;
    }

    #buildingEditorPanel {
        order: 2;
        grid-column: 1/3;
    }
}

/* RESPONSIVE */