/* Before/after slider (/before-after-slider): the comparison straight on the stage at its shape (--ba-aspect, set by the
   script), the two photos as thumbnails to open. Panels, sliders, segments and buttons come from the app kit. */

.ba-landing-app.ak-app > .filter-landing-stage.ak-stage {
    background: var(--component-checkerboard);
}

.ba-landing-app .ba-frame {
    position: relative;
    width: 100%;
    max-width: min(900px, calc(70vh * var(--ba-aspect, 1)));
}

/* Dragging the picture moves the divider, so the page does not scroll under a finger there. */
.ba-landing-app .ba-canvas {
    display: block;
    width: 100%;
    aspect-ratio: var(--ba-aspect, 1);
    border-radius: var(--ak-radius-sm, 6px);
    touch-action: none;
    cursor: ew-resize;
}

.ba-landing-app .ba-canvas:focus-visible {
    outline: 2px solid var(--ak-accent);
    outline-offset: 2px;
}

/* The two photos: a thumbnail each (click to open another), then Swap. */
.ba-landing-app .ba-photos {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
}

.ba-landing-app .ba-photo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 0;
    margin: 0;
    padding: 0.3rem 0.5rem 0.3rem 0.3rem;
    border: 1px solid var(--ak-border);
    border-radius: var(--ak-radius-sm, 6px);
    background: var(--ak-field, transparent);
    color: var(--ak-text);
    font: inherit;
    font-size: var(--ak-fs-sm, 0.875rem);
    cursor: pointer;
}

.ba-landing-app .ba-photo:hover {
    background: var(--ak-hover);
}

.ba-landing-app .ba-photo:focus-visible {
    outline: 2px solid var(--ak-accent);
    outline-offset: 2px;
}

.ba-landing-app .ba-photo-thumb {
    flex: none;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 4px;
    background: var(--component-checkerboard) center / cover no-repeat;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ak-text) 15%, transparent);
}

.ba-landing-app .ba-photo-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ba-landing-app .ba-swap {
    flex: none;
}

.ba-landing-app .ba-color-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.ba-landing-app .ba-color-row[hidden] {
    display: none;
}

.ba-landing-app .ba-color-input {
    width: 2.75rem;
    height: 1.9rem;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--ak-text) 25%, transparent);
    border-radius: var(--ak-radius-sm, 6px);
    background: transparent;
    cursor: pointer;
}

.ba-landing-app .ba-seg {
    flex-wrap: wrap;
}
