/* Visual Morse Code (/visual-morse-code). The design is drawn on the canvas; panels, buttons,
   fields and colours of the chrome come from the app kit. Loaded only on this page. */

.vm-landing-app > .ak-stage > * {
    align-self: stretch;
}

/* The stage is a fixed-height column in the app view, and it hides whatever spills past it.
   The drawing takes the space that is left; Play, the lamp and the written code stay in view. */
.vm-landing-app > .filter-landing-stage.ak-stage {
    min-height: 0;
    overflow: hidden;
}

.vm-landing-app .vm-board {
    flex: 1 1 0;
    min-height: 0;
    padding: 0.4rem;
    overflow: hidden;
}

/* The frame takes the look's own background, and the drawing sits in its middle, so the whole board
   is the design (no empty panel under a short message). */
.vm-landing-app .vm-frame {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    border-radius: var(--ak-radius);
    background: var(--vm-bg, transparent);
}

.vm-landing-app .vm-summary,
.vm-landing-app .vm-play,
.vm-landing-app .vm-code,
.vm-landing-app .vm-note {
    flex: 0 0 auto;
}

/* Duration is the figure you watch. The counts stay a compact list, each value next to its label. */
.vm-landing-app .vm-summary {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding: 0.65rem 1rem;
}

.vm-landing-app .vm-summary > .ak-stat--main {
    min-width: 6.25rem;
    padding: 0 1rem 0 0;
    border: 0;
    border-inline-end: 1px solid color-mix(in srgb, var(--ak-accent) 35%, var(--ak-border));
    border-radius: 0;
    background: none;
}

.vm-landing-app .vm-summary > .ak-kv {
    width: max-content;
    grid-template-columns: auto auto;
    column-gap: 1.75rem;
    row-gap: 0.15rem;
}

@container (max-width: 520px) {
    .vm-landing-app .vm-summary {
        flex-direction: column;
        align-items: stretch;
    }

    .vm-landing-app .vm-summary > .ak-stat--main {
        padding: 0 0 0.55rem;
        border-inline-end: 0;
        border-block-end: 1px solid color-mix(in srgb, var(--ak-accent) 35%, var(--ak-border));
    }

    .vm-landing-app .vm-summary > .ak-kv {
        width: 100%;
    }
}

@media (max-width: 960px) {
    body.filter-app-mode .vm-landing-app.ak-app > .filter-landing-stage.ak-stage {
        height: calc(100dvh - var(--seo-chrome-height, 4.75rem) - 11rem) !important;
        max-height: none !important;
        overflow: hidden !important;
    }
}

.vm-landing-app .vm-canvas {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    min-height: 10.5rem;
    margin-block: auto;
}

.vm-landing-app .vm-play {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.vm-landing-app .vm-lamp {
    width: 1.35rem;
    height: 1.35rem;
    margin-inline: 0.15rem;
    border-radius: 50%;
    background: var(--vm-lamp-off, var(--ak-border));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vm-lamp-on, var(--ak-border)) 35%, transparent);
}

.vm-landing-app .vm-lamp.is-on {
    background: var(--vm-lamp-on, var(--ak-warning));
    box-shadow: 0 0 0.55rem 0.12rem color-mix(in srgb, var(--vm-lamp-on, var(--ak-warning)) 75%, transparent);
}

.vm-landing-app .vm-code {
    margin: 0;
    max-height: 7.5rem;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.vm-landing-app .vm-speed-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}

.vm-landing-app .vm-speed-value {
    color: var(--ak-text);
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.vm-landing-app .vm-note {
    margin: 0;
}
