/* Hamiltonian Path Explorer (/hamiltonian-path-explorer): the Trace / Search / Edit switch, the square board, the
   action rows, the bars of nodes per path length and the list of quick tests. Tiles, the callout, the table, the
   buttons and the fields come from the app kit. Loaded only on its page
   (Views/SeoLanding/_HamiltonianPathExplorerDemo.cshtml). */

.hp-app .hp-tool {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ak-space-2) var(--ak-space-3);
    margin-bottom: var(--ak-space-2);
}

.hp-app .hp-board {
    border-radius: var(--ak-radius-sm);
}

.hp-app .hp-board:focus-visible {
    outline: 2px solid var(--ak-accent);
    outline-offset: 3px;
}

/* Square, like the drawing area in the script, so a chessboard stays square on every screen. */
.hp-app .hp-chart {
    max-width: 600px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin-inline: auto;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

/* While editing, a drag moves a vertex instead of scrolling the page. */
.hp-app[data-hp-mode="edit"] .hp-chart {
    touch-action: none;
}

.hp-app .hp-actions {
    margin-top: var(--ak-space-2);
}

/* The stage is a column that may be shorter than its content (a phone): the status line keeps its full height. */
.hp-app .hp-say {
    flex: none;
    min-height: 3.1rem;
    overflow-wrap: anywhere;
}

.hp-app .hp-depth {
    height: 140px;
}

.hp-app .hp-table {
    margin-top: var(--ak-space-1, 0.25rem);
}

.hp-app .hp-tests {
    display: flex;
    flex-direction: column;
    gap: var(--ak-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.hp-app .hp-test {
    display: flex;
    align-items: flex-start;
    gap: var(--ak-space-2);
    line-height: 1.45;
}

.hp-app .hp-test-mark {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 1.3rem;
    height: 1.3rem;
    margin-top: 0.05rem;
    border-radius: 50%;
    background: var(--ak-field);
    color: var(--ak-muted);
}

.hp-app .hp-test-mark::before {
    content: "";
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: currentColor;
}

.hp-app .hp-test-mark svg {
    width: 0.9rem;
    height: 0.9rem;
}

.hp-app .hp-test.is-ok .hp-test-mark,
.hp-app .hp-test.is-no .hp-test-mark {
    color: #fff;
}

.hp-app .hp-test.is-ok .hp-test-mark { background: var(--ak-success); }
.hp-app .hp-test.is-no .hp-test-mark { background: var(--ak-danger); }

.hp-app .hp-test.is-ok .hp-test-mark::before,
.hp-app .hp-test.is-no .hp-test-mark::before {
    content: none;
}

.hp-app .hp-test.is-open {
    color: var(--ak-muted);
}
