
:root {
    --tenant-primary: #001B32;
    --tenant-secondary: #005094;
    --menu-hover-color: #E2F2FF;
    --menu-hover-color-rgb: rgba(226, 242, 255, 1);
}

body,
html {
	height: 100%;
	margin: 0;
	font-family: "Roboto", sans-serif;
	background-color: #f8f9fa;
}

.btn {
	background-color: var(--tenant-primary);
	border: 1px solid var(--tenant-primary);
	color: white;
}

header {
	height: 56px;
	display: flex;
	align-items: center;
	padding: 0 1.35rem;
	background-color: var(--tenant-primary);
	font-weight: 400;
	font-size: 1.2rem;
	color: white;
	position: sticky;
	width: 100%;
	box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 50%);
	z-index: 997;
}

header img {
	height: 32px;
	margin-right: 0.75rem;
}

#app {
	display: flex;
	height: calc(100vh - 56px);
	background-color: #F0F3F8;
}

.sidebar {
	width: 320px;
	background-color: white;
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
	display: flex;
	flex-direction: column;
	border-right: 1px solid #dee2e6;
	padding-left: 0.75rem;
	padding-right: 0.75rem;
	overflow-y: auto;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.sidebar:-webkit-scrollbar-track {
    background: transparent;
}

.chat-list,
.template-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.chat-list li,
.template-list li {

	padding: 0.6rem 1rem;
	border-radius: 6px;
	margin-bottom: 6px;
	cursor: pointer;

}

.chat-list li:hover,
.template-list li:hover {
	background-color: var(--menu-hover-color) !important;

	color: var(--tenant-secondary);
}

.section-title {
	font-size: 0.9rem;
	color: #6c757d;
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
	padding-left: 1rem !important;

}

.chat-area {
	flex: 1;
	display: flex;
	flex-direction: column;
	margin: 0 auto;
	width: 100%;
	max-width: 1400px;
	::-webkit-scrollbar {
    display: none;
}
}

.chat-messages {
	flex: 1;
	padding: 2rem;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.message {
	display: flex;
	max-width: 75%;
}

.message.user {
	align-self: flex-end;
	justify-content: flex-end;
}

.message.assistant {
	align-self: flex-start;
	justify-content: flex-start;
}

.bubble {
	padding: 1.05rem;
	border-radius: 1.25rem;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
	line-height: 1.5;
	font-size: 1rem;
	background-color: #f1f3f5;
}

.user .bubble {
	background-color: white;
	color: #212529;
}

.assistant .bubble {
	background-color: white;
	color: #212529;
}

.bubble img {
	max-width: 100%;
	border-radius: 12px;
}

.chat-input {

	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.input-row {
	display: flex;
	gap: 0.5rem;
	position: relative;
}

.chat-input input {
	height: 50px;
	font-size: 1rem;
	flex: 1;
}

.chat-input label {
	min-width: 100px;
}

.dropdown-launcher {
	position: relative;
}

.dropdown-launcher .toggle-menu {
	width: 32px;
	height: 100%;
	font-size: 1.5rem;
	padding: 5px;
	line-height: 1;
	border-radius: 5px;
	color: #212529;
	border: none;
}

.dropdown-launcher .action-menu {
	position: absolute;
	bottom: 50px;
	left: 0;
	background: white;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
	display: none;
	flex-direction: column;
	z-index: 1000;
	overflow: hidden;
}

.dropdown-launcher .action-menu .dropdown-item {
	padding: 0.5rem 1rem;
	cursor: pointer;
	white-space: nowrap;
}

.dropdown-launcher .action-menu .dropdown-item:hover {
	background-color: #f8f9fa;
}

.dropdown-launcher.show .action-menu {
	display: flex;
}

#file-preview-zone .pill {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.75rem;
	background-color: #dee2e6;
	border-radius: 999px;
	font-size: 0.85rem;
	color: #212529;
}

#file-preview-zone .pill i {
	margin-right: 0.5rem;
}

#file-preview-zone .pill .remove {
	margin-left: 0.5rem;
	cursor: pointer;
	font-weight: bold;
}

.btn:active {
	background-color: var(--tenant-secondary) !important;
	border-color: var(--tenant-secondary) !important;
}

.btn:hover {
	background-color: var(--tenant-secondary) !important;
	border-color: var(--tenant-secondary) !important;
	color: white;
}

.btn:focus-visible {
	background-color: var(--tenant-secondary) !important;
	border-color: var(--tenant-secondary) !important;
}

.chat-list li {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center;
}



.chat-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn-outside {
	align-self: flex-end;
	font-size: 1.2rem;
	color: #888;
	cursor: pointer;
	margin-top: 4px;
	position: relative;
	opacity: 0;
	/* <– Neu: immer da, aber unsichtbar */
	height: 20px;
	/* Fixe Höhe, damit Platz reserviert ist */
	transition: opacity 0.2s ease;
	display: inline-flex;
	align-items: center;
}

.message:hover .copy-btn-outside {
	opacity: 1;
	/* <– Zeige das Icon beim Hover */
}

.copy-btn-outside:hover {
	color: #000;
}

.copy-btn-outside i {
	font-size: 1.2rem;
}

/* Tooltip */
.copy-btn-outside .tooltiptext {
	visibility: visible;
	opacity: 0;
	width: 80px;
	background-color: #333;
	color: #fff;
	text-align: center;
	border-radius: 4px;
	padding: 2px 6px;
	position: absolute;
	bottom: 140%;
	right: 0;
	font-size: 0.75rem;
	transition: opacity 0.3s;
	pointer-events: none;
}

.bubble .dot-loader {
	display: inline-block;
	font-size: 1.5rem;
	line-height: 1;
	letter-spacing: 2px;
	animation: blink 1.4s infinite both;
}

@keyframes blink {
	0% {
		opacity: 0.2;
	}

	20% {
		opacity: 1;
	}

	100% {
		opacity: 0.2;
	}
}

.pdf-pill {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	margin-bottom: 8px;
	background-color: #dee2e6;
	/* Hellgrau/Hellblau */
	color: #000;
	font-size: 0.9rem;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 500;
	max-width: 100%;
	overflow-wrap: break-word;
}

.app-mask {
	padding: 2rem;
	display: flex;
	justify-content: center;
}

.visualizer-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	min-height: 100%;
	padding: 2rem 1rem;
	overflow-y: auto;
}

#result {
	margin-top: 2rem;
	display: flex;
	flex-direction: column;
	align-items: center;
}

#result img {
	width: 100%;
	/* Bild nimmt gesamte Breite des Containers ein */
	max-width: 600px;
	/* Genauso breit wie deine .card */
	height: auto;
	border-radius: 12px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.spinner {
	width: 48px;
	height: 48px;
	border: 5px solid #dee2e6;
	border-top: 5px solid var(--tenant-primary);
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-top: 2rem;
}

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

#image-preview img {
	margin-top: 1rem;
	max-width: 30%;
	border-radius: 12px;
}


.delete-icon, .edit-icon {
	visibility: hidden;
	opacity: 0;
	color: var(--tenant-secondary);
	width: 16px;
	/* Platz reservieren */
	transition: opacity 0.2s ease;
	flex-shrink: 0;
  	margin-left: 4px;
  	cursor: pointer;
}



.chat-list li:hover .delete-icon{
	visibility: visible;
	opacity: 1;
}

.chat-list li:hover .edit-icon{
	visibility: visible;
	opacity: 1;
}
.chat-list li.active,
.template-list li.active {
	background-color: var(--menu-hover-color) !important;

	color: var(--tenant-secondary);
}

/* SVG im aktiven Listenelement weiß färben */
.chat-list li.active svg,
.template-list li.active svg {
	fill: var(--tenant-secondary);
}

input:focus {
	outline: none;
	box-shadow: 0 0 0 0.25rem rgba(var(--menu-hover-color-rgb), 1) !important;
	border-color: var(--tenant-secondary) !important;
}


.input-wrapper {
	display: flex;
	flex-direction: column;
	border: 1px solid #dee2e6;
	border-radius: 1rem;
	padding: 0.75rem;
	background-color: white;
	gap: 0.75rem;
}

/* Textbereich */
.input-wrapper textarea {
	resize: none;
	border: none;
	outline: none;
	font-size: 1rem;
	line-height: 1.5;
	max-height: 8.5em;
	overflow-y: auto;
	background: transparent;
	min-height: 24px;
}

/* Leiste darunter */
.input-toolbar {
	display: flex;
	align-items: center;

	gap: 0.5rem;
}

/* Upload-Button (Plus) */
.toolbar-btn {
	background: none;
	border: none;
	cursor: pointer;
	color: #212529;
	font-size: 1.4rem;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.toolbar-btn:hover {
	background-color: rgba(0, 0, 0, 0.05);
}

/* Action-Dropdown */
.dropdown-launcher {
	position: relative;
}

.dropdown-launcher .action-menu {
	position: absolute;
	bottom: 42px;
	left: 0;
	background: white;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
	display: none;
	flex-direction: column;
	z-index: 1000;
	overflow: hidden;
}

.dropdown-launcher.show .action-menu {
	display: flex;
}

.dropdown-item {
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	cursor: pointer;
	white-space: nowrap;
	background-color: #fff;
}

.dropdown-item:hover {
	background-color: #f8f9fa;
}

/* Senden-Button */
.send-button {
	background-color: var(--tenant-primary);
	color: white;
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	font-size: 1.4rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	margin-left: auto;
}

.send-button:hover {
	background-color: var(--tenant-secondary);
}

.menu-item {
  display: flex;
  align-items: center;
  cursor: pointer;
	max-width: 100%;      /* verhindert Überlauf */
  overflow: hidden;     /* begrenzt sichtbaren Raum */
}
.menu-item svg {
  margin-right: 5px;
}



.bubble h1 {
  font-size: 2rem;      /* 32px */
  line-height: 1.3;
  margin-bottom: 1rem;
}

.bubble h2 {
  font-size: 1.5rem;     /* 24px */
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.bubble h3 {
  font-size: 1.25rem;    /* 20px */
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.bubble h4 {
  font-size: 1.125rem;   /* 18px */
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.bubble h5 {
  font-size: 1rem;       /* 16px */
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.bubble h6 {
  font-size: 0.875rem;   /* 14px */
  font-weight: 600;
  margin-bottom: 0.5rem;
}




.sidebar-button {


	padding-left: 1rem;
	padding-right: 1rem;

}

.chat-list::-webkit-scrollbar {
    width: 6px;
}

.chat-list::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.chat-list::-webkit-scrollbar-track {
    background: transparent;
}

.badge.bg-primary {

	background-color: var(--tenant-secondary) !important;
}

.bg-primary {

	background-color: var(--tenant-secondary) !important;
}


.bubble p {
    margin-bottom: 0 !important;
}

.message.assistant .bubble p {
  margin-bottom: 1rem !important;
}

.message.assistant .bubble p:last-of-type {
  margin-bottom: 0 !important;
}


 .section-title.collapsed svg {
    transform: rotate(0deg);
    transition: transform 0.2s;
}

.section-title svg {
    transform: rotate(180deg);
    transition: transform 0.2s;
}

.chat-title {
  display: flex;
  align-items: center;
  justify-content: space-between; /* damit icons rechts sind */
  gap: 8px;
  max-width: 100%;
  overflow: hidden;
}

.edit-icon,
.delete-icon {
  visibility: hidden;
  opacity: 0;
  color: var(--tenant-secondary);
  width: 16px;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
  cursor: pointer;
  margin-left: 0; /* entferne den linken Abstand */
}

.chat-title-text {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.icon-group {
  display: flex;
  gap: 8px; /* optional, je nach gewünschtem Abstand */
}

/* Die letzte Sidebar-Sektion (Letzte Chats) füllt den Rest */
.sidebar-section.last {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* Die Chatliste selbst füllt die .last-Sektion und scrollt bei Bedarf */
.chat-list {
 flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;       /* Scrollbar nur hier */
  padding-right: 4px;
  max-height: 400px;      /* dein gewünschtes Limit */
}

/* Dein Wrapper */
.input-wrapper {
  position: relative;
}

/* Browser/Theme-Highlight beim Drag/Focus komplett aus */
.input-wrapper,
.input-wrapper:focus,
.input-wrapper:focus-within {
  outline: none !important;
  box-shadow: none !important;
}

/* Falls dein Theme beim Drag eine Border setzt: */
.input-wrapper.dragover {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Vollflächiges Overlay */
.drop-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  pointer-events: none;
  z-index: 999;              /* über allem */
  opacity: 0;
  transition: opacity 150ms ease;
}

/* Aktiv nur während Drag */
.input-wrapper.dragover .drop-overlay {
  background: var(--tenant-primary);
  opacity: 0.95;
  pointer-events: auto;
}

.tooltip-wide .tooltip-inner {
  max-width: 550px !important; /* oder auto für dynamische Breite */

}

/* Container begrenzen + zentrieren */
.visualizer-wrapper #gallery-container {
  max-width: 600px;        /* Kappgrenze */
}


/* Sidebar: eigener Scroll für alles */
.sidebar {
  height: 100%;
  min-height: 0;
  overflow-y: auto;   /* Scrollbar für die gesamte Sidebar */
}

/* Andere Sektionen behalten ihre natürliche Höhe */
.sidebar-section {
  flex: 0 0 auto;
}

/* Letzte Sektion wächst mit */
.sidebar-section.last {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* Chatliste: bekommt EIGENE Scrollbar + max-height */
.chat-list {
   flex: 1 1 auto;
  min-height: 200px;       /* Mindesthöhe – nach Wunsch ändern */
  max-height: 100%;        /* darf höchstens so hoch werden wie die .last-Sektion */
  overflow-y: auto;        /* eigene Scrollbar */
  padding-right: 4px;
}

.mic-btn.recording svg {
  color: red;
}
#mic-controls button {
  margin-left: .5rem;
  font-size: 1.2rem;
}
.hidden { display: none; }

#mic-visual {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 100%; /* kleiner Bereich */
}
#mic-wave {
  width: 100%;   /* feste Breite */
  height: 40px;   /* kleinere Höhe */
  background: none;
  border-radius: 6px;
	color: red;
}
.mic-actions button {
  font-size: 16px;
  background: none;
  border: none;
  cursor: pointer;
}

.mic-actions {

	width: 7%;

}

.hidden {
  display: none !important;
}

#mic-loader {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.loader {
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-top: 2px solid #007bff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

#transcribe-loader {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%); /* zentriert */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  z-index: 50;
}

#transcribe-loader .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #ccc;
  border-top-color: var(--tenant-secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

img, svg {
  vertical-align: unset;
}
