/**
 * Minimum Order Notice - Frontend Styles
 * Version: 1.1.0
 */

/* Wrapper - always present for JS to find */
.mo-notice-wrap {
	width: 100%;
}

/* Main notice card */
.mo-notice {
	background: var(--mo-bg, #f6f1f2);
	color: var(--mo-text, #111);
	border-radius: var(--mo-radius, 16px);
	padding: 14px 16px;
	box-shadow: var(--mo-shadow, 0 10px 25px rgba(0,0,0,.08));
	display: grid;
	gap: 10px;
	margin: 12px 0;
}

/* Header row */
.mo-notice__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

/* Pill/badge */
.mo-notice__pill {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	background: var(--mo-accent, #770335);
	color: #fff;
	border-radius: 999px;
	padding: 6px 10px;
	font-weight: 800;
	font-size: 13px;
	letter-spacing: .2px;
}

/* Minimum amount display */
.mo-notice__min {
	color: var(--mo-muted, #6b6b6b);
	font-weight: 700;
	font-size: 13px;
}

/* Message text */
.mo-notice__text {
	font-size: 18px;
	line-height: 1.25;
	font-weight: 650;
}

.mo-notice__text strong {
	font-weight: 900;
}

/* Progress bar */
.mo-notice__bar {
	height: 10px;
	background: rgba(0,0,0,.10);
	border-radius: 999px;
	overflow: hidden;
}

.mo-notice__bar span {
	display: block;
	height: 100%;
	background: var(--mo-accent, #770335);
	width: 0%;
	transition: width 0.4s ease-out;
}

/* Met state - subtle green tint */
.mo-notice[data-state="met"] {
	background: #f2f7f2;
}

/* CTA link */
.mo-notice__cta {
	margin-top: 2px;
}

.mo-notice__ctaLink {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--mo-accent, #770335);
	font-weight: 800;
	text-decoration: none;
}

.mo-notice__ctaLink:hover {
	text-decoration: underline;
}

/* Compact variant */
.mo-notice--compact {
	padding: 10px 12px;
	border-radius: 14px;
}

.mo-notice--compact .mo-notice__text {
	font-size: 16px;
}

/* ============================================
   WooCommerce Integration Styles
   ============================================ */

/* Soften WooCommerce error notices */
body.mon-soften-wc-error .woocommerce-error {
	border-color: rgba(119,3,53,.35) !important;
	background: rgba(246,241,242,.75) !important;
	color: #111 !important;
}

body.mon-soften-wc-error .woocommerce-error::before {
	color: var(--mo-accent, #770335) !important;
}

body.mon-soften-wc-error .woocommerce-error a {
	color: var(--mo-accent, #770335) !important;
}

/* Checkout hint message */
.mo-checkout-hint {
	background: rgba(246,241,242,.9);
	border: 1px solid rgba(119,3,53,.25);
	border-radius: 12px;
	padding: 10px 12px;
	margin: 10px 0 12px;
	color: var(--mo-text, #111);
	font-weight: 700;
	font-size: 14px;
}

/* Disabled checkout buttons */
a.checkout-button.is-disabled,
button.checkout-button.is-disabled,
.wc-proceed-to-checkout a.is-disabled,
#place_order.is-disabled,
#place_order:disabled {
	opacity: .55 !important;
	pointer-events: none !important;
	cursor: not-allowed !important;
	transition: opacity 0.15s ease;
}

/* Pending state - while waiting for server response */
a.checkout-button.mon-pending,
button.checkout-button.mon-pending,
.wc-proceed-to-checkout a.mon-pending,
#place_order.mon-pending {
	opacity: .55 !important;
	pointer-events: none !important;
	cursor: wait !important;
}

/* Smooth transition when becoming enabled */
a.checkout-button,
button.checkout-button,
.wc-proceed-to-checkout a,
#place_order {
	transition: opacity 0.15s ease, background-color 0.15s ease;
}

/* Ensure disabled state is visually clear */
#place_order.is-disabled,
#place_order:disabled {
	background-color: #ccc !important;
	border-color: #bbb !important;
	color: #666 !important;
}

/* Express checkout buttons when disabled */
.gpay-button[style*="pointer-events: none"],
.apple-pay-button[style*="pointer-events: none"],
#wc-stripe-payment-request-button[style*="pointer-events: none"] {
	filter: grayscale(50%);
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 480px) {
	.mo-notice {
		padding: 12px 14px;
	}
	
	.mo-notice__header {
		flex-wrap: wrap;
	}
	
	.mo-notice__text {
		font-size: 16px;
	}
	
	.mo-notice__pill {
		font-size: 12px;
		padding: 5px 8px;
	}
}
