/* Short dictation and number dictation. Ported from ThePureLanguage's english-dictation.css (same colours and shapes:
   the rust family #7c2d12 to #9a3412, kept apart from the stress game's indigo), comments in English. */

.ed-level-btn {
    border: 2px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-radius: 0.5rem;
    padding: 0.4rem 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.ed-level-btn:hover {
    border-color: #9a3412;
}

.ed-level-btn.active {
    background: #7c2d12;
    border-color: #7c2d12;
    color: #fff;
}

.ed-input {
    font-size: clamp(1rem, 3.5vw, 1.15rem);
    line-height: 1.5;
    min-height: 4.5rem;
    resize: vertical;
}

/* Number dictation: digits want room and tabular figures. From number-dictation.css. */
.ed-number-input {
    max-width: 14rem;
    letter-spacing: 0.12em;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

/* The word-by-word comparison. */
.ed-diff {
    font-size: clamp(1.05rem, 4vw, 1.3rem);
    line-height: 2.1;
    word-spacing: 0.1em;
}

.ed-ok {
    color: #146c43;
    font-weight: 600;
}

/* A missed word: in the sentence, not typed. */
.ed-miss {
    color: #b02a37;
    font-weight: 700;
    text-decoration: underline dotted;
    text-underline-offset: 0.25em;
}

/* A misheard word: the right spelling on top, what was typed struck out below. */
.ed-sub {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.15;
    vertical-align: bottom;
    color: #b02a37;
    font-weight: 700;
}

.ed-sub .ed-yours {
    font-size: 0.75em;
    font-weight: 500;
    opacity: 0.8;
    text-decoration: line-through;
}

/* An extra word: not in the sentence at all. */
.ed-extra {
    color: #9a6700;
    font-weight: 500;
    text-decoration: line-through;
}

.ed-note {
    color: #7c2d12;
}

.ed-review-diff {
    line-height: 2;
}

[data-bs-theme="dark"] .ed-note { color: #fdba74; }
[data-bs-theme="dark"] .ed-ok { color: #75b798; }
[data-bs-theme="dark"] .ed-miss,
[data-bs-theme="dark"] .ed-sub { color: #ea868f; }
[data-bs-theme="dark"] .ed-extra { color: #ffda6a; }
[data-bs-theme="dark"] .ed-level-btn.active { background: #9a3412; border-color: #9a3412; }
