/* NsInteraction showcase: a top-down room with a player, a sensor, and a hold prompt */

.ns-interact {
    margin: 0;
    padding: 20px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.ns-interact figcaption {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 150%;
    color: #989898;
}

.ns-interact ul {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 150%;
}

.ns-interact ul b {
    font-weight: normal;
    color: #ffffff;
}

/* The canvas shows the targets, so the list only reads without the script */
.ns-interact.is-live > ul {
    display: none;
}

.ns-interact-app {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 16px 20px;
    align-items: start;
}

.ns-interact-stage canvas {
    display: block;
    width: 100%;
    border-radius: 6px;
    background: #101114;
    touch-action: none;
    cursor: crosshair;
}

.ns-interact-side {
    display: grid;
    gap: 10px;
    min-width: 0;
    font-size: 14px;
    color: #ffffff;
}

.ns-interact-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 8px;
    align-items: center;
    font-size: 13px;
    color: #989898;
}

.ns-interact-row[hidden],
.ns-interact-hint[hidden] {
    display: none;
}

.ns-interact-row output {
    font-family: "Overpass Mono", monospace;
    font-size: 12px;
    color: #ffffff;
}

.ns-interact-row input,
.ns-interact-row select {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
    accent-color: #f03a6c;
}

.ns-interact-row select {
    padding: 6px 8px;
    border: 1px solid #333333;
    border-radius: 6px;
    background: #15161a;
    color: #ffffff;
    font: inherit;
    font-size: 13px;
}

.ns-interact-hint,
.ns-interact-log {
    margin: 0;
    font-size: 13px;
    line-height: 150%;
    color: #666666;
}

.ns-interact-log:empty {
    display: none;
}

.ns-interact-focus {
    margin: 0;
    font-size: 13px;
    line-height: 150%;
    color: #ffffff;
}

.ns-interact-use {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #f03a6c;
    border-radius: 6px;
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.ns-interact-use.is-down {
    background: #190d0f;
}

.ns-interact-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(240, 58, 108, 0.35);
    pointer-events: none;
}

.ns-interact-label {
    position: relative;
}

.ns-interact-key {
    position: relative;
    display: inline-block;
    min-width: 20px;
    padding: 1px 4px;
    border-radius: 3px;
    background: #ffffff;
    color: #101114;
    font-family: "Overpass Mono", monospace;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.ns-interact-targets {
    margin: 0;
    padding-left: 20px;
    font-family: "Overpass Mono", monospace;
    font-size: 12px;
    line-height: 160%;
    color: #666666;
}

.ns-interact-targets li.is-best {
    color: #f03a6c;
}

.ns-interact-stage canvas:focus-visible,
.ns-interact-use:focus-visible,
.ns-interact-row input:focus-visible,
.ns-interact-row select:focus-visible {
    outline: 2px solid #f03a6c;
    outline-offset: 2px;
}

@media (max-width: 760px) {
    .ns-interact {
        padding: 12px;
    }

    .ns-interact-app {
        grid-template-columns: minmax(0, 1fr);
    }
}
