/* Photo Morph (/photo-morph): the morph, with Photo 1 and Photo 2 side by side under it (their points are dragged on
   them). Panels and buttons come from the app kit (css/app-kit, docs/app-kit.md). Loaded only on this app's page
   (StylePaths). */

.pm-landing-app .pm-main {
    align-items: center;
}

/* The morph: the frame's shape is set by the script (--pm-aspect, photo 1's shape). */
.pm-landing-app .pm-canvas {
    display: block;
    width: 100%;
    max-width: min(640px, calc(62vh * var(--pm-aspect, 1)));
    aspect-ratio: var(--pm-aspect, 1);
}

/* Photo 1 and Photo 2, side by side, not wider than the morph above them. */
.pm-landing-app .pm-photos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ak-space-3, 0.75rem);
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
}

/* The photo the examples, Open photo and a drop go to. */
.pm-landing-app .pm-photo {
    gap: var(--ak-space-2, 0.5rem);
    cursor: pointer;
}

.pm-landing-app .pm-photo.is-active {
    border-color: var(--ak-accent);
    box-shadow: 0 0 0 1px var(--ak-accent);
}

.pm-landing-app .pm-photo-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--ak-space-2, 0.5rem);
    min-width: 0;
}

.pm-landing-app .pm-photo-name {
    font-weight: 600;
    font-size: var(--ak-fs-sm, 0.875rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Points are dragged with a finger too, so the canvas does not scroll the page. */
.pm-landing-app .pm-photo-canvas {
    display: block;
    width: 100%;
    aspect-ratio: var(--pm-aspect, 1);
    touch-action: none;
    cursor: crosshair;
    border-radius: var(--ak-radius-sm, 6px);
}

.pm-landing-app .pm-photo-canvas.is-over-point {
    cursor: grab;
}

.pm-landing-app .pm-photo-canvas.is-dragging {
    cursor: grabbing;
}

.pm-landing-app .pm-photo-canvas:focus-visible {
    outline: 2px solid var(--ak-accent);
    outline-offset: 2px;
}

.pm-landing-app .pm-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--ak-space-2, 0.5rem);
}

@media (max-width: 420px) {
    .pm-landing-app .pm-open {
        padding-inline: 0.5rem;
    }
}
