/* Rubik's Cube Solver (/rubiks-cube-solver): only what is the app's own - the cube's canvas, the solution's chips, the
   colour swatches and the turn buttons. Tiles, panels, buttons and the accent come from the app kit (css/app-kit,
   docs/app-kit.md), the button row from css/app-kit/games.css (every game). Loaded only on this page (StylePaths). */

.rc-landing-app .rc-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ak-space-2);
}

/* The cube: 4 : 3, as wide as the panel, no taller than the screen allows. */
.rc-landing-app .rc-board {
    width: min(100%, calc((100vh - 300px) * 4 / 3));
    min-width: min(100%, 280px);
    aspect-ratio: 4 / 3;
}

.rc-landing-app .rc-canvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    touch-action: none;
    cursor: grab;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.rc-landing-app .rc-canvas:active {
    cursor: grabbing;
}

.rc-landing-app .rc-canvas:focus-visible {
    box-shadow: 0 0 0 3px var(--ak-accent);
}

/* The solution: one chip per move, the phases marked; done moves fade, the next one is filled. */
.rc-landing-app .rc-solution {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    width: min(100%, 760px);
    min-height: 1.9rem;
}

.rc-landing-app .rc-phase {
    margin-inline: 0.35rem 0.1rem;
    color: var(--ak-muted);
    font-size: var(--ak-fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.rc-landing-app .rc-chip {
    min-width: 2.4rem;
    min-height: 1.85rem;
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--ak-border);
    border-radius: var(--ak-radius-pill);
    background: var(--ak-panel);
    color: var(--ak-text);
    font: inherit;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.rc-landing-app .rc-chip:hover {
    background: var(--ak-hover);
}

.rc-landing-app .rc-chip.is-done {
    opacity: 0.45;
}

.rc-landing-app .rc-chip.is-next {
    border-color: var(--ak-accent);
    background: var(--ak-accent);
    color: var(--ak-on-accent);
}

.rc-landing-app .rc-message {
    width: min(100%, 760px);
    margin: 0;
}

.rc-landing-app .ak-stat-value.is-solved {
    color: var(--ak-success);
}

/* Paint: six colour swatches. */
.rc-landing-app .rc-paint {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.rc-landing-app .rc-paint .rc-swatch {
    width: 2.1rem;
    min-width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border: 2px solid var(--ak-border);
    border-radius: 0.45rem;
}

.rc-landing-app .rc-paint .rc-swatch[aria-pressed="true"],
.rc-landing-app .rc-paint .rc-swatch[aria-checked="true"] {
    border-color: var(--ak-text);
    box-shadow: 0 0 0 2px var(--ak-accent);
}

.rc-landing-app .rc-swatch[data-rc-color="0"] { background: #ffffff; }
.rc-landing-app .rc-swatch[data-rc-color="1"] { background: #c41e3a; }
.rc-landing-app .rc-swatch[data-rc-color="2"] { background: #009e60; }
.rc-landing-app .rc-swatch[data-rc-color="3"] { background: #ffd500; }
.rc-landing-app .rc-swatch[data-rc-color="4"] { background: #ff5800; }
.rc-landing-app .rc-swatch[data-rc-color="5"] { background: #0051ba; }

/* Turn a face: U R F D L B over U' R' F' D' L' B'. */
.rc-landing-app .rc-pad {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.3rem;
}

.rc-landing-app .rc-pad .rc-key {
    min-width: 0;
    padding-inline: 0;
    font-weight: 700;
}

.rc-landing-app .rc-moves-row {
    display: flex;
    gap: 0.4rem;
}

.rc-landing-app .rc-moves-field {
    flex: 1;
    min-width: 0;
}
