/* The lesson kit (js/shared/lesson-kit.js): the lesson panel of the "Learn …" apps (Learn Chess, Learn Go, Learn
   Checkers), Views/SeoLanding/_LessonPanel.cshtml. It is the app kit's floating stats panel
   (section.ak-stats.ak-stats--float, css/app-kit/components.css) with sentences in it: the rule and the task. */

/* No wider than a short paragraph, and the sentences smaller than a figure. The sizes outweigh the games' tile sizes
   (app-kit/games.css). */
.ak-app .lesson-stats.ak-stats--float:not(.is-folded) {
    width: 17rem;
    max-width: min(17rem, calc(100% - 24px));
}

.ak-app .lesson-stats.ak-stats--float .ak-stat .lesson-stats-rule,
.ak-app .lesson-stats.ak-stats--float .ak-stat .lesson-stats-task,
.ak-app .lesson-stats.ak-stats--float .ak-stat .lesson-stats-status {
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.35;
    white-space: normal;
}

.ak-app .lesson-stats.ak-stats--float .ak-stat .lesson-stats-task,
.ak-app .lesson-stats.ak-stats--float .ak-stat .lesson-stats-status {
    font-weight: 600;
}

/* The hints (Lesson 1 of 13, Exercise 1 of 3, the moves) on a line of their own under the value. */
.ak-app .lesson-stats.ak-stats--float .ak-stat .ak-stat-hint {
    display: block;
    margin-inline-start: 0;
}

/* On a phone the panel is opened by hand and covers the board while it is open: narrower and in smaller type. */
@media (max-width: 600px) {
    .ak-app .lesson-stats.ak-stats--float:not(.is-folded) {
        width: 14rem;
        max-width: calc(100% - 16px);
    }

    .ak-app .lesson-stats.ak-stats--float .ak-stat .lesson-stats-rule,
    .ak-app .lesson-stats.ak-stats--float .ak-stat .lesson-stats-task,
    .ak-app .lesson-stats.ak-stats--float .ak-stat .lesson-stats-status {
        font-size: 0.8rem;
    }
}

/* After the last lesson: the way to a real game. */
.ak-app .lesson-stats .lesson-stats-play {
    display: block;
    margin-top: 0.2rem;
    color: var(--ak-accent);
    font-weight: 600;
}

/* A phone held upright: the panel lies across the top of the board (css/app-kit/components.css); its sentences each take
   the whole width there rather than sharing a row as the kit's figures do. */
@media (max-width: 640px) and (orientation: portrait) {
    .ak-app .lesson-stats.ak-stats--float:not(.is-folded) > .ak-stat { grid-column: 1 / -1; }
}

/* A phone on its side and a tablet either way up: the panel lies along the top (css/app-kit/components.css), its
   sentences side by side, each a short column of its own. */
@media (orientation: landscape) and (max-height: 500px), (orientation: portrait) and (min-width: 641px) and (max-width: 1100px),
    (orientation: landscape) and (max-width: 1400px) and (hover: none) and (pointer: coarse) {
    :root .ak-app .lesson-stats.ak-stats--float:not(.is-folded) { width: auto; inset-inline-end: 8px; }
    :root .ak-app .lesson-stats.ak-stats--float:not(.is-folded) > .ak-stat { flex: 1 1 0; }
}
