/*2021-10-22, K. Garmire*/

body{
    background-color: darkseagreen;
    background-image: url("../graphics/floral_background.svg");
    background-position: center;
    background-size: cover;

    overflow: hidden;

    font-family: sans-serif;
}

/*====================================*/
/*             STRUCTURE              */
/*====================================*/

main {
    height: 100%;
    width: 100%;
    padding: 12px;
}

h1{
    font-size: 48px;
    line-height: 48px;
    font-weight: normal;
    margin: 0;
    color: white;
    /*text-align: center;*/
    font-family: 'Patrick Hand SC', sans-serif;
}

h3{
    font-size: 1.8rem;
    /*line-height: 1.5rem;*/
    font-weight: normal;
    font-family: 'Patrick Hand SC', sans-serif;
    margin: 12px 0 6px 0;
    text-decoration: underline;
}

.view{
    display: grid;
    grid-template-rows: 48px 1fr;
    grid-gap: 12px;
    height: 100%;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 12px 0;
    overflow: hidden;
    display: none;
}

.view.search{
    grid-template-rows: 48px 34px 1fr;
}

.view .header{
    display: grid;
    grid-template-columns: 1fr 48px;
    height: 48px;
    grid-gap: 8px;
}

.card-list{
    background-color: rgba(255, 255, 255, 0.5);
    padding: 12px;
}

.card-list .card{
    cursor: pointer;
    margin-bottom: 12px;
}

.scroll-cont{
    overflow: auto;
}

.scroll-cont>div{
    height: 100%;
}

/*====================================*/
/*     COMMON CLASSES / ELEMENTS      */
/*====================================*/

.title-font{
    font-family: 'Patrick Hand SC', sans-serif;
}

.break-ellipsis{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

button{
    font-family: 'Patrick Hand SC', sans-serif;
}

button.header {
    height: 48px;
    width: 48px;
    display: flex;
    background-color: rgba(255,255,255,0.4);
    border: none;
}

button.header:hover{
    background-color: rgba(255,255,255,0.6);
}

button.header i{
    font-size: 36px;
    color: white;
    margin: auto;
}
button.header img{
    height: 36px;
    width: 36px;
    margin: auto;
}

button.action{
    height: 44px;
    background-color: transparent;
    border: 2px solid seagreen;
    color: seagreen;
    font-size: 2rem;
    font-weight: normal;
    font-family: 'Patrick Hand SC', sans-serif;
    width: 100%;

    display: flex;
    align-items: flex-end;
    cursor: pointer;
}
button.action:hover{
    background-color: rgba(46,139,87,0.2);
}
button.action span{width: 100%}

button.action.gray{
    border-color: gray;
    color: gray;
}

button.action.filled{
    background-color: seagreen;
    color: white;
}
button.action.filled:hover{
    background-color: #006837;
}

button.action.red{
    border: 2px solid firebrick;
    color: firebrick;
}
button.action.red:hover{
    background-color: rgba(178,34,34,0.2);
}

button.action.white{
    border: 2px solid white;
    color: white;
}
button.action.white:hover{
    background-color: rgba(255,255,255,0.2);
}

button.action.white.filled{
    background-color: white;
    color: seagreen;
}
button.action.white.filled:hover{
    background-color: #f1f1f1;
}

hr{
    border: none !important;
    border-bottom: 2px solid black !important;
}

img.divider{
    width: 90%;
    max-width: 200px;
    height: auto;
    margin: 0 auto;
}

input[type='file']{
    display: none;
}

/*====================================*/
/*               VIEWS                */
/*====================================*/
#loading{display: grid}


/*------------ LOGIN VIEW ------------*/

#login .card h2{
    margin: 0;
    font-size: 2rem;
    font-weight: normal;
    font-family: 'Patrick Hand SC', sans-serif;
}

#login section{
    margin-top: 12px;
}

/*------------ HOME VIEW -------------*/

#home .card h2{
    margin: auto 0 auto 12px;
    font-size: 2rem;
    font-weight: normal;
    font-family: 'Patrick Hand SC', sans-serif;
}

/*---------- INVENTORY VIEW ----------*/
.inventory.card{
    display: grid;
    grid-template-columns: 72px 1fr 36px;
    grid-gap: 16px;

    min-height: 64px;
}

.inventory.card:hover{
    background-color: #e4e4e4;
}

.inventory.card.archived{
    color: gray;
}

.inventory.card .species{
    font-family: 'Patrick Hand SC', sans-serif;
    font-size: 1.6rem;
    line-height: 1.6rem;
}

.inventory.card .variety{
    font-style: italic;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inventory.card .thumbnail{
    width: 72px;
    height: 72px;
    /*background-color: white;*/
    background-position: center;
    background-size: cover;
    display: flex;
    padding: 8px;
} 

/*------------ PLANT FORM ------------*/

.form section{
    margin-bottom: 12px;
}
label{
    font-family: 'Patrick Hand SC', sans-serif;
    font-size: 1.5rem;
}

.form input, .form select, .form textarea{
    font-size: 1.2rem;
}

.form input, .form select{
    height: 48px;
}

.toggles{
    grid-gap: 12px;
}

.toggle{
    padding: 8px;
    border: 1px solid gray;
    color: gray;
    cursor: pointer;
}

.toggle.active{
    color: white;
    font-weight: bold;
    background-color: seagreen;
    border-color: seagreen;
}

.form .new-care{
    max-width: 200px;
    margin: 12px auto;
}

#image-input{
    display: grid;
    grid-gap: 8px;
}

div.file-input{
    height: 44px;
    background-color: transparent;
    border: 2px solid seagreen;
    color: seagreen;
    font-size: 2rem;
    font-weight: normal;
    font-family: 'Patrick Hand SC', sans-serif;
    width: 100%;

    display: flex;
    align-items: flex-end;
    cursor: pointer;
}
button.action:hover{
    background-color: rgba(46,139,87,0.2);
}

#image-preview img{
    max-width: 600px;
    width:100%;
    height: auto;
    margin-top: 8px;
}

/*----------- DETAILS VIEW -----------*/
#details .thumbnail{
    height: 200px;
    width: 100%;
    /*max-width: 400px;*/
    background-position: center;
    background-size: cover;
}
#details .species{
    font-size: 3rem;
    font-family: 'Patrick Hand SC', sans-serif;
}
#details .variety{
    font-style: italic;
}
#details .card section{
    margin: 16px 0;
}

#details .faux-table{
    grid-gap: 4px;
    border:  4px solid mediumseagreen;
    background-color: mediumseagreen;
}
#details .faux-table p{
    background-color: white;
    padding: 4px;
}

#details .care-instructions{
    margin-bottom: 12px;
}

#details .action-row{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-column-gap: 8px;
    margin-top: 16px;
}

/*---------- SCHEDULE VIEW -----------*/

#schedule.view{
    grid-template-rows: 48px 84px 1fr;
}

#schedule .scroll-cont{
    height: calc(100vh - 194px);
}

#schedule .year-title{
    background-color: rgba(255, 255, 255, 0.5);
    padding: 8px;
}

#schedule h2{
    font-family: 'Patrick Hand SC', sans-serif;
    font-size: 3rem;
    line-height: 3rem;
    margin: 0;
    text-align: center;
    font-weight: normal;
}

#schedule h4{
    font-family: 'Patrick Hand SC', sans-serif;
    font-size: 2rem;
    line-height: 2rem;
    margin: 0;
    font-weight: normal;
    border-bottom: 1px solid black;
}

#schedule h5{
    font-family: 'Patrick Hand SC', sans-serif;
    font-size: 1.5rem;
    line-height: 1.5rem;
    margin: 6px 0 0 0;
    font-weight: normal;
}

/*====================================*/
/*               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: firebrick;
    padding: 12px;
    max-height: 90%;
    overflow: auto;

    text-align: center;
}

#scrim .modal h2{
    font-family: 'Patrick Hand SC', sans-serif;
    font-size: 3rem;
    line-height: 3rem;
    margin: 0;
    text-align: center;
    font-weight: normal;
    color:white;
}

#scrim .modal button.action.white.filled{
    color:firebrick;
}

/*====================================*/
/*            BREAKPOINTS             */
/*====================================*/
.mobile{
    display: none;
}

/*TABLET LANDSCAPE*/
@media (max-width: 1200px) {}

/*TABLET PORTRAIT*/
@media (max-width: 992px) {}

/*MOBILE LANDSCAPE*/
@media (max-width: 768px) {

}

/*MOBILE PORTRAIT*/
@media (max-width: 576px) {
    .form .toggles{
        grid-template-columns: 1fr;
    }
    #details .toggles{
        grid-template-columns: 1fr;
    }
    #details .action-row{
        display: block;
    }
    .desktop{
        display: none !important;
    }
    .mobile{
        display: block !important;
    }
}