/* Scanner for Gravity — desktop button + QR modal. */

.scfg-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	padding: 8px 14px;
	border: 1px solid rgba(133, 109, 64, 0.55); /* West Fork gold */
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.9em;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.scfg-button:hover,
.scfg-button:focus-visible {
	background: rgba(133, 109, 64, 0.12);
	border-color: #856d40;
	outline: none;
}

.scfg-glyph {
	width: 18px;
	height: 18px;
	flex: none;
}

/* ------------------------------------------------------------- overlay */

.scfg-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.62);
	backdrop-filter: blur(2px);
}

.scfg-modal {
	position: relative;
	width: 100%;
	max-width: 400px;
	padding: 28px 28px 22px;
	border-radius: 12px;
	background: #1c1c1e;
	color: #f3f1ec;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
	text-align: center;
	font-size: 15px;
	line-height: 1.45;
}

.scfg-close {
	position: absolute;
	top: 10px;
	right: 12px;
	border: 0;
	background: transparent;
	color: #9b9b9b;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.scfg-close:hover {
	color: #f3f1ec;
}

.scfg-title {
	margin: 0 0 6px;
	font-size: 19px;
	font-weight: 600;
	color: #f3f1ec;
}

.scfg-hint {
	margin: 0 0 18px;
	color: #b9b5ac;
	font-size: 13.5px;
}

.scfg-qr-wrap {
	position: relative;
	display: inline-block;
	padding: 12px;
	border-radius: 10px;
	background: #ffffff; /* quiet zone — scanners need light around the code */
}

.scfg-qr img,
.scfg-qr canvas,
.scfg-qr svg {
	display: block;
	width: 232px;
	height: 232px;
}

.scfg-qr-veil {
	position: absolute;
	inset: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.88);
}

/* -------------------------------------------------------------- status */

.scfg-status {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	margin-top: 18px;
	min-height: 22px;
	font-size: 14px;
	color: #d8d4cb;
}

.scfg-status-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex: none;
	background: #8a8a8e;
}

.scfg-phase-waiting {
	background: #856d40;
	animation: scfg-pulse 1.6s ease-in-out infinite;
}

.scfg-phase-connected {
	background: #4b9fd6;
	animation: scfg-pulse 1.6s ease-in-out infinite;
}

.scfg-phase-receiving {
	background: #4b9fd6;
	animation: scfg-pulse 0.7s ease-in-out infinite;
}

.scfg-phase-done {
	background: #4caf7d;
}

.scfg-phase-expired,
.scfg-phase-error {
	background: #d63638;
}

@keyframes scfg-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}

/* ------------------------------------------------------------- actions */

.scfg-actions {
	margin-top: 14px;
}

.scfg-secondary {
	padding: 8px 16px;
	border: 1px solid #856d40;
	border-radius: 6px;
	background: transparent;
	color: #e8ddc5;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

.scfg-secondary:hover {
	background: rgba(133, 109, 64, 0.18);
}

.scfg-link-fallback {
	margin-top: 16px;
	font-size: 12px;
	color: #9b968c;
}

.scfg-link-fallback summary {
	cursor: pointer;
}

.scfg-link {
	display: block;
	margin-top: 8px;
	padding: 8px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.06);
	word-break: break-all;
	user-select: all;
	font-size: 11px;
	color: #cfcabf;
}

/* ----------------------------------------------------------- short link */

.scfg-shortlink {
	margin-top: 16px;
	font-size: 13px;
	color: #9b968c;
}

.scfg-shortlink-url {
	display: block;
	margin-top: 7px;
	padding: 9px 12px;
	border-radius: 8px;
	background: rgba(217, 185, 106, 0.12);
	border: 1px solid rgba(133, 109, 64, 0.4);
	font-size: 16px;
	letter-spacing: 0.03em;
	color: #e8ddc5;
	user-select: all;
}
