/*
 * Before / After block styles.
 * Every theme token has a fallback so the block stays usable under any theme.
 */

.indi-ba__notice {
	font-family: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--faint, #6b6861);
}

.indi-ba__meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 14px;
	color: var(--wp--preset--color--muted, #68645d);
	font-family: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	font-size: 12px;
}

.indi-ba__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: var(--wp--custom--rule, 1px solid #d8d3c8);
	cursor: ew-resize;
	user-select: none;
	touch-action: none;
}

.indi-ba__frame img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.indi-ba__clip {
	position: absolute;
	inset: 0;
	clip-path: inset(0 calc(100% - var(--indi-reveal, 50%)) 0 0);
}

.indi-ba__tag {
	position: absolute;
	top: 12px;
	z-index: 2;
	padding: 6px 10px;
	background: rgb(18 17 15 / 82%);
	color: #f6f4ef;
	font-family: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	font-size: 11px;
	letter-spacing: 0.08em;
}

.indi-ba__tag--before {
	left: 12px;
}

.indi-ba__tag--after {
	right: 12px;
}

.indi-ba__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--indi-reveal, 50%);
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	margin-left: -20px;
	pointer-events: none;
}

.indi-ba__handle::before {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	margin-left: -1px;
	background: #f2efe8;
	content: '';
}

.indi-ba__knob {
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #f6f4ef;
	box-shadow: 0 4px 14px rgb(0 0 0 / 30%);
	color: #12110f;
	font-family: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	font-size: 13px;
}

.indi-ba__range {
	position: absolute;
	inset: 0;
	z-index: 4;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
}

.indi-ba__range:focus-visible + .indi-ba__handle .indi-ba__knob {
	outline: 3px solid var(--wp--preset--color--accent, #ba4f2b);
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.indi-ba__meta {
		align-items: flex-start;
		flex-direction: column;
		gap: 4px;
	}
}
