
:root {
    --background1: #303040;
    --background2: #00000033;
    --dishBuilderBackground: #00000080;
    --tableBackground: #000000;
    --tableItemBackground: #000000;
    --tableItemHover: #FFFFFF0F;
    --menuBackground: #0C0B18;
    --popupBackground: #000000;
    --popupRowBackground: #FFFFFF1A;
    --popupBorder:#FFFFFF33;
    --groupBorder: red;
    --text1: #FFFFFF;
    --text1-50: #FFFFFF7F;
    --text2: #000000;
    --placeholderText: #8E8E8E;
    --cellDate1: #8f3a3a;
    --cellDate2: #555555;

    --tableMaxWidth: 20rem;
    --tableMinWidth: 20rem;
    --tableFlexShrink: 1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    /* color: white; */
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none;
}

*::-webkit-scrollbar {
    width: 0.6rem;
    height: 0.6rem;
}
*::-webkit-scrollbar-track {
    box-shadow: inset 0 0 0.3rem 0.1rem rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}
*::-webkit-scrollbar-thumb {
    box-shadow: inset 0 0 0.3rem 0.1rem rgb(0, 0, 0);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.7rem;
}
*::-webkit-scrollbar-button {
    display: none;
}
*::-webkit-scrollbar-corner {
    display: none;
}

body {
    position: absolute;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--background1);
}

.header {
    position: absolute;
    height: 3.5rem;
    width: 100%;
    top: 0;
    left: 0;
    border-bottom: 0.2rem solid var(--text1-50);
    z-index: 10;
}

.title {
    position: absolute;
    height: 3.5rem;
    top: 0;
    left: 0;
    margin: 0 2rem;
    font-size: 2rem;
    line-height: 3.5rem;
    color: var(--text1);
}

/* TEMP TEMP TEMP TEMP TEMP TEMP TEMP TEMP */
.title span {
    color: red;
    margin: 0 2rem;
    font-size: 1rem;
}

.settings {
    position: absolute;
    height: 2rem;
    width: 6rem;
    top: 0;
    right: 0;
    margin: 0.75rem 2rem;
    color: var(--text1);
}

.settings .edit-icon {
    height: 2rem;
    width: 2rem;
    float: left;
}

.settings .settings-icon {
    height: 2rem;
    width: 2rem;
    float: right;
}

.settings div svg {
    height: 2rem;
    width: 2rem;
    fill: var(--text1);
    cursor: pointer;
}

.edit-icon.active svg,
.settings-icon.active svg {
    fill: red;
}

.settings-menu {
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    position: absolute;
    width: 21rem;
    top: 3rem;
    right: 0;
    padding: 1rem 0;
    border-radius: 0.75rem;
    background-color: var(--popupBackground);
    transition: 0.2s;
    overflow: hidden;
    z-index: 5;
}

.settings-menu.hidden {
    height: 0;
    padding: 0
}

.settings-menu.hidden * {
    display: none;
}

.settings-item {
    height: 2.5rem;
    line-height: 2.5rem;
    margin: 0.25rem 1rem;
    padding: 0 1rem;
    border: 0.15rem solid var(--popupBorder);
    border-radius: 0.5rem;
    background-color: var(--popupRowBackground);
    cursor: pointer;
}

.settings-item span {
    float: right;
    padding-left: 1rem;
    line-height: 2.5rem;
    color: #c1c1c1;
    font-weight: bold;
}

.settings-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.settings-item:hover span {
    color: red;
}

.settings-separator {
    height: 0.2rem;
    width: 90%;
    margin: 1rem auto;
    border-radius: 1rem;
    background-color: #be9164;
}

.grid-settings {
    display: flex;
    flex-flow: column nowrap;
}

.grid-settings.hidden {
    display: none;
}


.controls {
    position: absolute;
    height: 6.5rem;
    width: 100%;
    top: 3.5rem;
    left: 0;
}

.dish-build-container {
    position: relative;
    height: 6rem;
    width: min(42rem, 100%);
    margin: 0.25rem auto;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
}

.dish-build-container .build-deselect,
.dish-build-container .build-add {
    position: relative;
    height: 3rem;
    width: 3rem;
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 0.2rem;
    cursor: pointer;
}

.build-deselect svg,
.build-add svg {
    height: 3rem;
    width: 3rem;
    padding: 0.2rem;
    opacity: 80%;
}

.build-deselect svg {
    fill: red;
}

.build-add svg {
    fill: green;
}

.dish-build-container .dish-build {
    display: flex;
    flex-flow: column nowrap;
    position: relative;
    width: calc(80% - 7rem);
    margin: 0 0.5rem;
    flex-grow: 1;
}

.build-id,
.build-title,
.build-items {
    overflow: hidden;
    overflow-y: auto;
    padding: 0.5rem;
    color: white;
    background-color: var(--dishBuilderBackground);
}

.dish-build .build-items {
    height: 3rem;
    max-height: 3rem;
    border-radius: 0.2rem;
    border: 0.2rem solid #be9164;
}

.dish-build .build-info {
    height: 3rem;
    transition: 0.2s;
}

.build-info.hidden {
    height: 0rem;
}

.build-info.hidden input {
    border: 0;
    padding: 0;
}

.build-info .build-id,
.build-info .build-title {
    height: calc(100% - 0.25rem);
    margin-bottom: 0.2rem;
    border-radius: 0.2rem;
    border: 0.2rem solid #be9164;
    cursor: text;
}

.build-info .build-id {
    width: 4rem;
    float: left;
}

.build-info .build-title {
    width: calc(100% - 4.5rem);
    float: right;
}

.build-id::placeholder,
.build-title::placeholder {
    color: var(--placeholderText);
}


.group-tag {
    position: relative;
    width: 100%;
    /* border-radius: 0.2rem; */
    border-bottom: 0.0625rem solid var(--groupBorder);
}

.group-name {
    float: left;
    height: 100%;
    width: calc(100% - 2rem);
    line-height: 100%;
    color: var(--text1);
    cursor: pointer;
}

.group-control-button {
    float: right;
    height: 100%;
    width: 2rem;
    line-height: 100%;
    cursor: pointer;
}

.group-control-button svg {
    height: 100%;
    width: 2rem;
    fill: var(--background1);
    transition: fill 50ms linear;
}

.group-control-button.active svg,
.group-control-button svg:hover {
    fill: red;
}

.group-controls {
    position: absolute;
    top: 2rem;
    right: 0.25rem;
    background-color: black;
    border: 0.15rem solid var(--popupBorder);
    border-radius: 0.25rem;
    z-index: 5;
}

.group-controls.hidden {
    display: none;
}

.group-controls div {
    height: 2rem;
    line-height: 2rem;
    margin: 0.5rem 0.5rem;
    padding: 0 1rem;
    border: 0.15rem solid var(--popupBorder);
    border-radius: 0.25rem;
    background-color: var(--popupRowBackground);
    color: var(--text1);
    cursor: pointer;
}

.group-controls div:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}


.tables {
    position: absolute;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    height: calc(100% - 10rem);
    width: 100%;
    top: 10rem;
    left: 0;
    padding: 0 0.5rem;
    overflow-y: hidden;
    overflow-x: auto;
    background-color: var(--background2);
}

.table {
    display: inline-block;
    height: calc(100% - 4rem);
    max-height: calc(100% - 4rem);
    margin: 1rem 0.5rem 0 0.5rem;
    overflow-y: auto;
    min-width: var(--tableMinWidth);
    max-width: var(--tableMaxWidth);
    flex-shrink: var(--tableFlexShrink);
}

.table-header {
    position: relative;
    height: 2.5rem;
    width: 100%;
}

.table-title {
    position: absolute;
    height: 2.5rem;
    width: calc(100% - 2rem);
    padding-left: 1rem;
    top: 0;
    left: 0;
    font-size: 1.5rem;
    line-height: 2.5rem;
    color: var(--text1);
}

.create-table-group {
    position: absolute;
    height: 2.5rem;
    width: 2rem;
    top: 0;
    right: 0;
    cursor: pointer;
}

.create-table-group:hover svg {
    fill: red;
}

.create-table-group svg {
    height: 1.75rem;
    width: 2rem;
    margin: 0.375rem 0;
    fill: var(--text1);
}

.table-body {
    display: flex;
    flex-flow: column nowrap;
    position: relative;
    width: 100%;
    padding: 1.25rem;
    background-color: var(--tableBackground);
    border-radius: 0.75rem;
}

.table-input,
.table-item {
    height: 2rem;
    /* width: 19.5rem; */
    border-radius: 0.2rem;
}

.table-input {
    background: none;
    background-color: rgba(255, 255, 255, 0.2);
    padding-left: 1rem;
    outline: none;
    border: none;
    color: var(--text1);
}

.table-input::placeholder {
    color: var(--placeholderText);
}

.table-items {
    width: 100%;
}

.table-group .group-tag {
    height: 2rem;
    margin-top: 0.5rem;
}

.table-group .group-name {
    line-height: 2rem;
    font-size: 1.2rem;
}

.table-group:not(.ungrouped) .table-item {
    margin-left: 0.5rem;
}

.table-item {
    margin-top: 0.5rem;
    border: 0.0625rem solid rgba(255, 255, 255, 0.25);
    background-color: var(--tableItemBackground);
}

.table-item:hover {
    background-color: var(--tableItemHover);
    cursor: pointer;
}

.table-item.selected .circle {
    background-color: green;
    border: 0.2rem solid green;
}

.table-item.selected .item-content {
    opacity: 0.75;
}

.item-checkbox {
    float: left;
    width: 2rem;
    height: calc(2rem - 0.125rem);
    line-height: calc(2rem - 0.125rem);
    text-align: center;
    padding: 0.3rem 0;
}

.circle {
    display: inline-block;
    height: 1.2rem;
    width: 1.2rem;
    border: 0.2rem solid red;
    border-radius: 50%;
    line-height: calc(2rem - 0.125rem);
}

.item-content {
    float: right;
    width: calc(100% - 2rem);
    height: calc(2rem - 0.125rem);
    line-height: calc(2rem - 0.3rem);
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: break-word;
    padding: 0.175rem 0 0 0.2rem;
    font-size: 1.2rem;
    color: var(--text1)
}


/* MENU */
.menu-container {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: center;
    position: absolute;
    height: calc(100% - 3.5rem);
    width: 100%;
    min-width: 100%;
    bottom: 0;
    left: 0;
    z-index: 9;
    background-color: var(--menuBackground);
    transition: 0.2s;
    overflow: auto;
    color: var(--text1);
}

.menu-container.hidden {
    height: 0;
}

.menu-container.hidden * {
    display: none;
}

.archive-button {
    position: fixed;
    height: 8rem;
    width: 2rem;
    left: 0;
    top: calc(50% - 6rem);
    border-radius: 0 0.5rem 0.5rem 0;
    background-color: #ffffff20;
    cursor: pointer;
}

.menu,
.archive {
    display: flex;
    flex-flow: column nowrap;
    height: calc(100% - 2rem);
    border: 0.125rem solid var(--background1);
    border-radius: 0.125rem;
    transition: 0.2s;
}

.menu {
    margin: 1rem 2rem 1rem 1rem;
    min-width: 60rem;
    max-width: min(150rem, calc(100% - 2rem));
    flex-grow: 1;
}

.archive {
    margin: 1rem 1rem 1rem 2rem;
    width: 45rem;
    min-width: 45rem;
    max-width: 45rem;
}

.archive.hidden {
    min-width: 0;
    width: 0;
    margin: 0;
    padding: 0;
    flex-grow: 0;
    border: 0;
}

.archive.hidden * {
    display: none;
}

.menu-header,
.archive-header {
    position: relative;
    height: 3rem;
    width: calc(100% - 1rem);
    margin: 0.5rem;
    /* border-radius: 0.25rem; */
    border-bottom: 0.25rem solid var(--popupBorder);
}

.menu-title,
.archive-title {
    float: left;
    height: 3rem;
    line-height: 3rem;
    font-size: 1.5rem;
    padding: 0 1rem;
    font-weight: bold;
}

.menu-title {
    width: calc(100% - 6rem);
}

.archive-title {
    width: calc(100% - 3rem);
}

.print-menu {
    float: right;
    height: 3rem;
    width: 3rem;
    cursor: pointer;
}

.print-menu svg {
    height: 3rem;
    width: 2.8rem;
    padding: 0 0.6rem;
    fill: var(--background1);
}

.create-menu-group {
    float: right;
    height: 3rem;
    width: 3rem;
    cursor: pointer;
}

.create-menu-group.hidden {
    display: none;
}

.create-menu-group svg {
    height: 3rem;
    width: 3rem;
    padding: 0 0.5rem;
    fill: var(--background1);
}

.print-menu:hover svg,
.create-menu-group:hover svg {
    fill: red;
}

.menu-body,
.archive-body {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    align-content: flex-start;
    height: calc(100% - 3rem);
    width: calc(100% - 2rem);
}

.menu-group {
    width: 100%;
    display: flex;
    flex-flow: column nowrap;
}

.menu-body.list,
.archive-body {
    padding-top: 1rem;
    margin: 0 1rem 1rem 1rem;

    .group-tag {
        height: 3rem;
        margin-top: 1rem;
    }

    .group-name {
        line-height: 3rem;
        font-size: 1.25rem;
        cursor: pointer;
    }
}

.menu-body.grid {
    display: flex;
    flex-flow: column nowrap;
    margin: 1rem;

    .grid-cells {
        display: flex;
        flex-flow: row wrap;
        justify-content: flex-start;
        align-content: flex-start;
        height: 100%;
        min-height: calc(100% - 8rem);
        max-height: 100%;
        width: 100%;
        overflow-y: auto;
    }

    .grid-cell {
        width: calc((100% - 3.5rem) / 7);
        height: calc((100% - 3rem) / 6);
        min-height: 8rem;
        margin: 0.25rem;
        background-color: hsla(0, 0%, 100%, 0.07);
        border-radius: 0.25rem;
        cursor: pointer;

        display: flex;
        flex-flow: column nowrap;
    }

    .grid-cell:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }

    .grid-days {
        display: flex;
        flex-flow: row nowrap;
        justify-content: space-around;
        height: 1.25rem;
        width: 100%;
    }

    .grid-days.hidden {
        display: none;
    }

    .cell-date {
        height: 1.1rem;
        width: 1.25rem;
        flex-grow: 0;
        color: var(--cellDate1);
        background-color: var(--menuBackground);
        text-align: center;
        border-radius: 0.2rem 0 0.2rem 0;
        font-family: monospace;
    }

    .cell-date.off {
        color: var(--cellDate2)
    }
}

.menu-body.hidden {
    display: none;

    * { display: none;}
}

.menu-dish {
    position: relative;
    min-height: 4rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    color: var(--text1)
}

/* Menu dish when not in grid cell */
.menu-group {
    .menu-dish {
        margin-top: 0.5rem;
    }

    .menu-dish:hover {
        background-color: rgba(255, 255, 255, 0.10);
    }

    .dish-info {
        height: 2rem;
        width: calc(100% - 4rem);
    }
    
    .dish-id {
        float: left;
        height: 2rem;
        width: 3rem;
        line-height: 2rem;
        color: var(--text1-50);
        overflow: hidden;
    }
    
    .dish-title {
        float: right;
        height: 2rem;
        width: calc(100% - 4rem);
        font-size: 1.2rem;
        line-height: 2rem;
        overflow-y: auto;
    }
    
    .dish-items {
        position: relative;
        left: 4rem;
        min-height: 2rem;
        max-height: 6rem;
        width: calc(100% - 4rem);
        line-height: 2rem;
        opacity: 80%;
        overflow-x: hidden;
        overflow-y: auto;
        overflow-wrap: break-word;
    }
    
    .dish-archive-button {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        width: 2rem;
        cursor: auto;
    }
    
    .dish-archive-button svg {
        display: block;
        height: 100%;
        width: 2rem;
        margin: auto;
        fill: red;
        cursor: pointer;
        fill: var(--background1);
        transition: fill 50ms linear;
    }
    
    .dish-archive-button svg:hover {
        fill: red;
    }
}

/* Menu dish in grid cell */
.grid-cell {
    .menu-dish {
        display: flex;
        flex-flow: column nowrap;
        width: 100%;
        flex-grow: 1;
    }

    .dish-info {
        flex-basis: max-content;
        flex-grow: 1;
        width: 100%;
    }
    
    .dish-id {
        height: 1.5rem;
        width: 100%;
        line-height: 1.5rem;
        color: var(--text1-50);
        overflow: hidden;
    }
    
    .dish-title {
        height: calc(100% - 1.5rem);
        width: 100%;
        font-size: 1.2rem;
        line-height: 1.5rem;
        overflow-y: auto;
    }
    
    .dish-items {
        flex-basis: auto;
        flex-grow: 1;
        width: 100%;
        line-height: 1.5rem;
        opacity: 80%;
        overflow-x: hidden;
        overflow-y: auto;
        overflow-wrap: break-word;
    }
    
    .dish-archive-button {
        display: none;
    }
}


/* MENU BUTTON */
.menu-button {
    position: absolute;
    height: 8rem;
    width: 8rem;
    bottom: 2rem;
    right: 2rem;
    background-color: #ff6262;
    border-radius: 50%;
    z-index: 10;
    cursor: pointer;
    -webkit-transition: background-color 400ms linear;
    -ms-transition: background-color 400ms linear;
    transition: background-color 400ms linear;
}

.menu-button svg {
    height: 6rem;
    width: 6rem;
    margin: 1rem;
    fill: var(--background1)
}


/* IMPORT DATA WARNING POPUP MESSAGE*/
.popup-container.hidden {
    display: none;
}

.popup {
    display: flex;
    flex-flow: column nowrap;
    position: absolute;
    height: min(80%, 22rem);
    width: min(80%, 35rem);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background-color: var(--popupBackground);
    border-radius: 1rem;
    padding: 1rem;
    z-index: 10;
    cursor: pointer;
    transition: background-color 1s;
}

.popup-header {
    font-size: 1.25rem;
    line-height: 1.25rem;
    margin-bottom: 1rem;
}

.popup-body {
    flex-grow: 1;
    font-size: 0.75rem;
    border: 0.2rem solid var(--text1-50);
    border-radius: 0.5rem;
    padding: 0.5rem;
    overflow-wrap: anywhere;
    overflow-y: auto;
}

.popup-overlay {
    background-color: transparent;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    cursor: pointer;
    z-index: 9;
}

.popup-warning {
    font-size: 1.25rem;
    line-height: 1.25rem;
    align-self: center;
    margin-top: 1rem;
    color: red;
}

.popup-warning.hidden {
    display: none;
}


/* DRAG AND DROP */
.drag-clone {
    position: absolute !important;
    opacity: 50%;
    cursor: crosshair;
    z-index: 100;
    margin-top: 0;
    border: 0.15rem solid white;
}
.drag-clone * {
    cursor: crosshair;
}

.drag-item {
    opacity: 50%;
    border: 0.15rem solid white;
}


/* ITEM DELETE OVERLAY (SHOWS WHILE DRAGGING ITEMS) */
.item-delete-overlay {
    position: absolute;
    height: 10rem;
    width: 100%;
    top: 0;
    left: 0;
    background-color: rgb(87, 13, 13);
    opacity: 0.75;
    transition: opacity .2s linear;
    z-index: 10;
}

.item-delete-overlay.drop {
    opacity: 1;
    background-color: red;
}

.item-delete-overlay.hidden {
    max-height: 0;
    opacity: 0;
}







