.eh-results-open {
    cursor: pointer;
}

.eh-results-dialog {
    width: min(820px, 92vw);
    max-height: 86vh;
    margin: auto;
    padding: 0;

    border: 0;
    border-radius: 10px;

    box-shadow: 0 20px 70px #0005;
}

.eh-results-dialog::backdrop {
    background: #0008;
}


/* Dialog header
-------------------------------------------------- */

.eh-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 20px 24px;

    border-bottom: 1px solid #ddd;
}

.eh-dialog-head h2 {
    margin: 0;
}

.eh-results-close {
    font-size: 28px;

    border: 0;
    background: transparent;

    cursor: pointer;
}


/* Results
-------------------------------------------------- */

.eh-result-summary {
    padding: 20px 24px;
}

.eh-result-question {
    padding: 16px 0;

    border-top: 1px solid #eee;
}


/* Average
-------------------------------------------------- */

.eh-result-average {
    margin: 12px 0 18px;

    font-size: 30px;
    font-weight: 700;
}

.eh-result-average > span {
    display: block;

    margin-bottom: 3px;

    font-size: 14px;
    font-weight: 600;
}

.eh-result-average > strong {
    display: block;

    font-size: 30px;
}

.eh-result-average small {
    font-size: 15px;
}


/* Average scale
-------------------------------------------------- */

.eh-result-scale {
    margin: 0 0 24px;
}

.eh-result-scale-labels {
    display: flex;
    justify-content: space-between;

    margin-bottom: 8px;

    font-size: 12px;
    font-weight: 600;
}

.eh-result-scale-track {
    position: relative;

    height: 8px;
    margin: 0 8px;

    background: #e9e9e9;
    border-radius: 99px;
}

.eh-result-scale-track i {
    position: absolute;
    top: 50%;

    width: 18px;
    height: 18px;

    background: #0E52A0;
    border-radius: 50%;

    transform: translate(-50%, -50%);

    box-shadow:
        0 0 0 4px #fff,
        0 0 0 5px #0E52A0;
}

.eh-result-scale-numbers {
    display: grid;
    grid-template-columns: repeat(10, 1fr);

    margin-top: 9px;

    font-size: 11px;
    text-align: center;
}


/* Distribution legend
-------------------------------------------------- */

.eh-result-legend {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;

    margin: 18px 0 9px;
}

.eh-result-legend span {
    font-size: 12px;
}


/* Distribution bars
-------------------------------------------------- */

.eh-result-bars > div {
    display: grid;
    grid-template-columns: 70px 1fr 55px;
    align-items: center;
    gap: 8px;

    margin: 5px 0;
}

.eh-result-bars b {
    display: flex;
    justify-content: space-between;
    gap: 4px;
}

.eh-result-bars b small {
    font-size: 10px;
    font-weight: 400;
}

.eh-result-bars span {
    height: 10px;

    overflow: hidden;

    background: #eee;
    border-radius: 10px;
}

.eh-result-bars i {
    display: block;

    height: 100%;

    background: #0E52A0;
}

.eh-result-bars em {
    font-style: normal;
    text-align: right;
}


/* Responsive
-------------------------------------------------- */

@media (max-width: 700px) {

    .eduhub-activities {
        overflow-x: auto;
    }

    .eh-results-dialog {
        width: 95vw;
    }
}

@media (max-width: 600px) {

    .eh-result-legend {
        display: block;
    }

    .eh-result-legend span {
        display: block;

        margin-top: 4px;
    }

    .eh-result-bars > div {
        grid-template-columns: 58px 1fr 48px;
    }
}