/* The written-interval exercises: components/IntervalExercise.astro and interval-writing. */
/* A global rule centres text and makes .container a centring flex column;
   an exercise is read left to right and fills its column. */
.container { display: block !important; }
.ex-row, .ex-verdict { text-align: left; }

.ex-card {
    background: rgba(255, 255, 255, .75);
    border: 1px solid var(--nb-border-faint);
    border-radius: 1rem;
    padding: 1rem;
}
.ex-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.ex-clefs { display: flex; gap: .3rem; }
.ex-score { margin-left: auto; font-weight: 700; color: var(--nb-ink-muted); }

.ex-stave { display: flex; justify-content: center; overflow-x: auto; }

.ex-ask {
    text-align: center;
    font-size: .85rem;
    color: var(--nb-ink-muted);
    margin: .25rem 0 .75rem;
}

.ex-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; flex-wrap: wrap; }
.ex-label {
    flex: 0 0 5.5rem;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    opacity: .6;
}
.ex-options { display: flex; flex-wrap: wrap; gap: .3rem; }

/* Tones over semitones: one column per count, so 2 T sits above 2 s. */
#exTones, #exSemitones {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 3.2rem));
}
#exTones .ex-option, #exSemitones .ex-option { padding-left: 0; padding-right: 0; white-space: nowrap; }

.ex-verdict {
    margin: .75rem 0 0;
    padding: .6rem .8rem;
    border-radius: .6rem;
    font-size: .9rem;
}
/* The answer is told either way: being wrong is the moment the reading is
   worth spelling out, and being right is worth confirming in full. */
.ex-verdict.is-right { background: rgba(61, 165, 60, .12); color: #1e6b1d; }
.ex-verdict.is-wrong { background: rgba(176, 42, 55, .10); color: var(--nb-destructive); }

.ex-actions { display: flex; gap: .5rem; justify-content: center; margin-top: .9rem; }

/* The settings screen. It is the first thing on the page, so it says what
   it is; the exercise below it does not need a heading of its own. */
.ex-config-title {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 .9rem;
}
.ex-hint {
    text-align: center;
    font-size: .78rem;
    color: var(--nb-ink-muted);
    margin: .75rem 0 0;
}
/* Twelve distances left to wrap leave one button stranded on a line of its
   own. As a grid they are two even rows, which is also how the scale reads:
   six tones, twice. */
.ex-options-scale {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .3rem;
}
.cfg-option { min-width: 2.6rem; }

@media (max-width: 480px) {
    .ex-label { flex-basis: 100%; }
}
