:root{
    --qz-bg: rgba(0,0,0,0.2);
    
    /* indicators */
    --qz-error: brown;
    --qz-success: rgba(48, 222, 0, 0.5);
    --qz-select: rgb(29, 107, 136);
    --qz-hover: #2b8bad;
    --qz-neutral: rgba(128, 128, 128, 0.5);

    /* animation */
    --qz-animation-length: 0.33s;
}

@keyframes qz-flash {
    from {background-color: brown;}
    to {background-color: rgba(0,0,0,0.2);}
}

@keyframes qz-flash-select {
    from {background-color: var(--qz-select);}
    to {background-color: rgba(0,0,0,0.2);}
}
@keyframes qz-jump{
    from {
        transform: translateY(0);
    }
    50%{
        transform: translateY(-0.5rem);
    }
    66%{
        transform: translateY(0.25rem);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes qz-rocking {
    from {
        transform: rotateZ(-20deg);
    }
    to {
        transform: rotateZ(20deg);
    }
}

@keyframes qz-floatup {
    from {transform: translateY(0) scale(1); opacity: 1;}
    to {transform: translateY(-200px) scale(0); opacity: 0;}
}

.quizard-container{
    transition: background-color 0.5s;
    background: rgba(0,0,0,0.2);
    box-shadow: inset 0px 0px 10px 4px rgba(0,0,0,0.5);
    padding: 10px;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;


    .quizard-answer-pool{
        margin-top: 0px;;
    }
}

.quizard-container.incorrect{
    animation: qz-flash 0.33s ease-in-out;
}

.qz-flash-select{
    animation: qz-flash-select 0.33s ease-in-out;
}

.quizard-container .quizard-answers{
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
}

qz-quiz, .quizard-container{
    button{
        cursor: pointer;
        display: block;
        border: none;
        visibility: visible;
        padding: 0.5rem;
        margin-top: 1rem;
        transition: color 0.5s;
        color: rgb(85, 85, 85);
        background-color: rgba(0, 0, 0, 0.66);
    
        &:focus{
            box-shadow: 0px 0px 6px 2px var(--qz-hover);
        }
        &:hover{
            box-shadow: 0 0 4px 2px greenyellow;
            color: greenyellow;
        }
    }
}

qz-quiz {
    position: relative;
    padding-top: 20px;
    display: block;

    .statistics{
        display: flex;
        flex-direction: row;
        column-gap: 5px;
        align-items: end;
        height: 50px;
        width: 200px;
        color: black;
        
        border: none;

        & > div{
            max-width: 10px;
            overflow: hidden;
            background-color: orange;
        }
    }

    .about{
        position: absolute;
        top: -10px;
        left: 5px;
        white-space: nowrap;
        font-size: small;
    }
}

.quizard-container .framed{
    padding: 1rem 0.5rem;
    transition: border-color var(--qz-animation-length);
    border: 3px solid rgba(128, 128, 128, 0.5);
    border-radius: 0.5rem;
}

.quizard-answers{
    padding: 1rem 0rem 0rem;
    border: 3px transparent;
    
    label{
        display: flex;
        align-items: baseline;
        flex-direction: row;
        column-gap: 0.5rem;
        p {
            margin: 0px;
        }
        input{
            flex-grow: 0;
        }
        &:hover {
            cursor: pointer;
            border-color: var(--qz-hover);
        }
    }
}

.quizard-container .correct.framed{
    border-color: rgba(9, 149, 199, 0.5);
}

.quizard-container .correct.framed{
    border-color: rgba(48, 222, 0, 0.5);
}

/* ---------------- */
.quizard-categories{
    display: flex;
    flex-direction: row;
    column-gap: 1rem;
    justify-content: space-between;
    overflow-y: auto;
    flex-shrink: 0;
}

.quizard-categories .quizard-category{
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    column-gap: 1rem;
    margin-top:15px;
}

.quizard-answer-pool{
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
}

/* ------------ qz Category ---------------- */
.qz-category{
    --qz-category-label: 36px;
    row-gap: 2rem;
    max-height: calc(100vh - 5rem);
    overflow: hidden;
}

.quizard-category.framed{
    position: relative;
    padding-top: 1.5rem;
}

.quizard-category.framed .label, .quizard-answer-pool .framed .label{
    height: var(--qz-category-label);
    width: var(--qz-category-label);
    border-radius: calc(var(--qz-category-label) * 0.5);
    transition: background-color var(--qz-animation-length);
    background-color: gray;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #EEE;
    flex-grow: 0;
    flex-shrink: 0;
    position: relative;
}

.quizard-category.framed .label {
    position: absolute;
    top: calc(var(--qz-category-label) * -0.5);
    left: calc(50% + var(--qz-category-label) * -0.5);
}

.quizard-answer-pool .framed .label.jump {
    animation: qz-jump 0.15s ease-in-out;
}

.quizard-answer-pool .framed .label.empty::after{
    position: absolute;
    content: "";
    padding: 12px;
    background-color: #444;
    border-radius: 12px;
}

.quizard-category.framed.selected{
    border-color: var(--qz-select);
}

.quizard-category.framed.selected .label{
    background-color: var(--qz-select);
}

.quizard-category.framed:hover, .quizard-answer-pool .framed:hover{
    cursor: pointer;
    border-color: var(--qz-hover);
}

.quizard-category.framed:hover .label{
    background-color: var(--qz-hover);
}

.quizard-answer-pool{
    margin-top: 1rem;
    overflow: scroll;
}

.quizard-answer-pool .framed{
    display: flex;
    flex-direction: row;
    column-gap: 0.5rem;
    justify-content: flex-start;
    align-items: baseline;
}

.quizard-answer-pool .framed p{
    margin: 0px;
}

.quizard-answer-pool .framed select{
    visibility: hidden;
    display: none;
}

.quizard-flipcard button{
    margin: 0px;
}

.quizard-flipcard .buttons{
    display: flex;
    flex-direction: row;
    column-gap: 1rem;
}

.quizard-flipcard input.framed, .quizard-flipcard textarea.framed {
    background: rgba(0,0,0,0.3);
    color: #CCC;
    font-size: 1.3rem;
    line-height: 1.5rem;
}

.quizard-flipcard textarea.framed:focus{
    box-shadow: inset 0px 0px 10px 1px var(--qz-hover);
    outline: none;
}

.quizard-row-gap{
    row-gap: 1rem;
}

/* ---------------------- */

qz-typer, qz-typer2{
    font-family: 'Fira mono', monospace;
    background: rgba(0,0,0,0.2);
    box-shadow: inset 0px 0px 10px 4px rgba(0,0,0,0.5);
    cursor: pointer;
    padding: 4px 8px;
    transition: box-shadow 0.3s;
    letter-spacing: 2;
}

qz-typer:focus, qz-typer2.active{
    box-shadow: inset 0px 0px 10px 1px var(--qz-hover);
    outline: none;
}

qz-typer.qz-type-error, qz-typer2.qz-type-error{
    animation: qz-flash 0.33s ease-in-out;;
}

qz-practice{
    position: relative;
    display: block;
}

.qz-wiggler{
    animation: qz-rocking 0.5s linear alternate infinite;
}

.qz-float{
    animation: qz-floatup 4s linear;
}