/* IdeaMo Minimum Order Rules — Frontend Styles (fully namespaced) */

.ideamo-panel {
	--ideamo-color-primary: #6d5ef8;
	--ideamo-color-primary-dark: #4b3fd1;
	--ideamo-color-success: #16a34a;
	--ideamo-color-success-bg: #f0fdf4;
	--ideamo-color-warning: #d97706;
	--ideamo-color-warning-bg: #fffbeb;
	--ideamo-color-border: #eceef3;
	--ideamo-color-text: #1f2430;
	--ideamo-color-muted: #6b7280;
	--ideamo-radius: 14px;

	/* Some themes render the "before cart" hook outside the page's normal
	   boxed content container, making this panel stretch edge-to-edge.
	   Constrain it to match the site's usual content width instead.
	   Override --ideamo-content-max-width in your theme/child-theme CSS
	   if your site's container uses a different width. */
	--ideamo-content-max-width: 1200px;
	--ideamo-content-padding: 20px;

	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	max-width: var( --ideamo-content-max-width );
	margin: 20px auto;
	padding-left: var( --ideamo-content-padding );
	padding-right: var( --ideamo-content-padding );
	box-sizing: border-box;
	font-family: inherit;
}

.ideamo-notice {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 16px 18px;
	border-radius: var(--ideamo-radius);
	border: 1px solid var(--ideamo-color-border);
	background: #fff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.ideamo-notice.ideamo-state-warning {
	background: var(--ideamo-color-warning-bg);
	border-color: #fde7c0;
}

.ideamo-notice.ideamo-state-success {
	background: var(--ideamo-color-success-bg);
	border-color: #c9f0d8;
}

.ideamo-notice-icon {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	color: #fff;
	background: var(--ideamo-color-warning);
}

.ideamo-state-success .ideamo-notice-icon {
	background: var(--ideamo-color-success);
}

.ideamo-notice-body {
	flex: 1 1 auto;
	min-width: 0;
}

.ideamo-notice-title {
	font-weight: 600;
	font-size: 14px;
	color: var(--ideamo-color-text);
	margin-bottom: 2px;
}

.ideamo-notice-message {
	font-size: 13.5px;
	color: var(--ideamo-color-muted);
	line-height: 1.5;
}

.ideamo-notice-message .woocommerce-Price-amount {
	font-weight: 600;
	color: var(--ideamo-color-text);
}

.ideamo-progress-wrap {
	margin-top: 10px;
}

.ideamo-progress-label {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: var(--ideamo-color-muted);
	margin-bottom: 6px;
}

.ideamo-progress-track {
	width: 100%;
	height: 8px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.ideamo-progress-fill {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--ideamo-color-primary), var(--ideamo-color-primary-dark));
	transition: width 0.4s ease;
	max-width: 100%;
}

.ideamo-state-success .ideamo-progress-fill {
	background: linear-gradient(90deg, #22c55e, var(--ideamo-color-success));
}

.ideamo-cta-link {
	display: inline-block;
	margin-top: 10px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ideamo-color-primary-dark);
	text-decoration: none;
}

.ideamo-cta-link:hover {
	text-decoration: underline;
}

.ideamo-minicart-panel {
	margin: 10px 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ideamo-minicart-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 12.5px;
	color: #92620a;
	background: #fffbeb;
	border: 1px solid #fde7c0;
	border-radius: 10px;
	padding: 8px 10px;
}

/* Add-to-cart minimum purchase popup (category archive pages). */

body.ideamo-popup-open {
	overflow: hidden;
}

.ideamo-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(17, 20, 29, 0.55);
}

.ideamo-popup {
	--ideamo-color-primary: #6d5ef8;
	--ideamo-color-primary-dark: #4b3fd1;
	--ideamo-color-warning: #d97706;
	--ideamo-color-text: #1f2430;
	--ideamo-color-muted: #6b7280;

	position: relative;
	width: 100%;
	max-width: 440px;
	background: #fff;
	border-radius: 16px;
	padding: 32px 28px 28px;
	text-align: center;
	box-shadow: 0 20px 50px rgba(16, 24, 40, 0.25);
	font-family: inherit;
	animation: ideamo-popup-in 0.2s ease;
}

@keyframes ideamo-popup-in {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.ideamo-popup-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 30px;
	height: 30px;
	border: 0;
	background: transparent;
	font-size: 20px;
	line-height: 1;
	color: var(--ideamo-color-muted);
	cursor: pointer;
	border-radius: 50%;
	transition: background 0.15s ease, color 0.15s ease;
}

.ideamo-popup-close:hover {
	background: #f3f4f6;
	color: var(--ideamo-color-text);
}

.ideamo-popup-icon {
	width: 48px;
	height: 48px;
	margin: 0 auto 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #fffbeb;
	color: var(--ideamo-color-warning);
	font-size: 22px;
}

.ideamo-popup-title {
	margin: 0 0 10px;
	font-size: 18px;
	font-weight: 700;
	color: var(--ideamo-color-text);
}

.ideamo-popup-message {
	margin: 0 0 22px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--ideamo-color-muted);
}

.ideamo-popup-message .woocommerce-Price-amount {
	font-weight: 600;
	color: var(--ideamo-color-text);
}

.ideamo-popup-continue {
	display: inline-block;
	width: 100%;
	padding: 12px 20px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--ideamo-color-primary), var(--ideamo-color-primary-dark));
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.ideamo-popup-continue:hover {
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(123, 111, 251, 0.35);
}

@media (max-width: 480px) {
	.ideamo-popup {
		padding: 26px 20px 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ideamo-progress-fill {
		transition: none;
	}
}

@media (max-width: 600px) {
	.ideamo-notice {
		flex-direction: row;
		padding: 14px;
	}

	.ideamo-notice-title {
		font-size: 13.5px;
	}

	.ideamo-notice-message {
		font-size: 13px;
	}
}
