/* Code editor and token helpers */

.token-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
}

.token-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-family: Menlo, Consolas, monospace;
	border: 1px solid var(--md-color-border);
	background: var(--md-color-neutral-soft);
	color: var(--md-color-text);
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.token-chip:hover,
.token-chip:focus {
	border-color: var(--md-color-accent);
	background: var(--md-color-accent-soft);
}

.CodeMirror {
	border: 1px solid var(--md-color-border);
	border-radius: 8px;
	background: var(--md-color-surface);
	min-height: 240px;
	box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
	position: relative;
	overflow: hidden;
}

.CodeMirror-scroll {
	border-radius: 8px;
}

.CodeMirror-gutters {
	display: none;
}

.CodeMirror-lines {
	padding: 8px;
}

.CodeMirror pre {
	padding: 0 4px;
	margin: 0;
}

.wpmd-device-group {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.wpmd-device-group .wpmd-device-toggle {
	min-width: 32px;
	text-align: center;
}

.wpmd-device-group .is-active {
	background: var(--md-color-accent);
	border-color: var(--md-color-accent);
	color: #fff;
}
