/**** BASE ****/
/* toggle switch */

/* charts */
.donutchart
{
    display: block;
    position: relative;
    margin: 0 auto;
    padding: 0;
    width: 6em;
    height: 6em;
}

.donutchartoverlay
{
    width: 6em;
    height: 6em;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
}

    .donutchartoverlay span.wrap
    {
        text-align: center;
        color: #333;
        font-size: 0.85em;
        font-weight: bold;
    }

        .donutchartoverlay span.wrap .fullSize
        {
            display: block;
            font-size: 2.1em;
            flex-basis: 100%;
            width: 100%;
            text-align: center;
        }

#stat0, #stat1, #stat2, #stat3
{
    position: relative;
}

/* field-group */

li.field-set.hidden
{
    display: none !important;
}

/* question-group */
.story-content ul.question-group
{
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid #ddd;
    background: #fff;
}

    .story-content ul.question-group li.question-set
    {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        margin: 0;
        padding: 1em 0;
        border-bottom: 1px solid #ddd;
    }

        .story-content ul.question-group li.question-set .switch
        {
            margin-bottom: 0;
            flex-basis: 60px;
        }

        .story-content ul.question-group li.question-set:nth-child(1) .answer-text::before {
            content: 'A.';
            position: relative;
            margin-right: 5px;
            font-weight: 600;
        }

        .story-content ul.question-group li.question-set:nth-child(2) .answer-text::before {
            content: 'B.';
            position: relative;
            margin-right: 5px;
            font-weight: 600;
        }

        .story-content ul.question-group li.question-set:nth-child(3) .answer-text::before {
            content: 'C.';
            position: relative;
            margin-right: 5px;
            font-weight: 600;
        }

        .story-content ul.question-group li.question-set:nth-child(4) .answer-text::before {
            content: 'D.';
            position: relative;
            margin-right: 5px;
            font-weight: 600;
        }

        .story-content ul.question-group li.question-set .answer-text
        {
            flex-basis: calc(100% - (61px + 2em));
            width: calc(100% - (61px + 2em));
        }

        .story-content ul.question-group li.question-set span.error, .story-content ul.question-group li.question-set span.ok
        {
            flex-basis: 100%;
            width: 100%;
            padding-left: calc(61px + 2.4em);
            font-size: 0.8em;
            font-weight: bold;
        }

        .story-content ul.question-group li.question-set.error
        {
            padding-right: 3em;
            background: url(./img/Red-X-Circle.svg) no-repeat;
            background-size: 1em auto;
            background-position: calc(100% - 1.5em) center;
        }

        .story-content ul.question-group li.question-set.ok
        {
            padding-right: 3em;
            background: url(./img/Green-Checkmark.svg) no-repeat;
            background-size: 1em auto;
            background-position: calc(100% - 1.5em) center;
        }

        .story-content ul.question-group li.question-set.error input:checked + .slider
        {
            background: #DB513D;
        }

        .story-content ul.question-group li.question-set.ok input:checked + .slider
        {
            background: rgb(165,206,57);
        }
/* accordions */
ul.accordion
{
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #ddd;
}

    ul.accordion.listings
    {
        border-top: 1px solid #ddd;
    }

    ul.accordion li.item
    {
        width: 100%;
        margin: 0 0 1px 0;
        background: #fff;
        border-bottom: 1px solid #ddd;
    }

        ul.accordion li.item .tab
        {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
        }

            ul.accordion li.item .tab .item-wrap
            {
                flex-basis: calc(100% - 10em);
                padding: 1em 0;
                display: block;
                width: 100%;
                cursor: pointer;
            }

            ul.accordion li.item .tab .title
            {
                color: #333;
                font-weight: 700;
                display: block;
            }

            ul.accordion li.item .tab .desc
            {
                color: #333;
                display: block;
                font-size: 0.8em;
            }

        ul.accordion li.item:hover .tab
        {
            color: #383838;
        }

        ul.accordion li.item .content
        {
            flex-basis: 100%;
            display: block;
            height: 0;
            overflow: hidden;
            padding: 0 1em;
            opacity: 0;
            transition: all 0.25s ease;
            border-top: 1px solid #ddd;
        }

        ul.accordion li.item.active .tab, ul.accordian li.item.active:hover .tab
        {
            color: #54C7DA;
            border-bottom: none;
        }

        ul.accordion li.item.active .content
        {
            display: block;
            height: auto;
            padding: 1em;
            opacity: 1;
            background: #eee;
        }

        ul.accordion li.item.active .content
        {
            font-size: 0.8em;
        }

            ul.accordion li.item.active .content ul li
            {
                margin: 0;
                padding: 0;
            }

        ul.accordion li.item .icon-Chevron-Down-Lg:before
        {
            color: #54C7DA;
            cursor: pointer;
            margin-right: 1em;
            margin-left: 1em;
        }

        ul.accordion li.item.active .icon-Chevron-Down-Lg:before
        {
            content: '\e814';
        }

/* button bars */
.button-bar
{
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .button-bar button.button:first-child
    {
        margin-left: 0;
    }


/*** HELPERS ***/
/* flex-grid */
.flex-grid
{
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}
/* grid system */

/* flow mechanics */
#tab-defineQuiz, #tab-takeQuiz, #tab-scoreQuiz
{
    display: none;
}

    #tab-defineQuiz.active, #tab-takeQuiz.active, #tab-scoreQuiz.active
    {
        display: block;
    }

/*** STEPS ***/
/* build quiz */
.form-steps, .form-steps .field-set
{
    text-align: center;
}

    .form-steps h2
    {
        margin-bottom: 0;
    }

    .form-steps .field-set select
    {
        text-align: left;
        margin-left: auto;
        margin-right: auto;
        float: none;
        clear: both;
    }

    .form-steps .field-set button
    {
        margin-left: auto;
        margin-right: auto;
        float: none;
        clear: both;
    }

#step1 ul.field-group, #step2 ul.field-group
{
    padding-top: 0;
}

    #step2 ul.field-group.substep
    {
        padding: 1em 2em 1em 1em;
        display: inline-block;
        background: #efefef;
        width: auto;
        margin: 1em auto;
        text-align: left;
    }

        #step2 ul.field-group.substep ul li a
        {
            color: #81caa5;
            text-decoration: none;
        }
        #step2 ul.field-group.substep ul li a:hover
        {
            color: #444;
            text-decoration: underline;
        }

#step2 h2
{
    margin-top: 16px;
    margin-bottom: 16px;
}

#step2 .substep .categories
{
    display: flex;
    align-items: center;
    justify-content: center;
}
    #step2 .substep .categories .flex-content
    {
        display:block; width: calc(100% - (61px + 0.5em));
        flex-basis: calc(100% - (61px + 0.5em));
        line-height:1.2em;
    }

#step2 .categories img
{
    width: 100%;
    height: auto;
    max-width: 120px;
    max-height: 120px;
    margin-right: 2em;
}

#step2 .categories p
{
    margin-bottom: 0.75em;
    font-weight: bold;
    text-align: left;
}

#step2 .categories ul li
{
    text-align: left;
    margin-bottom: 3px;
    display:flex;
    align-items:center;
    justify-content:flex-start;
}

    #step2 .categories ul li .switch
    {
        margin-left: 0;
        margin-bottom: 0;
    }

#step2 h5
{
    margin: 1.25em 0 1em 0;
}

/* take quiz */
.flex-grid #stat0
{
    margin-right: 1em;
}

.flex-grid .inner-flex h1
{
    margin-bottom: 0;
}

.flex-grid .selected-items.small
{
    margin-bottom: 40px;
    font-size: 1em;
}

#answerOptions
{
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

    #answerOptions h2
    {
        flex-basis: 100%;
    }

    #answerOptions img
    {
        flex-basis: 280px;
        width: 100%;
        height: auto;
        max-width: 280px;
    }

    #answerOptions ul.question-group
    {
        flex-basis: 100%;
        width: 100%;
    }

    #answerOptions img + ul.question-group
    {
        flex-basis: calc(100% - (281px + 1em));
        width: calc(100% - (281px + 1em));
    }

/* score quiz */
#tab-scoreQuiz #stat1, #tab-scoreQuiz #stat2, #tab-scoreQuiz #stat3
{
    margin: 1em;
}

#tab-scoreQuiz .chart-grid
{
    flex-wrap: wrap;
    justify-content: center;
}

    #tab-scoreQuiz .chart-grid .donutchart
    {
        width: 10em;
        height: 8em;
    }

    #tab-scoreQuiz .chart-grid .donutchartoverlay
    {
        width: 10em;
        height: 8em;
    }

    #tab-scoreQuiz .chart-grid p.post-text
    {
        width: 100%;
        flex-basis: 100%;
        margin-top: 40px;
        text-align: center;
        font-weight: bold;
    }

#tab-scoreQuiz .responsive-split
{
    flex-wrap: wrap;
    flex-direction: row-reverse;
}

#review-bucket, #resource-bucket
{
    width: 100%;
    flex-basis: 100%;
}
#review-bucket ul.list li:nth-child(1) span::before {
    content: 'A.';
    position: relative;
    margin-right: 5px;
    font-weight: 600;
}
#review-bucket ul.list li:nth-child(2) span::before {
    content: 'B.';
    position: relative;
    margin-right: 5px;
    font-weight: 600;
}
#review-bucket ul.list li:nth-child(3) span::before {
    content: 'C.';
    position: relative;
    margin-right: 5px;
    font-weight: 600;
}
#review-bucket ul.list li:nth-child(4) span::before {
    content: 'D.';
    position: relative;
    margin-right: 5px;
    font-weight: 600;
}


#review-bucket
{
    margin-top: 40px;
}

    #review-bucket .flex-grid.title-controls
    {
        display: block;
    }

    #review-bucket .title-controls h2
    {
        text-align: center;
        font-size: 1.15em;
    }

    #review-bucket .title-controls button.button
    {
        margin: 0.25em auto 2em auto;
    }

    #review-bucket ul.accordion li.item.active .content img
    {
        margin-right: 1em;
        width:100%; max-width:284px;
    }

    #review-bucket ul.accordion li.item.active .content p
    {
        font-weight: bold;
    }

    #review-bucket ul.accordion li.item.active .content ul
    {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    #review-bucket ul.accordion.finalized li.item .tab .item-wrap
    {
        flex-basis: calc(100% - 5em);
    }

    #review-bucket ul.accordion.finalized li.item .icon.pass, #review-bucket ul.accordion.finalized li.item .icon.fail
    {
        display: inline-block;
        width: 1em;
        height: 1em;
        margin-right: 1em;
    }

    #review-bucket ul.accordion li.item .icon.pass
    {
        background: url(./img/Green-Checkmark.svg) no-repeat;
        background-size: 1em auto;
    }

    #review-bucket ul.accordion li.item .icon.fail
    {
        background: url(./img/Red-X-Circle.svg) no-repeat;
        background-size: 1em auto;
    }

    #review-bucket ul.accordion li.item.active .content ul li .pass
    {
        color: #060;
        font-weight: bold;
        padding-left: 2em;
        background: url(./img/Green-Checkmark.svg) no-repeat;
        background-size: 1em auto;
    }

    #review-bucket ul.accordion li.item.active .content ul li .fail
    {
        color: #600;
        padding-left: 2em;
        background: url(./img/Red-X-Circle.svg) no-repeat;
        background-size: 1em auto;
    }


#resource-bucket
{
    margin-top: 20px;
}

    #resource-bucket h2
    {
        text-align: center;
        margin-bottom: 20px;
        font-size: 1.15em;
    }

    #resource-bucket .grid-button-list
    {
        display: flex;
        align-items: stretch;
        justify-content: center;
    }

    #resource-bucket a.button.meta
    {
        color: #383838;
        text-decoration: none;
    }

        #resource-bucket a.button.meta:hover
        {
            color: #fff;
        }

@media only screen and (max-width: 1070px)
{

    footer
    {
        margin-bottom: 4em;
    }
    footer.no-button-bar {margin-bottom:0;}
    nav.button-bar
    {
        flex-wrap: wrap;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1;
        background: #fff;
        padding: 0.5em 1em;
        -webkit-box-shadow: 0px 2px 10px 0px rgb(0 0 0 / 75%);
        -moz-box-shadow: 0px 2px 10px 0px rgba(0,0,0,0.75);
        box-shadow: 0px 2px 10px 0px rgb(0 0 0 / 75%);
        border: none;
    }

    nav.button-bar button.button
    {
        margin: 0.5em 0;
    }
    .grid .tab1 {background:none;}
}

@media only screen and (max-width: 980px)
{
    #tab-scoreQuiz .responsive-split
    {
        flex-wrap: wrap;
    }

    #resource-bucket
    {
        padding-left: 0;
        flex-basis: 100%;
    }

    #review-bucket
    {
        padding-right: 0;
    }
}

@media only screen and (max-width: 720px)
{
    #answerOptions
    {
        justify-content: center;
    }

        #answerOptions img
        {
            margin-bottom: 20px;
        }

            #answerOptions img + ul.question-group
            {
                flex-basis: 100%;
                width: 100%;
            }

    .flex-grid #stat0
    {
        display: none;
    }
}

@media only screen and (max-width: 640px)
{
    #step2 .field-set.categories
    {
        flex-wrap: wrap;
    }
    #step2 .categories p {text-align:center;}
    #step2 .field-set.categories .flex-assembly
    {
        text-align: center; margin-top:1em;
    }
    #step2 .categories img
    {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1em;
    }
    #step2 ul.field-group.substep ul, #step2 ul.field-group.substep ul li, #step2 ul.field-group.substep ul li a
    {
        text-align: center;
        width: 100%;
        flex-basis: 100%;
    }
    #review-bucket ul.accordion li.item.active .content .flex-grid
    {
        flex-wrap: wrap;
    }
}

@media only screen and (max-width: 480px)
{
}

@media only screen and (max-width: 320px)
{
}
