.cr-refer-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.cr-refer-modal[hidden] {
	display: none;
}

.cr-refer-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.cr-refer-modal__panel {
	position: relative;
	width: 100%;
	max-width: 28rem;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	background: #fff;
	border-radius: 0.75rem;
	box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.25);
	padding: 1.5rem;
}

.cr-refer-modal__title {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	line-height: 1.3;
	font-weight: 700;
	color: #111;
}

.cr-refer-modal__message {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: #444;
}

.cr-refer-modal__code-label {
	margin: 0 0 0.375rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #666;
}

.cr-refer-modal__code {
	margin: 0 0 0.75rem;
	padding: 0.75rem 1rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 1.0625rem;
	font-weight: 700;
	word-break: break-all;
	background: #f4f6f8;
	border: 1px solid #dde3ea;
	border-radius: 0.5rem;
	color: #111;
}

.cr-refer-modal__new-code {
	margin: 0 0 1.25rem;
	font-size: 0.875rem;
	line-height: 1.45;
	color: #555;
}

.cr-refer-modal__new-code strong {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	color: #111;
}

.cr-refer-modal__actions {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.cr-refer-modal__btn {
	display: block;
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	border-radius: 0.5rem;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cr-refer-modal__btn--primary {
	background: #1a1a1a;
	color: #fff;
}

.cr-refer-modal__btn--primary:hover,
.cr-refer-modal__btn--primary:focus {
	background: #333;
}

.cr-refer-modal__btn--secondary {
	background: #fff;
	color: #1a1a1a;
	border-color: #ccd3db;
}

.cr-refer-modal__btn--secondary:hover,
.cr-refer-modal__btn--secondary:focus {
	background: #f7f8fa;
	border-color: #aab4c0;
}

@media (min-width: 480px) {
	.cr-refer-modal__panel {
		padding: 1.75rem;
	}

	.cr-refer-modal__title {
		font-size: 1.375rem;
	}
}

.cr-refer-lookup-message {
	margin: 1.25rem 0 1rem;
	padding: 0.75rem 1rem;
	font-size: 0.9375rem;
	line-height: 1.45;
	border-radius: 0.5rem;
	border: 1px solid transparent;
}

.cr-refer-lookup-message--success {
	background: #edf7ee;
	border-color: #b8dfc0;
	color: #1f4d28;
}

.cr-refer-lookup-message--error {
	background: #fdf0f0;
	border-color: #e8bcbc;
	color: #7a1f1f;
}

.cr-refer-lookup-message__text {
	margin: 0 0 0.625rem;
}

.cr-refer-lookup-message__codes {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cr-refer-lookup-message__code {
	margin: 0 0 0.5rem;
	padding: 0.75rem 1rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 1.0625rem;
	font-weight: 700;
	word-break: break-all;
	background: rgba(255, 255, 255, 0.65);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 0.5rem;
	color: inherit;
}

.cr-refer-lookup-message__codes .cr-refer-lookup-message__code:last-child {
	margin-bottom: 0;
}

.gform_wrapper.refer-code-lookup .gfield.refer-code-lookup-result input {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-weight: 700;
	letter-spacing: 0.02em;
}
