/* Email protection popup (assets/email-protect.js). */
html.cgm-lock { overflow: hidden; }
.cgm-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(10, 20, 45, .55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	animation: cgmFade .2s ease both;
}
.cgm-overlay[hidden] { display: none; }
.cgm-dialog {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 28px 26px 24px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(10, 20, 45, .3);
	color: #1F2937;
	font-family: inherit;
	text-align: left;
	animation: cgmPop .25s cubic-bezier(.2, .8, .2, 1) both;
}
.cgm-kicker {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #B91C1C;
}
.cgm-title { margin: 0 0 8px; font-size: 22px; line-height: 1.25; font-weight: 700; color: #0F1B3D; }
.cgm-lead { margin: 0 0 16px; font-size: 14.5px; line-height: 1.55; color: #4B5563; }
.cgm-label { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #B91C1C; }
.cgm-cap {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	padding: 10px;
	border-radius: 12px;
	background: rgba(220, 38, 38, .07);
	border: 1px solid rgba(220, 38, 38, .25);
}
.cgm-frame {
	position: relative;
	flex: none;
	width: 200px;
	max-width: 100%;
	aspect-ratio: 200 / 64;
	border-radius: 8px;
	background: #F4F5F8;
	overflow: hidden;
}
.cgm-img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; transition: opacity .2s ease; }
.cgm-img[hidden] { display: none; }
.cgm-frame.is-loading .cgm-img { opacity: .2; }
/* Progress bar shown while a new image is on its way. */
.cgm-loader {
	position: absolute;
	inset: 0;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
.cgm-frame.is-loading .cgm-loader { display: flex; }
.cgm-loader__bar {
	position: relative;
	width: 70%;
	height: 4px;
	border-radius: 2px;
	background: rgba(27, 63, 160, .15);
	overflow: hidden;
}
.cgm-loader__bar::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 40%;
	border-radius: 2px;
	background: #1B3FA0;
	animation: cgmBar 1.1s ease-in-out infinite;
}
.cgm-loader__txt { font-size: 12px; line-height: 1; color: #4B5563; }
@keyframes cgmBar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes cgmSpin { to { transform: rotate(360deg); } }
.cgm-dialog .cgm-new {
	flex: none;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid #D6DBE4;
	border-radius: 50%;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B91C1C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-2.64-6.36'/%3E%3Cpath d='M21 3v6h-6'/%3E%3C/svg%3E") center / 18px no-repeat;
	cursor: pointer;
	transition: transform .4s ease, border-color .2s ease;
}
.cgm-dialog .cgm-new:hover { border-color: #DC2626; transform: rotate(90deg); }
.cgm-dialog .cgm-new:disabled { cursor: wait; opacity: .65; border-color: #D6DBE4; animation: cgmSpin 1s linear infinite; }
.cgm-dialog .cgm-input {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 1px solid #C9D0DC;
	border-radius: 10px;
	background: #fff;
	font: 600 18px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	letter-spacing: .3em;
	text-align: center;
	text-transform: uppercase;
	color: #0F1B3D;
}
.cgm-dialog .cgm-input:focus { outline: none; border-color: #1B3FA0; box-shadow: 0 0 0 3px rgba(27, 63, 160, .18); }
.cgm-ts { margin: 12px 0 0; min-height: 65px; }
.cgm-err { min-height: 1.4em; margin: 10px 0 0; font-size: 13.5px; line-height: 1.4; color: #B91C1C; }
.cgm-err:empty { min-height: 0; margin: 0; }
.cgm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.cgm-dialog .cgm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid #1B3FA0;
	border-radius: 999px;
	background: #1B3FA0;
	color: #fff;
	font: 600 14.5px/1 inherit;
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.cgm-dialog .cgm-btn:hover { background: #142F7A; border-color: #142F7A; color: #fff; }
.cgm-dialog .cgm-btn:disabled { opacity: .6; cursor: wait; }
.cgm-dialog .cgm-btn--ghost { background: #fff; color: #1B3FA0; border-color: #C9D0DC; }
.cgm-dialog .cgm-btn--ghost:hover { background: #F1F4FA; color: #142F7A; border-color: #1B3FA0; }
.cgm-addr {
	margin: 0;
	padding: 14px 16px;
	border-radius: 12px;
	background: #F1F4FA;
	border: 1px solid #D6DEF0;
	font-size: 18px;
	font-weight: 600;
	color: #0F1B3D;
	word-break: break-all;
	user-select: all;
}
.cgm-dialog .cgm-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / 20px no-repeat;
	cursor: pointer;
}
.cgm-dialog .cgm-close:hover { background-color: #F1F4FA; }
.cgm-dialog :focus-visible { outline: 2px solid #1B3FA0; outline-offset: 2px; }
@keyframes cgmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cgmPop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) {
	.cgm-dialog { padding: 24px 18px 20px; }
	.cgm-cap { flex-wrap: wrap; }
	.cgm-dialog .cgm-actions .cgm-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
	.cgm-overlay, .cgm-dialog, .cgm-dialog .cgm-new:disabled { animation: none; }
	.cgm-loader__bar::after { animation-duration: 2.5s; }
}
