/* Reusable SingleMeetSingle photo editor. */

body.sms-modal-open {
	overflow: hidden;
}

.sms-photo-editor {
	position: fixed;
	z-index: 100001;
	inset: 0;
	display: grid;
	padding: 24px;
	place-items: center;
}

.sms-photo-editor[hidden],
.sms-photo-editor__error[hidden] {
	display: none !important;
}

.sms-photo-editor__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 16, 29, .82);
	backdrop-filter: blur(9px);
}

.sms-photo-editor__dialog {
	position: relative;
	width: min(100%, 620px);
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 30px 90px rgba(0, 0, 0, .38);
}

.sms-photo-editor__dialog > header {
	display: flex;
	padding: 20px 22px;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #e8eaf0;
}

.sms-photo-editor__dialog > header small {
	display: block;
	margin-bottom: 3px;
	color: #7135f6;
	font-size: 10px;
	font-weight: 850;
	letter-spacing: .09em;
	text-transform: uppercase;
}

.sms-photo-editor__dialog h2 {
	margin: 0 !important;
	color: #151d31;
	font-size: 24px !important;
	font-weight: 800 !important;
}

.sms-photo-editor__dialog > header > button {
	display: grid;
	width: 40px;
	height: 40px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: #f0f1f5;
	color: #667085;
	cursor: pointer;
	font: 400 27px/1 Arial, sans-serif;
}

.sms-photo-editor__stage {
	position: relative;
	width: min(82vw, 460px);
	margin: 24px auto 18px;
	overflow: hidden;
	border-radius: 18px;
	background: #e7eaf0;
	touch-action: none;
}

.sms-photo-editor__stage canvas {
	display: block;
	width: 100%;
	height: auto;
	cursor: grab;
}

.sms-photo-editor__stage canvas:active {
	cursor: grabbing;
}

.sms-photo-editor__stage > span {
	position: absolute;
	inset: 6%;
	border: 2px solid rgba(255, 255, 255, .95);
	border-radius: 50%;
	box-shadow: 0 0 0 999px rgba(9, 14, 25, .34);
	pointer-events: none;
}

.sms-photo-editor__controls {
	display: grid;
	padding: 0 22px;
	grid-template-columns: auto minmax(140px, 1fr) auto;
	align-items: end;
	gap: 16px;
}

.sms-photo-editor__controls button {
	min-height: 42px;
	padding: 8px 12px;
	border: 1px solid #dfe2e9;
	border-radius: 11px;
	background: #fff;
	color: #5d687b;
	cursor: pointer;
	font-weight: 750;
}

.sms-photo-editor__controls label,
.sms-photo-editor__controls label > span {
	display: block;
}

.sms-photo-editor__controls label > span {
	margin-bottom: 8px;
	color: #737d90;
	font-size: 11px;
	font-weight: 750;
	text-align: center;
}

.sms-photo-editor__controls input {
	width: 100%;
	accent-color: #7135f6;
}

.sms-photo-editor__hint {
	margin: 14px 22px 0;
	color: #7c879d;
	font-size: 12px;
	text-align: center;
}

.sms-photo-editor__error {
	margin: 14px 22px 0;
	padding: 10px 12px;
	border: 1px solid #f4b9c1;
	border-radius: 10px;
	background: #fff3f5;
	color: #b4233b;
	font-size: 12px;
}

.sms-photo-editor__dialog > footer {
	display: grid;
	padding: 20px 22px 22px;
	grid-template-columns: 1fr 1.5fr;
	gap: 12px;
}

.sms-photo-editor__dialog > footer button {
	min-height: 48px;
	border-radius: 13px;
	cursor: pointer;
	font: 750 14px/1 inherit;
}

.sms-photo-editor__dialog > footer .is-cancel {
	border: 1px solid #efb5bd;
	background: #fff7f8;
	color: #ca4053;
}

.sms-photo-editor__dialog > footer .is-save {
	border: 0;
	background: linear-gradient(110deg, #0bcdb7, #3d8fe2 52%, #7538ed);
	box-shadow: 0 9px 22px rgba(74, 74, 211, .22);
	color: #fff;
}

@media (max-width: 560px) {
	.sms-photo-editor {
		padding: 10px;
	}

	.sms-photo-editor__dialog {
		max-height: calc(100vh - 20px);
		border-radius: 20px;
	}

	.sms-photo-editor__controls {
		padding: 0 14px;
		grid-template-columns: 48px minmax(100px, 1fr) 48px;
		gap: 9px;
	}

	.sms-photo-editor__controls button {
		padding: 7px;
		font-size: 20px;
	}

	.sms-photo-editor__controls button span {
		display: none;
	}

	.sms-photo-editor__dialog > footer {
		padding: 16px;
	}
}
