/* Random Address Generator free tool */
.ml-rag {
	--ml-rag-border: #00000014;
	--ml-rag-ink: #0a0a0a;
	--ml-rag-muted: #7a7a85;
	--ml-rag-faint: #9090a0;
	--ml-rag-accent: #9647db;
	--ml-rag-gradient: linear-gradient(90deg, #9647db, #005ff9);
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	width: min(100%, var(--site-width, 1200px));
	margin: 0 auto;
	overflow: hidden;
	color: var(--ml-rag-ink);
	font-family: inherit;
	line-height: 1.5;
	text-align: left;
	background: #fff;
	border: 1px solid var(--ml-rag-border);
	border-radius: 28px;
}

/* A free tool placed inside the hero sits on the same gradient blobs. */
.ml-center-hero .ml-rag {
	margin-top: 24px;
}

.ml-rag *,
.ml-rag *::before,
.ml-rag *::after {
	box-sizing: border-box;
}

.ml-rag :is(h2, h3, p, ul) {
	margin: 0;
}

.ml-rag button {
	margin: 0;
	font-family: inherit;
	cursor: pointer;
}

.ml-rag :is(button, a, select, input):focus-visible {
	outline: 2px solid #005ff961;
	outline-offset: 2px;
}

.ml-rag svg {
	flex: 0 0 auto;
}

/* Form */
.ml-rag__form {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) 120px auto;
	align-items: end;
	gap: 12px;
	padding: 20px 36px;
	background: #fafafa;
	border-bottom: 1px solid var(--ml-rag-border);
}

.ml-rag__filter {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.ml-rag__filter label {
	color: var(--ml-rag-faint);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
}

.ml-rag__filter :is(select, input) {
	width: 100%;
	height: 44px;
	padding: 8px 12px;
	color: var(--ml-rag-ink);
	font-family: inherit;
	font-size: 14px;
	background-color: #fff;
	border: 1px solid var(--ml-rag-border);
	border-radius: 8px;
	appearance: none;
}

.ml-rag__filter select {
	padding-right: 32px;
	background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%230a0a0a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	cursor: pointer;
}

.ml-rag__filter input {
	appearance: textfield;
	-moz-appearance: textfield;
}

.ml-rag__filter input::-webkit-inner-spin-button,
.ml-rag__filter input::-webkit-outer-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.ml-rag .ml-rag__generate {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 44px;
	padding: 12px 24px;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	background: var(--ml-rag-gradient);
	border: 0;
	border-radius: 8px;
	transition: opacity 0.2s;
}

.ml-rag .ml-rag__generate:hover {
	opacity: 0.9;
}

.ml-rag .ml-rag__generate svg {
	width: 16px;
	height: 16px;
}

.ml-rag__hint {
	grid-column: 1 / -1;
	color: var(--ml-rag-faint);
	font-size: 12px;
}

/* Results */
.ml-rag__body {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 36px;
}

.ml-rag__results-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.ml-rag .ml-rag__results-title {
	color: var(--ml-rag-muted);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: uppercase;
}

.ml-rag__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ml-rag .ml-rag__action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	color: var(--ml-rag-muted);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	background: none;
	border: 1px solid var(--ml-rag-border);
	border-radius: 8px;
	transition: color 0.2s, border-color 0.2s;
}

.ml-rag .ml-rag__action:hover {
	color: var(--ml-rag-ink);
	border-color: var(--ml-rag-ink);
}

.ml-rag .ml-rag__action svg {
	width: 16px;
	height: 16px;
}

.ml-rag__message {
	padding: 12px 16px;
	color: #b42318;
	font-size: 14px;
	background: #fef3f2;
	border-radius: 8px;
}

.ml-rag__message[hidden] {
	display: none;
}

.ml-rag__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	padding: 0;
	list-style: none;
}

/* A single address takes the whole row. */
.ml-rag__card:only-child {
	grid-column: 1 / -1;
}

.ml-rag__card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--ml-rag-border);
	border-radius: 16px;
}

.ml-rag__card-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	background: #f8f8fa;
	border-bottom: 1px solid #e8e8e8;
}

.ml-rag__flag {
	display: block;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
}

.ml-rag .ml-rag__card-title {
	flex: 1 1 auto;
	color: var(--ml-rag-muted);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: uppercase;
}

.ml-rag .ml-rag__card-copy {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	color: var(--ml-rag-muted);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	background: none;
	border: 0;
	border-radius: 6px;
	transition: color 0.2s, background-color 0.2s;
}

.ml-rag .ml-rag__card-copy:hover {
	color: var(--ml-rag-accent);
	background: #9647db1f;
}

.ml-rag .ml-rag__card-copy svg {
	width: 14px;
	height: 14px;
}

.ml-rag__fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 20px;
	padding: 4px 20px 12px;
}

.ml-rag__field {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	padding: 8px 0;
}

.ml-rag__field--full {
	grid-column: 1 / -1;
	border-bottom: 1px solid #f0f0f2;
}

.ml-rag__field-label {
	color: var(--ml-rag-faint);
	font-size: 12px;
	font-weight: 500;
}

.ml-rag__field-value {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 14px;
	overflow-wrap: anywhere;
}

.ml-rag__field--full .ml-rag__field-value {
	font-weight: 600;
}

.ml-rag .ml-rag__copy {
	display: inline-flex;
	flex: 0 0 auto;
	padding: 4px;
	color: var(--ml-rag-muted);
	line-height: 0;
	background: none;
	border: 0;
	opacity: 0;
	transition: opacity 0.2s;
}

.ml-rag__field:hover .ml-rag__copy,
.ml-rag .ml-rag__copy:focus-visible {
	opacity: 0.6;
}

.ml-rag .ml-rag__copy:hover {
	opacity: 1;
}

.ml-rag .ml-rag__copy svg {
	width: 16px;
	height: 16px;
}

/* Touch screens have no hover to reveal the button. */
@media (hover: none) {
	.ml-rag .ml-rag__copy {
		opacity: 0.6;
	}
}

/* Footer */
.ml-rag__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 20px 36px;
	background: #fafafa;
	border-top: 1px solid var(--ml-rag-border);
}

.ml-rag__disclaimer {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	max-width: 640px;
	color: var(--ml-rag-muted);
	font-size: 12px;
	line-height: 1.6;
}

.ml-rag__disclaimer svg {
	width: 16px;
	height: 16px;
	margin-top: 2px;
	color: var(--ml-rag-accent);
}

.ml-rag a.ml-rag__cta {
	flex: 0 0 auto;
	padding: 12px 20px;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	background: var(--ml-rag-gradient);
	border-radius: 10px;
	box-shadow: 0 6px 16px #763ccd42;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ml-rag a.ml-rag__cta:hover {
	color: #fff;
	box-shadow: 0 8px 24px #763ccd57;
	transform: translateY(-1px);
}

/* "Copied" bubble. The resting state is the leaving state: higher and
   transparent, so removing .is-visible fades it out while it drifts up. */
.ml-rag-toast {
	position: fixed;
	z-index: 10000;
	padding: 4px 8px;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
	white-space: nowrap;
	background: #0a0a0a;
	border-radius: 6px;
	opacity: 0;
	transform: translate(-50%, -190%);
	transition: opacity 0.5s ease, transform 0.5s ease;
	pointer-events: none;
}

.ml-rag-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, -130%);
	transition: none;
}

@media (prefers-reduced-motion: reduce) {
	.ml-rag-toast {
		transform: translate(-50%, -130%);
		transition: opacity 0.2s ease;
	}

	.ml-rag a.ml-rag__cta:hover {
		transform: none;
	}
}

@media (max-width: 900px) {
	.ml-rag__form {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.ml-rag__list {
		grid-template-columns: minmax(0, 1fr);
	}

	.ml-rag__footer {
		flex-direction: column;
		align-items: stretch;
	}

	.ml-rag__disclaimer {
		max-width: none;
	}
}

@media (max-width: 600px) {
	.ml-rag {
		border-radius: 16px;
	}

	.ml-rag__form,
	.ml-rag__body,
	.ml-rag__footer {
		padding: 20px;
	}

	.ml-rag__form {
		grid-template-columns: minmax(0, 1fr);
	}

	.ml-rag__results-header {
		flex-direction: column;
		align-items: stretch;
	}

	.ml-rag__actions {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.ml-rag .ml-rag__action {
		justify-content: center;
	}

	.ml-rag__fields {
		grid-template-columns: minmax(0, 1fr);
		padding: 4px 16px 12px;
	}

	.ml-rag__card-header {
		padding: 12px 16px;
	}
}
