/**
 * File picker
 *
 * Reusable styled file picker.
 * The visible button opens the real file input, which is kept off-screen.
 */

.file-picker {
	display: inline-flex;
	align-items: center;
}

.file-picker-button {
	cursor: pointer;
}

.file-picker-input {
	position: fixed;
	top: -1000px;
	left: -1000px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

/**
 * Image picker
 *
 * Reusable image preview/cropper area.
 * The crop selection may be displayed as a circle while the exported image
 * can still be square.
 */

.image-picker {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .5rem;
}

.image-picker-cropper {
	position: relative;
	width: var(--image-picker-size, 240px);
	height: var(--image-picker-size, 240px);
}

.image-picker-cropper cropper-canvas {
	width: var(--image-picker-size, 240px);
	height: var(--image-picker-size, 240px);
}

.image-picker-img {
	display: block;
	max-width: 100%;
}

.image-picker-round cropper-selection {
	border-radius: 50%;
	overflow: hidden;
}

.image-picker-round cropper-selection::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	box-shadow: 0 0 0 9999px rgba(0, 0, 0, .25);
	pointer-events: none;
}
