/* Multi Payment — split checkout fills a roomy dialog (keypad + totals always visible) */

.cdk-overlay-pane.op-mp-active {
	max-width: none !important;
	max-height: none !important;
}

.cdk-overlay-pane.op-mp-active .mat-dialog-container {
	overflow: hidden !important;
	background: rgba(15, 23, 42, 0.45) !important;
	box-shadow: none !important;
}

.cdk-overlay-pane.op-mp-active .mat-dialog-container > *:not(.op-multi-payment-root) {
	visibility: hidden !important;
	pointer-events: none !important;
}

.op-multi-payment-root {
	display: none;
	flex-direction: column;
	position: fixed;
	background: #fff;
	overflow: hidden;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	touch-action: manipulation;
	z-index: 10001;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	box-shadow: 0 16px 48px rgba(15, 23, 42, 0.28);
	min-width: 320px;
	min-height: 480px;
}

.op-mp-wrap {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	overflow: hidden;
}

/* —— Header —— */
.op-mp-header {
	flex: 0 0 auto;
	padding: 14px 18px 10px;
	border-bottom: 1px solid #e2e8f0;
	background: #fff;
}

.op-mp-header-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.op-mp-title {
	font-size: 20px;
	font-weight: 700;
	color: #1e293b;
}

.op-mp-btn-exit {
	border: 1.5px solid #94a3b8;
	background: #fff;
	color: #475569;
	border-radius: 8px;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	min-height: 42px;
	white-space: nowrap;
}

.op-mp-summary {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.op-mp-stat {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 10px 10px 8px;
	text-align: center;
}

.op-mp-stat span {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: #64748b;
	margin-bottom: 4px;
	letter-spacing: 0.04em;
}

.op-mp-stat strong {
	display: block;
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.15;
}

.op-mp-stat.op-mp-paid strong {
	color: #059669;
}

.op-mp-stat.op-mp-remain strong {
	color: #dc2626;
}

.op-mp-ready-inline {
	margin-top: 10px;
	padding: 10px 12px;
	background: #ecfdf5;
	border: 1px solid #6ee7b7;
	border-radius: 8px;
	color: #047857;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

/* —— Body —— */
.op-mp-body-split {
	flex: 1 1 auto;
	display: grid;
	grid-template-columns: minmax(260px, 42%) minmax(280px, 1fr);
	gap: 0;
	min-height: 0;
	overflow: hidden;
	align-items: stretch;
}

.op-mp-col {
	display: flex;
	flex-direction: column;
	padding: 14px 16px;
	min-height: 0;
}

.op-mp-col-left {
	border-right: 1px solid #e2e8f0;
	background: #fff;
	overflow: hidden;
}

.op-mp-col-right {
	background: #f8fafc;
	overflow-y: auto;
	overflow-x: hidden;
	align-items: center;
	justify-content: flex-start;
	-webkit-overflow-scrolling: touch;
}

.op-mp-keypad-panel {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	max-width: 340px;
	flex: 0 0 auto;
	overflow: visible;
}

.op-mp-section-methods {
	flex: 0 0 auto;
	margin-bottom: 12px;
}

.op-mp-section-grow {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 72px;
	max-height: 42%;
	overflow: hidden;
}

.op-mp-label {
	font-size: 11px;
	font-weight: 700;
	color: #64748b;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.op-mp-pill {
	display: inline-block;
	padding: 3px 10px;
	background: #dbeafe;
	color: #1d4ed8;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	margin-left: 6px;
	text-transform: none;
}

.op-mp-methods {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.op-mp-method {
	border: 2px solid #e2e8f0;
	background: #fff;
	color: #334155;
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	min-height: 44px;
	line-height: 1.2;
	white-space: normal;
	text-align: center;
}

.op-mp-method.is-active {
	border-color: #2563eb;
	background: #2563eb;
	color: #fff;
}

.op-mp-method.is-needs-customer {
	border-color: #fcd34d;
	background: #fffbeb;
	color: #92400e;
}

.op-mp-list {
	flex: 1 1 auto;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow-x: hidden;
	overflow-y: auto;
	min-height: 64px;
	max-height: 100%;
	-webkit-overflow-scrolling: touch;
}

.op-mp-line {
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 10px;
	padding: 11px 12px;
	border-bottom: 1px solid #e2e8f0;
}

.op-mp-line-name {
	font-weight: 600;
	font-size: 14px;
}

.op-mp-line-amt {
	font-weight: 700;
	color: #059669;
	font-size: 16px;
}

.op-mp-remove {
	border: none;
	background: #fee2e2;
	color: #b91c1c;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	font-size: 18px;
	cursor: pointer;
	flex-shrink: 0;
}

.op-mp-empty {
	padding: 18px 12px;
	text-align: center;
	color: #94a3b8;
	font-size: 14px;
}

.op-mp-warn {
	flex: 0 0 auto;
	background: #fef3c7;
	border: 1px solid #fbbf24;
	color: #92400e;
	padding: 10px;
	border-radius: 8px;
	font-size: 12px;
	line-height: 1.4;
	margin-bottom: 8px;
}

.op-mp-amount-section {
	flex: 0 0 auto;
	margin-bottom: 10px;
}

.op-mp-amount-display {
	background: #fff;
	border: 2px solid #2563eb;
	border-radius: 10px;
	padding: 12px 16px;
	font-size: 34px;
	font-weight: 700;
	text-align: right;
	min-height: 56px;
	line-height: 1.2;
}

/* Keypad — fixed height so rows are never clipped */
.op-mp-keypad-zone {
	flex: 0 0 auto;
	width: 100%;
	margin-top: 6px;
}

.op-mp-numpad {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(4, minmax(52px, 1fr));
	gap: 10px;
	width: 100%;
	min-height: 248px;
	flex-shrink: 0;
}

.op-mp-key {
	border: 1px solid #cbd5e1;
	background: #fff;
	border-radius: 10px;
	font-size: 24px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0;
	margin: 0;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.op-mp-key:active {
	background: #e2e8f0;
}

.op-mp-key-clear {
	background: #fff7ed;
	color: #c2410c;
	font-size: 18px;
	font-weight: 800;
}

.op-mp-key-del {
	background: #fef2f2;
	color: #b91c1c;
	font-size: 22px;
	font-weight: 400;
}

/* —— Footer —— */
.op-mp-footer {
	flex: 0 0 auto;
	padding: 12px 18px 16px;
	border-top: 2px solid #e2e8f0;
	background: #fff;
}

.op-mp-actions {
	display: grid;
	grid-template-columns: 1fr 1.6fr;
	gap: 12px;
	margin-bottom: 6px;
}

.op-mp-btn {
	border: none;
	border-radius: 10px;
	padding: 0 16px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	min-height: 52px;
}

.op-mp-btn-primary {
	background: #2563eb;
	color: #fff;
}

.op-mp-btn-ghost {
	background: #fff;
	color: #2563eb;
	border: 2px solid #2563eb;
}

.op-mp-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.op-mp-btn-clear {
	width: 100%;
	background: transparent;
	color: #64748b;
	font-size: 13px;
	padding: 8px;
	border: none;
	cursor: pointer;
	min-height: 32px;
}

.op-mp-btn-pay {
	width: 100%;
	background: #059669;
	color: #fff;
	font-size: 19px;
	font-weight: 700;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	min-height: 56px;
	box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

/* —— Confirm dialog (Use single payment) —— */
.op-mp-confirm-overlay {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.18s ease;
}

.op-mp-confirm-overlay.is-visible {
	opacity: 1;
}

.op-mp-confirm-card {
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
	padding: 28px 28px 24px;
	text-align: center;
	transform: translateY(12px) scale(0.97);
	transition: transform 0.2s ease;
	border: 1px solid #e2e8f0;
}

.op-mp-confirm-overlay.is-visible .op-mp-confirm-card {
	transform: translateY(0) scale(1);
}

.op-mp-confirm-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
	color: #b45309;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.op-mp-confirm-title {
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
}

.op-mp-confirm-message {
	margin: 0 0 24px;
	font-size: 15px;
	line-height: 1.55;
	color: #475569;
}

.op-mp-confirm-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.op-mp-confirm-btn {
	border: none;
	border-radius: 10px;
	padding: 14px 16px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	min-height: 48px;
	transition: background 0.15s ease, transform 0.1s ease;
}

.op-mp-confirm-btn:active {
	transform: scale(0.98);
}

.op-mp-confirm-btn--ghost {
	background: #f1f5f9;
	color: #334155;
	border: 1px solid #e2e8f0;
}

.op-mp-confirm-btn--ghost:hover,
.op-mp-confirm-btn--ghost:focus {
	background: #e2e8f0;
}

.op-mp-confirm-btn--primary {
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
	color: #fff;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.op-mp-confirm-btn--primary:hover,
.op-mp-confirm-btn--primary:focus {
	background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

@media (max-width: 480px) {
	.op-mp-confirm-actions {
		grid-template-columns: 1fr;
	}

	.op-mp-confirm-btn--primary {
		order: -1;
	}
}

/* Narrow screens — stack columns; keep keypad full width */
@media (max-width: 720px) {
	.op-multi-payment-root {
		min-width: 0;
		border-radius: 10px;
	}

	.op-mp-body-split {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
		overflow-y: auto;
	}

	.op-mp-col-left {
		border-right: none;
		border-bottom: 1px solid #e2e8f0;
		max-height: none;
	}

	.op-mp-section-grow {
		max-height: 160px;
	}

	.op-mp-keypad-panel {
		max-width: none;
	}

	.op-mp-stat strong {
		font-size: 18px;
	}
}
