@import url('https://fonts.googleapis.com/css2?family=Jersey+20&display=swap');

:root{ /* Global Variables */

    /* Black theme */
    --global-background-color: #debcff;
    --navbar-background-color: #181818;
    --navbar-dropdown-color: #292929;
    --navbar-text-color: rgb(255, 255, 255);
    --navbar-hover-color: #f91272; 
    --section-background-color: #181818;
    --section-accent-color: #40375a;
    --section-second-accent-color: #213351;
    --section-light-color: #AA8BBB;
    --alert-color: #C796E8;
    --link-color: #FF579D;
    --row-background-color: #1b2036;
    --text-color:rgb(255, 255, 255);
    
    --navlink-width: 30%;
    --navlink-text-size: 1.4rem;

    --typebutton-background-color: var(--section-light-color);
    --typebutton-background-hover: rgb(236, 201, 255);
    --button-text-color: black;
    --default-tag-button-color: #d1d1d1;

    --alt-link-color: #e0a7ff;
    --tagbutton-border-color: #b3b3b3;
    --typebutton-border-color: black;


    --h1-size: 2.5rem;
    --h2-size: 2rem;
    --h3-size: 1.8rem;
    --h4-size: 1.6rem;
    --p-size: 1.5rem;
    --small-size: 1.3rem;

}

.banner {
    box-sizing: border-box;
    width: 100%;
    border: 10px solid black;
    margin-bottom: 1rem;
}

.graphic {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 40rem;
    margin-bottom: 1rem;
}

.section{
    background-color: var(--section-background-color);
    margin: 1rem 0;
    padding: 1rem 2rem;
}

.section.centered{
    text-align: center;
}

.section-accent{
    background-color: var(--section-accent-color);
    margin: 1rem 0;
    padding: 1rem;
}


h1, h2, h3 {
    margin-top: 0.5rem;
    text-align: center;
}

h1 {
    font-size: var(--h1-size);
}

h2{
    font-size: var(--h2-size);
}

h3 {
    font-size: var(--h3-size);
}

h4 {
    font-size: var(--h4-size);
}

a {
    font-size: inherit;
    color: var(--link-color);
}

ul{
    text-align: left;
}

body{
    width: 90%;
    background-color: var(--global-background-color);
    background-image: url(assets/backgroundtile.png);
    background-attachment: fixed;
    margin: 1rem auto; /* margin with 2 values sets top&bottom and left&right*/
    max-width: 55rem;
    font-family: "Jersey 20", sans-serif;
    font-size: var(--p-size);
    color:var(--text-color);
}

nav{
    text-align: center;
    width: 100%;
    background-color: var(--navbar-background-color);
    overflow: hidden;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    
    a{
        display: inline-block;
        font-size: var(--navlink-text-size);
        width: var(--navlink-width);  /* 19.589% is max */
        color: var(--navbar-text-color);
        text-decoration: none;
        padding: 0.5rem 0;
        margin: 0;
        vertical-align: middle;
    }
    
    .dropdown{
        overflow: hidden;
        display: inline-block;
        padding: 0.43rem 0;
        margin: 0;
        width: var(--navlink-width);
        vertical-align: middle;

        .dropbtn{
            font-size: var(--navlink-text-size);
            border: none;
            outline: none;
            color: var(--navbar-text-color);
            background-color: inherit;
            font-family: inherit;
            margin: 0;
        }
    }

    .dropdown-content {
        display: none;
        position: absolute;
        margin-top: 0.3rem;
        background-color: var(--navbar-dropdown-color);
        width: 10.45rem;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
        z-index: 1;

        a {
            float: none;
            color: var(--navbar-text-color);
            padding: 0.3rem;
            margin: 0;
            text-decoration: none;
            display: block;
            text-align: left;
            width: 9.85rem;
        }
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }

    a:hover, .dropdown:hover{
        background-color: var(--navbar-hover-color);
    }

    /* Turn navbar into a column when screen is less than 500 px */
    @media screen and (max-width: 600px) {
        flex-direction: column;
        
        a,.dropdown{
          float: none;
          padding: 0.4rem;
          padding-left: 1rem;
          margin: auto;
          width: 95%;
          text-align: left; /* If you want the text to be left-aligned on small screens */
          .dropbtn{
            padding: 0;
          }
        }
    }

}

.column{
    margin:auto;
    text-align: center;
}

.center-insides{
    display: flex; 
    justify-content: center;
}

.vertical-center{
    align-items: center;
}

.flex-image{
    flex: 50%;
    max-width: 50%;
    margin: 1rem;
}

.centered-image{
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 50%;
}

.ripped-edge-image{
    flex: 60%;
    max-width: 60%;
    margin: 0;
}



/* --------- Database Styling ----------- */

.row {
    margin: 0.5rem auto 2rem auto;
    padding: 1rem;
    width: 95%;
    box-sizing: border-box;
    text-align: center;
    background-color: var(--row-background-color);
    border: 2px solid #878787;
}

.titleSection{
    display: flex;
    padding: 1rem;

    .title{
        width: 80%;
        font-size: var(--h1-size);
        text-align: left;
    }
    .Type{
        box-sizing: border-box;
        width: 20%;
        min-width: 7.8rem;
        margin: 0.5rem;
        padding-right: 1rem;
        display: flex;
        flex-direction: column;
    }
}

.typebutton{
    font-family: "Jersey 20", sans-serif;
    font-size: var(--p-size);
    margin: 0.3rem;
    border: outset;
    border-color: var(--typebutton-border-color);
    background-color: var(--section-light-color);
    color: var(--button-text-color);
    text-align: center;
    text-decoration: none;
    display: inline-block;
    
}
.typebutton.clicked{
    background-color: var(--typebutton-background-hover);
}
.typebutton:hover {
    background-color: var(--typebutton-background-hover);
}

.tagbar{
    display: flex;
    justify-content: space-between;
    width: 90%;
    margin: auto;
    margin-top: 0.5rem;
    padding: 0rem;
    align-items: center;
    overflow:hidden;
    background-color: var(--section-accent-color);
    border-radius: 15px;
}

/* tagslist */
.Tags { 
    display: flex;
    flex-wrap: wrap;
    padding: 8px;
}

.tagbutton {
    display: inline-block;
    margin: 0.3rem 0.8rem;
    font-family: "Jersey 20", sans-serif;
    font-size: var(--small-size);
    border-radius: 10px;
    border-style: solid;
    background-color: var(--default-tag-button-color);
    color: var(--button-text-color);
    border-color: var(--tagbutton-border-color);
}

.noteDropDownDiv {
    display: inline-block;
}

.noteDropDownButton{
    display: inline-block;
    width: 0.9rem;
    height: 100%;
    margin: 0.7rem 1rem;
}

/* initially hidden */
.notesection{
    text-align: left;
    margin: auto;
    padding: 0.1rem 1rem;
    box-sizing: border-box;
    width: 90%;
    background-color: var(--section-accent-color);
    border-radius: 0 0 15px 15px;
    display: none;
}

.show {
    display: block;
}





.resourceContainer{
    display: flex;
    position: relative;
    width: 100%;
    justify-content: center;
    background-color: #FF579D;
}

.table {
    width: 100%;
}
.table.small {
    width: 70%;
}

#filterWindow{
    width: 20rem;
    height: fit-content;
    background-color: var(--section-accent-color);
    position: relative;
    display: none;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

#filterWindow.show{
    display: block;
}

#closeFilterWindowArrow{
    width: 0.9rem; 
    position: absolute; 
    top: 1rem; 
    left: 87%;
}

#openFilterWindowButton{
    font-family: "Jersey 20", sans-serif;
    font-size: var(--h3-size);
    margin: 1.3rem;
    border: outset;
    border-color: black;
    background-color: var(--section-light-color);
    color:var(--button-text-color);
    text-align: center;
    text-decoration: none;
    display: none;
}

#openFilterWindowButton.show{
    display: block;
}

#openFilterWindowButton:hover{
    background-color: white;
}

.search-area{
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: -1rem;
    padding: 0;
}

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

#search-field{
    height: 2.5rem;
    max-width: 18rem;
    width:90%;
    margin: 1rem;
    font-size: var(--small-size);
}

.currentFilters{
    display: flex;
    margin: 1rem;
}

.previewbutton{
    display: none;
}

.togglebutton{
    align-items: center;
    padding: 0;
    margin: 0.4rem;
    p{
        margin:0.2rem;
    }
}

.togglebutton.clicked{
    display: flex;
    .buttonCloseIcon{
        display: block;
    }
    p{
        margin:0.3rem;
        margin-left: 0;
    }
}

.buttonCloseIcon{
    display: none;
    width: 0.8rem;
    height: 0.8rem;
    margin: 0.3rem;
}

/* styled like tagbutton, but won't be included in listeners */
#clearFiltersButton {
    display: inline-block;
    margin: 0.3rem 0.8rem;
    font-family: "Jersey 20", sans-serif;
    font-size: var(--p-size);
    border-radius: 10px;
    border-style: solid;
    background-color: white;
    color:var(--button-text-color);
    border-color: var(--tagbutton-border-color);
}
#clearFiltersButton:hover{
    background-color: #878787;
}

.question{
    display: none;
    flex-direction: column;
    margin-bottom: 3rem;
}

.question.show{
    display: flex;
}

.answers{
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.qsButton{
    display: inline-block;
    text-align: center;
    margin: 1.5rem 15% 1.5rem 15%;
    font-size: var(--h3-size);
    color: var(--alt-link-color);
    background-color: var(--section-accent-color);
    padding: 1rem;
    border: var(--tagbutton-border-color) 2px outset;
    b{
        color: white;
    }
}

.qsButton.largeText{
    font-size: var(--h2-size);
    margin: 1.5rem 10% 1.5rem 10%;
}

.qsButton.centered{
    margin: auto;
}

.toSection{
    color: var(--link-color);
}

.goBackButton {
    height: 1.3rem; 
    align-self: flex-end;
    display: flex;
    font-family: "Jersey 20" ;
    margin: 1rem;
    padding: 1rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: var(--h4-size);
    color: var(--alt-link-color);
    background-color: var(--section-accent-color);
    border: var(--tagbutton-border-color) 2px outset;
}

/* create page */

.mini-section{
    background-color: var(--section-second-accent-color);
    box-sizing: border-box;
    margin: auto;
    margin-bottom: 2rem;
    padding: 1rem 1rem;
    max-width: 80%;
    ul{
        padding-left: 0.7rem;
    }
}

.mini-section.column{
    width: 40%;
    ul{
        padding-left: 1.5rem;
    }
}

.space-evenly{
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
}

.centered-list{
    max-width: 30rem; 
    margin: auto;
    padding: 0;
}

.mobileColumn{
    flex-direction: row;
}

.recommendedbanner {
    display: none;
    text-align: left; 
    background-color: var(--alert-color); 
    margin: 0; 
    padding: 10px;
    border-radius: 15px;
    h4{
        margin: 0;
        color: black;
    }
}


/* ----------- For Mobile -------------- */

@media screen and (max-width: 650px) {
    .center-insides{
        flex-direction: column;
        img{
            max-width: 100%;
        }
    }
    .section{
        padding: 16px 16px;
    }
    .search-area{
        flex-direction: column;
        align-items: start;
        #search-field{
            align-self: center;
        }
    }
    .titleSection{
        flex-direction: column-reverse;
        align-items: center;
        padding: 0;
        margin-top: 7px;
        .Type{
            width: auto;
            min-width: 0;
            flex-direction: row;
            flex-wrap: wrap;
            padding: 0;
            justify-content: center;
        }
        .title{
            width: auto;
            font-size: var(--h1-size);
        }
    }
    .tagbutton{
        font-size: var(--small-size);
        margin: 5px;
    }
    .typebutton{
        font-size: var(--p-size);
        margin: 5px;
    }
    .tagbar{
        align-items: flex-end;
        width:100%
    }
    .notesection{
        width: 100%;
    }
    .resourceContainer{
        flex-direction: column;
        .table.small{
            width: 100%;
        }
        #filterWindow{
            width: 100%;
        }
    }
    .mini-section.column{
        width: 100%;
        ul{
            padding-left: 1.5rem;
        }
    }


}