/**
 * WP Code Plug – Static Coupon Code Widget
 * Version 2.0.1
 */

.static-coupon-code-widget {
	max-width: 100%;
}

.static-coupon-code-widget__inner {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	max-width: 100%;
}

.static-coupon-code-widget[data-stack="yes"] .static-coupon-code-widget__inner {
	flex-direction: column;
	align-items: center;
}

.static-coupon-code-before,
.static-coupon-code-after,
.static-coupon-code {
	max-width: 100%;
	overflow-wrap: anywhere;
}

.static-coupon-code {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: inherit;
	font-style: normal;
	line-height: inherit;
	white-space: normal;
}

/*
 * Version 2.0.0 rendered clickable codes as native buttons. Keep a
 * defensive reset for cached markup, while Version 2.0.1 uses a span so
 * broad theme and Elementor button rules cannot enlarge the coupon code.
 */
button.static-coupon-code {
	-webkit-appearance: none !important;
	appearance: none !important;
	display: inline-flex !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: max-content !important;
	min-height: 0 !important;
	margin: 0 !important;
	color: inherit;
	background-image: none !important;
	box-shadow: none !important;
	font: inherit;
	text-transform: none;
}

.static-coupon-code--interactive {
	box-sizing: border-box;
	width: auto;
	min-width: 0;
	max-width: max-content;
	vertical-align: middle;
	-webkit-tap-highlight-color: transparent;
}

.static-coupon-code--interactive,
.copy-code-btn {
	cursor: pointer;
	touch-action: manipulation;
}

.copy-code-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	text-align: center;
	text-decoration: none;
	line-height: 1.2;
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.2s ease;
}

.static-coupon-code--interactive:focus-visible,
.copy-code-btn:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

.static-coupon-code--interactive[aria-busy="true"],
.copy-code-btn[aria-busy="true"] {
	cursor: wait;
}

.wpcp-coupon-copy-status {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.wpcp-coupon-editor-notice {
	padding: 12px;
	border: 1px dashed #9ca3af;
	background: #f8fafc;
	color: #374151;
	font-size: 14px;
	text-align: center;
}

@media (max-width: 480px) {
	.static-coupon-code-widget__inner {
		row-gap: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.copy-code-btn {
		transition: none;
	}
}
