/* Kāzu dāvanu karte block */
.kg {
	--kg-green: #475836;
	--kg-ink: #2c3326;
	--kg-muted: #6f7568;
	--kg-line: #e3ded3;
	--kg-paper: #f8f4ec;
}
.kg__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 28px;
	margin-top: 32px;
}
@media (min-width: 992px) {
	.kg__grid {
		grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
		gap: 40px;
		align-items: start;
	}
	.kg__preview {
		position: sticky;
		top: 120px;
	}
}
.kg__form {
	padding: 28px;
	background: #fff;
	border: 1px solid var(--kg-line);
}
.kg__alert {
	margin-bottom: 18px;
	padding: 12px 14px;
	background: #fdf0ef;
	border-left: 3px solid #b3261e;
	color: #7a1b15;
	font-size: 14px;
}
.kg__step {
	margin: 0 0 26px;
	padding: 0;
	border: 0;
	min-width: 0;
}
.kg__step legend {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	font-family: 'EB Garamond LV', 'EB Garamond', Georgia, serif;
	font-size: 22px;
	color: var(--kg-ink);
}
.kg__n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--kg-green);
	color: #fff;
	font-family: 'League Spartan', sans-serif;
	font-size: 14px;
}
.kg__amounts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}
.kg__amount {
	position: relative;
	margin: 0;
	cursor: pointer;
}
.kg__amount input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.kg__amount span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	border: 1px solid var(--kg-line);
	background: #fff;
	font-family: 'EB Garamond LV', 'EB Garamond', Georgia, serif;
	font-size: 22px;
	color: var(--kg-ink);
	transition: border-color .15s, background .15s;
}
.kg__amount--own span {
	font-family: inherit;
	font-size: 15px;
}
.kg__amount:hover span { border-color: #b9b3a5; }
.kg__amount input:focus-visible + span { outline: 2px solid var(--kg-green); outline-offset: 2px; }
.kg__amount.is-active span,
.kg__amount input:checked + span {
	border-color: var(--kg-green);
	background: var(--kg-green);
	color: #fff;
}
.kg__own { margin-top: 12px; max-width: 260px; }
.kg__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}
.kg__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 14px;
	min-width: 0;
}
.kg__field label {
	font-size: 14px;
	font-weight: 500;
	color: var(--kg-ink);
}
.kg__req { color: #b3261e; }
.kg__opt { font-weight: 400; font-size: 12px; color: var(--kg-muted); }
.kg__field input,
.kg__field textarea {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid #d5d0c5;
	border-radius: 0;
	background: #fff;
	font-size: 15px;
	color: var(--kg-ink);
}
.kg__field textarea { min-height: 84px; resize: vertical; }
.kg__field input:focus,
.kg__field textarea:focus { outline: none; border-color: var(--kg-green); box-shadow: 0 0 0 1px var(--kg-green); }
.kg__field.has-error input,
.kg__field.has-error textarea { border-color: #b3261e; }
.kg__err { font-size: 13px; color: #b3261e; }
.kg__count { align-self: flex-end; font-size: 12px; color: var(--kg-muted); }
.kg__terms { margin: 4px 0 18px; }
.kg__check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400 !important; }
.kg__check a { color: var(--kg-green); text-decoration: underline; text-underline-offset: 3px; }
.kg__check a:hover { text-decoration-thickness: 2px; }
.kg__check input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; accent-color: var(--kg-green); }
.kg__submit { width: 100%; }
.kg__after { margin: 12px 0 0; font-size: 13px; color: var(--kg-muted); text-align: center; }

/* certificate preview */
.kg__cert {
	position: relative;
	display: flex;
	aspect-ratio: 210 / 148;
	background: var(--kg-paper);
	box-shadow: 0 18px 48px rgba(44, 51, 38, .16);
	overflow: hidden;
}
.kg__cert-photo {
	flex: 0 0 35%;
	background-size: cover;
	background-position: center;
}
.kg__cert-card {
	position: relative;
	flex: 1;
	margin: 4.3%;
	padding: 5% 5% 0;
	border: 1px solid var(--kg-green);
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.kg__cert-brand {
	font-family: 'League Spartan', sans-serif;
	font-weight: 600;
	font-size: clamp(11px, 1.1vw, 15px);
	letter-spacing: .3em;
	color: var(--kg-green);
}
.kg__cert-kicker {
	margin-top: 4%;
	font-family: 'League Spartan', sans-serif;
	font-size: clamp(8px, .7vw, 10px);
	letter-spacing: .2em;
	text-transform: uppercase;
	color: #7a7f72;
}
.kg__cert-couple {
	margin-top: 1.5%;
	font-family: 'EB Garamond LV', 'EB Garamond', Georgia, serif;
	font-style: italic;
	font-size: clamp(20px, 2.3vw, 34px);
	line-height: 1.05;
	color: var(--kg-ink);
	overflow-wrap: anywhere;
}
.kg__cert-couple.is-placeholder { color: #b3ad9f; }
.kg__cert-what {
	margin-top: 2%;
	font-family: 'EB Garamond LV', 'EB Garamond', Georgia, serif;
	font-size: clamp(11px, 1vw, 15px);
	color: var(--kg-green);
}
.kg__cert-amount {
	margin-top: 4%;
	font-family: 'EB Garamond LV', 'EB Garamond', Georgia, serif;
	font-weight: 500;
	font-size: clamp(22px, 2.5vw, 38px);
	line-height: 1;
	color: var(--kg-ink);
}
.kg__cert-msg {
	margin-top: 3%;
	font-family: 'EB Garamond LV', 'EB Garamond', Georgia, serif;
	font-style: italic;
	font-size: clamp(11px, .95vw, 14px);
	line-height: 1.3;
	color: #3c4236;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.kg__cert-from {
	margin-top: 2%;
	font-family: 'EB Garamond LV', 'EB Garamond', Georgia, serif;
	font-size: clamp(11px, .95vw, 14px);
	color: #3c4236;
}
.kg__cert-foot {
	margin-top: auto;
	padding: 4% 0 4%;
	font-family: 'League Spartan', sans-serif;
	font-size: clamp(7px, .62vw, 9px);
	letter-spacing: .08em;
	color: #7a7f72;
}
.kg__preview-note { margin: 14px 0 0; font-size: 13px; color: var(--kg-muted); text-align: center; }

@media (max-width: 767px) {
	.kg__form { padding: 20px 16px; margin: 0 -16px; border-left: 0; border-right: 0; }
	.kg__row { grid-template-columns: 1fr; gap: 0; }
	.kg__preview { order: -1; }
	.kg__cert-photo { flex-basis: 28%; }
	.kg__cert-couple { font-size: 22px; }
	.kg__cert-amount { font-size: 24px; }
}

/* thank-you page */
.krokus-gift-thanks {
	margin: 0 0 28px;
	padding: 22px 24px;
	background: #f8f4ec;
	border-left: 3px solid #475836;
}
.krokus-gift-thanks h2 { margin: 0 0 8px; font-size: 24px; }
.krokus-gift-thanks p { margin: 0; }
.kg__check input[type="checkbox"] {
	flex: 0 0 18px;
	width: 18px !important;
	height: 18px !important;
	min-height: 0 !important;
	padding: 0 !important;
}
.kg__submit-sum { margin-left: .4em; }
.kg__submit-sum:empty { display: none; }

.kg__cert-brand { line-height: 0; }
.kg__cert-brand img { display: block; width: 34%; max-width: 150px; height: auto; }
