/* clip-edit — additive styles (loaded after style.css). */

/* Bottom-sheet prompts (rename, etc.) must float ABOVE full-screen editors.
   The loopify/audio-clip editor is `position:fixed; z-index:10`, but
   `.menu-backdrop` had no stacking context of its own, so the rename sheet
   opened from the clip page rendered behind the editor and was invisible.
   Lift every sheet above all overlays. */
.menu-backdrop { z-index: 100; }

/* Beat/bar gridlines layer: above the canvas, below region/handles. */
.loopify-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.loopify-gridline {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
}
.loopify-gridline.beat {
    background: color-mix(in srgb, var(--fg-dim) 22%, transparent);
}
.loopify-gridline.bar {
    background: color-mix(in srgb, var(--fg-dim) 55%, transparent);
}

/* Preview playhead: thin orange line tracking playback within the loop. */
.loopify-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: var(--orange);
    pointer-events: none;
}

/* Stretch-algorithm dropdown, sitting to the right of the "fit to tempo" label. */
.loopify-algo-select {
    background: var(--bg2);
    border: 1px solid var(--bg3);
    border-radius: 8px;
    color: var(--fg);
    font: inherit;
    font-size: 13px;
    padding: 0 10px;
    min-height: 38px;
}
.loopify-algo-select:focus {
    outline: none;
    border-color: var(--green);
}

/* Tappable clip title (rename) in editor headers — looks like text, acts like
   a button; the trailing ✎ hints it's editable. */
.editable-title {
    background: none;
    border: none;
    color: var(--fg);
    font: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 8px 4px;
}
.loopify header .editable-title { flex: 1; min-width: 0; text-align: center; }

/* Friendly readout of the selected loop length (e.g. "2 bars"). */
.loopify-bars-readout {
    color: var(--fg-dim);
    font-size: 13px;
    white-space: nowrap;
}
