/* WB Design System — Photo Upload */

.wb-photo-dropzone {
	border: 0.125rem dashed rgba(255, 255, 255, 0.4);
	border-radius: var(--wb-ctx-radius, 0.9375rem);
	padding: 2.5rem 1.25rem;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s;
}

.wb-photo-dropzone:hover,
.wb-photo-dropzone.wb-dragover {
	border-color: var(--wb-ctx-primary);
	background: rgba(255, 255, 255, 0.1);
}

.wb-photo-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.wb-photo-thumb {
	position: relative;
	width: 6.25rem;
	height: 5rem;
	border-radius: calc(var(--wb-ctx-radius, 0.9375rem) / 2);
	overflow: hidden;
}

.wb-photo-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wb-photo-thumb:not(.wb-photo-loading) {
	cursor: grab;
}

.wb-photo-thumb.wb-photo-dragging {
	opacity: 0.4;
	cursor: grabbing;
}

.wb-photo-thumb.wb-photo-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	background: rgba(255, 255, 255, 0.1);
}

/* Loading dots */
.wb-dot {
	width: 0.375rem;
	height: 0.375rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.7);
	animation: wb-bounce 0.9s ease-in-out infinite;
}

.wb-dot:nth-child(2) { animation-delay: 0.15s; }
.wb-dot:nth-child(3) { animation-delay: 0.3s; }

/* Remove button */
.wb-photo-remove {
	position: absolute;
	top: 0.125rem;
	right: 0.125rem;
	width: 1.5rem !important;
	height: 1.5rem !important;
	border: none;
	border-radius: 50% !important;
	background: rgba(192, 57, 43, 0.8) !important;
	color: #fff !important;
	font-size: 1rem !important;
	line-height: 1.5rem;
	cursor: pointer;
	padding: 0 !important;
}

.wb-photo-remove:hover {
	background: rgba(192, 57, 43, 1) !important;
}

.wb-photo-remove.wb-photo-removing {
	cursor: wait;
	pointer-events: none;
	background: rgba(0, 0, 0, 0.5) !important;
}

.wb-photo-remove.wb-photo-removing::after {
	content: '';
	display: block;
	width: 0.75rem;
	height: 0.75rem;
	margin: 0.375rem auto;
	border: 0.125rem solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: wb-spin 0.6s linear infinite;
}
