/* Category Minimum Order Amount - cart and checkout notices */

.cp-cmo {
	box-sizing: border-box;
	margin: 0 0 20px;
	padding: 16px 18px;
	border: 2px solid;
	border-radius: 10px;
	font-size: 15px;
	line-height: 1.45;
}

.cp-cmo *,
.cp-cmo *::before,
.cp-cmo *::after {
	box-sizing: border-box;
}

.cp-cmo p {
	margin: 0;
	padding: 0;
}

.cp-cmo__head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.cp-cmo__icon {
	flex: 0 0 auto;
	display: inline-flex;
	line-height: 0;
}

.cp-cmo__body {
	min-width: 0;
}

.cp-cmo__title {
	font-size: 1.15em;
	font-weight: 700;
}

.cp-cmo__text {
	font-size: 0.95em;
}

.cp-cmo__note {
	margin-top: 10px;
	font-size: 0.85em;
	opacity: 0.85;
}

/* ---- Cart: amber ---- */

.cp-cmo--cart {
	background: #fffbeb;
	border-color: #f59e0b;
	color: #b45309;
}

.cp-cmo--cart .cp-cmo__title {
	color: #92400e;
}

.cp-cmo__bar {
	display: block;
	width: 100%;
	height: 10px;
	margin: 14px 0 6px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	box-shadow: inset 0 0 0 1px #fcd34d;
	overflow: hidden;
	-webkit-appearance: none;
	appearance: none;
}

.cp-cmo__bar::-webkit-progress-bar {
	background: #fff;
	border-radius: 999px;
}

.cp-cmo__bar::-webkit-progress-value {
	background: #f59e0b;
	border-radius: 999px;
}

.cp-cmo__bar::-moz-progress-bar {
	background: #f59e0b;
	border-radius: 999px;
}

.cp-cmo__scale {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 0.8em;
	font-weight: 700;
}

/* ---- Checkout: red ---- */

.cp-cmo--checkout {
	background: #fef2f2;
	border-color: #ef4444;
	color: #b91c1c;
}

.cp-cmo--checkout .cp-cmo__title {
	color: #991b1b;
}

.cp-cmo__figures {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin: 14px 0 10px;
	background: #fee2e2;
	border-radius: 8px;
	overflow: hidden;
}

.cp-cmo__figures > div {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 14px;
}

.cp-cmo__figures > div + div {
	border-left: 2px solid #fef2f2;
}

.cp-cmo__label {
	font-size: 0.78em;
	font-weight: 700;
	color: #991b1b;
}

.cp-cmo__value {
	font-size: 1.35em;
	font-weight: 700;
}

.cp-cmo__value--current {
	color: #dc2626;
}

.cp-cmo__value--required {
	color: #166534;
}

.cp-cmo__remaining {
	font-size: 0.85em;
}

.cp-cmo__link {
	display: block;
	margin-top: 14px;
	padding: 11px 14px;
	border: 2px solid #1c9c6f;
	border-radius: 8px;
	background: #fff;
	color: #1c9c6f;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
}

.cp-cmo__link:hover,
.cp-cmo__link:focus {
	background: #1c9c6f;
	color: #fff;
}

/* ---- Disabled buttons (classic) ---- */

.cp-cmo-disabled,
.cp-cmo-disabled:hover,
.cp-cmo-disabled:focus {
	opacity: 0.45;
	cursor: not-allowed;
	pointer-events: none;
}

/* ---- Blocks: soften the submit buttons while below the minimum (UI only,
       the order is refused server-side regardless) ---- */

body.cp-cmo-blocked .wc-block-cart__submit-button,
body.cp-cmo-blocked .wc-block-components-checkout-place-order-button {
	opacity: 0.45;
	cursor: not-allowed;
	pointer-events: none;
}

@media (max-width: 480px) {
	.cp-cmo {
		padding: 14px;
	}
}
