#farm3d-dialog, #farm3d-dialog * {
    box-sizing: border-box;
}

#farm3d-dialog {
    width: 100dvw;
    height: 100dvh;
    overflow: hidden;
    padding: 0;
    font-family: arial, helvetica, sans-serif;
}

div#farm3d-dialog {
    position: fixed;
    top: 0px;
    left: 0px;
    z-index: 100;
}

body:has(#farm3d-dialog[open], div#farm3d-dialog:not(.hidden)) {
    margin: 0;
    overflow: hidden;
}

#farm3d-dialog .rows {
    height: 100%;
    width: 100%;
    background: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
}

#farm3d-dialog .title-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: #181820;
}

#farm3d-dialog .title-bar > * {
    padding: 2px 10px;
}

#farm3d-dialog .title-bar .close-dialog {
    font-size: 1.5em;
    background: #e00;
    color: #fff;
}

#farm3d-left-menu {
    width: 250px;
    background: #181820;
    padding: 10px;
    overflow: auto;
}

#farm3d-left-menu h3 {
    margin: 0 0 10px 0;
    font-weight: bold;
}

#farm3d-left-menu ul, #farm3d-left-menu ol {
    list-style-type: none;
    margin: 0 0 10px 0;
    padding-left: 0;
    font-size: smaller;
}

#farm3d-left-menu li {
    margin: 2px 0;
    padding-left: 15px;
    padding: 5px;
    cursor: pointer;
    user-select: none;
}

#farm3d-left-menu li:hover,
#farm3d-left-menu li.selected {
    background-color: #444;
    border-radius: 2px;
}

#farm3d-left-menu li.selected::before {
    margin-right: 10px;
    font-family: FontAwesome;
    content: '\f14a';
}

#farm3d-left-menu section {
    margin-bottom: 20px;
}

#farm3d .image-legend:not(.hidden) {
    position: absolute;
    top: 0;
    right: 10px;
}

/* waiting dialog */
@keyframes spin {
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

#waiting-dialog {
    outline: none;
    border: none;
    background: inherit;
    color: inherit;
    font-size: 2rem;
}

#waiting-dialog .spin {
    display: inline-block;
    margin-left: 0.5rem;
    font-family: monospace;
    animation: spin 0.5s linear infinite;
}
