/**
 * Calendanse QR Content — front
 *
 * @package Calendanse_QR_Content
 */

.cqc-qr {
	box-sizing: border-box;
	max-width: 100%;
}

.cqc-qr__inner {
	display: block;
}

.cqc-qr--align-left .cqc-qr__inner {
	text-align: left;
}

.cqc-qr--align-center .cqc-qr__inner {
	text-align: center;
}

.cqc-qr--align-right .cqc-qr__inner {
	text-align: right;
}

.cqc-qr__text {
	margin: 0 0 0.5rem;
	font-size: 0.95rem;
	line-height: 1.45;
}

.cqc-qr__frame {
	display: inline-block;
	max-width: 100%;
}

.cqc-qr__image {
	display: block;
	height: auto;
	max-width: 100%;
	vertical-align: middle;
}

.cqc-qr__subcaption {
	margin: 0.5rem 0 0;
	font-size: 0.85rem;
	line-height: 1.4;
	opacity: 0.85;
}

.cqc-qr__fallback {
	margin: 0;
	font-size: 0.9rem;
	color: #666;
}

/* —— Styles legacy (simple / bordered) —— */

.cqc-qr--style-bordered .cqc-qr__inner {
	padding: 1rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	background: #fafafa;
}

.cqc-qr--style-simple .cd-qr-card__badge,
.cqc-qr--style-bordered .cd-qr-card__badge {
	display: none;
}

.cqc-qr--style-simple .cqc-qr__image,
.cqc-qr--style-bordered .cqc-qr__image {
	display: inline-block;
}

/* —— Carte Calendanse (.cd-qr-card) —— */

.cd-qr-card.cqc-qr--style-card {
	--cd-qr-blue: #5b8fd9;
	--cd-qr-rose: #e84a7f;
	--cd-qr-yellow: #f5c842;
	--cd-qr-violet: #6a3fb5;
	--cd-qr-ink: #0f172a;
	--cd-qr-muted: #475569;
	--cd-qr-surface: #ffffff;
	--cd-qr-radius: 18px;
	--cd-qr-shadow: 0 14px 40px rgba(15, 23, 42, 0.1);
	position: relative;
	padding: 3px;
	border-radius: calc(var(--cd-qr-radius) + 4px);
	background: linear-gradient(
		135deg,
		rgba(91, 143, 217, 0.55) 0%,
		rgba(232, 74, 127, 0.45) 32%,
		rgba(245, 200, 66, 0.5) 66%,
		rgba(106, 63, 181, 0.5) 100%
	);
	box-shadow: var(--cd-qr-shadow);
}

.cd-qr-card.cqc-qr--style-card::before {
	content: "";
	position: absolute;
	inset: -10px;
	z-index: -1;
	border-radius: calc(var(--cd-qr-radius) + 14px);
	background: linear-gradient(
		160deg,
		rgba(91, 143, 217, 0.14) 0%,
		rgba(252, 232, 240, 0.55) 38%,
		rgba(255, 248, 230, 0.45) 68%,
		rgba(237, 233, 254, 0.4) 100%
	);
	pointer-events: none;
}

.cd-qr-card.cqc-qr--style-card .cd-qr-card__inner {
	position: relative;
	padding: clamp(1rem, 3.5vw, 1.35rem) clamp(1rem, 4vw, 1.5rem);
	border-radius: var(--cd-qr-radius);
	background: var(--cd-qr-surface);
	overflow: hidden;
}

.cd-qr-card.cqc-qr--style-card .cd-qr-card__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0 0 0.65rem;
	padding: 0.28rem 0.7rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--cd-qr-violet);
	background: linear-gradient(135deg, rgba(91, 143, 217, 0.12) 0%, rgba(232, 74, 127, 0.1) 50%, rgba(106, 63, 181, 0.12) 100%);
	border: 1px solid rgba(106, 63, 181, 0.18);
}

.cd-qr-card.cqc-qr--style-card .cd-qr-card__badge::before {
	content: "";
	display: inline-block;
	width: 0.45rem;
	height: 0.45rem;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--cd-qr-rose) 0%, var(--cd-qr-violet) 100%);
	box-shadow: 0 0 0 2px rgba(232, 74, 127, 0.2);
}

.cd-qr-card.cqc-qr--style-card .cd-qr-card__text {
	margin: 0 0 1rem;
	max-width: 28rem;
	font-size: clamp(0.92rem, 2.6vw, 1.02rem);
	line-height: 1.55;
	color: var(--cd-qr-ink);
}

.cqc-qr--align-center.cd-qr-card.cqc-qr--style-card .cd-qr-card__text {
	margin-left: auto;
	margin-right: auto;
}

.cd-qr-card.cqc-qr--style-card .cd-qr-card__qr-frame {
	position: relative;
	display: inline-block;
	padding: clamp(0.55rem, 2vw, 0.75rem);
	border-radius: 14px;
	background: #ffffff;
	box-shadow:
		0 0 0 1px rgba(15, 23, 42, 0.06),
		0 8px 24px rgba(91, 143, 217, 0.12);
}

.cd-qr-card.cqc-qr--style-card .cd-qr-card__qr-frame::before {
	content: "";
	position: absolute;
	inset: -3px;
	z-index: -1;
	border-radius: 16px;
	background: linear-gradient(
		135deg,
		var(--cd-qr-blue) 0%,
		var(--cd-qr-rose) 34%,
		var(--cd-qr-yellow) 68%,
		var(--cd-qr-violet) 100%
	);
	opacity: 0.72;
}

.cd-qr-card.cqc-qr--style-card .cd-qr-card__qr-frame::after {
	content: "";
	position: absolute;
	inset: 6px;
	z-index: -1;
	border-radius: 12px;
	background: radial-gradient(
		circle at 50% 50%,
		rgba(91, 143, 217, 0.08) 0%,
		rgba(255, 255, 255, 0) 70%
	);
	pointer-events: none;
}

.cd-qr-card.cqc-qr--style-card .cqc-qr__image {
	border-radius: 6px;
	background: #ffffff;
}

.cd-qr-card.cqc-qr--style-card .cd-qr-card__subcaption {
	margin: 0.85rem 0 0;
	font-size: 0.82rem;
	line-height: 1.45;
	color: var(--cd-qr-muted);
	opacity: 1;
}

.cd-qr-card.cqc-qr--style-card .cd-qr-card__fallback {
	padding: 0.75rem 1rem;
	border-radius: 10px;
	background: #fff8f6;
	border: 1px solid rgba(232, 74, 127, 0.2);
	color: var(--cd-qr-muted);
}

@media (min-width: 768px) {
	.cqc-qr--device-mobile {
		display: none !important;
	}
}

@media (max-width: 767.98px) {
	.cqc-qr--device-desktop {
		display: none !important;
	}

	.cd-qr-card.cqc-qr--style-card {
		margin-left: auto;
		margin-right: auto;
		max-width: min(100%, 22rem);
	}

	.cd-qr-card.cqc-qr--style-card .cd-qr-card__text {
		max-width: none;
	}
}
