/* ── Container ─────────────────────────────────────────────────────────── */
.bas-container {
    position: relative;
    display: block;
    max-width: 100%;
    box-sizing: border-box;
    cursor: col-resize;
    -webkit-user-select: none;
    user-select: none;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
    border-radius: 6px;
    overflow: hidden;
}

/* Intrinsic-ratio spacer — sized by PHP from the image's actual dimensions */
.bas-sizer {
    display: block;
    pointer-events: none;
}

/* Fills the space created by .bas-sizer */
.bas-stage {
    position: absolute;
    inset: 0;
}

/* ── Images ──────────────────────────────────────────────────────────────── */
.bas-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
}

.bas-before {
    will-change: clip-path;
}

/* ── Labels ──────────────────────────────────────────────────────────────── */
.bas-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 12px 14px;
    box-sizing: border-box;
}

.bas-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 4px 10px;
    border-radius: 4px;
    line-height: 1.5;
}

/* ── Handle ──────────────────────────────────────────────────────────────── */
.bas-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;               /* zero-width; children are centred via flex */
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

.bas-line {
    flex: 1;
    width: 2px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.bas-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: col-resize;
    pointer-events: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    padding: 0;
    margin: 0;
    transition: background 0.15s ease, transform 0.1s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.bas-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.12);
}

.bas-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.7), 0 2px 10px rgba(0, 0, 0, 0.45);
}

.bas-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
