@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;400;700&display=swap");

:root {
    --red: #E81623;
    --green: #09B584;
    --purple: #6424cc;
    --gray: #272a31;
}


/* Set font and background color */
body {
    font-family: "Inter", sans-serif;
    background-color: #1b1c20;
    color: #fff;
    height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    scroll-behavior: smooth;
}

#ui-container {
    position: absolute;
    top: 25px;
    left: 25px;
    z-index: 10;
    font-size: 14px;

    .panel {
        position: absolute;
        /* Or 'absolute' */
        overflow: hidden;
        /* Or 'scroll' */
        max-height: calc(100vh - 60px);
        /* max-width: 700px; */
        padding: 20px;
        border-radius: 8px;
        color: #fff;
        background-color: rgba(39, 42, 49, 0.75);
        backdrop-filter: blur(20px);
        width: 550px;
        min-height: 200px;
        box-sizing: border-box;
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
        transition: opacity 0.3s, transform 0.3s;
        transform-origin: top left;
        opacity: 1;
        transform: scale(1);
        min-width: 250px;
        display: flex;
        flex-direction: column;
        resize: both;             

        &.minimize {
            opacity: 0;
            transform: scale(0.95);
        }

        #status-bar {
            background-color: #6424cc;
            padding: 2px 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 11px;
            font-weight: 500;
            color: #fff;
            /* margin: 20px -20px -20px -20px; */
            border-bottom-left-radius: 8px;
            border-bottom-right-radius: 8px;
            position: absolute;
            bottom: 0;
            left: 0;
            width: calc(100% - 20px);

            #status-text {
                width: calc(100% - 40px);
            }

            #status-spinner {
                width: 60px;
                height: 26px;
            }

        }

        .panelPage {
            position: relative;
            width: 100%;
            overflow: auto;
            margin-bottom: 40px;
            transition: opacity 0.2s ease-in-out;
            opacity: 1;
            flex-direction: column;
            flex-grow: 1;
            -ms-overflow-style: none; 
            scrollbar-width: none;

            /* Initially visible */
            display: none;

            /* Initially not displayed */
            &.current {
                display: flex;
                /* Make the current page visible */
                opacity: 1;
                /* Fully visible */
            }            
        }

        .panelPage::-webkit-scrollbar {
            display: none;
        }
    }

    #instructions2 {
        margin-top: 6px;
    }

    #show-hide-button {
        position: absolute;
        background-color: #666;
        color: white;
        border-radius: 20px;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 36px;
        height: 36px;
        left: -15px;
        top: -15px;
        user-select: none;
        z-index: 1;
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
    }

}

#hiber-logo {
    width: 130px;
}

#right-ui-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items:end;
    bottom: 35px;
    right: 35px;
    z-index: 10;
    font-size: 14px;
    gap:16px;
    
    button {
        margin: 0;
    }
}


.pulsating-plane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ddd;
    z-index: 3;
    animation: pulsate 2s ease-in-out infinite;

}

@keyframes pulsate {
    0% {
        opacity: 0.1;
    }

    50% {
        opacity: 0.33;
    }

    100% {
        opacity: 0.1;
    }
}

#promptWrapper{
    flex-grow: 1;
    display: flex;
    flex-direction: column;
 
    #prompt {
        flex-grow: 1;
        width: 100%;
        height: 140px;
        font-size: 13px;
        background-color: #272a31;
        outline: none;
        margin-top: 18px;
    }
}


#drop_zone {
    position: relative;
    background-color: #272a31;
    border-radius: 8px;
    height: 250px;
    max-height: 35vh;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    background-size: cover;
    background-position: center center;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.75);
    transition: all 0.3s ease;

    &.empty {
        height: 120px;
    }

    &.portrait {
        height: 350px;

    }

    &.contain {
        background-repeat: no-repeat;
        background-size: contain;
    }

    .drop-zone-text {
        /* position: absolute;
        bottom: 25px; */
        font-size: 11px;
        text-shadow: 0 0 2px rgba(0, 0, 0, 0.75);
        opacity: 0.75;
    }
}

#drop_zone.highlight {
    border: 3px solid #09B584;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Creates two columns */
    gap: 10px;
    /* Adjust the space between images */
    max-width: 100%;
    /* Ensures the grid does not exceed the width of its container */
    margin: auto;
    /* Centers the grid horizontally if it's narrower than its container */
    margin-top: 14px;
    margin-bottom: 20px;

    .img-wrapper {

        width: 100%;
        /* Makes images fill their cells */
        height: auto;
        /* Maintains aspect ratio */
        position: relative;

        .sample-image {
            width: 100%;
            height: auto;
            object-fit: cover;
            box-sizing: border-box;
            border-top: 3px solid transparent;
            border-bottom: 3px solid transparent;

            &.selected {
                border: 3px solid #09B584;
            }
            
            &.grayed-out  {
                filter: grayscale(1);
            }
        }

    }

}

#imageDialog {

    width: 100%;
    height: 100%;
    padding: 0px;
    background-color: #000;
    text-align: center;
    overflow: hidden;
    padding: 0;
    border-radius: 8px;
    overflow: hidden; 
    outline: none;
    

    #closeDialog {
        cursor: pointer;
        position: absolute;
        top: 10px;
        right: 20px;
        font-size: 30px;
        color: #FFF;
        user-select: none;
        z-index: 2;
    }

    .image-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%; /* Takes the full width of the dialog */
        height: 100%; /* Takes the full height of the dialog */
        overflow: hidden; /* Ensures no overflow from this container */
        /* background-color: #555;
        img {
            border: 1px solid #09B584;
        } */
    }

    #generateSkyBoxBtn {
        position: absolute;
        bottom: 20px;
        right: 20px;
        z-index: 1;
    }

    #readmeButton {
        position: absolute;
        bottom: 32px;
        right: 160px;
        z-index: 1;
        color: #fff;
        text-decoration: none;
    }
    
    #dialogImage {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain; /* Ensures the image scales properly */
    }
}


#imageDialogInner{
    position: relative;
    height: fit-content;

    #tool-container {
        z-index: 1;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        user-select: none;

        #marker{
            position: absolute;
            top: calc(50% - 9px);
            left: 0;
            width: 100%;
            padding: 6px 0;
            cursor: ns-resize;
            #marker-line {
                width: 100%;
                height: 2px;
                background-color: #e81623cf;
                pointer-events: none;
                box-shadow: 0 0 5px #000;
            }

            #marker-info{
                margin-top: 4px;
                color: #fff;
                text-shadow: 0 0 5px #000;
                opacity: 0.96;
                font-size: 14px;
                padding: 4px;
                background-color: #0000002b;
                white-space: nowrap;

            }
            .pulsating-bg {
                animation: pulsate 2s ease-in-out infinite;
                width: 100%;
                height: 27px;
                position: absolute;
                top: 10px;
                left: 0;
                background-color: #000000;
                z-index: -1;
            }

        }

    }

}

.buttonsContainer {
    display: flex;
    justify-content: space-between;
    flex-direction: row-reverse;
}

.buttonsContainer {
    display: flex;
}

.buttonsWrapper {
    display: flex;
}

.nextPrev{
    z-index: 3;
    position: absolute;
    right: 5px;
    width: 21px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    color: #000;
    background-color: #fff;
    &.prev{
        left: 5px;
    }

}

#removeImageIcon {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
    z-index: 1;
    background-color: rgb(0 0 0 / 41%);
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 19px;
}

#dragOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.75);
}

.iframe-fullscreen {
    width: 100%;
    height: 100%;
    border: none;
}

h1 {
    font-weight: 700;
    font-size: 30px;
    margin: 0px 0 8px 0;
}

.small-text {
    font-size: 11px;

    &.button {
        margin: 15px 0;
        text-decoration: underline;
        color: var(--red);
        cursor: pointer;
        user-select: none;
    }
}

.align-right {
    text-align: right;
}

input,
select,
textarea {
    padding: 14px;
    margin: 5px 0;
    width: 75%;
    background-color: rgb(52, 53, 64);
    font-family: "Inter", sans-serif;
    color: #fff;
    border: none;
    font-weight: 500;
    line-height: 1.5;
    font-style: normal;
    border-radius: 8px;
    font-size: 16px;
    height: 100px;
    box-sizing: border-box;
    resize: none;
}

/* input[type="number"] {
    width: 75px;
    padding: 14px;
    margin: 0 0;
    background-color: rgb(52, 53, 64);
    color: #fff;
    border: none;
    font-weight: 500;
    line-height: 1.5;
    font-style: normal;
    border-radius: 8px;
    font-size: 14px;
    height: 40px;
    box-sizing: border-box;
}

input[type="range"] {
    width: 45px;
    box-sizing: border-box;
} */

#enginePreviewCover,
#enginePreviewElement {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.SkyScape-logo {
    width: 30%;
    min-width: 200px;
    max-width: 400px;
    margin: 0 10px 30px 0;
}

#enginePreviewCover {
    display: flex;
    justify-content: right;
    align-items: end;
    background: radial-gradient(circle, var(--purple), #000);
    /* animation: animateHue 5s linear infinite; */
}

@keyframes animateHue {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

.elementToFadeInAndOut {
    opacity: 0;
    transition: opacity 0.5s;
}
.fadeIn {
    animation: fadeIn 1.5s;
}
.fadeOut {
    animation: fadeOut 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}


.hidden {
    display: none !important;
}

.expandable {
    max-height: 1000px;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.5s ease, opacity 0.5s ease;
}

.expandable.minimized {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease, visibility 0s linear 0.5s;
}

button {
    margin-top: 5px;
    margin-bottom: 5px;
    padding: 10px 20px;
    background-color: #E81623;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    margin-right: 10px;
    font-size: 15px;

    &.green {
        background-color: #09B584;
    }

    &.grey {
        background-color: #696969;
    }

    &:disabled {
        background-color: #696969;
        cursor: not-allowed;
        color: #b1b1b1;
    }
}

.buttonContainer {
    display: flex;
    justify-content: space-between;
}

/* The scrollbar's track (the part the thumb slides within) */
::-webkit-scrollbar-track {
    background: #3c3e4a;
    /* Color of the tracking area */
}

/* The scrollbar's thumb (the draggable element) */
::-webkit-scrollbar-thumb {
    background: #E81623;
    /* Color of the thumb */
    border-radius: 10px;

}

/* The scrollbar's button (arrows pointing upwards and downwards) */
::-webkit-scrollbar-button {
    background: #555;
    /* Color of the buttons */
}

/* The scrollbar itself (including thumb, track, and buttons) */
::-webkit-scrollbar {
    width: 8px;
    /* Width of the entire scrollbar */
}