/* =========================================================================
   Floating Coupon Popup - Frontend Styles
   All classes prefixed "wcfp-" to avoid theme/plugin conflicts.
   ========================================================================= */

.wcfp-widget-root {
	position: fixed;
	bottom: var( --wcfp-spacing-bottom, 20px );
	z-index: 999999;
	line-height: 0;
}

.wcfp-pos-bottom-right {
	right: var( --wcfp-spacing-right, 20px );
}

.wcfp-pos-bottom-left {
	left: var( --wcfp-spacing-left, 20px );
}

/* ---- Floating trigger ---- */
.wcfp-floating-btn {
	background: none !important;
	border: none !important;
	padding: 0 !important;
	cursor: pointer !important;
	display: inline-block !important;
	line-height: 0 !important;
	border-radius: 50% !important;
}

.wcfp-floating-btn:focus-visible {
	outline: 2px solid #2271b1 !important;
	outline-offset: 4px !important;
}

.wcfp-floating-img {
	display: block;
	width: 100px !important;
	max-width: 100px;
	height: auto;
	filter: drop-shadow( 0 6px 14px rgba( 0, 0, 0, 0.3 ) );
	animation: wcfp-zoom-pulse 1.8s ease-in-out infinite;
	transition: filter 0.2s ease;
	will-change: transform;
}

.wcfp-floating-btn:hover .wcfp-floating-img {
	filter: drop-shadow( 0 8px 18px rgba( 0, 0, 0, 0.38 ) );
}

@keyframes wcfp-zoom-pulse {
	0% { transform: scale( 1 ); }
	50% { transform: scale( 1.12 ); }
	100% { transform: scale( 1 ); }
}

@media ( prefers-reduced-motion: reduce ) {
	.wcfp-floating-img {
		animation: none;
	}
}

/* ---- Shared overlay ---- */
.wcfp-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba( 20, 20, 20, 0.65 );
	z-index: 1000000;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.wcfp-overlay.wcfp-active {
	display: flex;
	opacity: 1;
}

/* ---- Close Button ---- */
.wcfp-close-btn {
	position: absolute !important;
	top: 12px !important;
	right: 12px !important;
	width: 32px !important;
	height: 32px !important;
	min-width: 32px !important;
	min-height: 32px !important;
	max-width: 32px !important;
	max-height: 32px !important;
	border-radius: 50% !important;
	border: none !important;
	background: #f1f1f1 !important;
	color: #333333 !important;
	font-size: 20px !important;
	line-height: 32px !important;
	text-align: center !important;
	cursor: pointer !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	transition: background 0.15s ease !important;
	z-index: 2 !important;
	appearance: none !important;
	-webkit-appearance: none !important;
}

.wcfp-close-btn:hover {
	background: #e2e2e2 !important;
	color: #333333 !important;
}

/* ---- Main Coupon Popup ---- */
.wcfp-main-modal {
	position: relative;
	background: #ffffff;
	border-radius: 16px;
	max-width: 640px;
	width: 100%;
	max-height: 88vh;
	overflow-y: auto;
	box-sizing: border-box;
	padding: 26px 22px 24px;
	box-shadow: 0 20px 50px rgba( 0, 0, 0, 0.35 );
	transform: scale( 0.9 );
	opacity: 0;
	transition: transform 0.28s cubic-bezier( 0.34, 1.56, 0.64, 1 ), opacity 0.22s ease;
}

.wcfp-overlay.wcfp-active .wcfp-main-modal,
.wcfp-overlay.wcfp-active .wcfp-detail-modal {
	transform: scale( 1 );
	opacity: 1;
}

.wcfp-main-title {
	margin: 0 0 16px;
	font-size: 19px;
	font-weight: 700;
	text-align: center;
	color: #1d2327;
}

/* ---- Coupon Slider (2 cards per view, auto-sliding when more than 2) ---- */
.wcfp-coupon-slider {
	position: relative;
	padding: 0 34px;
}

.wcfp-coupon-viewport {
	overflow: hidden;
	padding: 20px 0px;
}

.wcfp-coupon-track {
	display: flex;
	transition: transform 0.4s cubic-bezier( 0.4, 0, 0.2, 1 );
}

.wcfp-coupon-card {
	flex: 0 0 calc( 50% - 6px );
	margin-right: 12px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 4px;
	background: #fff8ee !important;
	border: 1px solid #f3ddb8 !important;
	border-radius: 12px !important;
	padding: 16px 12px !important;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wcfp-card-image-wrap {
	display: block;
	width: 100%;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 6px;
}

.wcfp-card-image {
	display: block;
	width: 100%;
	height: 100px;
	object-fit: cover;
	border-radius: 10px;
}

.wcfp-coupon-card:last-child {
	margin-right: 0;
}

.wcfp-coupon-card:hover {
	transform: translateY( -3px );
	box-shadow: 0 8px 18px rgba( 217, 119, 6, 0.18 );
}

.wcfp-card-discount {
	font-size: 20px;
	font-weight: 800;
	color: #d97706;
}

.wcfp-card-title {
	font-size: 13px;
	font-weight: 700;
	color: #1d2327;
}

.wcfp-card-short {
	font-size: 12px;
	color: #757c82;
}

.wcfp-card-cta {
	margin-top: 6px;
	font-size: 11px;
	font-weight: 600;
	color: #2271b1;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* ---- Slider nav buttons ---- */
.wcfp-slider-nav {
	position: absolute !important;
	top: 50% !important;
	transform: translateY( -50% ) !important;
	width: 30px !important;
	height: 30px !important;
	min-width: 30px !important;
	min-height: 30px !important;
	border-radius: 50% !important;
	border: 1px solid #f3ddb8 !important;
	background: #ffffff !important;
	color: #d97706 !important;
	font-size: 18px !important;
	line-height: 1 !important;
	font-weight: 700 !important;
	cursor: pointer !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: 0 4px 10px rgba( 0, 0, 0, 0.15 ) !important;
	z-index: 3 !important;
	display: flex;
	align-items: center !important;
	justify-content: center !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	transition: background 0.15s ease, color 0.15s ease !important;
}

.wcfp-slider-nav:hover {
	background: #d97706 !important;
	color: #ffffff !important;
}

.wcfp-slider-prev {
	left: 0 !important;
}

.wcfp-slider-next {
	right: 0 !important;
}

/* ---- Coupon Details / Scratch Popup ---- */
.wcfp-detail-modal {
	position: relative;
	background: #ffffff;
	border-radius: 16px;
	max-width: 380px;
	width: 100%;
	box-sizing: border-box;
	padding: 26px 20px 22px;
	box-shadow: 0 20px 50px rgba( 0, 0, 0, 0.35 );
	transform: scale( 0.9 );
	opacity: 0;
	transition: transform 0.28s cubic-bezier( 0.34, 1.56, 0.64, 1 ), opacity 0.22s ease;
}

.wcfp-scratch-wrap {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	min-height: 220px;
	background: #fffaf0;
	touch-action: none;
}

.wcfp-reveal-content {
	position: absolute;
	inset: 0;
	z-index: 1;
	padding: 22px 16px;
	box-sizing: border-box;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	overflow-y: auto;
}

.wcfp-reveal-discount {
	font-size: 26px;
	font-weight: 800;
	color: #d97706;
}

.wcfp-reveal-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #1d2327;
}

.wcfp-reveal-detail {
	margin: 0;
	font-size: 13px;
	color: #646970;
	line-height: 1.5;
}

.wcfp-code-row {
	margin-top: 4px;
}

.wcfp-code-value {
	display: inline-block;
	padding: 10px 16px;
	border: 2px dashed #d97706;
	border-radius: 8px;
	background: #fff2d9;
	color: #92400e;
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}

/* ---- Copy Button ---- */
.wcfp-copy-btn {
	margin-top: 6px !important;
	padding: 10px 22px !important;
	border: none !important;
	border-radius: 8px !important;
	background: #2271b1 !important;
	color: #ffffff !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	cursor: pointer !important;
	transition: background 0.15s ease, transform 0.1s ease !important;
	min-width: 130px !important;
	height: auto !important;
	line-height: normal !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	appearance: none !important;
	-webkit-appearance: none !important;
}

.wcfp-copy-btn:hover {
	background: #135e96 !important;
	color: #ffffff !important;
}

.wcfp-copy-btn:active {
	transform: scale( 0.96 ) !important;
}

.wcfp-copy-btn.wcfp-copied {
	background: #1a7d1a !important;
	color: #ffffff !important;
}

/* ---- Scratch Canvas ---- */
.wcfp-scratch-canvas {
	position: absolute;
	inset: 0;
	z-index: 2;
	width: 100%;
	height: 100%;
	cursor: pointer;
	transition: opacity 0.35s ease;
}

.wcfp-scratch-canvas.wcfp-scratch-hidden {
	opacity: 0;
	pointer-events: none;
}

.wcfp-scratch-label {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	z-index: 3;
	font-size: 14px;
	font-weight: 700;
	color: #ffffff;
	text-shadow: 0 1px 3px rgba( 0, 0, 0, 0.4 );
	letter-spacing: 0.5px;
	pointer-events: none;
}

.wcfp-scratch-label.wcfp-scratch-hidden {
	display: none;
}

/* ---- Responsive ---- */
@media ( max-width: 480px ) {
	.wcfp-floating-img {
		max-width: 72px;
	}

	.wcfp-main-modal,
	.wcfp-detail-modal {
		padding: 20px 14px 18px;
	}

	.wcfp-coupon-slider {
		padding: 0 28px;
	}

	.wcfp-coupon-card {
		flex: 0 0 100%;
		margin-right: 0;
	}

	.wcfp-slider-nav {
		width: 26px !important;
		height: 26px !important;
		min-width: 26px !important;
		min-height: 26px !important;
		font-size: 16px !important;
	}

	.wcfp-slider-prev {
		left: -4px !important;
	}

	.wcfp-slider-next {
		right: -4px !important;
	}

	.wcfp-main-title {
		font-size: 17px;
	}
}