/**
 * State Object CSS file.
 * @author Conor O'Brien
 * @version 1.0
 */

div#liveStates {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
}

section.liveStateContainer {
    margin: 5px 5px;
    padding-left: 5px;
    padding-right: 5px;
    padding-bottom: 5px;
}

section.liveStateContainer:hover, section.liveStateContainer:active, section.liveStateContainer:focus {
    background-image: linear-gradient(to bottom right, #faf1eb, white);
    padding-left: 3px;
    padding-right: 3px;
    margin-top: 3px;
    margin-bottom: 3px;
    border: 2px solid #5be35b;
    cursor: pointer;
}


div#liveStates h3 {
    margin-bottom: 0;
    margin-top: 3px;
}

div#liveStates img {
    box-shadow: 4px 4px 8px #888760;
    margin-top: auto;
    margin-bottom: auto;
}

div.centerImageDiv {
    display: flex;
    height: calc(100% - 27px);
}

div.centerImageDiv img {
    display: block;
    margin-top: auto;
    margin-bottom: auto;
    width: 100%;
}

section.liveStateContainer {
    width: 240px;
}

section.liveStateContainer h3 {
    text-align: center;
}

div.nameFlagContainer {
    display: flex;
    flex-direction: column;
    align-content: baseline;
}

div.flexContainersHolder {
    margin-top: 1.5rem;
    display: flex;
    flex-flow: column wrap;
    width: 100%;
}

section.firstFlexEntity {
    flex-direction: column;
}

section.flexEntity {
    border: #fc2727 solid 2px;
    padding: 1px 1px;
    box-shadow: 4px 4px 4px #888760;
    margin-top: 0.5em;
    background-color: white;
    justify-content: space-evenly;
}

section.flexEntity:hover, section.flexEntity:active, section.flexEntity:focus {
    border: #04b90b solid 3px;
    padding: 0 0;
    cursor: pointer;
}

section.flexEntity:active {
    box-shadow: 4px 2px 4px #838161;
    transform: translateY(2px);
}

section.flexEntity p {
    margin-bottom: 0;
    margin-top: 0;
}

@media screen and (max-width: 719px) {
    div#states hr {
        display: none;
    }

    section.firstFlexEntity {
        width: 100px;
    }

    section.flexEntity {
        padding-left: 0.5em;
        padding-right: 0.5em;
    }
}

@media screen and (min-width: 720px) {
    div.nameFlagContainer {
        margin-left: 1rem;
    }

    section.firstFlexEntity, section.flexEntity {
        display: flex;
    }

    section.firstFlexEntity {
        width: 280px;
    }

    section.flexEntity {
        padding-left: 1em;
        padding-right: 1em;
    }

    section.flexEntity p:nth-of-type(2) {
        text-align: end;
    }

    div#states hr {
        border: none;
        border-top: 3px double #000000;
        color: #020202;
        overflow: visible;
        text-align: center;
        height: 5px;
        width: 90%;
    }

    div#states hr:after {
        background-color: #f6ebe2;
        content: '§';
        padding: 0 4px;
        position: relative;
        top: -13px;
    }
}

section#userTypeGrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 10px;
}

section#stateYears {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
}

section#stateYears div {
    margin: 25px 10px;
}

p.userInfoSection, div.thisStateYear {
    text-align: center;
    border: 3px solid #2a2a2a;
    border-radius: 5px;
    box-shadow: 4px 4px 4px #383838;
    background-color: white;
}

div.thisStateYear {
    padding: 5px 5px;
    font-weight: bold;
    font-size: large;
    width:20%;
}

p.userInfoSection {
    padding: 0 8px;
    font-size: smaller;
}

p.userInfoSection:hover, p.userInfoSection:active, p.userInfoSection:focus,
div.thisStateYear:hover, div.thisStateYear:active, div.thisStateYear:focus
{
    border: solid 3px #04b90b;
    cursor: pointer;
}

p.userInfoSection:active, div.thisStateYear:active {
    box-shadow: 4px 2px 4px #252525;
    transform: translateY(2px);
}

canvas#drugDataChart {
    width: 100%;
    margin-right: 2em;
    margin-left: 2em;
}