* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}
:root {
    font-family: monospace, sans-serif;
    --main-bg-color: #102030;
    --main-contrast-color: #eed550;
    --secondary-contrast-color: #ccc;
    --secondary-bg-color: #402010;
    --bad-color1: red;


    /* --main-bg-color: #ddeeff;
    --main-contrast-color: #223070;
    --secondary-bg-color: #ffeedd;
    --secondary-contrast-color: #703022; */


    --std-gap: 3px;
    --extra-gap: 6px;
    --mega-gap: 12px;
    --panel-gap: 6px;
    --panel-pad: 5px;

    --left-column-default: 200px;    

    --panel-br: 8px;

    --main-text-color: var(--main-contrast-color);
}

html, body {
    overscroll-behavior-y: contain;
    background-color: var(--main-bg-color);
    color: var(--main-text-color);
}

h1 {
    margin: 0px;
}

.hidden {
    display: none;
}

.settings {
    display: grid;
    grid-auto-rows: 1fr;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    .setting {
        /* max-width: 300px; */
        display: flex;
        justify-content: space-between;
        border: var(--main-bg-color) solid 1px;
        border-radius: var(--panel-br);
        padding: 3px 5px;
        label {
            min-width: 200px;
            flex: 1 1 auto;
        }
        input[type="range"] {
            /* min-width: 40px; */
            width: 100%;
        }
    }
}

/* https://www.smashingmagazine.com/2021/12/create-custom-range-input-consistent-browsers/ */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    /* width: 15rem; */
}
/***** Chrome, Safari, Opera, and Edge Chromium *****/
input[type="range"]::-webkit-slider-runnable-track {
    background: var(--main-bg-color);
    margin-top: -12px;
    border: var(--main-contrast-color) 1px solid;
    height: 0.5rem;
}
/******** Firefox ********/
input[type="range"]::-moz-range-track {
    background: var(--main-bg-color);
    border: var(--main-contrast-color) 1px solid;
    height: 0.5rem;
}
input[type=range]::-ms-fill-lower {
    background: #2a6495;
    border: 0.2px solid #010101;
    border-radius: 2.6px;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
}
input[type=range]::-moz-range-progress {
    background: var(--main-contrast-color);
}

.resource-preview {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    /* background: linear-gradient(0deg, rgba(85,0,90,1) 0%, rgba(110,10,120,1) 35%, rgba(130,0,220,1) 100%); */
    background: linear-gradient(0deg, var(--main-contrast-color) 0%, var(--main-contrast-color) 100%);
    /* display: grid;
    grid-template-rows: 1fr 1fr 1fr;
    grid-template-columns: 1fr;
    row-gap: 1px; */
    padding: 5px 20px;
    max-width: 100%;
    resize: horizontal;
    overflow: hidden;
    border-radius: var(--panel-br);

    .settings {
        color: white;
        display: grid;
        grid-auto-rows: 1fr;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        .setting {
            display: flex;
            justify-content: space-between;
            border: white solid 1px;
            padding: 2px;
            label {
                flex: 1 1 auto;
            }
            input[type="range"] {
                min-width: 80px;
                width: 80px;
                touch-action: none;
                /* min-width: 10px; */
            }
        }
    }
}

.resource-preview.mini-preview{
    padding: 5px 5px;
    width: 50px;
    /* min-height: 50px; */
    /* height: 100%; */
    font-size: 0.5em;

    .resource-infos {
        grid-auto-rows: 7px;
        row-gap: 0px;
    }
    .resource-preview-text {
        font-size: 0.5rem;
    }
    .settings {
        color: white;
        display: grid;
        grid-auto-rows: 1fr;
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        .setting {
            display: flex;
            justify-content: space-between;
            border: white solid 1px;
            padding: 2px;
            label {
                flex: 1 1 auto;
            }
            input[type="range"] {
                min-width: 40px;
                width: 40px;
            }
        }
    }
}

.resource-preview:hover {
    box-shadow: 2px 2px 5px 1px #bbb;
}
.resource-infos {
    display: grid;
    grid-auto-rows: 1fr;
    grid-template-columns: 1fr;
    row-gap: 1px;
    /* padding: 5px; */
    /* width: 500px;
    resize: horizontal;
    overflow: hidden; */
}
.resource-preview-meter {
    /* -webkit-appearance: none; */
    appearance: none;
    width: 100%;
    min-width: 5px;
    height: 5px;
    border-radius: 10px;
}
.resource-preview-info {
    display: flex;
    /* display: grid;
    grid-template-columns: 100px 1fr;
    grid-auto-rows: 1fr; */
    align-items: center;
    min-height: 0.7rem;

    .resource-preview-text {
        color: white;
        font-size: 10px;
        min-width: 125px;
        width: 125px;
    }
    .resource-preview-text.mini {
        min-width: 2rem;
        width: 2rem;
    }
}

/* The main content (basically all that isn't header/footer) */
.content {
    display: flex;
    border: solid 1px var(--main-contrast-color);
    border-radius: var(--panel-br);
    padding: 20px 50px;
}

.content-panel {
    border: solid 1px var(--main-contrast-color);
    border-radius: var(--panel-br);
    padding: var(--panel-pad);
}

.main-content {
    flex: 0 1 75vw;
    padding: 5px;
    border-radius: var(--panel-br);
}

.tooltip {
    visibility: hidden;
    width: 120px;
    text-align: center;
    padding: 5px 0;
    border-radius: 6px;

    /* Position the tooltip text - see examples below! */
    position: fixed;
    z-index: 1;
}

.setting-bar {
    position: sticky;
    top: 0;
    z-index: 2;
    border-radius: var(--panel-br);
}
#setting-bar-title:hover {
    cursor: pointer;
}