﻿
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: system-ui, sans-serif;
}

#boardCanvas {
    display: block;
    width: 100vw;
    height: 100vh;
    background-color: var(--bgcolor1);
}

.panel {
    width: 260px;
    background-color: var(--bgcolor2);
    color: var(--text-color);
    padding: 0 12px;
    box-sizing: border-box;
    border-right: 1px solid #3a3a3a;
}

    .panel.right {
        border-right: none;
        border-left: 1px solid #3a3a3a;
    }

#canvasContainer {
    flex: 1;
    position: relative;
    background-color: #1e1e1e;
}

#boardCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#app {
    display: flex;
    width: 100vw;
    height: 100vh;
}

    .panel button {
        width: 100%;
    }

.panel-section {
    padding-bottom: 10px;
    display: none;
}

.visible {
    display: block;
}

#tools > div {
    cursor: pointer;
}

#canvasContainer {
    flex: 1;
    position: relative;
    background-color: var(--bgcolor1);
}

:root { /*fix for dumb hdr browsers*/
    color-gamut: srgb;
}

#boardCanvas {
    position: absolute;
    top: 0;
    left: 0;
    color-space: srgb;
}

.panel {
    overflow-y: auto;
}

.category-item, .panel-item {
    font-size: 1.75rem;
    text-align: center;
    padding: 10px 0px;
}

#slidesContainer {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
}

    #slidesContainer > button {
        display: inline-block;
        padding: 3px 10px;
        margin-bottom: 0;
    }

    #slidesContainer > button.selected {
        background-color: #ffa;
        color: black;
    }

#modalBlock {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50px;
    left: 0;
    background-color: var(--bgcolor1);
    opacity: 0.5;
    z-index: 10;
}

.modalDialog, .smallModalDialog {
    display: flex; /* ← missing */
    flex-direction: column; /* ← missing */
    max-height: min(1000px, 80vh);
    overflow: hidden;
    z-index: 20;
    position: absolute;
    background-color: var(--bgcolor2);
    border: var(--text-color) 1px solid;
    color: var(--text-color);
    width: 80vw;
    top: max(50px, 10vh);
    left: 10vw;
    min-height: 0; /* ← ADD THIS */
}

.smallModalDialog {
    top: max(50px, 10vh);
    left: 25vw;
    width: 50vw;
    max-height: min(500px, 80vh);
}

.modalDialog .nav-item:first-child, .smallModalDialog .nav-item:first-child {
    margin-left: 50px;
}

.modalContent {
    padding: 20px 50px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}


#mapList > button {
    display: block;
    margin: 10px;
}

.map {
    display: inline-block;
    text-align: center;
    padding: 10px;
}

.map > * {
    display: block;
    margin: auto;
}

.category > img {
    padding: 10px;
    opacity: 0.5;
    transition: filter linear 0.3s, opacity linear 0.3s;
    transition-delay: 0.1s;
}

    .category > img:hover {
        opacity: 1;
        transition-delay: 0s;
    }

#propertiesView > * {
    display: block;
    padding: 4px;
}

#propertiesView .halfWidth {
    display: inline-block;
    width: 50%;
    vertical-align: top;
}

.panel textarea {
    resize: vertical;
}

.panel button {
    margin-bottom: 10px;
}

#propertiesView > label > * {
    display: block;
}

#objectsView {
    text-align: center;
}

#connectionStatusDisplay {
    position: fixed;
    bottom: 5px;
    left: 5px;
    z-index: 10;
    color: var(--text-color);
}

#objectControls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 8px; /* space between buttons */
}

#objectList, #bundlePickList {
    min-height: 100px;
    max-height: 500px;
    overflow-y: auto;
    border: solid 1px #aaa;
    padding: 5px 10px;
    list-style: none;
}

.object-item {
    display: inline-block;
    text-align: center;
    padding: 5px;
    vertical-align: middle;
}

    .object-item > img {
        max-width: 100%;
    }

    .object-item.selected {
        filter: drop-shadow(0px 0px 7px rgba(255, 255, 255, 0.5));
    }

.object-list-item.drag-over-group {
    background: rgba(77, 163, 255, 0.15);
}

.groupObjectContainer {
    padding-left: 5px;
}

.drop-indicator {
    position: absolute;
    height: 2px;
    background: #4da3ff;
    pointer-events: none;
    z-index: 9999;
}

#resetCamera {
    position: absolute;
    bottom: 0;
    right: 0;
    margin: 0;
}

.object-item.active {
    filter: drop-shadow(0px 0px 5px var(--input-highlightcolor));
}

#bundleList, #bundlePickList {
    max-height: 250px;
}

#bundlePickList {
    list-style: none;
}

#bundleListTbody {
    height: 200px;
    overflow: auto;
}

#bundlesDialog {
    min-height: 400px;
}