body {
	font-family: system-ui, -apple-system, sans-serif;
	margin: 0.9rem;
	line-height: 1.5;
	background-color: #f2f2f2;
}

#header {
	clear: both;
	display: flex;
}

h1 { font-size: 1.7em; margin: 0 0 -0.4rem 0; }
h1 a { text-decoration: none; color: #AAA; }
h1 span { text-transform: lowercase; color: #06F; }

hr {
	clear: both;
	border: 1px solid #AAA;
}

label {
	font-weight: bold;
	display: block;
	margin-bottom: 0.5rem;
}

input[type="text"] {
	width: 95%;
	padding: 8px;
	font-size: 13px;
	margin-bottom: 0.5rem;
	font-family: monospace;
}

#wrapper {
	clear: both;
	display: flex;
}

ul, li { list-style-type: none; }

ul {
	margin: 0;
	padding: 0;
}

li {
	display: inline-block;
}

.pagination-link {
	text-decoration: underline;
	cursor: pointer;
}

#examples {
	margin-top: 1rem;
	flex: 1;
}

#examples p {
	margin-bottom: 0.5rem;
}

#examples li a {
	font-family: monospace;
	display: inline-block;
	margin: 0 0.5rem 0.75rem 0;
	padding: 4px 8px;
	background: white;
	border-radius: 4px;
	text-decoration: none;
	color: #333;
	font-size: 0.8rem;
}
#examples li a span { color: #BBB; font-size: 0.9em; }
#examples li a:hover {
	background: #FFA;
}

#query {
	border: none;
	border-radius: 4px;
}

#results {
	clear: both;
	flex: 1;
	font-family: monospace;
	margin-top: 1rem;
	padding-bottom: 0.75rem;
	overflow-x: auto;
	white-space: nowrap;
}
.header {
	margin-bottom: 1rem;
}
.result-line {
	padding: 2px 0;
}
.source {
	display: inline-block;
	width: 1.2em;
	cursor: help;
	color: #666;
}
.path {
	display: inline-block;
}
.path-segment {
	color: #06F;
	cursor: pointer;
}
.path-segment:hover {
	text-decoration: underline;
}
.separator {
	color: #666;
	margin: 0 2px;
}
.match {
	font-weight: bold;
	background: #FFA;
}

.pagination {
	margin-top: 1rem;
}
.pagination a {
	display: inline-block;
	padding: 4px 8px;
	margin: 0 4px;
	background: #f0f0f0;
	border-radius: 4px;
	text-decoration: none;
	color: #333;
}
.pagination a.active {
	background: #333;
	color: white;
}
.pagination-info {
	color: #666;
	margin-bottom: 0.5rem;
}

#links li.break-before::before {
	content: "";
	width: 100%;
	display: block !important;
}

#links li {
	font-size: 0.8rem;
}

/* Apply wrapping only on mobile screens */
@media screen and (max-width: 768px) {
	.mobilehide {
		display: none;
	}
	.mobilewrap {
		content: "";
		display: block;
		width: 100%;
	}
}

.mobile-tooltip {
	position: fixed;
	z-index: 1000;
	background: rgba(0, 0, 0, 0.8);
	color: white;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	font-size: 14px;
	max-width: 90%;
	text-align: center;
	pointer-events: none;
	animation: fadeInOut 2s ease-in-out;
	word-break: break-word;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInOut {
	0% { opacity: 0; }
	10% { opacity: 1; }
	90% { opacity: 1; }
	100% { opacity: 0; }
}

/* Enhance touch target size for mobile */
.source {
	min-width: 2em;  /* Increase touch target width */
	min-height: 1.5em; /* Increase touch target height */
	text-align: left;
	-webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
}

.mobilewrap {
	color: #AAA;
}

/* Media query for mobile devices */
@media (max-width: 768px) {
	.mobile-tooltip {
		font-size: 16px; /* Larger text for mobile */
		padding: 1rem 1.5rem;
	}
}
