/** Loading Bar **/

#loading-bar-blur {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;

    background-color: rgba(0, 0, 0, 0.4);
    box-shadow: inset 0 0 64px 32px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(16px);
}

#loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    width: 20%;

    padding: 8px;
}

#loading-bar p {
    margin: 0;
}

.loading-bar-wrapper {
    display: flex;
    flex-direction: column;
}

.loading-bar-label-wrapper {
    display: flex;
    flex-direction: row;

    margin-bottom: 8px;
}

.loading-bar-outer {
    height: 16px;

    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);

    outline: 2px solid rgba(255, 255, 255, 0.4);
}

.loading-bar-outer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.loading-bar-inner {
    width: 0;
    height: 100%;

    box-shadow: inset 0 0 8px 4px rgba(0, 0, 0, 0.35);
}

/** Main Menu **/

#main-menu {
    display: none;

    position: absolute;
    bottom: 64px;
    left: 64px;

    width: 20vw;

    padding: 16px;

    text-align: center;
}

#main-menu-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#main-menu h1 {
    margin: 0 0 16px 0;
}

#main-menu .button {
    padding: 8px 16px;
}

#main-menu .separator {
    margin-bottom: 16px;
    margin-top: 8px;
}

#main-menu-worlds {
    display: none;

    /*display: flex;*/
    flex-direction: column;
    gap: 8px;
}

#main-menu-worlds-list {
    display: flex;
    flex-direction: column;
    gap: 8px;

    max-height: 50vh;
    overflow: scroll;
}

.world-listing {
    align-items: start;

    padding: 16px;
}

.world-listing-info {
    flex: 1;

    display: flex;
    flex-direction: row;
    align-items: start;
    gap: 8px;
}

.world-listing-icon {
    width: 2rem;

    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.2));
}

.world-listing-info-right {
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 8px;
}

.world-listing-name {
    font-size: 18px;
}

.world-listing-type {
    opacity: 0.8;
    font-size: 14px;
    font-style: italic;
}

.world-listing-buttons {
    display: flex;
    flex-direction: row;
    justify-content: right;
    gap: 16px;

    width: 100%;
}

#main-menu-world-creator {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#main-menu-worlds-bottom {
    display: flex;
    flex-direction: row;
}

.main-menu-bottom {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.main-menu-bottom .button {
    flex: 1;
}


/** Workbench Naming Menu **/

#workbench-name-parent {
    display: none;

    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;

    backdrop-filter: blur(4px);
}

#workbench-name {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 8px;

    background-image: url("../../img/ui_background.png");
    background-repeat: repeat;
    background-size: 128px;
    image-rendering: pixelated;
    outline: 2px solid #cccccc;

    color: white;

    user-select: none;
}

#workbench-name p {
    margin: 0 0 8px 0;

    font-size: 16px;
}

#workbench-name-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#workbench-name-submit, #workbench-name-cancel {
}

#workbench-name-submit img, #workbench-name-cancel img {
    width: 1rem;
    height: auto;
}

.workbench-name-buttons {
    display: flex;
    flex-direction: row;
    justify-content: end;
    gap: 6px;

    margin-bottom: 4px;
}

#workbench-description-input {
    resize: none;
}


/** Pause Menu **/

#pause-blur {
    display: none;
}

.title {
    margin: 0;

    text-align: center;
    font-size: 20px;
}

#pause-menu {
    width: 15%;
}


/** Settings Menu **/

#settings-blur {
    display: none;
}

#settings-menu {
    width: 20%;

    gap: 16px;
}

.settings-entry {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.settings-entry-label {
    text-align: left;
    flex: 1;
}

.settings-entry-value {
    margin-right: 4px;
}


/** Prompt **/

#prompt-blur {
    display: none;
}

#prompt {
    gap: 16px;
    padding: 16px;
    align-items: center;
    text-align: center;

    max-width: 20vw;
}

.prompt-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.prompt-buttons .button {
    padding: 8px;
}


/** Debugging Stats **/

#debug {
    display: none;

    position: absolute;
    top: 16px;
    left: 16px;
    min-width: 9%;

    font-size: 12px;
}

.label {
    font-weight: bold;
    text-align: center;
}


/** Focus Loss **/

#focus-loss {
    display: none;
}

#focus-loss-inner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;

    color: white;

    user-select: none;
}

#focus-loss-inner h1, #focus-loss-inner p {
    margin: 0;

    text-shadow: 0 0 4px 2px rgba(0, 0, 0, 0.5);
}