/* Invisible character tool — Método 1 (presets) and Método 2 (custom
 * stepper) as two boxes side by side on wider screens, stacked on
 * mobile. Reuses .ldh-style-card from font-generator.css for the
 * individual "label + preview + copy" cards so this tool doesn't
 * duplicate that component. Mobile-first. */

.ldh-ic__methods {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--ldh-space-lg);
	margin-top: var(--ldh-space-md);
}

.ldh-ic__method {
	padding: var(--ldh-space-md);
	border: 1px solid var(--ldh-color-border);
	border-radius: var(--ldh-radius);
	background: var(--ldh-color-bg);
}

.ldh-ic__method-title {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--ldh-color-text);
}

.ldh-ic__method-desc {
	margin: 0 0 var(--ldh-space-md);
	font-size: 13px;
	color: var(--ldh-color-muted);
}

.ldh-ic__presets {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--ldh-space-sm);
}

/* The button IS the copy action — no separate preview + "Copiar" button.
 * Its label wraps the (invisible) character block in a bracket pair
 * that differs per preset — since the content between the brackets
 * never renders, the brackets themselves are the only visual size cue
 * ("Pequeno ( )", "Médio { }", "Grande [ ]"). Same convention as
 * editpad.org/tool/br/caractere-invisivel. */
.ldh-ic__preset-btn {
	min-height: 44px;
	padding: var(--ldh-space-sm) var(--ldh-space-md);
	border: 1px solid var(--ldh-color-accent);
	border-radius: var(--ldh-radius-sm);
	background: transparent;
	color: var(--ldh-color-accent);
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.ldh-ic__preset-btn:hover,
.ldh-ic__preset-btn:focus-visible {
	background: var(--ldh-color-accent);
	color: #ffffff;
}

.ldh-ic__preset-btn.is-copied {
	background: var(--ldh-color-success);
	border-color: var(--ldh-color-success);
	color: #ffffff;
}

.ldh-ic__stepper {
	display: flex;
	align-items: center;
	gap: var(--ldh-space-sm);
	margin-bottom: var(--ldh-space-md);
}

.ldh-ic__stepper-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	flex: 0 0 auto;
	border: 1px solid var(--ldh-color-border);
	border-radius: var(--ldh-radius-sm);
	background: var(--ldh-color-surface);
	color: var(--ldh-color-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.ldh-ic__stepper-btn:hover,
.ldh-ic__stepper-btn:focus-visible {
	border-color: var(--ldh-color-accent);
	color: var(--ldh-color-accent);
}

.ldh-ic__stepper-input {
	width: 100%;
	max-width: 96px;
	height: 44px;
	padding: 0 var(--ldh-space-sm);
	border: 1px solid var(--ldh-color-border);
	border-radius: var(--ldh-radius-sm);
	background: var(--ldh-color-surface);
	color: var(--ldh-color-text);
	font-size: 16px; /* also prevents iOS Safari auto-zoom on focus */
	font-weight: 600;
	text-align: center;
}

.ldh-ic__stepper-input:focus {
	outline: 2px solid var(--ldh-color-accent);
	outline-offset: 2px;
}

.ldh-ic__test {
	margin-top: var(--ldh-space-lg);
	padding: var(--ldh-space-md);
	border: 1px solid var(--ldh-color-border);
	border-radius: var(--ldh-radius);
	background: var(--ldh-color-bg);
}

.ldh-ic__test-area {
	width: 100%;
	min-height: 64px;
	padding: var(--ldh-space-sm) var(--ldh-space-md);
	border: 1px solid var(--ldh-color-border);
	border-radius: var(--ldh-radius-sm);
	background: var(--ldh-color-surface);
	color: var(--ldh-color-text);
	font-size: 16px;
	resize: vertical;
}

.ldh-ic__test-area:focus {
	outline: 2px solid var(--ldh-color-accent);
	outline-offset: 2px;
}

.ldh-ic__test-count {
	margin: var(--ldh-space-sm) 0 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--ldh-color-muted);
}

.ldh-ic__test-count.is-nonzero {
	color: var(--ldh-color-success);
}

@media (min-width: 641px) {
	.ldh-ic__methods {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}

	.ldh-ic__presets {
		grid-template-columns: repeat(3, 1fr);
	}
}
