body {
    background-color: rgb(24, 32, 32);
    color: whitesmoke;
    font-family: sans-serif;
    margin: 0;
}

.main-container {
    background-color: rgb(41, 68, 71);
    justify-content: space-between;
    max-width: 1200px;
    margin: 0px auto;
    box-shadow: 1px 1px 8px 1px rgba(0, 0, 0, 0.25);
    border-radius: 2px;
}

h1 {
    margin: 0;
    font-size: xx-large;
    text-align: right;
}

h2 {
    margin: 0;
    font-size: medium;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
    font-style: italic;
    a {
        color: rgba(255, 255, 255, 0.6);
        text-decoration: none;
        &:hover {
            text-decoration: underline;
        }
    }
}


h3 {
    margin: 0;
    font-size: x-large;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    margin-bottom: 12px;
}

p {
    margin: 0;
    font-size: large;
    color: white;
    margin-bottom: 24px;
    margin-left: 12px;
    a {
        color: white;
        text-decoration: underline;
        &:hover {
            color: rgba(255, 255, 255, 0.75);
        }
    }
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-row {
    display: flex;
    flex-direction: row;

    .flex-column:not(:last-child) {
        margin-right: 8px;
    }
}

.sidebar {
    position: sticky;
    position: -webkit-sticky;
    height: calc(100vh - 32px);
    background-color: rgb(51, 96, 102);
    box-shadow: 1px 1px 4px 1px rgba(0, 0, 0, 0.25);
    padding: 16px 24px;
    flex-direction: column;
    top: 0px;
}

canvas {
    image-rendering: optimizeSpeed;
    image-rendering: crisp-edges;
    image-rendering: -moz-crisp-edges;
    image-rendering: -o-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    -ms-interpolation-mode: nearest-neighbor;
}

.gfx-canvas {
    margin: 8px 0px;
    padding: 8px;
    border-radius: 4px;
    background-color: rgb(18, 53, 53);
    box-shadow: inset 1px 1px 4px 1px rgba(0, 0, 0, 0.25);
}


.selected-list {
    margin-top: 8px;
    min-height: 250px;
    overflow-y: auto;
    background-color: rgb(45, 89, 94);
    box-shadow: inset 1px 1px 8px 0px rgba(0, 0, 0, 0.125);
    padding: 7px 4px;
    border-radius: 4px;

    .selected-list-element {
        cursor: pointer;
        user-select: none;
        padding: 2px 4px;
        border-radius: 3px;
        display: flex;
        justify-content: space-between;
        text-overflow: ellipsis;
        overflow: hidden;
        max-height: 18px;
        /* white-space: nowrap; */

        &:hover {
            background-color: rgb(51, 99, 104);

            &::after {
                color: white;
                content: "(click to remove)";
                display: flex;
                right: 0;
                white-space: nowrap;
            }
        }

        &.conflict {
            color: rgb(241, 239, 159);
        }
    }
}

.buttons-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;

    >.button {
        max-width: none;
    }
}

.category-list {
    user-select: none;
    margin: 16px;
    padding: 98px 0px;

    .sprite-category {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;

        .header {
            flex: 0 0 100%;
            padding: 12px 4px 4px;
            margin: 2px;
            font-style: italic;
        }
    }
}


.sprite-tooltip {
    position: absolute;
    pointer-events: none;
    box-shadow: 1px 1px 16px 2px rgba(0, 0, 0, 0.33);
    border-radius: 4px;
    background-color: rgba(23, 51, 51, 0.95);
    margin: 0;
    padding: 8px;
}

.button {
    flex: 1;
    min-width: max-content;
    max-width: max-content;
    max-height: 18px;
    text-align: center;

    cursor: pointer;
    user-select: none;
    padding: 8px 12px;
    margin: 2px;
    border-radius: 2px;
    color: rgb(250, 250, 250);

    box-shadow: 1px 1px 4px 1px rgba(0, 0, 0, 0.25);
    background-color: rgb(119, 127, 129);

    &:hover {
        background-color: rgb(137, 143, 148);
        box-shadow: 1px 1px 8px 1px rgba(0, 0, 0, 0.25);
    }

    &.selected {
        background-color: rgb(71, 170, 121);

        &:hover {
            background-color: rgb(87, 197, 142);
        }
    }

    &.conflict {
        color: rgba(250, 250, 250, 0.75);
        background-color: rgba(97, 96, 92, 0.75);
        box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.125);

        &:hover {
            background-color: rgb(119, 114, 94);
        }

        &.selected {
            color: white;
            background-color: rgb(167, 158, 79);

            &:hover {
                background-color: rgb(194, 194, 91);
            }
        }

        &:active:not(.disabled) {
            box-shadow: none;
            background-color: rgb(119, 129, 103);
        }
    }

    &.disabled {
        cursor: default;
        box-shadow: none;
        color: rgba(255, 255, 255, 0.33);
        background-color: rgba(119, 127, 129, 0.25);
    }

    &:active:not(.disabled) {
        box-shadow: none;
        background-color: rgb(103, 125, 129);
    }
}

.help {
    position: fixed;
    top: -8px;
    left: 0;
    right: 0;
    max-width: 1200px;
    margin: 0px auto;
    display: flex;
    align-items: center;
    pointer-events: none;

    &:hover {
        .modal {
            transform: translateY(0);
        }
        .background {
            opacity: 1;
        }
    }

    .background {
        position: fixed;
        background-color: rgba(0, 0, 0, 0.25);
        opacity: 0;
        transition: opacity 0.1s;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        pointer-events: none;
    }

    .modal {
        display: flex;
        flex: 1;
        flex-direction: column;
        box-shadow: 1px 1px 8px 1px rgba(0, 0, 0, 0.25);
        background-color: rgb(51, 96, 102);
        margin: 0px 16px 16px 368px;
        padding: 48px 24px 24px;
        border-radius: 4px;
        pointer-events: auto;
        transition: transform 0.1s;
        transform: translateY(-100%);
    }

    .tab {
        position: absolute;
        top: 0px;
        right: 8px;
        overflow: hidden;
        width: max-content;
        padding: 0px 8px 8px 8px;
        height: 40px;
        pointer-events: none;

        div {
            padding: 8px 12px;
            padding-top: 16px;
            background-color: rgb(51, 96, 102);
            border-radius: 0px 0px 4px 4px;
            box-shadow: 1px 1px 8px 1px rgba(0, 0, 0, 0.25);
            pointer-events: auto;
            user-select: none;
        }
    }
}