.amount-editor-open {
	overflow: hidden;
}

.amount-editor-backdrop {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	background: rgba(15, 23, 42, 0.58);
	box-sizing: border-box;
}

.amount-editor-dialog {
	width: 350px;
	max-width: 100%;
	max-height: calc(100vh - 24px);
	overflow-y: auto;
	padding: 18px;
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
	box-sizing: border-box;
	color: #0f172a;
}

.amount-editor-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.amount-editor-title {
	margin: 0 0 3px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #64748b;
}

.amount-editor-product {
	margin: 0;
	font-size: 21px;
	font-weight: 750;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.amount-editor-close {
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 12px;
	background: #f1f5f9;
	color: #475569;
	font-size: 25px;
	line-height: 1;
	cursor: pointer;
}

.amount-editor-units {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
	gap: 7px;
	margin-bottom: 12px;
}

.amount-editor-unit {
	min-height: 42px;
	padding: 7px 5px;
	border: 1px solid #dbe3ee;
	border-radius: 11px;
	background: #f8fafc;
	color: #334155;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.amount-editor-unit.is-active {
	border-color: #2563eb;
	background: #2563eb;
	color: #fff;
}

.amount-editor-unit:disabled {
	opacity: .43;
	text-decoration: line-through;
	cursor: not-allowed;
}

.amount-editor-display {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 8px;
	min-height: 76px;
	margin-bottom: 12px;
	padding: 10px;
	border: 1px solid #dbeafe;
	border-radius: 15px;
	background: #eff6ff;
	box-sizing: border-box;
}

.amount-editor-value {
	font-size: 38px;
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	word-break: break-all;
}

.amount-editor-current-unit {
	font-size: 17px;
	font-weight: 700;
	color: #475569;
}

.amount-editor-keypad {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.amount-editor-key {
	min-height: 52px;
	border: 1px solid #dbe3ee;
	border-radius: 13px;
	background: #fff;
	color: #0f172a;
	font-size: 22px;
	font-weight: 700;
	cursor: pointer;
	touch-action: manipulation;
}

.amount-editor-key:active,
.amount-editor-close:active,
.amount-editor-unit:active,
.amount-editor-button:active {
	transform: scale(.97);
}

.amount-editor-key--delete {
	background: #f8fafc;
	color: #475569;
}

.amount-editor-error {
	min-height: 19px;
	margin: 8px 0 0;
	color: #b91c1c;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

.amount-editor-actions {
	display: grid;
	grid-template-columns: 1fr 1.35fr;
	gap: 9px;
	margin-top: 9px;
}

.amount-editor-button {
	min-height: 48px;
	border: 0;
	border-radius: 13px;
	font-size: 16px;
	font-weight: 750;
	cursor: pointer;
}

.amount-editor-button--cancel {
	background: #e2e8f0;
	color: #334155;
}

.amount-editor-button--save {
	background: #0f766e;
	color: #fff;
}

.amount-editor-button:disabled {
	opacity: .55;
	cursor: wait;
}

@media (max-width: 380px), (max-height: 720px) {
	.amount-editor-dialog {
		padding: 14px;
		border-radius: 18px;
	}
	.amount-editor-header {
		margin-bottom: 10px;
	}
	.amount-editor-product {
		font-size: 18px;
	}
	.amount-editor-display {
		min-height: 62px;
		margin-bottom: 9px;
	}
	.amount-editor-value {
		font-size: 32px;
	}
	.amount-editor-key {
		min-height: 45px;
	}
}
