:root {
    --button-color: #9dcfd3;
    --topbar-height: 33px;
    --stats-display: none;
    --icon-size: 25px;
}

::selection {
    background-color: var(--highlight-background-color);
    color: var(--highlight-color);
}

html,
body {
    width: 100%;
    height: 100%;
    font-family:
        "Trebuchet MS",
        "Lucida Sans Unicode",
        "DejaVu Sans",
        "Bitstream Vera Sans",
        "Liberation Sans",
        Verdana,
        sans-serif;
    line-height: 1.5;
}

body {
    background-color: black;
}

body,
a {
    color: #000;
}

button {
    background-color: var(--button-color);
    border: 1px solid #7f7f7f;
    min-height: 2em;
    cursor: pointer;
}

ul {
    list-style-type: square;
    list-style-position: outside;
    margin: 0 0 1em;
    padding-left: 2em;
}


button[disabled] {
    background-color: #a5a5a5;
}

.renderCanvas {
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
    /* mobile webkit */
}

.posAbs100 {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}

table,
td,
th {
    padding: 5px;
    text-align: left;
}

h2 {
    font-size: 1.1rem;
    font-weight: normal;
}

.border1 {
    border: 1px solid black
}

.border-none {
    border: 0;
}

h1 {
    padding: 0 10px;
    font-size: 1.2em;
    font-weight: normal;
}

.draggable {
    cursor: pointer;
}

.padding-less {
    padding: 0.6em;
}

.padding-more {
    padding: 1em;
}

.gui-background {
    background-color: lightgray;
}

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

.footer button {
    flex: auto;
}

#stats canvas {
    display: initial !important;
}

#entity-counter {
    background: white;
    padding: 4px;
    font-size: small;
}

#dialog-container-footer-left,
#dialog-container-footer-middle,
#dialog-container-footer-right {
    position: absolute;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    flex: 0 1 auto;
}

.dialog-header {
    overflow: hidden;
    background: radial-gradient(circle, rgb(185 185 185) 20%, transparent 21%) repeat, rgb(169 169 169);
    background-size: 8px 8px;
    background-position: 0 0;
    border-bottom: 1px solid #7f7f7f;
}

.dialog-body {
    overflow: auto;
    max-height: calc(100% - 64px);
}

#dialog-button-bar {
    width: fit-content;
    top: 0;
    left: initial;
    right: 0;
}

.dialog-dimensions-and-location {
    max-width: 100%;
    max-height: 90%;
}

.border-top-bottom-only-1px {
    border-width: 1px 0;
}

.fontSmall {
    font-size: 1em;
}

.fontLarge {
    font-size: 1.5em;
}

.label {
    color: white;
}

input[readonly] {
    border: 0;
    background: none;
}

input:invalid {
    outline: 2px solid red;
}

.settings-action {
    display: flex;
    margin-bottom: 0.65em;
}

.settings-labels {
    display: block;
    width: 150px;
    border: 1px solid transparent;
    margin-top: 0.65em;
}

.settings-keys {
    width: 150px;
    min-height: 1.5em;
    border: 1px solid transparent;
    padding: 0.3em 0.3em 0;
    cursor: pointer;
}

.settings-key {
    padding: 0.2em;
    border: 1px solid blue;
    border-radius: 3px;
    float: left;
    margin: 0 3px 3px 0;
}

.settings-x {
    width: 30px;
    padding: 0.2em;
    margin-top: 0.2em;
    background-color: transparent;
    margin-left: 5px;
}


.value-bar-panel {
    background-color: grey;
    height: 3px;
    border: 3px solid black;
    width: 64px;
}

.value-bar-immediate {
    background-color: white;
    transition: width 0.36s;
    transition-timing-function: ease-out;
}

.value-bar-bar {
    background-color: red;
}


/* Dialog resize handles */
.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: black;
    cursor: nwse-resize;
    /* Cursor style for resizing */
}

.pointer {
    width: 30px;
    display: inline-block;
}

.black-bg {
    background-color: black;
}

.label-indicator {
    line-height: 1.1;
    padding: 0 0.1em;
}

.grabbable {
    cursor: move;
    /* Fallback if grab cursor is unsupported */
    cursor: grab;
    cursor: -moz-grab;
    cursor: -webkit-grab;
}

/* Optional: Apply a "closed-hand" cursor during drag operation */
.grabbable:active {
    cursor: grabbing;
    cursor: -moz-grabbing;
    cursor: -webkit-grabbing;
}

.lil-gui.autoPlace.autoPlace {
    right: 150px;
}

.button-icon {
    float: left;
    width: var(--icon-size);
    height: var(--icon-size);
    background-image: url('images/ui\ symbol\ spritesheet.png');
    /* scale the entire spritesheet */
    background-size: 256px 128px;
    /* background-color: yellow; */
}

.button-text-and-icon {
    line-height: var(--icon-size);
}

.margin-bottom-only {
    margin: 0 0 1em;
}

#units-wrapper>div {
    margin-bottom: 3px;
}

.unitListItem {
    position: absolute;
    transition: top 1s ease-out;
}

.star {
    clip-path: polygon(50% 0%,
            65% 35%,
            100% 35%,
            75% 57%,
            85% 91%,
            50% 72%,
            15% 91%,
            25% 57%,
            0% 35%,
            35% 35%);
}

.arrow {
    clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
}

.hotkey {
    position: absolute;
    right: 2px;
    bottom: 5px;
    height: 1.2em;
    font-size: 0.75em;
}

.armor-section {
    display: flex;
    flex-direction: row;
    gap: 2px;
    width: fit-content;
}

.slot {
    width: 25px;
    height: 25px;
    background-color: black;
    border: 2px solid black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #eee;
}

.tile {
    background-color: white;
}

.tile[data-state="intact"] {
    background: #fff;
    color: #000;
}

.tile[data-state="damaged"] {
    background: #000;
    color: #fff;
}