/* Selection tool (/selection-tool): the stage (one canvas with the photo, the result and the marching ants) and the
   few controls of its own. Buttons, sliders, palettes and colours come from the app kit and the shared landing
   controls (docs/app-kit.md). Loaded only on this app's page (StylePaths in SeoFilterDemoCatalog.SelectionTool.cs). */

.selection-tool-landing-app {
    display: grid;
    gap: 1rem;
    align-items: start;
}

.filter-landing-stage.sel-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    overflow: hidden;
    box-shadow: none;
    background: #eef1f5;
}

.dark .filter-landing-stage.sel-stage {
    background: #161a22;
}

.sel-canvas {
    display: block;
    width: 100%;
    height: auto;
    max-height: 78vh;
    object-fit: contain;
    /* Selections are dragged on the canvas, so it handles touch itself. */
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: crosshair;
    outline: none;
}

.sel-canvas[data-tool="wand"] {
    cursor: cell;
}

.sel-canvas:focus-visible {
    box-shadow: 0 0 0 3px var(--ak-accent, #2563eb);
}

body.filter-app-mode .selection-tool-landing-app > .filter-landing-stage.sel-stage {
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

body.filter-app-mode .sel-canvas {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

.sel-file-input {
    display: none;
}

.sel-status {
    margin: 0;
    min-height: 1.4em;
    font-size: 0.875rem;
    color: var(--ak-muted, #64748b);
    font-variant-numeric: tabular-nums;
}

.sel-wand-options {
    display: grid;
    gap: 0.5rem;
}

.sel-wand-options[hidden],
.sel-controls [hidden] {
    display: none;
}

/* Three buttons in the row of two columns: Deselect takes the whole second line. */
.sel-actions > :last-child {
    grid-column: 1 / -1;
}

/* CJK labels never wrap before a prolonged sound mark or small kana. */
.sel-controls {
    line-break: strict;
}
