/**
 * Coupon Display – Frontend styles
 * Attractive coupon cards with responsive grid
 */

/* ---- Wrapper & Grid ---- */
.cdp-coupons-wrapper {
	display: grid;
	gap: 1.25rem;
	margin: 1.5rem 0;
	width: 100%;
	box-sizing: border-box;
}

.cdp-coupons-wrapper.cdp-cols-1 {
	grid-template-columns: 1fr;
	max-width: 420px;
}

.cdp-coupons-wrapper.cdp-cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.cdp-coupons-wrapper.cdp-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.cdp-coupons-wrapper.cdp-cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
	.cdp-coupons-wrapper.cdp-cols-3,
	.cdp-coupons-wrapper.cdp-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 576px) {
	.cdp-coupons-wrapper.cdp-cols-2,
	.cdp-coupons-wrapper.cdp-cols-3,
	.cdp-coupons-wrapper.cdp-cols-4 {
		grid-template-columns: 1fr;
	}
	.cdp-coupons-wrapper.cdp-cols-1 {
		max-width: none;
	}
}

/* ---- Base coupon card ---- */
.cdp-coupon {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cdp-coupon:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.cdp-coupon-inner {
	position: relative;
	padding: 1.75rem 1.5rem;
	background: #fff;
	border: 2px dashed #e0e0e0;
	border-radius: 12px;
	min-height: 140px;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	font-size: 2.125rem; /* 2x for visibility and impact */
}

/* ---- Style: Default ---- */
.cdp-style-default .cdp-coupon-inner {
	border-color: #3b82f6;
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.cdp-style-default .cdp-coupon-discount {
	color: #1e40af;
	font-weight: 700;
	font-size: 3.5rem;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.cdp-style-default .cdp-coupon-code-wrap {
	background: #1e3a8a;
	color: #fff;
	border-radius: 8px;
	padding: 0.75rem 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-top: 0.25rem;
}

.cdp-style-default .cdp-coupon-code {
	background: transparent;
	color: #93c5fd;
	font-size: 2.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	border: none;
	padding: 0;
}

.cdp-style-default .cdp-copy-btn {
	background: #fff;
	color: #1e40af;
	border: none;
	padding: 0.55rem 1rem;
	border-radius: 6px;
	font-weight: 600;
	font-size: 2.1rem;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.cdp-style-default .cdp-copy-btn:hover {
	background: #eff6ff;
	color: #1d4ed8;
}

.cdp-style-default .cdp-coupon-cta-wrap,
.cdp-style-default .cdp-coupon-details-wrap {
	margin-top: 0.35rem;
}
.cdp-style-default .cdp-cta-btn,
.cdp-style-default .cdp-details-btn {
	background: #1e3a8a;
	color: #fff;
	border: none;
	padding: 0.7rem 1.4rem;
	border-radius: 8px;
	font-weight: 600;
	font-size: 2.2rem;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}
.cdp-style-default .cdp-cta-btn:hover,
.cdp-style-default .cdp-details-btn:hover {
	background: #1e40af;
	color: #fff;
}

/* ---- Style: Minimal ---- */
.cdp-style-minimal .cdp-coupon-inner {
	border-color: #d1d5db;
	background: #fff;
	border-style: solid;
	border-width: 1px;
}

.cdp-style-minimal .cdp-coupon-discount {
	color: #374151;
	font-weight: 700;
	font-size: 3.3rem;
	line-height: 1.2;
}

.cdp-style-minimal .cdp-coupon-code-wrap {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 0.5rem 0.75rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.cdp-style-minimal .cdp-coupon-code {
	background: transparent;
	color: #111827;
	font-size: 2.5rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	border: none;
	padding: 0;
}

.cdp-style-minimal .cdp-copy-btn {
	background: #111827;
	color: #fff;
	border: none;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	font-weight: 600;
	font-size: 2rem;
	cursor: pointer;
	transition: opacity 0.2s;
}

.cdp-style-minimal .cdp-copy-btn:hover {
	opacity: 0.9;
}

.cdp-style-minimal .cdp-coupon-cta-wrap,
.cdp-style-minimal .cdp-coupon-details-wrap {
	margin-top: 0.25rem;
}
.cdp-style-minimal .cdp-cta-btn,
.cdp-style-minimal .cdp-details-btn {
	background: #111827;
	color: #fff;
	border: none;
	padding: 0.65rem 1.25rem;
	border-radius: 6px;
	font-weight: 600;
	font-size: 2.1rem;
	cursor: pointer;
	transition: opacity 0.2s;
}
.cdp-style-minimal .cdp-cta-btn:hover,
.cdp-style-minimal .cdp-details-btn:hover {
	opacity: 0.9;
}

/* ---- Style: Bold ---- */
.cdp-style-bold .cdp-coupon-inner {
	border: none;
	background: linear-gradient(145deg, #7c3aed 0%, #5b21b6 100%);
	color: #fff;
}

.cdp-style-bold .cdp-coupon-discount {
	color: #fbbf24;
	font-weight: 800;
	font-size: 3.7rem;
	line-height: 1.2;
	text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.cdp-style-bold .cdp-coupon-title,
.cdp-style-bold .cdp-coupon-desc {
	color: rgba(255,255,255,0.95);
}

.cdp-style-bold .cdp-coupon-desc p {
	color: inherit;
}

.cdp-style-bold .cdp-coupon-code-wrap {
	background: rgba(0,0,0,0.25);
	border-radius: 8px;
	padding: 0.65rem 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.cdp-style-bold .cdp-coupon-code {
	background: transparent;
	color: #fbbf24;
	font-size: 2.8rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	border: none;
	padding: 0;
}

.cdp-style-bold .cdp-copy-btn {
	background: #fbbf24;
	color: #1f2937;
	border: none;
	padding: 0.65rem 1.35rem;
	border-radius: 6px;
	font-weight: 700;
	font-size: 2.1rem;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.15s;
}

.cdp-style-bold .cdp-copy-btn:hover {
	transform: scale(1.02);
	box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.cdp-style-bold .cdp-coupon-cta-wrap,
.cdp-style-bold .cdp-coupon-details-wrap {
	margin-top: 0.35rem;
}
.cdp-style-bold .cdp-cta-btn,
.cdp-style-bold .cdp-details-btn {
	background: #fbbf24;
	color: #1f2937;
	border: none;
	padding: 0.7rem 1.4rem;
	border-radius: 8px;
	font-weight: 700;
	font-size: 2.2rem;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.15s;
}
.cdp-style-bold .cdp-cta-btn:hover,
.cdp-style-bold .cdp-details-btn:hover {
	transform: scale(1.02);
	box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.cdp-style-bold .cdp-coupon-expiry {
	color: rgba(255,255,255,0.8);
	font-size: 2rem;
}

/* ---- Shared typography ---- */
.cdp-coupon-title {
	font-weight: 600;
	font-size: 2.4rem;
	color: #1f2937;
	line-height: 1.3;
}

.cdp-coupon-desc {
	font-size: 2.1rem;
	color: #6b7280;
	line-height: 1.5;
}

.cdp-coupon-desc p:last-child {
	margin-bottom: 0;
}

.cdp-coupon-expiry {
	font-size: 1.9rem;
	color: #9ca3af;
	margin-top: auto;
	padding-top: 0.25rem;
}

/* ---- See Details: expanded rules panel ---- */
.cdp-coupon-details {
	margin-top: 0.75rem;
	padding: 1.15rem 1.25rem;
	border-radius: 8px;
	font-size: 2.1rem;
	line-height: 1.55;
	border: 1px solid rgba(0, 0, 0, 0.08);
	background: rgba(255, 255, 255, 0.6);
}
.cdp-coupon-details p {
	margin: 0 0 0.5rem;
}
.cdp-coupon-details p:last-child {
	margin-bottom: 0;
}
.cdp-style-default .cdp-coupon-details {
	background: rgba(255, 255, 255, 0.8);
	border-color: rgba(30, 64, 175, 0.2);
	color: #1e293b;
}
.cdp-style-minimal .cdp-coupon-details {
	background: #f9fafb;
	border-color: #e5e7eb;
	color: #374151;
}
.cdp-style-bold .cdp-coupon-details {
	background: rgba(0, 0, 0, 0.2);
	border-color: rgba(255, 255, 255, 0.2);
	color: rgba(255, 255, 255, 0.95);
}

/* ---- Copy button feedback ---- */
.cdp-copy-btn.cdp-copied {
	pointer-events: none;
}

.cdp-style-default .cdp-copy-btn.cdp-copied {
	background: #10b981;
	color: #fff;
}

.cdp-style-minimal .cdp-copy-btn.cdp-copied {
	background: #059669;
	color: #fff;
}

.cdp-style-bold .cdp-copy-btn.cdp-copied {
	background: #10b981;
	color: #fff;
}
