.mm-panel-photo-field {
	grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.mm-panel-photo-cropper {
	align-items: stretch;
	height: 292px;
	justify-items: stretch;
	max-width: 360px;
	padding: 0;
	width: 100%;
}

.mm-panel-photo-cropper::after {
	background: rgb(255 255 255 / 88%);
	border-radius: 999px;
	bottom: 14px;
	color: var(--mm-primary);
	content: "Okrąg pokazuje kadr profilu";
	font-size: 12px;
	font-weight: 750;
	left: 50%;
	padding: 7px 10px;
	position: absolute;
	transform: translateX(-50%);
	z-index: 4;
}

.mm-panel-photo-cropper .mm-panel-photo-preview {
	align-items: center;
	background: #f7faf8;
	border: 0;
	border-radius: 22px;
	box-shadow: none;
	display: flex;
	height: 100%;
	justify-content: center;
	width: 100%;
}

.mm-panel-photo-cropper .mm-panel-photo-preview img {
	height: 100%;
	object-fit: contain;
	transform-origin: center;
	width: 100%;
}

.mm-panel-photo-cropper .mm-panel-photo-cropper-grid {
	background: rgb(227 247 239 / 48%);
	box-shadow: 0 0 0 999px rgb(17 31 27 / 14%);
	height: 176px;
	outline: 2px solid rgb(255 255 255 / 88%);
	outline-offset: 0;
	width: 176px;
	z-index: 3;
}

/* Stable preview: confirm the photo is stored without rendering an unreliable crop. */
#panel-profile.mm-panel-profile-preview .mm-panel-profile-card > header {
	align-items: center !important;
	display: flex !important;
	gap: 16px !important;
}

#panel-profile.mm-panel-profile-preview .mm-panel-avatar {
	align-items: center !important;
	background: #eef7f3 !important;
	border: 1px solid #cfe3da !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	color: #0b6b52 !important;
	display: inline-flex !important;
	flex: 0 0 auto !important;
	height: 44px !important;
	justify-content: center !important;
	min-width: 178px !important;
	overflow: hidden !important;
	padding: 0 16px !important;
	width: auto !important;
}

#panel-profile.mm-panel-profile-preview .mm-panel-avatar::after {
	content: "✓ Zdjęcie profilowe zapisane";
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0;
	white-space: nowrap;
}

#panel-profile.mm-panel-profile-preview .mm-panel-avatar img {
	display: none !important;
}

@media (max-width: 760px) {
	.mm-panel-photo-field {
		grid-template-columns: 1fr;
	}

	.mm-panel-photo-cropper {
		max-width: none;
	}

	#panel-profile.mm-panel-profile-preview .mm-panel-profile-card > header {
		align-items: flex-start !important;
		flex-direction: column !important;
	}
}
