﻿.eAccessibility {
    & #result {
        background: var(--gray-100);
        padding: 1rem;
        border-radius: 6px;
        overflow: auto;
        max-height: 60vh;
    }

    & .severity {
        margin-top: 1rem;
    }

    & .severity h3 {
        cursor: pointer;
        user-select: none;
        display: flex;
        align-items: center;
    }

    & .item {
        margin: .5rem 0;
    }

    & .item h4 {
        cursor: pointer;
        user-select: none;
        display: flex;
        align-items: center;
    }

    & .item a {
        color: #0064e5;
        text-decoration: underline;
    }

    & details {
        transition: all .25s ease;
        max-width: 450px;
        width: auto;
    }

    & details summary {
        cursor: pointer;
        font-weight: 600;
        list-style: none;
        display: flex;
        gap: 4px;
        justify-content: space-between;
        align-items: center;
    }

    & details p:not(.block__selector) {
        overflow: hidden;
        font-weight: 600;
    }

    & .block__selector {
        border-radius: var(--radius-lg);
        border: 1px solid var(--gray-300);
        color: var(--gray-600);
        padding: 8px;
        margin-bottom: 12px;
    }

    & details[open] summary::after,
    & details summary::after {
        content: '▶';
        float: right;
        transition: transform .25s;
    }

    & details[open] > summary::after {
        transform: rotate(180deg);
    }

    & .--eGrade {
        position: relative;
        padding-bottom: 12px;

        &::after {
            content: '';
            position: absolute;
            inset: 0;
            height: 12px;
            background: green;
            width: var(--eGradeWidth);
            border-radius: 6px;
        }

        &::before {
            content: '';
            position: absolute;
            inset: 0;
            height: 12px;
            background: red;
            width: 100%;
            border-radius: 6px;
        }
    }
}

.wrapper__eAccessibilityBlind {
    position: absolute;
    z-index: 10;
    top: 10px;
    left: calc(50% - 50px);
    height: auto;
    width: 250px;
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    box-shadow: 0 -3px 4px -2px rgba(0 0 0 / .2);
    background: rgba(204, 204, 204, 0.25); /*rgba(248, 249, 255, .25);*/
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 8px;
}

.wrapper__accessibility,
.wrapper__eAccessibilityBlind {
    display: none;

    &.open {
        display: block;
    }
}

.wrapper__accessibility {
    position: absolute;
    top: 50px;
    right: calc(50% - 150px);
    z-index: 2;
}