/* Checked Practice: choice questions and the Check button (practice_checks.js). */
:root {
    --bash-check-correct: #1a7f37;
    --bash-check-incorrect: #b3261e;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { --bash-check-correct: #57c27a; --bash-check-incorrect: #f2827a; }
}
:root[data-theme="dark"] { --bash-check-correct: #57c27a; --bash-check-incorrect: #f2827a; }

form.bash-choice { margin: .25rem 0 .75rem; }
form.bash-choice fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
form.bash-choice legend {
    float: none;
    width: 100%;
    padding: 0;
    margin-bottom: .5rem;
    font-size: 1rem;
    line-height: inherit;
    font-weight: 400;
}
form.bash-choice label {
    display: flex;
    gap: .55rem;
    align-items: baseline;
    margin: .3rem 0;
    cursor: pointer;
}
form.bash-choice input[type="radio"] { flex: none; margin: 0; transform: translateY(1px); }
form.bash-choice button[type="submit"] {
    margin-top: .5rem;
    padding: .25rem .8rem;
    border: 1px solid var(--pst-color-border, #d4d7dc);
    border-radius: 4px;
    background: var(--pst-color-surface, #f7f7f7);
    color: inherit;
    font: inherit;
    cursor: pointer;
}
form.bash-choice button[type="submit"]:focus-visible,
.bash-check-button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.bash-choice-result:empty, .bash-check-feedback:empty { display: none; }
.bash-choice-result, .bash-check-feedback p { margin: .5rem 0 0; }
.bash-choice-result[data-state="correct"], .bash-check-feedback[data-state="correct"] > p { color: var(--bash-check-correct); }
.bash-choice-result[data-state="incorrect"], .bash-check-feedback[data-state="incorrect"] > p { color: var(--bash-check-incorrect); }
.bash-check-button { margin-left: 4px; }
.bash-check-button:disabled { cursor: wait; opacity: .65; }
.bash-check-feedback { margin: .5rem 0; }
.bash-check-details > summary { cursor: pointer; margin-top: .35rem; }
.bash-check-details pre { white-space: pre-wrap; overflow-wrap: anywhere; }
