/**
 * LLM Demo Modal - Styles
 * FAB + Modale pour le chat (clone visuel d'aegis_demo_modal).
 *
 * @version 1.0.0
 * @date    2026.05.05
 */

/* === FAB === */
.llm-demo-fab {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--primary-color, #FFC735);
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
	z-index: 9998;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.llm-demo-fab:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
}

.llm-demo-fab-icon {
	width: 36px;
	height: 36px;
	transition: transform 0.3s ease;
}

.llm-demo-fab-active .llm-demo-fab-icon {
	transform: rotate(90deg);
}

.llm-demo-fab-pulse {
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--primary-color, #FFC735);
	animation: llmDemoFabPulse 2s infinite;
	z-index: -1;
}

@keyframes llmDemoFabPulse {
	0%   { transform: scale(1);   opacity: 0.5; }
	100% { transform: scale(1.5); opacity: 0;   }
}

.llm-demo-fab-active .llm-demo-fab-pulse {
	animation: none;
	opacity: 0;
}

/* === MODAL === */
.llm-demo-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	padding: 24px;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.llm-demo-modal-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.llm-demo-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.llm-demo-modal-open .llm-demo-modal-backdrop {
	opacity: 1;
}

.llm-demo-modal-container {
	position: relative;
	width: 100%;
	max-width: 800px;
	max-height: calc(100vh - 100px);
	background: var(--card-bg, #232323);
	border: 1px solid var(--border-dark, #333);
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
	transform: translateY(100%) scale(0.9);
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	overflow: hidden;
}

.llm-demo-modal-open .llm-demo-modal-container {
	transform: translateY(0) scale(1);
}

.llm-demo-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--border-dark, #333);
	background: var(--frame-bg, #2F3235);
}

.llm-demo-modal-title {
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 600;
	color: var(--text-primary, #fff);
}

.llm-demo-modal-logo {
	width: 32px;
	height: 32px;
}

.llm-demo-modal-close {
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: var(--text-muted, #888);
	font-size: 24px;
	cursor: pointer;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.llm-demo-modal-close:hover {
	background: var(--border-dark, #333);
	color: var(--text-primary, #fff);
}

.llm-demo-modal-body {
	flex: 1;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.llm-demo-modal-chat {
	padding: 0;
	max-width: none;
	height: 100%;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.llm-demo-modal-chat .chat_history {
	flex: 1;
	min-height: 250px;
	max-height: none;
	border: none;
	border-radius: 0;
	margin-bottom: 0;
	overflow-y: auto;
}

.llm-demo-modal-chat .aegis-header {
	display: none;
}

.llm-demo-modal-chat .input_wrapper {
	border-radius: 0;
	border: none;
	border-top: 1px solid var(--border-dark, #333);
}

.llm-demo-modal-chat .input_footer {
	padding: 8px 16px;
	background: var(--frame-bg, #2F3235);
}

@media (max-width: 600px) {
	.llm-demo-modal {
		padding: 0;
	}

	.llm-demo-modal-container {
		max-width: none;
		max-height: 100vh;
		border-radius: 0;
		height: 100%;
	}

	.llm-demo-fab {
		bottom: 16px;
		right: 16px;
		width: 56px;
		height: 56px;
	}

	.llm-demo-fab-icon {
		width: 32px;
		height: 32px;
	}
}

@media (min-width: 768px) {
	.llm-demo-modal {
		align-items: center;
		justify-content: center;
	}

	.llm-demo-modal-container {
		max-height: 600px;
	}
}
