/* Cape Vine Master: certificates, certificate pop-up and the bottom "Complete course" bar */

:root {
	--cvc-burgundy: #4B0924;
	--cvc-burgundy-deep: #2E0516;
	--cvc-gold: #D7B374;
	--cvc-gold-ink: #9A7230;
	--cvc-cream: #FBF7EE;
	--cvc-parchment: #F4ECDC;
	--cvc-ink: #241D1D;
	--cvc-serif: "Cormorant Garamond", Georgia, serif;
	--cvc-sans: Lato, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Complete course: bottom of the lesson / quiz ---------- */
body.cvs-finish-moved #popup-header form.form-button-finish-course { display: none !important; }

.cvs-finish-bar {
	position: sticky;
	bottom: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
	margin: 36px 0 0;
	padding: 18px 24px;
	border-top: 3px solid var(--cvc-gold);
	background: var(--cvc-burgundy-deep);
	box-shadow: 0 -14px 30px -18px rgba(46, 5, 22, .6);
	color: var(--cvc-cream);
	font-family: var(--cvc-sans);
}
.cvs-finish-bar__text { display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
.cvs-finish-bar__text strong { font: 500 24px/1.1 var(--cvc-serif); color: var(--cvc-cream); }
.cvs-finish-bar__text span { font-size: 14px; color: rgba(251, 247, 238, .78); }
.cvs-finish-bar form { margin: 0; flex: 0 0 auto; }
.cvs-finish-bar .lp-button,
.cvs-finish-bar button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 16px 34px !important;
	border: 0 !important;
	border-radius: 2px !important;
	background: var(--cvc-gold) !important;
	color: var(--cvc-burgundy-deep) !important;
	font: 700 14px/1.2 var(--cvc-sans) !important;
	letter-spacing: .14em;
	text-transform: uppercase;
	box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .7);
	cursor: pointer;
	transition: transform .2s, background-color .2s;
}
.cvs-finish-bar .lp-button:hover,
.cvs-finish-bar button:hover { background: #E6C98F !important; transform: translateY(-2px); }
@media (max-width: 600px) {
	.cvs-finish-bar { padding: 16px; }
	.cvs-finish-bar form, .cvs-finish-bar button { width: 100%; }
}

/* ---------- Course page: certificate link ---------- */
.cvs-cert-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0 0 12px;
	padding: 14px 18px;
	border-radius: 2px;
	background: var(--cvc-gold);
	color: var(--cvc-burgundy-deep) !important;
	font: 700 12px/1.2 var(--cvc-sans);
	letter-spacing: .12em;
	text-transform: uppercase;
	text-decoration: none !important;
}
.cvs-cert-link:hover { background: #E6C98F; }

/* ---------- Certificate pop-up ---------- */
.cvs-certmodal {
	position: fixed;
	inset: 0;
	z-index: 999990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(46, 5, 22, .78);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	font-family: var(--cvc-sans);
}
.cvs-certmodal__card {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 36px 30px 28px;
	border-top: 4px solid var(--cvc-gold);
	border-radius: 4px;
	background: var(--cvc-cream);
	color: var(--cvc-ink);
	text-align: center;
	box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
}
.cvs-certmodal__x { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 30px; line-height: 1; color: var(--cvc-burgundy); cursor: pointer; }
.cvs-certmodal__eyebrow { margin: 0 0 6px; font: italic 600 17px/1 var(--cvc-serif); font-variant: small-caps; letter-spacing: .08em; color: var(--cvc-gold-ink); }
.cvs-certmodal__card h2 { margin: 0 0 8px; font: 500 34px/1.1 var(--cvc-serif); color: var(--cvc-burgundy-deep); }
.cvs-certmodal__course { margin: 0 0 12px; font: 500 22px/1.2 var(--cvc-serif); color: var(--cvc-burgundy); }
.cvs-certmodal__sub { margin: 0 0 22px; font-size: 15px; line-height: 1.5; color: #6B5B55; }
.cvs-certmodal__primary {
	display: block;
	padding: 16px 20px;
	border-radius: 2px;
	background: var(--cvc-burgundy);
	color: #fff !important;
	font: 700 13px/1.2 var(--cvc-sans);
	letter-spacing: .14em;
	text-transform: uppercase;
	text-decoration: none !important;
}
.cvs-certmodal__primary:hover { background: var(--cvc-burgundy-deep); }
.cvs-certmodal__share { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 6px; }
.cvs-certmodal__share a,
.cvs-certmodal__share button {
	padding: 10px 14px;
	border: 1px solid rgba(75, 9, 36, .3);
	border-radius: 999px;
	background: transparent;
	color: var(--cvc-burgundy) !important;
	font: 700 12px/1 var(--cvc-sans);
	text-decoration: none !important;
	cursor: pointer;
}
.cvs-certmodal__share a:hover,
.cvs-certmodal__share button:hover { background: rgba(215, 179, 116, .25); }
.cvs-certmodal__next { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 18px; font-size: 14px; }
.cvs-certmodal__next button { border: 0; background: none; color: var(--cvc-burgundy); font: 700 14px var(--cvc-sans); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.cvs-certmodal__next a { color: var(--cvc-burgundy) !important; font-weight: 700; }

/* ---------- Public certificate page ---------- */
body.cvs-certpage { margin: 0; background: var(--cvc-parchment); color: var(--cvc-ink); font-family: var(--cvc-sans); }
.cvs-certpage__wrap { max-width: 1040px; margin: 0 auto; padding: 32px 16px 64px; }
.cvs-cert {
	padding: 14px;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 30px 60px -34px rgba(46, 5, 22, .55);
}
.cvs-cert__frame {
	padding: 48px 40px 36px;
	border: 2px solid var(--cvc-gold);
	outline: 1px solid rgba(154, 114, 48, .5);
	outline-offset: -10px;
	background: linear-gradient(180deg, #fff 0%, var(--cvc-cream) 100%);
	text-align: center;
}
.cvs-cert__brand { margin: 0 0 14px; font: 700 12px/1 var(--cvc-sans); letter-spacing: .24em; text-transform: uppercase; color: var(--cvc-gold-ink); }
.cvs-cert__title { margin: 0 0 22px; font: 500 clamp(34px, 6vw, 56px)/1.05 var(--cvc-serif); color: var(--cvc-burgundy-deep); }
.cvs-cert__lead { margin: 0 0 8px; font: italic 500 20px/1.3 var(--cvc-serif); color: #6B5B55; }
.cvs-cert__name { margin: 4px 0 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(154, 114, 48, .5); display: inline-block; min-width: 55%; font: 600 clamp(32px, 5.5vw, 52px)/1.1 var(--cvc-serif); color: var(--cvc-burgundy); }
.cvs-cert__course { margin: 4px 0 14px; font: 600 clamp(26px, 4.4vw, 40px)/1.15 var(--cvc-serif); color: var(--cvc-burgundy-deep); }
.cvs-cert__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 34px 0 0; text-align: center; font: 700 15px/1.3 var(--cvc-sans); color: var(--cvc-ink); }
.cvs-cert__foot > div { flex: 1 1 0; }
.cvs-cert__foot span { display: block; margin-bottom: 4px; font: 700 11px/1 var(--cvc-sans); letter-spacing: .18em; text-transform: uppercase; color: var(--cvc-gold-ink); }
.cvs-cert__seal { font-size: 54px; line-height: 1; color: var(--cvc-gold); }
.cvs-cert__verify { margin: 26px 0 0; font-size: 12px; color: #6B5B55; word-break: break-all; }

.cvs-certpage__actions { margin: 32px 0 0; text-align: center; }
.cvs-certpage__actions h2 { margin: 0 0 16px; font: 500 30px/1.1 var(--cvc-serif); color: var(--cvc-burgundy-deep); }
.cvs-certpage__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cvs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 12px 20px;
	border: 1px solid rgba(75, 9, 36, .4);
	border-radius: 2px;
	background: transparent;
	color: var(--cvc-burgundy);
	font: 700 12px/1.2 var(--cvc-sans);
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
}
.cvs-btn:hover { background: rgba(215, 179, 116, .25); }
.cvs-btn--solid { background: var(--cvc-burgundy); border-color: var(--cvc-burgundy); color: #fff; }
.cvs-btn--solid:hover { background: var(--cvc-burgundy-deep); }
.cvs-certpage__more { margin: 22px 0 0; font-size: 15px; }
.cvs-certpage__more a { color: var(--cvc-burgundy); font-weight: 700; }

@media (max-width: 640px) {
	.cvs-cert__frame { padding: 32px 18px 26px; }
	.cvs-cert__foot { flex-direction: column; align-items: center; }
	.cvs-cert__seal { font-size: 40px; }
}

@media print {
	@page { size: A4 landscape; margin: 10mm; }
	body.cvs-certpage { background: #fff; }
	.cvs-certpage__actions { display: none; }
	.cvs-certpage__wrap { padding: 0; max-width: none; }
	.cvs-cert { box-shadow: none; padding: 0; }
	.cvs-cert__frame { padding: 28px 40px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
