/*====================================*/
/*           MASTERCART.CSS           */
/*           KG, 2022-07-11           */
/*====================================*/

:root{
    --bg-color: #353535;
    --b25: rgba(0,0,0,0.25);
    --b50: rgba(0,0,0,0.50);
    --b75: rgba(0,0,0,0.75);
    
    --w10: rgba(255,255,255,0.10);
}

/*====================================*/
/*               COMMON               */
/*====================================*/

html{
    user-select: noselect;
}

body{
    background-color:var(--bg-color);
    font-family:"Quicksand", sans-serif;
    color: white;
    /*overflow: hidden;*/
}

nav{
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    z-index: 9;
}

h1{
    font-weight: 400;
    text-transform: uppercase;
    font-size: 3rem;
    margin: 24px 0;
}

h2{
    font-weight: 400;
    margin: auto 0;
    font-weight: normal;
}

h3{
    margin: 0;
    font-weight: normal;
    text-transform: uppercase;
}

.view input{
    border: none;
    background-color: var(--b75);
    font-size: 1.1rem;
    font-family: 'Quicksand', sans-serif;
    color: white;
}

button{
    font-size: 1.1rem;
    font-family: 'Quicksand', sans-serif;
    /*font-weight: 400 !important;*/
}
button.hollow{font-weight: 400 !important; }

.strike-through{text-decoration: line-through; }
.pointer{cursor: pointer;}
.semi {opacity: 0.1; }
.view{display: none;}
.middled{
    max-width:600px;
    width: 100%;
    margin:0 auto;
}


/*.............. ZONES ...............*/
.zone{
    height:24px;
    width:24px;
    border-radius:12px;
    cursor: pointer;
}
.pantry.zone{
    border-radius: 3px;
}


.zone-header{
    font-weight: bold;
    font-size: 1.1rem;
    background-color: var(--b75);
    margin-top: 12px !important;
}

/*====================================*/
/*         LOGIN / HOME VIEW          */
/*====================================*/
#loading{display: flex}

#home{
/*    display: block;*/
    height: 100%;
}

#home .main{
    margin: auto;
    width: 100%;
    text-align: center;
}

#home .img-cont{
    display: flex;
    height: 300px;
}

#home img{
    margin: auto;
    filter: drop-shadow(14px 14px 8px rgba(34,34,34,0.5));
    
    height: 100%;
    width: auto;
    max-width: 300px;
    max-height: 300px;

    animation-iteration-count: infinite;
    animation-duration: 2s;

    display:none;
}

@media (max-width:768px) { 
    #home .img-cont{
        height: 200px;
    }
}

@media (max-height:500px) { 
    #home .img-cont{
        display: none !important;
    }
}

#login, #main-buttons{
    padding: 12px;
    margin: 0 24px 24px 24px;
    background: var(--b25);
    display: none;
}

#spinner{display: none}

#username, #password, #login button, #main-buttons button {
    height: 48px;
    margin-bottom: 12px;
}
#login button:last-child, #main-buttons button:last-child{
    margin-bottom: 0;
}

/*----------- COLOR SELECT -----------*/
#home .color-select{
    position: absolute;
    bottom: 6px;

    width: 100%;

    display: grid;
    grid-template-columns: 1fr repeat(4, 18px) 1fr;
    grid-gap: 12px;
}

#home .color-select button{
    height: 18px;
    min-height: 18px;
    width: 18px;
    margin: 0 auto auto auto;
}
#home .color-select button.active{border: 2px solid white}

/*The circle colors are not the same as the background colors (to differentiate them)?
    NOTE MAYBE WE SHOULD MAKE THEM THE SAME AND ADD A FILTER OVER THE ACTIVE ONE?
*/
#home .color-select button.black{background-color: #121212;}
#home .color-select button.green{background-color: green;}
#home .color-select button.blue{background-color: darkblue;}
#home .color-select button.slate{background-color: #456565;}


/*====================================*/
/*               SHARED               */
/*====================================*/

/*-------------- HEADER --------------*/
.header{
    background-color: var(--b75);
    padding: 0 12px;
    display: flex;
    height: 64px;
}

.header .inner{
    padding: 0 6px;

    display: grid;
    grid-template-columns: 1fr 24px 36px;
    grid-gap: 24px;
}

.header .inner .menu-btn .material-icons,
.header .inner .menu-btn .material-icons-outlined{
    font-size: 36px;
    cursor: pointer;
}

.header .inner .sync{
    margin: auto;
    opacity: 0;
    color:mediumseagreen;
}
.header .inner .sync.active{
    opacity: 1;
}

@keyframes spin {
    0%{transform: rotate(0deg);}
    100%{transform: rotate(-360deg);}
}

.header .inner .sync.spin{
    animation: spin 1s infinite;
}

#datalist-bank-items{
    max-height: 100px;
    overflow: hidden;
}

/*--------------- MAIN ---------------*/
.main{
    overflow: auto;
    padding-bottom:1px;
}

#list .main .row, 
#bank .main .row,
#pantry .main .row{
    display:grid;
    grid-template-columns:24px 1fr 24px 24px;
    grid-gap: 12px;
    padding: 12px;
    margin: 4px 8px;
    background-color: var(--b50);

    -webkit-user-select: none; /* Safari */        
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}

#list .main .row span, 
#bank .main .row span,
#pantry .main .row span{
    margin:auto 0;
    -webkit-user-select: none; /* Safari */        
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}

/*------------ ITEM ENTRY ------------*/
form.item-entry {
    background-color: var(--w10);
    display: flex;
    
    height: 64px;
}

form.item-entry .grid{
    display: grid;
    grid-template-columns: 1fr 48px 48px;
    grid-gap: 12px;
    padding: 8px;
    height: 100%;
}

form.item-entry input{
    height: 100%;
}

/*====================================*/
/*             LIST VIEW              */
/*====================================*/
/*#list{display: block; }*/

#list .master-grid{
    display: grid;
    grid-template-rows: 128px 1fr;
    height: 100%;
}


/*--------------- MAIN ---------------*/

.unchecked{
    margin-bottom: 24px;
}

.graveyard{
    opacity: 0.5;
    margin-bottom: 24px;
}

.graveyard .title{
    padding: 0 12px;
    margin-bottom: 8px;
}

.grave-digger{
    cursor: pointer;
    text-align: center;
    margin: 12px 0;
}

.graveyard .graves{
    margin-bottom: 36px;
}


/*====================================*/
/*                BANK                */
/*====================================*/
/*#bank{display: block; }*/

#bank .master-grid{
    display: grid;
    grid-template-rows: 64px 1fr;
    height: 100%;
}

#bank .main .row{
    grid-template-columns:24px 1fr 24px;
}


/*====================================*/
/*               MODALS               */
/*====================================*/
#scrim{
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(255,255,255,0.4);
    display: none;
    z-index: 99;
}

#scrim .modal{
    width: 90%;
    max-width: 550px;
    margin: auto;
    background-color: var(--bg-color);
    padding: 12px;
    display: none;

    max-height: 90%;
    overflow: auto;
}

#note-modal textarea{
    margin: 24px 0;
    height: 200px;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    color: white;
    border: none;
    background-color: var(--b75);
    padding: 12px;
}

.modal .zones{
    max-height: 80vh;
    overflow: auto;
}

.modal .zone-option{ 
    padding: 8px;
    margin: 4px 0;
    background-color: var(--b50);
    cursor: pointer;
}
.modal .zone-option.active{ background-color: var(--b75); }
.modal .zone-option .zone .material-icons{
    font-size: 18px;
    color: black;
    font-weight: bold;
    margin: auto;
}

#deposit-modal .zone-select,
#relist-modal .zone-select{
    padding: 8px;
    background-color: var(--b50);
    width: 200px;
    margin: 8px auto;
    /*text-align: left;*/
    /*grid-gap: 12px;*/
    cursor: pointer;
}

#relist-modal .content, 
#deposit-modal .content, 
#delete-modal .content{
    margin: 36px 12px;
    text-align: center;
}

#relist-modal p.item, 
#deposit-modal p.item, 
#delete-modal p.item{
    font-size: 1.2rem;
    margin: 8px;
}

#error-modal{
    background-color: brown !important;
}

#error-modal div.main{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items:center;
    margin-bottom:24px;
}

#error-modal .material-icons{
    font-size: 4rem;
}

#error-modal h3{
    font-size: 2rem;
}