
/**
 * Frontend Customize Button Styles
 */
.mpd-customize-button-container {
	margin: 20px 0;
	position: relative;
}

.mpd-customize-button-wrapper {
	display: inline-block;
	position: relative;
}

.mpd-customize-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: none;
	outline: none;
	cursor: pointer;
	font-family: inherit;
	text-decoration: none;
	transition: all .3s ease;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
	position: relative;
	overflow: hidden;
	user-select: none;
	/* Default fallback styles */
	width: 200px;
	height: 50px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border-radius: 25px;
	font-size: 16px;
	font-weight: 500;
}

.mpd-customize-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
}

.mpd-customize-button:active {
	transform: translateY(-1px);
	transition: transform .1s ease;
}

.mpd-customize-button:disabled {
	opacity: .7;
	cursor: not-allowed;
	transform: none !important;
}

/* Shimmer effect on hover */
.mpd-customize-button::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
	transition: left .5s ease;
}

.mpd-customize-button:hover::before {
	left: 100%;
}

/* Button text and loading states */
.mpd-customize-button .button-text {
	position: relative;
	z-index: 1;
	transition: opacity .3s ease;
}

.mpd-customize-button .button-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: .9em;
	z-index: 2;
}

.mpd-customize-button.loading .button-text {
	opacity: 0;
}

.mpd-customize-button.loading .button-loading {
	display: flex !important;
}

/* Loading spinner animation */
.loading-spinner {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	
	to {
		transform: rotate(360deg);
	}
}

/* Info text below button */
.mpd-customize-info {
	margin-top: 10px;
	text-align: center;
	opacity: .8;
}

.mpd-customize-info small {
	font-size: 12px;
	color: #666;
	line-height: 1.4;
}

/* Responsive design */
@media (max-width: 768px) {
	.mpd-customize-button {
		min-width: 160px;
		min-height: 44px;
	}
	
	.mpd-customize-button-container {
		text-align: center;
		margin: 15px 0;
	}
}

@media (max-width: 480px) {
	.mpd-customize-button {
		width: 100% !important;
		max-width: 300px;
		min-height: 48px;
	}
}

/* Integration with common themes */
.woocommerce div.product form.cart .mpd-customize-button-container {
	margin: 20px 0;
}

/* Storefront theme compatibility */
.woocommerce.storefront div.product .summary .mpd-customize-button-container {
	margin: 1.5em 0;
}

/* Astra theme compatibility */
.ast-woocommerce-container .mpd-customize-button-container {
	margin: 1.5em 0;
}

/* OceanWP theme compatibility */
.oceanwp-woocommerce .mpd-customize-button-container {
	margin: 20px 0;
}

/* Focus styles for accessibility */
.mpd-customize-button:focus {
	outline: 2px solid rgba(66, 153, 225, .5);
	outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.mpd-customize-button {
		border: 2px solid;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.mpd-customize-button, .mpd-customize-button::before, .loading-spinner {
		transition: none;
		animation: none;
	}
}

/* Print styles */
@media print {
	.mpd-customize-button-container {
		display: none;
	}
}
