* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-family: "Roboto", sans-serif;
}

html,
body,
.container {
	height: 100%;
	width: 100%;
}

body {
	background-color: #212121;
	color: #e0e0e0;
}

button {
	background-color: #f44336;
	color: white;
	cursor: pointer;
}

button:hover {
	background-color: #d32f2f;
}

.container {
	display: grid;
	grid-template-rows: 65% 35%;
	grid-template-columns: 40% 60%;
	border: 1px solid #444444;
}

.box {
	height: 100%;
	width: 100%;
	background-color: #2c2c2c;
	border: 1px solid #444444;
	padding: 15px;
	overflow: auto;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar {
	width: 12px;
}

::-webkit-scrollbar-thumb {
	background-color: #f44336;
	border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
	background-color: #d32f2f;
}

::-webkit-scrollbar-track {
	background-color: #333333;
	border-radius: 6px;
}

#query-container {
	grid-row: 1 / span 2;
}

#query-results {
	grid-row: 1;
}

#additional-info {
	grid-row: 2;
}

.center {
	text-align: center;
	justify-content: center;
	color: #e0e0e0;
	font-weight: bold;
}
#query-results {
	overflow: hidden;
}

#results-area {
	height: calc(100% - 34px);
	border: none;
	padding: 0px;
	overflow: auto;
}

#results-area table {
	border-collapse: collapse;
	font-size: 16px;
	width: 100%;
	text-align: left;
	background-color: #2f2f2f;
	color: #f0f0f0;
}

#results-area th,
#results-area td {
	padding: 8px;
	max-height: 40px;
	border-right: 1px solid #666666;
}

#results-area td:last-child {
	border-right: none;
}

#results-area th:last-child {
	border-right: none;
}

#results-area th {
	background-color: #f44336;
	font-weight: bold;
	text-align: center;
}

#results-area tr:nth-child(even) {
	background-color: #444444;
}

#results-area tr:hover {
	background-color: #555555;
}

#results-area td {
	white-space: nowrap;
}

#query-results.wrap td {
	word-wrap: break-word;
	white-space: normal;
}

.switch-container {
	float: right;
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
	max-width: 100%;
	flex-wrap: wrap;
}

.switch-label {
	font-size: 14px;
}

.switch-input {
	width: 50px;
	height: 24px;
	appearance: none;
	background-color: #ccc;
	border-radius: 30px;
	position: relative;
	transition: background-color 0.3s;
	cursor: pointer;
}

.switch-input:checked {
	background-color: #f44336;
}

.switch-input:checked::before {
	left: 26px;
}

.switch-input::before {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background-color: white;
	transition: left 0.3s;
}
.error {
	color: #f44336;
	font-weight: bold;
	animation: error-fade 2s forwards;
}

@keyframes error-fade {
	0% {
		color: #f44336;
	}

	100% {
		color: #f0f0f0;
	}
}
:root {
	--sidebar-width: 350px;
}

#examples-sidebar {
	position: fixed;
	top: 0;
	left: calc(var(--sidebar-width) * -1);
	width: var(--sidebar-width);
	height: 100%;
	background-color: #333;
	color: #fff;
	overflow-y: auto;
	transition: left 0.3s ease;
	z-index: 1000;
	border-right: 3px solid #444;
}

#examples-sidebar.open {
	left: 0;
}

#examples-sidebar ul {
	list-style-type: none;
}

#examples-sidebar li {
	padding: 10px;
	border-bottom: 1px solid #444;
}

.example pre {
	white-space: pre-wrap;
	word-wrap: break-word;
	word-break: break-word;
	overflow-wrap: break-word;
}

#examples-sidebar li:hover {
	text-decoration: underline;
	cursor: pointer;
}

#examples-button {
	position: fixed;
	left: 0;
	top: 10%;
	height: auto;
	width: 25px;
	border: none;
	font-weight: bold;
	border-radius: 4px;
	cursor: pointer;
	writing-mode: vertical-lr;
	text-orientation: sideways;
	white-space: nowrap;
	padding: 10px 0px 10px;
	transition: left 0.3s ease;
	z-index: 1100;
}

#examples-button.open {
	left: var(--sidebar-width);
}

.keyword {
	color: #f44336;
	font-weight: bold;
}

.comment {
	color: gray;
	font-style: italic;
}

.comment .keyword {
	color: gray;
	font-style: italic;
}
form {
	height: 100%;
	width: calc(100% - 20px);
	margin-left: 20px;
	justify-content: center;
	align-items: center;
}

#query-container textarea {
	height: calc(100% - 70px);
	width: 100%;
	border: 1px solid #444444;
	border-radius: 4px;
	padding: 10px;
	font-size: 14px;
	color: #e0e0e0;
	background-color: #333333;
	font-size: 18px;
	resize: none;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#form-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	margin: 10px 0px;
}

#submit-query-button {
	display: flex;
	float: right;
	height: 50px;
	width: 100px;
	padding: 10px;
	font-weight: bold;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	justify-content: center;
	align-items: center;
}

.indicator {
	display: none;
	height: 100%;
	aspect-ratio: 1;
	border: 3px solid rgba(255, 255, 255, .3);
	border-radius: 50%;
	border-top-color: #fff;
	animation: spin 1s ease-in-out infinite;
	-webkit-animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
	to {
		-webkit-transform: rotate(360deg);
	}
}

@-webkit-keyframes spin {
	to {
		-webkit-transform: rotate(360deg);
	}
}

.htmx-request .indicator-replace {
	display: none;
}

.htmx-request .indicator {
	display: block;
}

#logos {
	display: flex;
	gap: 10%;
	height: 50px;
	justify-content: left;
	align-items: center;
}

#logos .logo {
	display: flex;
	height: 50%;
	aspect-ratio: 1;
	text-decoration: none;
}

#logos .logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.2s ease, filter 0.2s ease;
	filter: invert(1);
}

#logos .logo:hover img {
	transform: scale(1.1);
	filter: invert(0);
}

@media (max-width: 600px) {
	#logos {
		flex-direction: column;
		width: 25%;
		align-items: start;
		gap: 0;
	}

	#submit-query-button {
		width: 70%;
	}
}
#welcome-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	display: flex;
	justify-content: center;
	align-items: center;
	color: white;
	font-family: 'Roboto', sans-serif;
	z-index: 9999;
}

#popup-content {
	background-color: #333;
	padding: 20px;
	border-radius: 10px;
	text-align: center;
	max-width: 500px;
	box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

#popup-content h2 {
	margin-top: 0;
	margin-bottom: 10px;
}

#popup-ok-btn {
	margin-top: 20px;
	border: none;
	padding: 10px 20px;
	cursor: pointer;
	border-radius: 5px;
	font-size: 16px;
}
