.tui-input {
	margin: 0.5rem 0;
	font-size: 0.9rem;
}

.tui-input.inline {
	display: inline-flex;
	flex-direction: column;
	margin: 0 0.5rem 0 0;
}

.input-label {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-bottom: 0.35rem;
	color: var(--terminal-muted);
	font-size: 0.85rem;
}

:global(.label-icon) {
	color: var(--input-color);
}

.input-wrapper {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.5rem 0.75rem;
	background: color-mix(in srgb, var(--terminal-bg) 80%, black);
	border: 1px solid var(--terminal-muted);
	border-radius: 4px;
	transition: all 0.15s ease;
}

.input-wrapper:focus-within {
	border-color: var(--input-color);
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--input-color) 30%, transparent);
}

.tui-input.error .input-wrapper {
	border-color: #f38ba8;
}

.tui-input.disabled .input-wrapper {
	opacity: 0.5;
	cursor: not-allowed;
}

.input-prompt {
	color: var(--input-color);
	font-weight: bold;
	user-select: none;
}

.input-affix {
	color: var(--terminal-muted);
	font-size: 0.85rem;
}

.input-affix.prefix {
	margin-right: 0.25rem;
}

.input-affix.suffix {
	margin-left: 0.25rem;
}

input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: none;
	color: var(--terminal-text);
	font-family: inherit;
	font-size: inherit;
	outline: none;
}

input::placeholder {
	color: var(--terminal-muted);
	opacity: 0.6;
}

input:disabled {
	cursor: not-allowed;
}

.input-error {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.35rem;
	color: #f38ba8;
	font-size: 0.8rem;
}
