ul.acf-image-select-list {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.acf-image-select-list li {
	display: flex;
	flex: 0 0 calc(33.333% - 10px);
	margin: 0;
	text-align: center;
}

ul.acf-image-select-list li input {
	display: none;
}

.acf-image-select-list .acf-image-select {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.acf-image-select-list .acf-image-select img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	box-sizing: border-box;
}
.acf-image-select-list .acf-image-select label {
	display: flex;
	flex-direction: column;
	flex: 1;
	border: solid 4px #D9D9D9;
	transition: border-color 0.2s ease-in-out;
	cursor: pointer;
	overflow: hidden;
	position: relative;
	min-height: 80px;
}
.acf-image-select-list .acf-image-select label.acf-image-select-selected  {
	border: solid 4px #ff9900;
}
.acf-image-select-list .acf-image-select .item-title {
	font-size: 12px;
	padding: 12px;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	line-height: 1.4;
	position: absolute;
	bottom: 0;
	text-align: center;
	width: 100%;
	padding: 12px 4px;
	background: rgba(0, 0, 0, 0.3);
	color: #fff;
}
/* Upload item styles - part of the choices list */
.acf-image-select-upload-item {
	position: relative;
	vertical-align: top;
	display: flex;
	flex-direction: column;
}

.acf-image-select-upload-item .acf-image-select-upload-preview {
	display: inline-block;
	width: 100%;
	height: auto;
	border: solid 4px #D9D9D9;
	background: #f9f9f9;
	overflow: hidden;
	position: relative;
	box-sizing: border-box;
}

.acf-image-select-upload-item .acf-image-select-upload-preview img {
	width: 100%;
	height: auto;
	object-fit: cover;
	display: block;
}

.acf-image-select-upload-item .acf-image-select-upload-preview.has-image {
	border: solid 4px #7A7A7A;
}

.acf-image-select-upload-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100px;
	font-size: 40px;
	font-weight: bold;
	color: #999;
	line-height: 1;
}

.acf-image-select-upload-item .acf-image-select-upload-btn,
.acf-image-select-upload-item .acf-image-select-remove-btn {
	display: block;
	width: 100%;
	margin-top: 5px;
	font-size: 12px;
	line-height: 1.4;
	padding: 4px 8px;
	min-height: 0;
}

.acf-image-select-upload-item .acf-image-select-remove-btn {
	background: #dc3232;
	border-color: #dc3232;
	color: #fff;
}

.acf-image-select-upload-item .acf-image-select-remove-btn:hover {
	background: #b32d2e;
	border-color: #b32d2e;
	color: #fff;
}

/* Horizontal carousel layout */
.acf-image-select-carousel {
	display: flex;
	align-items: center;
	position: relative;
	width: 100%;
	max-width: 100%;
	padding: 0 44px;
	box-sizing: border-box;
}
.acf-image-select-viewport {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	overflow-x: hidden;
	overflow-y: hidden;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.acf-image-select-viewport::-webkit-scrollbar {
	display: none;
}
.acf-image-select-carousel ul.acf-image-select-list {
	flex-wrap: nowrap;
	gap: 10px;
	transition: transform 0.3s ease;
	will-change: transform;
}
.acf-image-select-carousel ul.acf-image-select-list li {
	flex: 0 0 150px;
	width: 150px;
}
.acf-image-select-carousel .acf-image-select img {
	height: 110px;
	object-fit: cover;
}
.acf-image-select-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: #ffcc66;
	color: #000;
	font-size: 22px;
	line-height: 1;
	padding: 0;
	cursor: pointer;
	z-index: 20;
	pointer-events: auto;
	display: flex;
	align-items: center;
	justify-content: center;
}
.acf-image-select-prev {
	left: 0;
}
.acf-image-select-next {
	right: 0;
}
.acf-image-select-arrow:hover,
.acf-image-select-arrow:focus {
	background: #ff9900;
	outline: none;
	color: #000;
}
.acf-image-select-arrow:disabled {
	opacity: 0.35;
	cursor: default;
	background: #ddd;
}
.acf-image-select-arrow.is-disabled {
	opacity: 0.35;
	background: #ddd;
}
.acf-image-select-arrow:disabled:hover {
	background: #ddd;
}

/* 1 image-select per row on devices less than 767px */
@media (max-width: 767px) {
	ul.acf-image-select-list li {
		flex: 0 0 100%;
	}
	.acf-image-select-carousel ul.acf-image-select-list li {
		flex: 0 0 140px;
		width: 140px;
	}
}
