/* styles.css */
* {
	box-sizing: border-box;
}

body {
	font-family: Arial, sans-serif;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
	background-color: #f7f9fc;
	color: #333;
}

.main-container {
	width: 1000px;
	max-width: 90vw;
	height: 70vh;
	background: #ffffff;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	overflow: hidden;
	display: grid;
	grid-template-rows: 75px 1fr 30px;
	grid-template-columns: 200px 1fr;
	grid-template-areas:
		"header header"
		"sidebar main"
		"sidebar footer";
}

header {
	grid-area: header;
	display: flex;
	justify-content: center;
	align-items: center;
	background: #1e88e5;
	color: white;
	padding: 8px 16px;
	text-align: center;
}

nav {
	grid-area: sidebar;
	background: #e3f2fd;
	padding: 15px;
	display: flex;
	gap: 10px;
	flex-direction: column;
	border-right: 1px solid #ddd;
}

nav button {
	padding: 10px 15px;
	border: none;
	background: #1e88e5;
	color: white;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.3s;
}

nav button:hover {
	background: #1565c0;
}

main {
	grid-area: main;
	flex: 1;
	padding: 16px;
	display: flex;
}

footer {
	border-top: 1px solid #ddd;
	background: #f9f9f9;
	grid-area: footer;
	padding: 7px 7px;
	/*font-style: italic;*/
	font-size: 80%;
}

	footer.error-message {
		color: red;
	}

	footer.status-message {
	}

.section {
	display: none;
	width: 100%;
	overflow: hidden;
	flex-direction: column;
}

	.section *:first-child { margin-top: 0; }
	.section *:last-child { margin-bottom: 0; }

	.section.active {
		display: flex;
	}

	.wrapper {
		display: flex;
		flex-direction: column;
		gap: 10px;
		flex: 1 1 auto;
	}

		.chat-output {
			flex: 1 1 0; /* Wichtig: Platz korrekt zuweisen */
			display: flex;
			flex-direction: column;
			padding: 10px;
			border: 1px solid #ddd;
			border-radius: 4px;
			background-color: #f9f9f9;
			overflow-y: auto; /* Scrollbar aktivieren */
			font-family: Arial, sans-serif;
			max-height: 100%;
		}

			.user-message {
				text-align: right;
				align-self: flex-end;
				background-color: #e0f7fa;
				color: #00796b;
				margin: 5px 0;
				padding: 8px 12px;
				border-radius: 12px 12px 0 12px;
				display: inline-block;
				max-width: 80%;
			}

			.ai-message {
				text-align: left;
				align-self: flex-start;
				background-color: #fff9c4;
				color: #f57f17;
				margin: 5px 0;
				padding: 8px 12px;
				border-radius: 12px 12px 12px 0;
				display: inline-block;
				max-width: 80%;
			}

			.system-message {
				text-align: center;
				background-color: #eeeeee;
				color: #757575;
				margin: 10px 0;
				padding: 6px 10px;
				font-style: italic;
				border-radius: 8px;
				display: inline-block;
				max-width: 100%;
			}

		.input-wrapper {
			display: flex;
			gap: 10px;
		}

			.input-wrapper input,
			.input-wrapper select,
			.input-wrapper .select {
				flex: 1;
				border: 1px solid #ccc;
				border-radius: 4px;
				outline: none;
				font-family: Arial, sans-serif;
				font-size: 14px;
				padding: 10px 12px;
				transition: all 0.3s ease;
			}

				.input-wrapper .select {
					display: flex;
					padding: 0;
				}

					.input-wrapper .select select {
						border: 0;
					}

					.input-wrapper .select::before {
						font-family: bootstrap-icons !important;
						display: inline-flex;
						justify-content: center;
						align-items: center;
						aspect-ratio: 1;
						font-size: 1.5em;
						border-right: 1px solid #ccc;
						background: #ddd;
					}

						.input-wrapper .select.microphone::before {
							content: '\F48D';
						}

						.input-wrapper .select.assistant::before {
							content: '\F8A2';
						}

						.input-wrapper .select.thread::before {
							content: '\F256';
						}

			.input-wrapper button {
				padding: 10px 15px;
				border: none;
				background: #1e88e5;
				color: white;
				border-radius: 4px;
				cursor: pointer;
			}

			.input-wrapper button:hover {
				background: #1565c0;
			}



/* Allgemeine Stile für Input-, Select- und Button-Elemente */
input, select, button {

}

/* Fokus-Effekte */
input:focus, select:focus, button:focus {
	border-color: #1e88e5;
	box-shadow: 0 0 5px rgba(30, 136, 229, 0.5);
}

/* Input-Elemente */
input {
	width: 100%;
	background-color: #fdfdfd;
}

/* Select-Elemente */
select {
	width: 100%;
	background-color: #fdfdfd;
	cursor: pointer;
}


/* Deaktivierte Elemente */
input:disabled, select:disabled, button:disabled {
	background-color: #e0e0e0;
	border-color: #d0d0d0;
	cursor: not-allowed;
	color: #8a8a8a;
}


#connections {
	padding: 0;
	margin: 0;
	margin-top: auto;
	list-style: none;
}

	/* Basisstil für Listenpunkte */
	.status-item {
		display: block;
		align-items: center;
		gap: 10px; /* Abstand zwischen Statuspunkt und Text */
		font-size: 14px;

		/* Text-Overflow-Einstellungen */
		overflow: hidden;       /* Versteckt überfließenden Text */
		white-space: nowrap;    /* Verhindert Zeilenumbruch */
		text-overflow: ellipsis; /* Zeigt "..." bei überfließendem Text */
	}

		/* Statuspunkt vor dem Text */
		.status-item::before {
			content: '';
			display: inline-block;
			width: 10px;
			height: 10px;
			border-radius: 50%; /* Kreisform */
			background-color: grey; /* Standardfarbe */
			flex-shrink: 0; /* Verhindert Größenanpassung */
			margin-right: 10px;
		}

		/* Grün für connected */
		.status-item.connected::before {
			background-color: green;
		}

		/* Gelb für connecting (blinkt) */
		.status-item.connecting::before {
			background-color: #ffa300;
			animation: blink 500ms infinite;
		}

		/* Rot für disconnected */
		.status-item.disconnected::before {
			background-color: red;
		}

		/* Blinkanimation */
		@keyframes blink {
			0%, 100% {
				opacity: 1;
			}
			50% {
				opacity: 0;
			}
		}
