/**
 * myPOS — modale paiement CB TakePOS (tpl/takepos_cb.tpl.php).
 */

.mypos-is-hidden {
	display: none !important;
}

.myposmodal-takepos {
	display: flex;
	position: fixed;
	z-index: 99999;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
	align-items: center;
	justify-content: center;
}

.myposmodal-takepos__dialog {
	background: #fff;
	border-radius: 10px;
	padding: 2em;
	min-width: 320px;
	max-width: 90vw;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
	position: relative;
}

.myposmodal-takepos__header-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.5em;
}

.myposmodal-takepos__title {
	color: #615fb5;
	margin: 0;
	flex: 1 1 auto;
	min-width: 200px;
	font-size: 1.25rem;
}

.myposmodal-takepos__terminal-wrap {
	flex: 0 1 auto;
	text-align: right;
}

.myposmodal-takepos__terminal-label {
	display: block;
	font-size: 0.85em;
	color: #4b5563;
	margin-bottom: 0.35em;
}

.myposmodal-takepos__terminal-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	justify-content: flex-end;
	align-items: center;
}

.myposmodal-takepos__terminal-select {
	min-width: 12rem;
	padding: 0.45em 0.6em;
	font-size: 0.95em;
	border: 1px solid #9ca3af;
	border-radius: 6px;
}

.myposmodal-takepos__terminal-select:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.myposmodal-takepos__terminal-confirm {
	background: #615fb5;
	color: #fff;
	border: 1px solid #4f4d9e;
	border-radius: 6px;
	font-size: 0.95em;
	padding: 0.5em 1.1em;
	cursor: pointer;
	white-space: nowrap;
}

.myposmodal-takepos__terminal-confirm:disabled {
	opacity: 0.6;
	cursor: wait;
}

.myposmodal-takepos__hint {
	color: #7f7f7f;
	text-align: right;
	margin-top: 0;
}

.myposmodal-takepos__amount-row {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	align-items: stretch;
}

.myposmodal-takepos__card-icon {
	flex: 1 1 120px;
	min-width: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 4rem;
	color: #688fd7;
}

.myposmodal-takepos__amount-box {
	flex: 1 1 180px;
	min-width: 180px;
	border: 2px solid #688fd7;
	border-radius: 12px;
	padding: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.myposmodal-takepos__amount-label {
	margin: 0;
	font-size: 16px;
	text-decoration: underline;
}

.myposmodal-takepos__amount-value {
	margin: 0;
	font-size: 42px;
	font-weight: bold;
	text-align: center;
}

.myposmodal-takepos__msg {
	min-height: 1.2em;
	color: #555;
	margin-bottom: 0.5em;
}

.myposmodal-takepos__msg--error {
	color: #b91c1c;
}

.myposmodal-takepos__msg--ok {
	color: #15803d;
}

.myposmodal-takepos__payment-id {
	margin: 0 0 0.75em;
	font-size: 0.9em;
	color: #374151;
	line-height: 1.4;
}

.myposmodal-takepos__payment-id-label {
	color: #6b7280;
}

.myposmodal-takepos__payment-id-value {
	font-family: ui-monospace, Consolas, monospace;
	font-weight: 600;
	word-break: break-all;
}

.myposmodal-takepos__error {
	margin-top: 0.5em;
	padding: 1em;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	color: #991b1b;
	max-height: 220px;
	overflow: auto;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: 0.95em;
	line-height: 1.4;
}

.myposmodal-takepos__warning {
	margin-top: 0.5em;
	padding: 1em;
	background: #fffbeb;
	border: 1px solid #fcd34d;
	border-radius: 8px;
	color: #92400e;
	max-height: 220px;
	overflow: auto;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: 0.95em;
	line-height: 1.4;
}

.myposmodal-takepos__actions {
	display: flex;
	gap: 1em;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 1.5em;
}

.myposmodal-takepos__btn {
	border-radius: 8px;
	font-size: 1.25em;
	padding: 0.9em 2.6em;
	min-width: 180px;
	cursor: pointer;
}

.myposmodal-takepos__btn--cancel {
	background: #6b7280;
	color: #fff;
	border: 1px solid #4b5563;
}

.myposmodal-takepos__btn--cancel.is-loading {
	opacity: 0.6;
	cursor: wait;
}

.myposmodal-takepos__btn--finalize {
	background: #2563eb;
	color: #fff;
	border: 1px solid #1d4ed8;
	min-width: 220px;
}
