/*
 * Obsidian Gemini Chatbot Plugin Styles
 * 
 * This stylesheet contains all the UI components for the chatbot interface.
 * The design follows a modern, glassy aesthetic with smooth animations.
 * 
 * Structure:
 * 1. Core container styles
 * 2. Header and controls
 * 3. Chat messages and input
 * 4. Animations
 * 5. History view
 * 6. Utility classes
 */

/* Core font import - bundled fonts for VaultAI */
@import url("./src/fonts/fonts.css");

/* Base container styling with theme awareness */
.gemini-chat-container {
	--chat-background: var(--background-primary);
	--chat-text: var(--text-normal);
	--chat-border: var(--background-modifier-border);
	--chat-hover: var(--background-modifier-hover);
	--chat-bot-bg: var(--background-secondary);
	--chat-user-bg: var(--background-primary-alt);
	--chat-header-bg: var(--background-secondary-alt);
	position: fixed;
	bottom: 100px !important;
	right: 20px !important;
	width: 380px;
	height: 590px;
	display: flex;
	flex-direction: column;
	background: var(--chat-background);
	color: var(--chat-text);
	border: 1px solid var(--chat-border);
	border-radius: 12px;
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(10px);
	z-index: 1000;
	overflow: hidden;
	animation: slideIn 0.3s ease-out;
	resize: both;
	min-width: 280px;
	max-width: 800px;
	min-height: 590px;
	max-height: 800px;
	transform-origin: bottom right;
	transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
		height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
		transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideIn {
	from {
		transform: translateY(20px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Animation for closing */
@keyframes slideOut {
	from {
		opacity: 1;
		transform: translateY(0);
	}
	to {
		opacity: 0;
		transform: translateY(20px);
	}
}

.gemini-chat-container.closing {
	animation: slideOut 0.3s ease-out;
}

/* Simplified header */
.gemini-chat-header {
	padding: 12px 16px;
	border-bottom: 1px solid var(--chat-border);
	display: flex;
	justify-content: flex-end;
	align-items: center;
	background: var(--chat-header-bg);
	border-radius: 12px 12px 0 0;
}

.chat-header-controls {
	display: flex;
	gap: 8px;
}

.chat-header-controls button {
	width: 32px;
	height: 32px;
	background: var(--chat-bot-bg);
	color: var(--chat-text);
	border: 1px solid var(--chat-border);
	border-radius: 6px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	padding: 6px;
}

.chat-header-controls button:hover {
	background: var(--chat-hover);
}

.chat-header-controls svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
	stroke-width: 2;
	opacity: 0.7;
}

.chat-header-controls button:hover svg {
	opacity: 1;
}

/* Bot Info Section */
.bot-info {
	padding: 24px;
	display: flex;
	align-items: flex-start;
	gap: 16px;
	transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.bot-info.hidden {
	opacity: 0;
	transform: translateY(-20px);
	pointer-events: none;
	position: absolute;
}

.bot-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background-color: var(--chat-bot-bg);
	border: 1px solid var(--chat-border);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	overflow: hidden;
}

.bot-avatar svg {
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: var(--chat-bot-bg);
	border-radius: 50%;
}

.bot-greeting {
	font-size: 1.25em;
	font-weight: 500;
	color: var(--text-normal);
	margin-bottom: 24px;
}

/* VaultAI Suggested Actions */
.vaultai-suggested-actions {
	padding: 0 24px;
	background: var(--chat-background);
	transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.vaultai-suggested-actions.hidden {
	opacity: 0;
	transform: translateY(-20px);
	pointer-events: none;
	position: absolute;
}

.vaultai-suggested-actions h3 {
	font-size: 0.875em;
	color: var(--text-muted);
	margin-bottom: 12px;
	font-weight: 500;
}

.vaultai-action-button {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	margin-bottom: 8px;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
	border: 1px solid var(--chat-border);
	width: 100%;
	background: var(--chat-bot-bg);
	color: var(--text-normal);
}

.vaultai-action-button:hover {
	background: var(--chat-hover);
}

.vaultai-action-icon {
	width: 20px;
	height: 20px;
	fill: currentColor;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.action-icon:hover {
	opacity: 1;
}

/* Input Section */
.chat-input-container {
	margin-top: auto;
	padding: 16px;
	background: var(--chat-background);
	border-top: 1px solid var(--chat-border);
}

.chat-input-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px;
	border: 1px solid var(--chat-border);
	border-radius: 8px;
	background-color: var(--chat-bot-bg);
}

.chat-input {
	flex-grow: 1;
	border: none;
	background: transparent;
	padding: 8px;
	font-size: 0.95em;
	min-height: 24px;
	max-height: 80px;
	resize: none;
	color: var(--text-normal);
}

.input-actions {
	display: flex;
	gap: 4px;
}

.input-actions button {
	width: 32px;
	height: 32px;
	background: none;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	opacity: 0.7;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.input-actions button:hover {
	opacity: 1;
	background: var(--chat-hover);
}

/* Add to existing styles.css */
.gemini-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 0;
	height: calc(100% - 140px);
	background: var(--chat-background);
	border-bottom: 1px solid var(--chat-border);
}

.gemini-message-user,
.gemini-message-bot,
.gemini-message-error {
	max-width: 85%;
	padding: 12px;
	border-radius: 12px;
	overflow-wrap: break-word;
	flex-shrink: 0;
}

.gemini-message-user {
	align-self: flex-end;
	background-color: var(--interactive-accent);
	color: var(--text-on-accent);
	border-bottom-right-radius: 4px;
}

.gemini-message-bot {
	width: 100%;
	background: var(--chat-bot-bg);
	border: 1px solid var(--chat-border);
	padding: 16px;
	position: relative;
	flex-shrink: 0;
	min-height: min-content;
}

.gemini-message-error {
	align-self: center;
	background-color: var(--background-modifier-error);
	color: var(--text-on-accent);
	font-size: 0.9em;
}

/* Add to existing styles */
.setting-item-control input[type="password"] {
	font-family: monospace;
	letter-spacing: 0.2em;
	padding-right: 30px; /* Space for the toggle button */
}

.password-toggle:hover {
	opacity: 0.8;
}

.gemini-message-loading {
	align-self: center;
	color: var(--text-muted);
	font-size: 0.9em;
	padding: 8px 12px;
	background-color: var(--background-modifier-form-field);
	border-radius: 12px;
	animation: pulse 1.5s infinite;
}

@keyframes pulse {
	0% {
		opacity: 0.6;
	}
	50% {
		opacity: 1;
	}
	100% {
		opacity: 0.6;
	}
}

/* File name in header */
.current-file {
	font-size: 0.9em;
	color: var(--text-muted);
	margin-right: auto;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 200px;
}

/* Typing animation */
.typing-indicator {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 12px 16px;
	background: var(--background-modifier-form-field);
	border-radius: 12px;
	margin-bottom: 8px;
	width: fit-content;
}

.typing-indicator span {
	width: 6px;
	height: 6px;
	background: var(--text-muted);
	border-radius: 50%;
	animation: typing 1.4s infinite;
	opacity: 0.4;
}

.typing-indicator span:nth-child(2) {
	animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes typing {
	0%,
	100% {
		opacity: 0.4;
	}
	50% {
		opacity: 1;
	}
}

/* Improve markdown rendering in messages */
.gemini-message-bot {
	max-width: 100%;
	background: var(--chat-bot-bg);
	border: 1px solid var(--chat-border);
	border-radius: 8px;
	margin: 8px 0;
}

.response-content {
	padding: 16px;
	overflow-y: auto;
	max-height: 100%;
	word-wrap: break-word;
}

.response-content > * {
	width: 100%;
	margin: 8px 0;
}

.response-content pre {
	background: var(--code-background);
	border: 1px solid var(--chat-border);
	padding: 12px;
	border-radius: 4px;
	overflow-x: auto;
	white-space: pre-wrap;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	white-space: pre-wrap;
}

.response-content ul,
.response-content ol {
	width: 100%;
	padding-left: 24px;
	margin: 8px 0;
}

.response-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 8px 0;
	display: table;
}

.response-content th,
.response-content td {
	border: 1px solid var(--chat-border);
	padding: 6px 8px;
	text-align: left;
}

.response-content img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	margin: 8px 0;
}

.response-content blockquote {
	margin: 8px 0;
	padding: 8px 16px;
	border-left: 3px solid var(--interactive-accent);
	background: var(--background-secondary);
	border-radius: 0 4px 4px 0;
}

/* More Options Menu */
.more-options-menu {
	position: fixed;
	background: var(--background-primary);
	border: 1px solid var(--background-modifier-border);
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	z-index: 1001;
	min-width: 180px;
}

.vaultai-menu-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	cursor: pointer;
	color: var(--text-normal);
}

.vaultai-menu-item:hover {
	background: var(--background-modifier-hover);
}

.vaultai-menu-item svg {
	opacity: 0.7;
}

/* Full Page Mode */
.gemini-chat-container.full-page {
	top: 20px;
	left: 20px;
	right: 20px !important;
	bottom: 20px !important;
	width: auto;
	height: auto;
	animation: expandToFull 0.3s ease-out;
}

@keyframes expandToFull {
	from {
		transform: scale(0.95);
		opacity: 0.8;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

/* Update chat messages container for full page */
.gemini-chat-container.full-page .gemini-chat-messages {
	flex: 1;
}

/* History button active state */
.history-button.active {
	color: var(--interactive-accent);
}

/* Chat History View */
.chat-history-view {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--background-primary);
	z-index: 1001;
	display: flex;
	flex-direction: column;
	animation: slideInHistory 0.3s ease-out;
}

.chat-history-view.closing {
	animation: slideOutHistory 0.3s ease-out;
}

.chat-history-header {
	padding: 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	border-bottom: 1px solid var(--background-modifier-border);
}

.chat-history-header h2 {
	margin: 0;
	flex-grow: 1;
	font-size: 1.2em;
}

.back-button,
.new-chat-button {
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
}

.back-button:hover,
.new-chat-button:hover {
	background: var(--background-modifier-hover);
}

.new-chat-button {
	color: var(--text-accent);
}

.chat-history-search {
	padding: 16px;
	border-bottom: 1px solid var(--background-modifier-border);
}

.chat-history-search input {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid var(--background-modifier-border);
	border-radius: 6px;
	background: var(--background-modifier-form-field);
}

.chat-history-sections {
	flex-grow: 1;
	overflow-y: auto;
	padding: 16px;
}

.history-section {
	margin-bottom: 24px;
}

.history-section h3 {
	font-size: 0.9em;
	color: var(--text-muted);
	margin-bottom: 12px;
	padding-left: 8px;
	font-weight: 600;
}

.history-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	background: var(--chat-bot-bg);
	margin-bottom: 8px;
}

.history-item:hover {
	background: var(--chat-hover);
}

.history-item-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.1);
	font-size: 16px;
}

.history-item-content {
	flex-grow: 1;
}

.history-item-title {
	font-weight: 500;
	margin-bottom: 4px;
	color: var(--text-normal);
}

.history-item-time {
	font-size: 0.8em;
	color: var(--text-muted);
}

.delete-chat {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	opacity: 0;
	transition: all 0.2s ease;
	padding: 8px;
	border-radius: 6px;
	background: rgba(255, 0, 0, 0.1);
	color: var(--text-error);
	display: flex;
	align-items: center;
	justify-content: center;
}

.history-item:hover .delete-chat {
	opacity: 0.7;
}

.delete-chat:hover {
	opacity: 1 !important;
	background: var(--background-modifier-error);
	color: var(--text-on-accent);
}

/* Back button improvements */
.back-button {
	display: flex;
	align-items: center;
	padding: 8px;
	border-radius: 4px;
	transition: background-color 0.2s;
}

.back-button:hover {
	background-color: var(--background-modifier-hover);
}

/* File Selection Modal */
.suggestion-path {
	font-size: 0.8em;
	color: var(--text-muted);
	margin-top: 4px;
}

.vaultai-suggestion-item {
	padding: 8px 12px;
	cursor: pointer;
	border-radius: 4px;
}

.vaultai-suggestion-item:hover {
	background-color: var(--background-modifier-hover);
}

.vaultai-suggestion-item.is-selected {
	background-color: var(--background-modifier-hover);
}

/* Referenced File Tags */
.chat-input-wrapper .reference-tag {
	display: inline-block;
	background-color: var(--background-modifier-hover);
	padding: 2px 6px;
	border-radius: 4px;
	margin: 0 2px;
	font-size: 0.9em;
	color: var(--text-accent);
}

/* Response Formatting */
.gemini-message-bot {
	background: var(--chat-bot-bg);
	border: 1px solid var(--chat-border);
	border-radius: 8px;
	overflow: hidden;
}

.response-header {
	padding: 8px 12px;
	background: var(--background-secondary);
	border-bottom: 1px solid var(--background-modifier-border);
	display: flex;
	justify-content: flex-end;
}

.copy-response-button {
	background: var(--chat-bot-bg);
	color: var(--chat-text);
	border: 1px solid var(--chat-border);
	padding: 4px 8px;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	font-size: 12px;
	transition: opacity 0.2s;
}

.copy-response-button:hover {
	opacity: 0.9;
}

.response-content {
	padding: 16px;
	color: var(--text-normal);
}

/* Markdown Content Styling */
.response-content h1,
.response-content h2,
.response-content h3,
.response-content h4,
.response-content h5,
.response-content h6 {
	margin-top: 1em;
	margin-bottom: 0.5em;
}

.response-content p {
	margin: 0.5em 0;
}

.response-content ul,
.response-content ol {
	margin: 0.5em 0;
	padding-left: 1.5em;
}

.response-content code {
	background: var(--code-background);
	padding: 0.2em 0.4em;
	border-radius: 3px;
	font-family: var(--font-monospace);
	font-size: 0.9em;
}

.response-content pre {
	background: var(--code-background);
	padding: 1em;
	border-radius: 4px;
	overflow-x: auto;
	margin: 0.5em 0;
}

.response-content blockquote {
	border-left: 3px solid var(--interactive-accent);
	margin: 0.5em 0;
	padding-left: 1em;
	color: var(--text-muted);
}

/* Copy button styling */
.copy-response-button {
	position: absolute;
	top: 8px;
	right: 8px;
	background: var(--chat-bot-bg);
	color: var(--chat-text);
	border: 1px solid var(--chat-border);
	padding: 4px 8px;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	font-size: 12px;
	opacity: 0;
	transition: opacity 0.2s;
}

.gemini-message-bot:hover .copy-response-button {
	opacity: 1;
}

/* Direct markdown content styling */
.gemini-message-bot h1,
.gemini-message-bot h2,
.gemini-message-bot h3,
.gemini-message-bot h4,
.gemini-message-bot h5,
.gemini-message-bot h6 {
	margin: 1em 0 0.5em 0;
	line-height: 1.3;
}

.gemini-message-bot p {
	margin: 0.8em 0;
	line-height: 1.6;
}

.gemini-message-bot ul,
.gemini-message-bot ol {
	margin: 0.8em 0;
	padding-left: 1.5em;
}

.gemini-message-bot li {
	margin: 0.3em 0;
}

.gemini-message-bot pre {
	background: var(--code-background);
	padding: 12px 16px;
	border-radius: 8px;
	margin: 1em 0;
	overflow-x: auto;
}

.gemini-message-bot code {
	background: var(--code-background);
	padding: 0.2em 0.4em;
	border-radius: 4px;
	font-family: var(--font-monospace);
	font-size: 0.9em;
}

.gemini-message-bot blockquote {
	margin: 1em 0;
	padding: 0.5em 1em;
	border-left: 3px solid var(--interactive-accent);
	background: var(--background-secondary);
	border-radius: 0 4px 4px 0;
}

.gemini-message-bot table {
	border-collapse: collapse;
	width: 100%;
	margin: 1em 0;
}

.gemini-message-bot th,
.gemini-message-bot td {
	border: 1px solid var(--background-modifier-border);
	padding: 8px 12px;
}

.gemini-message-bot th {
	background: var(--background-secondary);
}

/* Typewriter animation */
@keyframes typewriter {
	from {
		opacity: 0;
		transform: translateY(5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.response-content > * {
	animation: typewriter 0.2s ease-out forwards;
	opacity: 0;
}

.response-content > *:nth-child(1) {
	animation-delay: 0.1s;
}
.response-content > *:nth-child(2) {
	animation-delay: 0.2s;
}
.response-content > *:nth-child(3) {
	animation-delay: 0.3s;
}
.response-content > *:nth-child(4) {
	animation-delay: 0.4s;
}
.response-content > *:nth-child(5) {
	animation-delay: 0.5s;
}
/* Add more if needed */

/* Better blockquote styling */
.response-content blockquote {
	margin: 1em 0;
	padding: 0.5em 1em;
	border-left: 3px solid var(--interactive-accent);
	background: var(--background-secondary);
	border-radius: 0 4px 4px 0;
}

/* Table styling */
.response-content table {
	border-collapse: collapse;
	width: 100%;
	margin: 1em 0;
}

.response-content th,
.response-content td {
	border: 1px solid var(--background-modifier-border);
	padding: 8px 12px;
}

.response-content th {
	background: var(--background-secondary);
}

/* Bot message styling */
.gemini-message-bot {
	width: 100%;
	background: var(--chat-bot-bg);
	border: 1px solid var(--chat-border);
	border-radius: 12px;
	margin: 8px 0;
	padding: 16px;
	position: relative;
}

/* Copy button */
.copy-response-button {
	position: absolute;
	top: 8px;
	right: 8px;
	background: var(--chat-bot-bg);
	color: var(--chat-text);
	border: 1px solid var(--chat-border);
	padding: 4px 8px;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	font-size: 12px;
	opacity: 0;
	transition: opacity 0.2s;
}

.gemini-message-bot:hover .copy-response-button {
	opacity: 1;
}

/* Direct markdown styling */
.gemini-message-bot h1,
.gemini-message-bot h2,
.gemini-message-bot h3,
.gemini-message-bot h4,
.gemini-message-bot h5,
.gemini-message-bot h6 {
	margin: 1em 0 0.5em 0;
}

.gemini-message-bot p {
	margin: 0.8em 0;
}

.gemini-message-bot ul,
.gemini-message-bot ol {
	margin: 0.8em 0;
	padding-left: 1.5em;
}

.gemini-message-bot pre {
	background: var(--code-background);
	padding: 12px 16px;
	border-radius: 4px;
	overflow-x: auto;
	margin: 0.8em 0;
}

.gemini-message-bot code {
	background: var(--code-background);
	padding: 0.2em 0.4em;
	border-radius: 3px;
	font-size: 0.9em;
}

/* Scrollbar styling for messages container */
.gemini-chat-messages::-webkit-scrollbar {
	width: 8px;
}

.gemini-chat-messages::-webkit-scrollbar-track {
	background: var(--chat-background);
}

.gemini-chat-messages::-webkit-scrollbar-thumb {
	background: var(--chat-border);
	border-radius: 4px;
}

.gemini-chat-messages::-webkit-scrollbar-thumb:hover {
	background: var(--chat-hover);
}

/* Floating Chat Icon */
.gemini-chat-icon {
	position: fixed;
	bottom: 40px !important;
	right: 20px !important;
	width: 40px;
	height: 40px;
	background-color: var(--chat-header-bg);
	border: 1px solid var(--chat-border);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: all 0.2s ease;
	z-index: 1000;
	padding: 8px;
}

.gemini-chat-icon:hover {
	transform: scale(1.1);
	background-color: var(--chat-hover);
}

/* Load Recent Chats Animation */
@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.gemini-chat-messages > div {
	animation: fadeIn 0.5s ease-in;
}

/* Delete Chat Animation */
@keyframes fadeOut {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}

.history-item.deleting {
	animation: fadeOut 0.3s ease-out;
	pointer-events: none;
}

/* Add these animations for history view */
@keyframes slideInHistory {
	from {
		opacity: 0;
		transform: translateX(20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes slideOutHistory {
	from {
		opacity: 1;
		transform: translateX(0);
	}
	to {
		opacity: 0;
		transform: translateX(20px);
	}
}

/* Update the chat history view with animation */
.chat-history-view {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--background-primary);
	z-index: 1001;
	display: flex;
	flex-direction: column;
	animation: slideInHistory 0.3s ease-out;
}

.chat-history-view.closing {
	animation: slideOutHistory 0.3s ease-out;
}

/* Add resize handle to top-left corner */
.resize-handle {
	position: absolute;
	top: 0;
	left: 0;
	width: 20px;
	height: 20px;
	cursor: nw-resize;
	z-index: 1002;
}

.resize-handle::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 12px;
	height: 12px;
	border-left: 2px solid var(--chat-border);
	border-top: 2px solid var(--chat-border);
	border-radius: 2px 0 0 0;
}

/* Add animation for resetting window size */
@keyframes resetSize {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(0.985);
	}
	100% {
		transform: scale(1);
	}
}

.gemini-chat-container.resetting {
	animation: resetSize 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Error message styling */
.gemini-message-error {
	margin: 8px 16px;
	padding: 12px 16px;
	background: var(--background-modifier-error);
	border-radius: 8px;
	color: var(--text-error);
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9em;
	animation: fadeIn 0.3s ease-out;
}

.gemini-message-error .error-icon {
	font-size: 1.2em;
}

.gemini-message-error .error-content {
	flex: 1;
	line-height: 1.4;
}

/* Password toggle button */
.password-toggle {
	position: absolute;
	right: 5px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	cursor: pointer;
}

/* Chat icon styles */
.gemini-chat-icon {
	position: fixed;
	bottom: 40px !important;
	right: 20px !important;
	width: 40px;
	height: 40px;
	background-color: var(--chat-header-bg);
	border: 1px solid var(--chat-border);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: all 0.2s ease;
	z-index: 1000;
	padding: 8px;
}

.gemini-chat-icon:hover {
	transform: scale(1.1);
	background-color: var(--chat-hover);
}

/* History item visibility */
.history-item.hidden {
	display: none;
}

.history-item.visible {
	display: flex;
}

/* Add styles for password toggle button */
.setting-item-control {
	position: relative;
}

.password-toggle {
	position: absolute;
	right: 5px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.password-toggle:hover {
	opacity: 1;
}

/* Add styles for error message */
.gemini-message-error {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 8px 16px;
	padding: 12px 16px;
	background: var(--background-modifier-error);
	border-radius: 8px;
	color: var(--text-error);
	font-size: 0.9em;
	animation: fadeIn 0.3s ease-out;
}

.error-icon {
	font-size: 1.2em;
}

.error-content {
	flex: 1;
	line-height: 1.4;
}

/* =================================================================
 * UTILITY CLASSES TO REPLACE INLINE STYLES
 * ================================================================= */

/* Display utilities */
.gemini-hidden {
	display: none !important;
}

.gemini-visible {
	display: block !important;
}

.gemini-visible-flex {
	display: flex !important;
}

/* Chat container dimension states */
.gemini-chat-container.default-size {
	width: 380px !important;
	height: 590px !important;
}

.gemini-chat-container.initially-hidden {
	display: none;
}

.gemini-chat-container.visible {
	display: flex;
}

/* Suggested actions visibility */
.vaultai-suggested-actions.gemini-hidden {
	display: none !important;
}

.vaultai-suggested-actions.gemini-visible {
	display: block !important;
}

/* Current file header visibility */
.current-file.gemini-hidden {
	display: none !important;
}

.current-file.gemini-visible {
	display: block !important;
}

/* History view element visibility */
.chat-history-view .gemini-hidden {
	display: none !important;
}

.chat-history-view .gemini-visible {
	display: block !important;
}

.chat-history-view .gemini-visible-flex {
	display: flex !important;
}

/* Dynamic sizing using CSS custom properties */
.gemini-chat-container.dynamic-size {
	width: var(--dynamic-width, 380px);
	height: var(--dynamic-height, 590px);
}
