/* Ollie Command Palette */

.ocp-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 12vh;
	background: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ocp-overlay.ocp-open {
	opacity: 1;
	visibility: visible;
}

.ocp-modal {
	width: 100%;
	max-width: 620px;
	max-height: 70vh;
	margin: 0 16px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: scale(0.96) translateY(-10px);
	transition: transform 0.2s ease;
}

.ocp-overlay.ocp-open .ocp-modal {
	transform: scale(1) translateY(0);
}

/* Input area */
.ocp-input-wrap {
	display: flex;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid #e5e7eb;
	gap: 12px;
}

.ocp-input-wrap svg {
	flex-shrink: 0;
	color: #9ca3af;
}

.ocp-input {
	flex: 1;
	border: none;
	outline: none;
	font-size: 16px;
	font-family: inherit;
	background: transparent;
	color: #111;
	line-height: 1.5;
}

.ocp-input::placeholder {
	color: #9ca3af;
}

.ocp-kbd {
	flex-shrink: 0;
	font-size: 12px;
	color: #9ca3af;
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	padding: 2px 6px;
	font-family: inherit;
}

/* Chat messages area */
.ocp-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ocp-messages:empty {
	display: none;
}

.ocp-message {
	max-width: 85%;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.6;
	word-wrap: break-word;
}

.ocp-message a {
	color: inherit;
	text-decoration: underline;
}

.ocp-message-user {
	align-self: flex-end;
	background: #2563eb;
	color: #fff;
	border-bottom-right-radius: 2px;
}

.ocp-message-bot {
	align-self: flex-start;
	background: #f3f4f6;
	color: #111;
	border-bottom-left-radius: 2px;
}

.ocp-message-bot p {
	margin: 0 0 8px;
}

.ocp-message-bot p:last-child {
	margin-bottom: 0;
}

.ocp-message-bot ul,
.ocp-message-bot ol {
	margin: 4px 0 8px;
	padding-left: 20px;
}

.ocp-message-bot code {
	background: #e5e7eb;
	padding: 1px 4px;
	border-radius: 3px;
	font-size: 13px;
}

.ocp-message-bot pre {
	background: #1f2937;
	color: #e5e7eb;
	padding: 10px 12px;
	border-radius: 6px;
	overflow-x: auto;
	margin: 8px 0;
	font-size: 13px;
}

.ocp-message-bot pre code {
	background: none;
	padding: 0;
	color: inherit;
}

/* Sources */
.ocp-sources {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #e5e7eb;
	font-size: 12px;
	color: #6b7280;
}

.ocp-sources a {
	color: #2563eb;
}

/* Loading indicator */
.ocp-loading {
	align-self: flex-start;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 10px 14px;
}

.ocp-loading-dot {
	width: 6px;
	height: 6px;
	background: #9ca3af;
	border-radius: 50%;
	animation: ocp-bounce 1.4s infinite ease-in-out both;
}

.ocp-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.ocp-loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes ocp-bounce {
	0%, 80%, 100% { transform: scale(0); }
	40% { transform: scale(1); }
}

/* Footer hint */
.ocp-footer {
	padding: 10px 20px;
	border-top: 1px solid #e5e7eb;
	font-size: 12px;
	color: #9ca3af;
	text-align: center;
}
