/* CC Coupon Rotator — front end. Override the variables in your theme if needed. */
.ccr-coupon {
	--ccr-accent: #c8102e;
	--ccr-text: inherit;
	--ccr-bg: #f7f7f7;
	--ccr-border: #c8c8c8;
	--ccr-btn-bg: #22476f;
	--ccr-btn-text: #ffffff;
}

/* Inline: sits inside a sentence. */
.ccr-coupon.ccr-style-inline {
	display: inline;
	white-space: nowrap;
}

.ccr-coupon .ccr-code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--ccr-text);
}

.ccr-coupon .ccr-code.ccr-loading {
	opacity: 0.45;
}

.ccr-coupon .ccr-code.ccr-unavailable {
	font-family: inherit;
	font-weight: 400;
	letter-spacing: normal;
	font-style: italic;
}

.ccr-coupon.ccr-style-inline .ccr-copy,
.ccr-coupon.ccr-style-inline .ccr-reveal {
	margin-left: 0.4em;
	padding: 0.15em 0.6em;
	font-size: 0.85em;
	vertical-align: baseline;
}

/* Box: standalone block with label + copy button. */
.ccr-coupon.ccr-style-box {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.6em 0.9em;
	max-width: 100%;
	box-sizing: border-box;
	margin: 1em 0;
	padding: 1em 1.2em;
	background: var(--ccr-bg);
	border: 2px dashed var(--ccr-border);
	border-radius: 8px;
	text-align: center;
}

.ccr-coupon.ccr-style-box .ccr-label {
	flex-basis: 100%;
	font-size: 0.85em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.75;
}

.ccr-coupon.ccr-style-box .ccr-code {
	font-size: 1.5em;
	color: var(--ccr-accent);
	word-break: break-all;
}

.ccr-coupon .ccr-copy,
.ccr-coupon .ccr-reveal {
	display: inline-block;
	cursor: pointer;
	border: 0;
	border-radius: 4px;
	background: var(--ccr-btn-bg);
	color: var(--ccr-btn-text);
	font: inherit;
	font-weight: 600;
	line-height: 1.4;
	padding: 0.5em 1.1em;
	transition: opacity 0.15s ease;
}

.ccr-coupon .ccr-copy:hover,
.ccr-coupon .ccr-reveal:hover {
	opacity: 0.88;
}

.ccr-coupon .ccr-copy.ccr-copied {
	background: #4db153;
}

.ccr-coupon .ccr-reveal[disabled] {
	opacity: 0.6;
	cursor: wait;
}

.ccr-coupon .ccr-msg {
	display: block;
	flex-basis: 100%;
	margin-top: 0.4em;
	font-size: 0.9em;
	color: #b51d1c;
	white-space: normal;
}

.ccr-admin-warning {
	background: #fff3cd;
	color: #664d03;
	padding: 0.1em 0.4em;
	border-radius: 3px;
	font-size: 0.9em;
}
