/* Dedicated AI assistant workspace */

body.ai-assistant-page {
	background: #f8fafc;
}

.assistant-hero {
	background: linear-gradient(120deg, rgba(99, 102, 241, 0.12), rgba(56, 189, 248, 0.1));
	padding: 48px 0 36px;
}

.assistant-hero .hero-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.assistant-hero h1 {
	font-size: 2rem;
	font-weight: 800;
	color: #1f2937;
}

.assistant-hero p {
	color: #475569;
	max-width: 520px;
	font-size: 1rem;
}

.assistant-user-pill {
	display: flex;
	align-items: center;
	gap: 12px;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 999px;
	padding: 10px 16px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.assistant-user-pill .avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.95rem;
}

.assistant-user-pill .meta {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.assistant-user-pill strong {
	color: #1f2937;
}

.assistant-user-pill span {
	font-size: 0.8rem;
	color: #64748b;
}

.assistant-workspace {
	padding: 32px 0 60px;
}

.assistant-layout {
	display: grid;
	grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
	gap: 28px;
	align-items: stretch;
}

.assistant-sidebar,
.assistant-chat {
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.assistant-sidebar {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.sidebar-header {
	padding: 22px 24px 18px;
	border-bottom: 1px solid #f1f5f9;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.sidebar-header h2 {
	font-size: 1.15rem;
	color: #0f172a;
	font-weight: 700;
}

.sidebar-header button {
	border: none;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: #fff;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-header button:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.session-list {
	flex: 1;
	overflow-y: auto;
	padding: 18px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.session-empty {
	text-align: center;
	color: #94a3b8;
	font-size: 0.9rem;
	padding: 24px;
}

.session-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	background: #f8fafc;
	border-radius: 14px;
	padding: 12px 14px;
	border: 1px solid transparent;
	transition: all 0.2s ease;
}

.session-item.active {
	border-color: rgba(99, 102, 241, 0.35);
	background: #eef2ff;
	box-shadow: 0 12px 24px rgba(99, 102, 241, 0.12);
}

.session-select {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	border: none;
	background: none;
	color: inherit;
	cursor: pointer;
	flex: 1;
}

.session-select strong {
	font-size: 0.95rem;
	color: #1e293b;
}

.session-select span {
	font-size: 0.8rem;
	color: #64748b;
}

.session-delete {
	border: none;
	background: rgba(15, 23, 42, 0.05);
	color: #475569;
	width: 32px;
	height: 32px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.session-delete:hover {
	background: rgba(220, 53, 69, 0.08);
	color: #dc2626;
}

.assistant-sidebar footer {
	padding: 14px 18px 18px;
	border-top: 1px solid #f1f5f9;
	font-size: 0.82rem;
	color: #64748b;
	background: #f8fafc;
}

.assistant-chat {
	display: flex;
	flex-direction: column;
	min-height: 620px;
}

.assistant-chat-header {
	padding: 26px 28px 20px;
	border-bottom: 1px solid #f1f5f9;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.assistant-chat-header h2 {
	font-size: 1.4rem;
	margin-bottom: 6px;
	color: #0f172a;
}

.assistant-chat-header p {
	color: #475569;
	font-size: 0.95rem;
}

.assistant-chat-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.assistant-chat-actions button {
	border-radius: 10px;
	border: 1px solid #e2e8f0;
	background: #fff;
	padding: 8px 12px;
	font-size: 0.85rem;
	font-weight: 600;
	color: #475569;
	cursor: pointer;
	transition: all 0.2s ease;
}

.assistant-chat-actions button:hover {
	border-color: #6366f1;
	color: #6366f1;
}

.assistant-messages {
	flex: 1;
	padding: 24px 28px 22px;
	overflow-y: auto;
	background: linear-gradient(180deg, rgba(241, 245, 249, 0.6), rgba(241, 245, 249, 0));
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.assistant-messages::-webkit-scrollbar {
	width: 6px;
}

.assistant-messages::-webkit-scrollbar-thumb {
	background: rgba(148, 163, 184, 0.6);
	border-radius: 999px;
}

.message {
	max-width: 72%;
	background: #ffffff;
	padding: 14px 16px;
	border-radius: 16px;
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
	line-height: 1.55;
	color: #0f172a;
	position: relative;
}

.message-user {
	align-self: flex-end;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: #fff;
}

.message-user .message-meta {
	color: rgba(255, 255, 255, 0.75);
}

.message-assistant {
	align-self: flex-start;
	border: 1px solid rgba(99, 102, 241, 0.06);
}

.message-meta {
	margin-top: 10px;
	font-size: 0.75rem;
	color: #64748b;
}

.message-typing {
	display: flex;
	align-items: center;
	gap: 6px;
	background: rgba(99, 102, 241, 0.12);
	color: #475569;
}

.message-typing span {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: currentColor;
	animation: typing 1.2s infinite ease-in-out;
}

.message-typing span:nth-child(2) { animation-delay: 0.15s; }
.message-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
	0%, 80%, 100% { opacity: 0.2; transform: translateY(0); }
	40% { opacity: 1; transform: translateY(-3px); }
}


.assistant-prompts {
	padding: 0 28px 18px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-start;
}

.prompts-label {
	font-size: 0.82rem;
	font-weight: 600;
	color: #64748b;
	margin: 0;
	flex-basis: 100%;
}

.prompt-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.prompt-chip {
	border: 1px solid #e2e8f0;
	background: #fff;
	color: #475569;
	padding: 8px 12px;
	border-radius: 999px;
	font-size: 0.85rem;
	cursor: pointer;
	transition: all 0.2s ease;
}

.prompt-chip:hover {
	border-color: #38bdf8;
	color: #0ea5e9;
}


.assistant-composer {
	border-top: 1px solid #f1f5f9;
	padding: 18px 24px 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #fff;
}

.composer-toolbar {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.composer-input-row {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	padding: 12px 14px;
	transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.composer-input-row:focus-within {
	background: #ffffff;
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.composer-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #e2e8f0;
	background: #fff;
	color: #475569;
	padding: 8px 12px;
	border-radius: 12px;
	font-size: 0.85rem;
	cursor: pointer;
	transition: border 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.composer-btn:hover {
	border-color: #6366f1;
	color: #6366f1;
	background: rgba(99, 102, 241, 0.06);
}

.composer-attachments {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.attachment-chip {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #eef2ff;
	color: #3730a3;
	border-radius: 12px;
	padding: 6px 10px;
	font-size: 0.8rem;
}

.attachment-remove {
	border: none;
	background: rgba(59, 130, 246, 0.12);
	color: #1d4ed8;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.attachment-remove:hover {
	background: rgba(30, 64, 175, 0.18);
	color: #1e3a8a;
}

.assistant-composer textarea {
	flex: 1;
	min-height: 72px;
	max-height: 200px;
	resize: vertical;
	padding: 8px 4px;
	border: none;
	background: transparent;
	font-size: 0.95rem;
	line-height: 1.6;
	color: #1e293b;
	direction: inherit;
	text-align: start;
}

.assistant-composer textarea:focus {
	outline: none;
}

.composer-actions {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
}

.composer-hint {
	color: #94a3b8;
	font-size: 0.78rem;
}

.composer-send {
	border: none;
	border-radius: 14px;
	padding: 12px 20px;
	font-size: 0.95rem;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, #1a936f, #38bdf8);
	cursor: pointer;
	box-shadow: 0 15px 30px rgba(56, 189, 248, 0.3);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	flex-shrink: 0;
}

.composer-send:hover {
	transform: translateY(-1px);
	box-shadow: 0 18px 30px rgba(56, 189, 248, 0.35);
}

.composer-send i {
	font-size: 0.9rem;
}

.message-attachments {
	margin-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.message-attachment {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.82rem;
	color: #1d4ed8;
	background: rgba(59, 130, 246, 0.08);
	padding: 6px 10px;
	border-radius: 10px;
	text-decoration: none;
}

.message-attachment i {
	font-size: 0.8rem;
}

.message-user .message-attachment {
	background: rgba(255, 255, 255, 0.15);
	color: #f1f5f9;
}

.message-pending {
	opacity: 0.85;
}

.assistant-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 8px;
}

.assistant-action-btn {
	border: 1px solid #0ea5e9;
	background: rgba(14, 165, 233, 0.08);
	color: #0c4a6e;
	padding: 8px 12px;
	border-radius: 12px;
	font-size: 0.85rem;
	cursor: pointer;
	transition: all 0.2s ease;
}

.assistant-action-btn:hover {
	background: rgba(14, 165, 233, 0.16);
	border-color: #0284c7;
	color: #075985;
}

.assistant-safety-note {
	font-size: 0.8rem;
	color: #64748b;
	padding-top: 12px;
	text-align: right;
}

@media (max-width: 1024px) {
	.assistant-layout {
		grid-template-columns: 1fr;
	}

	.assistant-sidebar {
		order: 2;
	}
}

@media (max-width: 768px) {
	.assistant-hero {
		padding: 40px 0 28px;
	}

	.assistant-hero .hero-content {
		flex-direction: column;
		align-items: flex-start;
	}

	.assistant-chat {
		min-height: 520px;
	}

	.assistant-composer {
		flex-direction: column;
		align-items: stretch;
	}

	.composer-input-row {
		flex-direction: column;
		align-items: stretch;
	}

	.composer-send {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.assistant-messages {
		padding: 18px 18px 16px;
	}

	.message {
		max-width: 100%;
	}

	.assistant-prompts {
		padding: 0 18px 14px;
	}
}
