/* The CloudSewa Academy certificate (cs_cert_render() in inc/certificates.php): certificate pages, verify page
   (sample + result thumbnails), the print copy and the course pages' sample. Own file so course pages can load it
   without pages.css. Text is sized from the certificate's own width (container units), so it scales to any size. */

/* The certificate: landscape A4 proportions, text sized from its own width (container units) */
.csc-cert {
	margin: 0;
	container-type: inline-size;
}

.csc-cert__paper {
	position: relative;
	aspect-ratio: 1.414;
	padding: 2.6cqw;
	border-radius: 10px;
	background:
		radial-gradient(circle at 0% 0%, rgba(0, 200, 255, .14) 0, rgba(0, 200, 255, 0) 32%),
		radial-gradient(circle at 100% 100%, rgba(0, 113, 229, .12) 0, rgba(0, 113, 229, 0) 36%),
		#fff;
	box-shadow: 0 30px 60px -34px rgba(15, 23, 42, .5), 0 0 0 1px var(--csx-line);
	overflow: hidden;
}

.csc-cert__frame {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 3cqw 5cqw 2.4cqw;
	border: .45cqw solid transparent;
	border-radius: 6px;
	background:
		linear-gradient(#fff, #fff) padding-box,
		linear-gradient(135deg, #00cefc, #0071e5 55%, #0f172a) border-box;
	text-align: center;
}

.csc-cert__frame::before {
	position: absolute;
	inset: 1.1cqw;
	border: 1px solid #d7ecf7;
	border-radius: 4px;
	content: "";
	pointer-events: none;
}

.csc-cert__head .csc-cert__logo {
	display: block;
	width: auto !important;
	height: 5.4cqw !important;
	margin: 0 auto;
}

.csc-cert .csc-cert__kicker {
	margin: 2.6cqw 0 1.6cqw;
	color: var(--csx-navy);
	font: 800 3.4cqw/1.1 'Nunito Sans', sans-serif;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.csc-cert .csc-cert__small {
	margin: 0;
	color: var(--csx-muted);
	font-size: 1.75cqw;
	line-height: 1.4;
}

.csc-cert .csc-cert__name {
	margin: 1cqw 0 1.4cqw;
	padding: 0 4cqw .8cqw;
	border-bottom: 1px solid #cfe2ee;
	color: #0b2a5b;
	font: italic 600 5.4cqw/1.1 Georgia, 'Times New Roman', serif;
	word-break: break-word;
}

.csc-cert .csc-cert__course {
	margin: .8cqw 0 0;
	color: var(--csx-blue);
	font: 800 2.7cqw/1.25 'Nunito Sans', sans-serif;
}

.csc-cert__foot {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: end;
	gap: 4cqw;
	width: 100%;
	margin-top: auto;
	padding-top: 2.4cqw;
}

.csc-cert__sign {
	display: grid;
	gap: .5cqw;
	justify-items: center;
}

.csc-cert__value {
	color: var(--csx-navy);
	font-size: 1.85cqw;
	font-weight: 700;
}

.csc-cert__value--sig {
	font: italic 600 2.2cqw/1.1 Georgia, 'Times New Roman', serif;
}

.csc-cert__line {
	width: 100%;
	height: 1px;
	background: #9fb4c8;
}

.csc-cert__sign small {
	color: var(--csx-muted);
	font-size: 1.4cqw;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.csc-cert__seal {
	display: grid;
	place-items: center;
	width: 8.4cqw;
	height: 8.4cqw;
	border-radius: 50%;
	background: linear-gradient(135deg, #00cefc, #0071e5);
	box-shadow: 0 0 0 .5cqw #fff, 0 0 0 .75cqw #b9e6fb;
}

.csc-cert__seal img {
	width: 4.6cqw !important;
	height: auto !important;
}

.csc-cert .csc-cert__id {
	margin: 1.8cqw 0 0;
	color: var(--csx-muted);
	font: 600 1.3cqw/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	letter-spacing: .03em;
}

.csc-cert__id span {
	display: block;
}

.csc-cert__void {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	padding: .6cqw 3cqw;
	border: .5cqw solid #d92d20;
	border-radius: 8px;
	color: #d92d20;
	font: 900 6cqw/1 'Nunito Sans', sans-serif;
	letter-spacing: .12em;
	text-transform: uppercase;
	opacity: .8;
	transform: translate(-50%, -50%) rotate(-14deg);
}

.csc-cert.is-revoked .csc-cert__frame > :not(.csc-cert__void) {
	opacity: .45;
}

@media (max-width: 680px) {
	.csc-cert__paper {
		padding: 2cqw;
		border-radius: 6px;
	}
}
