khuf-quiz-component {

    &[data-type="ls"] :is(.answers, .questionText, .solution) {
        line-height: 2.5;
    }

    .quiz-container {
    
        line-height: 1.5;

        p {
            margin-top: 1em;
            margin-bottom: 1em;
        }

        h2, h3 {
            margin-top: 0.75em;
            margin-bottom: 0.5em;
        }

        .questions {

            overflow: hidden;

            .question {
                opacity: 0;
                max-height: 0;
                overflow: hidden;
                transition: all 1.33s ease;

                &.is-visible {
                    opacity: 1;
                    max-height: unset;
                }

                fieldset {
                    margin: 0;
                    border: none;
                    padding: 0;
                }
            }

            .questionText {
                font-weight: 700;
                letter-spacing: 0.125em;
                font-size: 1.15em;
            }
        }

        .answers {
            list-style-type: none;
            padding: 0;
            display:flex;
            flex-direction: column;
            gap: 1rem;
            margin: 1rem 0 2rem 0;
            
            .answer {
                display: flex;
                align-items: baseline;
                padding: 0;
                border: 2px solid rgb(226, 231, 237);
                border-radius: 0.25rem;
                transition: all 0.4s ease;
                transition-property: color, border-color, background-color, opacity;
                
                &:has(input[type="radio"]:checked), 
                &:has(input[type="checkbox"]:checked) {
                    border-color: rgb(242, 204, 0);
                    background-color: rgba(242, 204, 0, 0.05);
                }

                &:hover {
                    background-color: rgba(242, 204, 0, 0.05);
                }

                input[type="radio"], input[type="checkbox"] {
                    margin: 0 0 0 1rem;
                    scale: 1.5;
                    translate: 0 10%;
                    cursor: pointer;
                    accent-color: rgb(111, 95, 9);
                }

                label {
                    width: 100%;
                    padding: 1rem;
                    cursor: pointer;
                }
            }
        }

        .answers.solved {
            .answer:has(input[type="radio"][data-is-correct="true"]) {
                border-color: rgb(28, 185, 86);
            }
            .answer:has(input[type="radio"][data-is-correct="true"]:checked) {
                background-color:rgb(28, 185, 86);
                border-color: rgba(0, 0, 0, 0.33);
                color: white;
            }
            .answer:has(input[type="radio"][data-is-correct="false"]:checked) {
                background-color:rgb(161, 14, 14);
                border-color: rgba(0, 0, 0, 0.33);
                color: white;
            }
            .answer:has(input[type="checkbox"][data-is-correct="true"]) {
                border-color: rgb(28, 185, 86);
            }
            .answer:has(input[type="checkbox"][data-is-correct="true"]:checked) {
                background-color:rgb(28, 185, 86);
                border-color: rgba(0, 0, 0, 0.33);
                color: white;
            }
            .answer:has(input[type="checkbox"][data-is-correct="false"]:checked) {
                background-color:rgb(161, 14, 14);
                border-color: rgba(0, 0, 0, 0.33);
                color: white;
            }
        }

        .solution {
            opacity: 0;
            max-height: 0;
            transition: all 1.33s ease;

            &.is-visible {
                opacity: 1;
                max-height: 1000vh;
            }
        }

        .solution-inner {
            background-color: rgb(240, 243, 246);
            padding: 1rem 2rem;
            margin: 2rem 0 2rem 0;
            border: 2px solid rgb(226, 231, 237);
            border-radius: .25rem;

            .resultText {
                font-weight: 700;
                letter-spacing: .125em;
                font-size: 1.15em;
                text-align: center;
            }
        }

        .indicators {
            margin: 1rem 0 1rem 0;
            display: none;
            flex-direction: row;
            justify-content: flex-start;
            gap: .5rem;

            &.is-visible {
                display: flex;
            }

            .indicator {
                width: 1.25rem;
                aspect-ratio: 1;
                box-sizing: border-box;
                border: 2px solid rgba(0, 0, 0, 0.5);
                border-radius: 50%;
                background-color: rgb(241, 243, 246);

                &[data-is-correct="false"] {
                    background-color: rgb(161, 14, 14);
                }

                &[data-is-correct="true"] {
                    background-color: rgb(0, 195, 73);
                }
            }
        }

        .summary {
            opacity: 0;
            max-height: 0;
            transition: all 1.33s ease;

            &.is-visible {
                opacity: 1;
                max-height: 1000vh;
                background-color: rgb(240, 243, 246);
                padding: 1rem 2rem;
                margin: 2rem 0 2rem 0;
                border: 2px solid rgb(226, 231, 237);
                border-radius: .25rem;
            }

            .scoreText {
                font-weight: 700;
                letter-spacing: .125em;
                font-size: 1.15em;
                text-align: center;
            }
        }

        .video {
            position: relative;
            width: 100%;
            padding-bottom: 56.25%;

            iframe {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
            }
        }

        .submit {
            display: flex;
            justify-content: flex-end;

            button {
                display: none;
                padding: 1rem;
                font-size: 1rem;
                font-weight: 800;
                background-color: rgb(242, 204, 0);
                border: 2px solid rgba(0, 0, 0, 0.33);
                border-radius: 1rem;
                transition: all 0.4s ease;
                transition-property: color, border-color, background-color, opacity;
                cursor: pointer;
                
                &.is-visible {
                    display: block;
                }

                &[disabled] {
                    cursor:not-allowed;
                    opacity: 0.5;
                    &:hover {
                        opacity: 0.5
                    }
        
                }

                &:hover {
                    opacity: 0.8;
                }
            }
        }
    }
}