/**
 * Quiz Slider — the whole family's styles.
 *
 * Deliberately minimal. Every part of this quiz is a container holding
 * ordinary blocks, and those blocks bring their own spacing, colour and
 * typography. Anything opinionated here would fight them.
 */

/* Progress ---------------------------------------------------------------- */

.advertorial-quiz-slider .quiz-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.advertorial-quiz-slider .quiz-progress--bottom {
    margin-top: 1rem;
    margin-bottom: 0;
}

.advertorial-quiz-slider .quiz-progress-bar-track {
    flex: 1 1 auto;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.advertorial-quiz-slider .quiz-progress-bar-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    /* The bar is the one place a transition is wanted: questions swap without
       animation, so this is the only cue that progress moved. */
    transition: width 0.3s ease;
}

.advertorial-quiz-slider .quiz-progress-counter {
    flex: 0 0 auto;
    font-size: 0.875rem;
    line-height: 1;
    white-space: nowrap;
}

/* Answers ----------------------------------------------------------------- */

.advertorial-quiz-slider .quiz-answer {
    cursor: pointer;
    /* Keeps the box from shifting when .is-selected adds its outline. */
    outline: 2px solid transparent;
    outline-offset: 2px;
    transition: outline-color 0.15s ease;
}

.advertorial-quiz-slider .quiz-answer:focus-visible {
    outline-color: currentColor;
}

.advertorial-quiz-slider .quiz-answer.is-selected {
    outline-color: currentColor;
}

/* An answer with its own selected Border / Background shows that instead of
   the default outline. */
.advertorial-quiz-slider .quiz-answer.is-selected.has-selected-style {
    outline-color: transparent;
}

/* Editor ------------------------------------------------------------------ */

.quiz-question-editor,
.quiz-answer-editor,
.quiz-upper-editor,
.quiz-bottom-editor {
    border: 1px dashed #c3c4c7;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 8px;
}

.quiz-answer-editor {
    border-style: solid;
    border-color: #e0e0e0;
}

.quiz-slider-editor {
    border: 2px dashed #0073aa;
    border-radius: 4px;
    padding: 16px;
}
