/* --- CSS VARIABLES --- */
:root {
	--font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

	/* Light Mode */
	--bg-body: #ffffff;
	--bg-sidebar: #f9f9f9;
	--bg-input: #f4f4f4;
	--text-main: #1a1a1a;
	--text-sub: #6e6e6e;
	--border: #e5e5e5;
	--hover: #ebebeb;
	--msg-user-bg: #f4f4f4;
	--sidebar-width: 260px;
	--sidebar-width-collapsed: 72px;
}

[data-theme="dark"] {
	/* Dark Mode */
	--bg-body: #111111;
	--bg-sidebar: #171717;
	--bg-input: #212121;
	--text-main: #ededed;
	--text-sub: #a1a1aa;
	--border: #333333;
	--hover: #2a2a2a;
	--msg-user-bg: #2a2a2a;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	outline: none;
}

body {
	font-family: var(--font-main);
	background-color: var(--bg-body);
	color: var(--text-main);
	height: 100vh;
	display: flex;
	transition: background 0.3s, color 0.3s;
	overflow: hidden;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--text-sub);
}

/* --- SIDEBAR --- */
.sidebar {
	width: var(--sidebar-width);
	background: var(--bg-sidebar);
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	padding: 1rem;
	transition: width 0.3s ease;
	z-index: 10;
	position: relative;
}

/* Collapsed State Styles */
.sidebar.collapsed {
	width: var(--sidebar-width-collapsed);
	padding: 1rem 0.5rem;
	align-items: center;
}

/* Hide elements when collapsed */
.sidebar.collapsed .text-label,
.sidebar.collapsed .history-list,
.sidebar.collapsed .new-chat-text,
.sidebar.collapsed .profile-info,
.sidebar.collapsed .profile-arrow {
	display: none;
	opacity: 0;
	pointer-events: none;
}

/* Toggle Button (Hamburger) */
.sidebar-header {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin-bottom: 20px;
	height: 40px;
}

.sidebar.collapsed .sidebar-header {
	justify-content: center;
}

.toggle-btn {
	background: transparent;
	border: none;
	color: var(--text-sub);
	cursor: pointer;
	padding: 8px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: 0.2s;
}

.toggle-btn:hover {
	background: var(--hover);
	color: var(--text-main);
}

.toggle-btn svg {
	width: 20px;
	height: 20px;
	stroke-width: 2;
}

/* New Chat Button */
.btn-new-chat {
	padding: 12px;
	border-radius: 18px;
	border: 1px solid var(--border);
	background: transparent;
	color: var(--text-main);
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.9rem;
	transition: 0.2s;
	width: 100%;
	height: 44px;
	overflow: hidden;
	font-family: var(--font-main);
}

.btn-new-chat:hover {
	background: var(--hover);
}

.sidebar.collapsed .btn-new-chat {
	justify-content: center;
	border: none;
	background: var(--hover);
}

.btn-new-chat svg {
	width: 20px;
	height: 20px;
	stroke-width: 2;
}

/* History Section */
.history-list {
	flex: 1;
	overflow-y: auto;
	margin-top: 20px;
	width: 100%;
}

.history-label {
	font-size: 0.75rem;
	color: var(--text-sub);
	margin-bottom: 10px;
	padding-left: 5px;
	font-weight: 600;
}

.history-items {
	display: flex;
	flex-direction: column;
	gap: 4px;
	position: relative;
	/* For dropdown positioning context */
}

.history-item {
	padding: 10px;
	border-radius: 18px;
	font-size: 0.9rem;
	color: var(--text-main);
	cursor: pointer;
	white-space: nowrap;
	overflow: visible;
	/* Allow dropdown to overflow */
	transition: 0.2s;
	display: flex;
	align-items: center;
	gap: 10px;
	background: transparent;
	border: none;
	text-align: left;
	width: 100%;
	font-family: var(--font-main);
	position: relative;
}

/* Chat title with ellipsis truncation */
.history-item .chat-title {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

/* Three-dot menu button - hidden by default, shown on hover */
.history-item .menu-btn {
	display: none;
	background: transparent;
	border: none;
	color: var(--text-sub);
	cursor: pointer;
	padding: 4px;
	border-radius: 6px;
	flex-shrink: 0;
	margin-left: auto;
	position: relative;
	z-index: 10;
}

.history-item .menu-btn:hover {
	background: var(--border);
	color: var(--text-main);
}

.history-item:hover .menu-btn {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Dropdown menu - positioned fixed to escape overflow containers */
.chat-dropdown {
	position: fixed;
	background: var(--bg-chat);
	border: 1px solid var(--border);
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	z-index: 9999;
	min-width: 140px;
	overflow: hidden;
	display: none;
}

.chat-dropdown.show {
	display: block;
}

.chat-dropdown button {
	width: 100%;
	padding: 10px 14px;
	background: transparent;
	border: none;
	color: var(--text-main);
	font-size: 0.85rem;
	cursor: pointer;
	text-align: left;
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-main);
}

.chat-dropdown button:hover {
	background: var(--hover);
}

.chat-dropdown button.delete-btn {
	color: #ef4444;
}

.chat-dropdown button.delete-btn:hover {
	background: rgba(239, 68, 68, 0.1);
}

.history-item:hover {
	background: var(--hover);
}

.history-item.active {
	background: var(--hover);
	font-weight: 500;
}

.history-item>ion-icon:first-child {
	font-size: 18px;
	flex-shrink: 0;
}

.empty {
	color: var(--text-sub);
	font-size: 13px;
	text-align: center;
	padding: 24px 8px;
}

/* Profile Section */
.profile-section {
	border-top: 1px solid var(--border);
	padding-top: 1rem;
	width: 100%;
	margin-top: auto;
	position: relative;
}

.sidebar.collapsed .profile-section {
	border-top: none;
	display: flex;
	justify-content: center;
}

.profile-btn {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px;
	width: 100%;
	border-radius: 8px;
	cursor: pointer;
	transition: 0.2s;
	overflow: hidden;
	background: transparent;
	border: none;
	color: var(--text-main);
	text-align: left;
	font-family: var(--font-main);
}

.profile-btn:hover {
	background: var(--hover);
}

.sidebar.collapsed .profile-btn {
	justify-content: center;
	padding: 0;
	width: 40px;
	height: 40px;
}

.avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--text-main);
	color: var(--bg-body);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	font-size: 0.8rem;
	flex-shrink: 0;
}

.profile-info {
	font-size: 0.9rem;
	font-weight: 500;
	flex: 1;
	text-align: left;
}

.profile-arrow {
	flex-shrink: 0;
}

/* Settings Dropdown */
.settings-menu {
	position: absolute;
	bottom: 100%;
	left: 0;
	width: 100%;
	min-width: 200px;
	background: var(--bg-sidebar);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 6px;
	display: none;
	flex-direction: column;
	margin-bottom: 10px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	z-index: 20;
}

.sidebar.collapsed .settings-menu {
	left: 100%;
	bottom: 0;
	margin-left: 10px;
	margin-bottom: 0;
}

.settings-menu.show {
	display: flex;
}

.menu-opt {
	padding: 10px;
	font-size: 0.9rem;
	cursor: pointer;
	border-radius: 6px;
	color: var(--text-main);
	display: flex;
	gap: 10px;
	align-items: center;
	background: transparent;
	border: none;
	text-align: left;
	width: 100%;
	font-family: var(--font-main);
}

.menu-opt:hover {
	background: var(--hover);
}

.menu-opt svg {
	width: 18px;
	height: 18px;
	stroke-width: 2;
}

/* --- MAIN AREA --- */
.main {
	flex: 1;
	display: flex;
	flex-direction: column;
	position: relative;
}

.main-header {
	padding: 20px 24px;
	display: flex;
	align-items: center;
	position: relative;
	height: 70px;
}

.brand-title {
	font-weight: 600;
	color: var(--text-main);
	font-size: 1.2rem;
	z-index: 2;
}

.header-chat-title {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	font-size: 14px;
	font-weight: 500;
	color: var(--text-sub);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 50%;
	text-align: center;
}

.chat-area {
	flex: 1;
	overflow-y: auto;
	scroll-behavior: smooth;
	position: relative;
}

/* Welcome Screen */
.welcome-screen {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	text-align: center;
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.welcome-screen.show {
	display: flex;
}

.welcome-logo {
	width: 72px;
	height: 72px;
	border-radius: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 24px;
	animation: fadeInUp 0.6s ease;
	overflow: hidden;
}

.welcome-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 18px;
}

.welcome-screen h1 {
	font-size: 28px;
	font-weight: 600;
	margin-bottom: 8px;
	letter-spacing: -0.03em;
	color: var(--text-main);
	animation: fadeInUp 0.6s ease 0.1s both;
}

.welcome-screen p {
	font-size: 15px;
	color: var(--text-sub);
	margin-bottom: 40px;
	animation: fadeInUp 0.6s ease 0.2s both;
}

.suggestions-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(200px, 260px));
	gap: 12px;
	max-width: 850px;
	width: 100%;
	animation: fadeInUp 0.6s ease 0.3s both;
	justify-content: center;
}

.suggestion-card {
	padding: 16px;
	background: var(--bg-chat);
	border: 1px solid var(--border);
	border-radius: 12px;
	text-align: left;
	font-size: 14px;
	color: var(--text-main);
	cursor: pointer;
	transition: all 0.2s ease;
	min-height: 50px;
	display: flex;
	align-items: center;
}

.suggestion-card:hover {
	background: var(--hover);
	border-color: var(--text-sub);
	transform: translateY(-2px);
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.chat-area-inner {
	max-width: 800px;
	width: 100%;
	margin: 0 auto;
	padding: 24px 20px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-height: 100%;
}

/* Message Bubbles */
.message {
	display: flex;
	gap: 15px;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(5px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.message.user-message {
	flex-direction: row-reverse;
}

.message-avatar {
	width: 28px;
	height: 28px;
	border: 1px solid var(--border);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: var(--bg-sidebar);
}

.message-avatar ion-icon {
	font-size: 16px;
	color: var(--text-main);
}

.message-avatar .bot-logo {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	object-fit: cover;
}

.message-content {
	max-width: 80%;
	line-height: 1.6;
	font-size: 1rem;
	word-wrap: break-word;
}

.user-message .message-content {
	background: var(--msg-user-bg);
	padding: 10px 16px;
	border-radius: 20px;
	position: relative;
}

.user-message .message-content p {
	margin: 0;
}

/* ========================
   USER MESSAGE COPY BUTTON
   ========================
   - Desktop: Shows on hover after 1s delay
   - Mobile: Shows on long-press
   - Positioned at bottom-right of message bubble
   ======================== */
.user-msg-copy-btn {
	position: absolute;
	bottom: -8px;
	right: -8px;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bg-sidebar);
	border: 1px solid var(--border);
	border-radius: 50%;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: scale(0.8);
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.2s ease;
	z-index: 10;
}

.user-msg-copy-btn svg {
	width: 14px;
	height: 14px;
	color: var(--text-sub);
	transition: color 0.2s ease;
}

.user-msg-copy-btn:hover {
	background: var(--hover);
}

.user-msg-copy-btn:hover svg {
	color: var(--text-main);
}

/* Show copy button when message content has .show-copy class */
.message-content.show-copy .user-msg-copy-btn {
	opacity: 1;
	visibility: visible;
	transform: scale(1);
}

/* Copied state - checkmark feedback */
.user-msg-copy-btn.copied {
	background: #22c55e;
	border-color: #22c55e;
}

.user-msg-copy-btn.copied svg {
	color: white;
}

/* AI message markdown styling */
.ai-message .message-content {
	color: var(--text-main);
	line-height: 1.8;
}

.ai-message .message-content strong {
	font-weight: 600;
	color: var(--text-main);
}

.ai-message .message-content p {
	margin: 0 0 16px 0;
	line-height: 1.8;
}

.ai-message .message-content p:last-child {
	margin-bottom: 0;
}

.ai-message .message-content h1,
.ai-message .message-content h2,
.ai-message .message-content h3,
.ai-message .message-content h4 {
	margin: 16px 0 8px 0;
	font-weight: 600;
	line-height: 1.3;
	color: var(--text-main);
}

.ai-message .message-content h1:first-child,
.ai-message .message-content h2:first-child,
.ai-message .message-content h3:first-child,
.ai-message .message-content h4:first-child {
	margin-top: 0;
}

.ai-message .message-content h1 {
	font-size: 22px;
}

.ai-message .message-content h2 {
	font-size: 20px;
}

.ai-message .message-content h3 {
	font-size: 18px;
}

.ai-message .message-content h4 {
	font-size: 16px;
}

.ai-message .message-content code {
	background: var(--bg-input);
	padding: 2px 6px;
	border-radius: 4px;
	font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
	font-size: 0.9em;
	color: var(--text-main);
}

/* Code Block Container */
.code-block-container {
	position: relative;
	margin: 12px 0;
	border-radius: 8px;
	overflow: hidden;
	background: var(--bg-input);
	border: 1px solid var(--border);
}

.code-block-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 12px;
	background: var(--bg-sidebar);
	border-bottom: 1px solid var(--border);
	font-size: 0.85rem;
	color: var(--text-sub);
}

.code-block-lang {
	font-weight: 500;
}

.copy-code-btn {
	background: transparent;
	border: none;
	color: var(--text-sub);
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 0.8rem;
	display: flex;
	align-items: center;
	gap: 4px;
	transition: 0.2s;
}

.copy-code-btn:hover {
	background: var(--hover);
	color: var(--text-main);
}

.copy-code-btn.copied {
	color: #4ade80;
}

.code-block-content {
	padding: 16px;
	overflow-x: auto;
	font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--text-main);
	background: var(--bg-input);
}

.code-block-content pre {
	margin: 0;
	padding: 0;
	white-space: pre;
	overflow-x: auto;
}

.ai-message .message-content ul,
.ai-message .message-content ol {
	margin: 12px 0;
	padding-left: 0;
	list-style: none;
}

.ai-message .message-content li {
	margin: 8px 0;
	position: relative;
	padding-left: 1.2rem;
	line-height: 1.8;
}

.ai-message .message-content li::before {
	content: "•";
	position: absolute;
	left: 0;
	top: 0;
	color: var(--text-sub);
	font-weight: bold;
}

.ai-message .message-content li>p {
	margin: 0;
}

.ai-message .message-content blockquote {
	border-left: 3px solid var(--border);
	padding-left: 16px;
	margin: 12px 0;
	color: var(--text-sub);
	font-style: italic;
}

.ai-message .message-content a {
	color: #6eb4ff;
	text-decoration: underline;
}

.ai-message .message-content a:hover {
	color: #9cc9ff;
}

/* Code Block Styling */
.ai-message .message-content pre {
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0;
	margin: 12px 0;
	overflow: hidden;
}

.ai-message .message-content pre code {
	display: block;
	padding: 16px;
	overflow-x: auto;
	background: transparent;
	font-size: 0.9rem;
	line-height: 1.5;
}

/* Thinking Indicator */
.thinking-indicator {
	opacity: 0;
	animation: fadeIn 0.3s ease-out forwards;
}

.thinking-box {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	background: var(--bg-input);
	border-radius: 16px;
	border: 1px solid var(--border);
}

.thinking-dots {
	display: flex;
	gap: 6px;
	align-items: center;
}

.thinking-dots .dot {
	width: 8px;
	height: 8px;
	background: var(--text-main);
	border-radius: 50%;
	animation: bounce 1.4s infinite ease-in-out;
}

.thinking-dots .dot:nth-child(1) {
	animation-delay: 0s;
}

.thinking-dots .dot:nth-child(2) {
	animation-delay: 0.2s;
}

.thinking-dots .dot:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes bounce {

	0%,
	60%,
	100% {
		transform: translateY(0);
		opacity: 0.7;
	}

	30% {
		transform: translateY(-10px);
		opacity: 1;
	}
}

/* AI text reveal animation */
.ai-text-reveal {
	opacity: 0;
	animation: fadeInReveal 2s ease-out forwards;
}

@keyframes fadeInReveal {
	0% {
		opacity: 0;
		transform: translateY(20px);
		clip-path: inset(0 0 100% 0);
	}

	20% {
		opacity: 1;
	}

	100% {
		opacity: 1;
		transform: translateY(0);
		clip-path: inset(0 0 0 0);
	}
}

/* --- INPUT AREA --- */
.input-container-wrapper {
	width: 100%;
	padding: 0 20px 30px 20px;
	background: var(--bg-body);
}

.input-container {
	max-width: 800px;
	margin: 20px auto 0;
}

.input-bar {
	background: var(--bg-input);
	border-radius: 26px;
	padding: 8px 10px 8px 16px;
	display: flex;
	align-items: flex-end; /* Keeps send button at bottom when textarea grows */
	gap: 10px;
	transition: box-shadow 0.2s;
	border: 1px solid transparent;
}

.input-bar:focus-within {
	box-shadow: 0 0 0 2px var(--border);
	background: var(--bg-body);
	border-color: var(--border);
}

/* 
 * CHAT INPUT TEXTAREA
 * ---------------------
 * Multi-line text input with auto-grow behavior.
 * 
 * Alignment Logic:
 * - min-height matches single-line height (line-height + padding)
 * - line-height: 1.5 provides comfortable reading
 * - Symmetric vertical padding centers text for 1-2 lines
 * - max-height limits growth, then scrolls internally
 * - overflow-y: auto enables scroll after max-height
 */
#chat-input {
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	resize: none;
	
	/* Typography */
	font-size: 1rem;
	font-family: var(--font-main);
	color: var(--text-main);
	line-height: 1.5;
	
	/* 
	 * Vertical alignment fix:
	 * - 10px top/bottom padding keeps text centered
	 * - min-height = line-height (24px) + padding (20px) = 44px
	 * - This matches icon button height for alignment
	 */
	padding: 10px 0;
	min-height: 44px;
	
	/* 
	 * Max height = ~6 lines before scrolling
	 * 6 lines * 24px (line-height at 1rem) + 20px padding = ~164px
	 */
	max-height: 160px;
	overflow-y: auto;
	
	/* Hide scrollbar until needed, then show subtle scrollbar */
	scrollbar-width: thin;
	scrollbar-color: var(--border) transparent;
}

/* Webkit scrollbar styling for chat input */
#chat-input::-webkit-scrollbar {
	width: 4px;
}

#chat-input::-webkit-scrollbar-track {
	background: transparent;
}

#chat-input::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 2px;
}

#chat-input::placeholder {
	color: var(--text-sub);
}

.icon-btn {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: none;
	background: transparent;
	color: var(--text-main);
	cursor: pointer;
	transition: 0.2s;
	flex-shrink: 0;
}

.icon-btn:hover {
	background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .icon-btn:hover {
	background: rgba(255, 255, 255, 0.1);
}

.send-btn {
	background: var(--text-main);
	color: var(--bg-body);
}

.send-btn:hover {
	opacity: 0.9;
}

/* Stop button styling */
.stop-btn {
	background: #ef4444;
	color: #ffffff;
}

.stop-btn:hover {
	background: #dc2626;
}

.stop-btn svg {
	width: 16px;
	height: 16px;
}

.icon-btn svg {
	width: 20px;
	height: 20px;
	stroke-width: 2;
}

.status {
	min-height: 18px;
	font-size: 12px;
	text-align: center;
	margin-top: 8px;
	color: #dc2626;
}

/* Loading Screen Overlay */
.loading-screen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.95);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 9999;
	backdrop-filter: blur(10px);
}

.loading-screen.active {
	display: flex;
	animation: fadeIn 0.3s ease-out;
}

.loading-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.loading-spinner {
	width: 50px;
	height: 50px;
	border: 3px solid rgba(255, 255, 255, 0.1);
	border-top: 3px solid #ffffff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

.loading-message {
	font-size: 16px;
	color: #ffffff;
	font-weight: 500;
	letter-spacing: -0.01em;
}

/* Toast Notification */
.toast-notification {
	position: fixed;
	bottom: 100px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: var(--text-main);
	color: var(--bg-body);
	padding: 12px 24px;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 500;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	opacity: 0;
	transition: all 0.3s ease;
	z-index: 9999;
	pointer-events: none;
}

.toast-notification.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ========================
   FILE UPLOAD MODAL
   ========================
   Custom modal for displaying "feature unavailable" message
   when user clicks the attach file button.
   
   Design: Card-style centered modal with glassmorphism effect
   Matches SAIVO dark theme with smooth animations
   ======================== */

.upload-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.upload-modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

.upload-modal-card {
	background: var(--bg-sidebar);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 32px;
	max-width: 380px;
	width: 90%;
	text-align: center;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
	transform: scale(0.9) translateY(20px);
	transition: transform 0.25s ease;
}

.upload-modal-overlay.active .upload-modal-card {
	transform: scale(1) translateY(0);
}

.upload-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: var(--text-sub);
	cursor: pointer;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, color 0.2s ease;
}

.upload-modal-close:hover {
	background: var(--hover);
	color: var(--text-main);
}

.upload-modal-close svg {
	width: 18px;
	height: 18px;
}

.upload-modal-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 20px;
	background: var(--hover);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.upload-modal-icon svg {
	width: 28px;
	height: 28px;
	color: var(--text-sub);
}

.upload-modal-title {
	font-size: 18px;
	font-weight: 600;
	color: var(--text-main);
	margin-bottom: 12px;
	letter-spacing: -0.02em;
}

.upload-modal-message {
	font-size: 14px;
	line-height: 1.6;
	color: var(--text-sub);
	margin-bottom: 24px;
}

.upload-modal-btn {
	background: var(--text-main);
	color: var(--bg-body);
	border: none;
	padding: 12px 32px;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.upload-modal-btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.upload-modal-btn:active {
	transform: translateY(0);
}

/* ========================
   MOBILE RESPONSIVE
   ========================
   Breakpoint: 768px
   
   Mobile UX:
   - Sidebar becomes slide-in drawer from left
   - Hamburger menu (☰) in header opens sidebar
   - Close button (✕) inside sidebar header
   - Overlay behind sidebar, click to close
   - Selecting a chat auto-closes sidebar
   - Profile moved to header (top-right)
   - Chat title truncated with expand/collapse
   ======================== */

/* Sidebar Overlay - dark backdrop when sidebar is open on mobile */
.sidebar-overlay {
	display: none;
}

/* Mobile hamburger menu button - hidden on desktop */
.mobile-menu-btn {
	display: none;
}

/* Mobile close button inside sidebar - hidden on desktop */
.mobile-close-btn {
	display: none;
}

/* Mobile chat title wrapper - hidden on desktop */
.mobile-chat-title-wrapper {
	display: none;
}

/* Mobile profile wrapper - hidden on desktop */
.mobile-profile-wrapper {
	display: none;
}

@media (max-width: 768px) {
	/* ========================
	   SIDEBAR DRAWER
	   ======================== */
	.sidebar {
		position: fixed;
		left: -100%;
		top: 0;
		height: 100vh;
		width: 85%;
		max-width: 320px;
		z-index: 1000;
		transition: left 0.3s ease;
		box-shadow: none;
	}

	.sidebar.active {
		left: 0;
		box-shadow: 5px 0 30px rgba(0, 0, 0, 0.4);
	}

	/* Prevent body scroll when sidebar is open */
	body.sidebar-open {
		overflow: hidden;
	}

	/* Hide profile section in sidebar on mobile (moved to header) */
	.sidebar .profile-section {
		display: none;
	}

	/* ========================
	   SIDEBAR OVERLAY
	   ========================
	   Dark backdrop that appears behind sidebar
	   Click to close sidebar
	   ======================== */
	.sidebar-overlay {
		display: block;
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.5);
		z-index: 999;
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease, visibility 0.3s ease;
	}

	.sidebar-overlay.active {
		opacity: 1;
		visibility: visible;
	}

	/* ========================
	   MOBILE HAMBURGER MENU
	   ========================
	   Visible only on mobile, opens sidebar
	   ======================== */
	.mobile-menu-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		background: transparent;
		border: none;
		color: var(--text-main);
		cursor: pointer;
		border-radius: 8px;
		transition: background 0.2s ease;
		flex-shrink: 0;
	}

	.mobile-menu-btn:hover {
		background: var(--hover);
	}

	.mobile-menu-btn svg {
		width: 22px;
		height: 22px;
	}

	/* ========================
	   MOBILE CLOSE BUTTON
	   ========================
	   Inside sidebar header, visible only on mobile
	   ======================== */
	.mobile-close-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		background: transparent;
		border: none;
		color: var(--text-sub);
		cursor: pointer;
		border-radius: 8px;
		transition: background 0.2s ease, color 0.2s ease;
	}

	.mobile-close-btn:hover {
		background: var(--hover);
		color: var(--text-main);
	}

	.mobile-close-btn svg {
		width: 20px;
		height: 20px;
	}

	/* Hide desktop toggle button on mobile */
	.sidebar-header .toggle-btn {
		display: none;
	}

	/* Adjust sidebar header for mobile */
	.sidebar-header {
		justify-content: flex-end;
		padding: 12px 16px;
	}

	/* ========================
	   MAIN HEADER (MOBILE)
	   ======================== */
	.main-header {
		padding: 12px 16px;
		justify-content: space-between;
		gap: 8px;
	}

	/* Hide SAIVO logo on mobile */
	.main-header .brand-title {
		display: none;
	}

	/* Hide desktop chat title on mobile (replaced by mobile version) */
	.main-header .header-chat-title {
		display: none;
	}

	/* ========================
	   MOBILE CHAT TITLE
	   ========================
	   Truncated title with expand/collapse toggle
	   - Shows first 5-6 chars + "…"
	   - Arrow indicates expandability
	   - Tap to show full title
	   ======================== */
	.mobile-chat-title-wrapper {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		flex: 1;
		min-width: 0;
		position: relative;
	}

	.mobile-chat-title-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 4px;
		background: transparent;
		border: none;
		cursor: pointer;
		padding: 6px 10px;
		border-radius: 8px;
		transition: background 0.2s ease;
		max-width: 100%;
	}

	.mobile-chat-title-btn:hover {
		background: var(--hover);
	}

	.mobile-chat-title-text {
		font-size: 14px;
		font-weight: 500;
		color: var(--text-main);
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 80px;
	}

	.mobile-chat-title-arrow {
		width: 14px;
		height: 14px;
		color: var(--text-sub);
		flex-shrink: 0;
		transition: transform 0.2s ease;
	}

	.mobile-chat-title-btn[aria-expanded="true"] .mobile-chat-title-arrow {
		transform: rotate(180deg);
	}

	.mobile-chat-title-full {
		position: absolute;
		top: 100%;
		left: 50%;
		transform: translateX(-50%);
		background: var(--bg-sidebar);
		border: 1px solid var(--border);
		border-radius: 8px;
		padding: 10px 14px;
		font-size: 13px;
		color: var(--text-main);
		white-space: normal;
		text-align: center;
		max-width: 250px;
		box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.2s ease, visibility 0.2s ease;
		z-index: 100;
		margin-top: 4px;
	}

	.mobile-chat-title-wrapper.expanded .mobile-chat-title-full {
		opacity: 1;
		visibility: visible;
	}

	/* ========================
	   MOBILE PROFILE (HEADER)
	   ========================
	   Circular avatar in top-right
	   Dropdown with theme toggle and logout
	   ======================== */
	.mobile-profile-wrapper {
		display: block;
		position: relative;
		flex-shrink: 0;
	}

	.mobile-profile-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		background: transparent;
		border: none;
		cursor: pointer;
		padding: 0;
	}

	.mobile-profile-avatar {
		width: 32px;
		height: 32px;
		border-radius: 50%;
		background: var(--hover);
		color: var(--text-main);
		font-size: 14px;
		font-weight: 600;
		display: flex;
		align-items: center;
		justify-content: center;
		text-transform: uppercase;
		transition: background 0.2s ease;
	}

	.mobile-profile-btn:hover .mobile-profile-avatar {
		background: var(--border);
	}

	.mobile-profile-dropdown {
		position: absolute;
		top: 100%;
		right: 0;
		background: var(--bg-sidebar);
		border: 1px solid var(--border);
		border-radius: 10px;
		padding: 6px;
		min-width: 160px;
		box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
		z-index: 1001;
		margin-top: 8px;
	}

	.mobile-profile-dropdown.show {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.mobile-profile-opt {
		display: flex;
		align-items: center;
		gap: 10px;
		width: 100%;
		padding: 10px 12px;
		background: transparent;
		border: none;
		border-radius: 6px;
		font-size: 14px;
		color: var(--text-main);
		cursor: pointer;
		transition: background 0.2s ease;
		text-align: left;
	}

	.mobile-profile-opt:hover {
		background: var(--hover);
	}

	.mobile-profile-opt svg {
		width: 18px;
		height: 18px;
		flex-shrink: 0;
	}

	.mobile-profile-logout {
		color: #ff5555;
	}

	/* ========================
	   MAIN CONTENT
	   ======================== */
	.main {
		width: 100%;
	}

	/* ========================
	   OTHER MOBILE ADJUSTMENTS
	   ======================== */
	.chat-area-inner {
		padding: 16px;
	}

	.input-container-wrapper {
		padding: 0 12px 16px;
	}

	.input-container {
		margin-top: 12px;
	}

	.input-bar {
		padding: 6px 8px 6px 14px;
	}

	/* 
	 * Mobile textarea adjustments
	 * min-height matches smaller icon-btn (36px)
	 */
	#chat-input {
		font-size: 15px;
		padding: 8px 0;
		min-height: 36px;
		max-height: 140px;
	}

	.icon-btn {
		width: 36px;
		height: 36px;
	}

	.message-content {
		max-width: 90%;
		font-size: 15px;
	}

	.message-avatar {
		width: 24px;
		height: 24px;
	}

	.message-avatar .bot-logo {
		width: 18px;
		height: 18px;
	}

	.suggestions-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.welcome-screen h1 {
		font-size: 24px;
	}
}

/* ========================
   INFO / HELP BUTTON
   ========================
   Positioned in top-right of header
   ======================== */

.info-btn {
	position: absolute;
	right: 24px;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border: none;
	background: transparent;
	color: var(--text-sub);
	cursor: pointer;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, color 0.2s ease;
	z-index: 5;
}

.info-btn:hover {
	background: var(--hover);
	color: var(--text-main);
}

.info-btn svg {
	width: 20px;
	height: 20px;
}

/* ========================
   INFO MODAL
   ========================
   Large modal with two side-by-side cards
   ======================== */

.info-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	padding: 20px;
}

.info-modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

.info-modal-container {
	background: var(--bg-sidebar);
	border: 1px solid var(--border);
	border-radius: 20px;
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
	transform: scale(0.9) translateY(20px);
	transition: transform 0.3s ease;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.info-modal-container::-webkit-scrollbar {
	display: none;
}

.info-modal-overlay.active .info-modal-container {
	transform: scale(1) translateY(0);
}

.info-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 36px;
	height: 36px;
	border: none;
	background: var(--hover);
	color: var(--text-sub);
	cursor: pointer;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, color 0.2s ease;
	z-index: 10;
}

.info-modal-close:hover {
	background: var(--border);
	color: var(--text-main);
}

.info-modal-close svg {
	width: 18px;
	height: 18px;
}

/* Tab Navigation */
.info-tabs {
	display: flex;
	border-bottom: 1px solid var(--border);
	padding: 16px 24px 0;
	gap: 4px;
}

.info-tab {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	color: var(--text-sub);
	font-family: var(--font-main);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-bottom: -1px;
}

.info-tab:hover {
	color: var(--text-main);
	background: var(--hover);
	border-radius: 8px 8px 0 0;
}

.info-tab.active {
	color: var(--text-main);
	border-bottom-color: var(--text-main);
}

.info-tab svg {
	width: 18px;
	height: 18px;
}

/* Tab Content */
.info-tab-content {
	padding: 24px;
}

.info-tab-panel {
	display: none;
}

.info-tab-panel.active {
	display: block;
}

.info-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 24px;
}

.info-panel-title {
	font-size: 20px;
	font-weight: 600;
	color: var(--text-main);
	margin: 0;
}

/* Help History Button */
.help-history-btn {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.help-history-btn:hover {
	background: var(--hover);
	border-color: var(--text-sub);
}

.help-history-btn svg {
	width: 18px;
	height: 18px;
	color: var(--text-sub);
}

.help-history-btn:hover svg {
	color: var(--text-main);
}

/* Help History Panel */
.help-history {
	display: none;
	flex-direction: column;
	gap: 12px;
}

.help-history.active {
	display: flex;
}

.help-history-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border);
}

.help-history-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--text-main);
}

.help-history-back {
	font-size: 13px;
	color: var(--text-sub);
	background: none;
	border: none;
	cursor: pointer;
	text-decoration: underline;
}

.help-history-back:hover {
	color: var(--text-main);
}

.help-history-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 280px;
	overflow-y: auto;
}

.help-history-item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px;
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: 10px;
}

.help-history-item-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.help-history-date {
	font-size: 12px;
	color: var(--text-sub);
}

.help-history-status {
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 12px;
}

.help-history-status.working {
	background: rgba(234, 179, 8, 0.15);
	color: #eab308;
}

.help-history-status.fixed {
	background: rgba(34, 197, 94, 0.15);
	color: #22c55e;
}

.help-history-problem {
	font-size: 13px;
	color: var(--text-main);
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.help-history-empty {
	text-align: center;
	padding: 24px;
	color: var(--text-sub);
	font-size: 14px;
}

/* Help Form */
.help-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.help-form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.help-form-group label {
	font-size: 13px;
	font-weight: 500;
	color: var(--text-sub);
}

.help-form-group textarea {
	width: 100%;
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 14px 16px;
	color: var(--text-main);
	font-family: var(--font-main);
	font-size: 14px;
	resize: vertical;
	min-height: 120px;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.help-form-group textarea:focus {
	border-color: var(--text-sub);
	background: var(--bg-sidebar);
	outline: none;
}

.help-form-group textarea::placeholder {
	color: var(--text-sub);
	opacity: 0.6;
}

.help-submit-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 14px 20px;
	margin-top: 16px;
	background: var(--text-main);
	color: var(--bg-body);
	border: none;
	border-radius: 10px;
	font-family: var(--font-main);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.help-submit-btn:hover {
	opacity: 0.9;
}

.help-submit-btn:active {
	transform: scale(0.98);
}

.help-submit-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.help-submit-btn svg {
	width: 16px;
	height: 16px;
}

/* Help Success */
.help-success {
	text-align: center;
	padding: 20px 0;
}

.help-success-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	color: #22c55e;
}

.help-success-icon svg {
	width: 100%;
	height: 100%;
}

.help-success p {
	font-size: 14px;
	color: var(--text-sub);
	line-height: 1.6;
	margin-bottom: 20px;
}

.help-another-btn {
	padding: 10px 20px;
	background: transparent;
	color: var(--text-sub);
	border: 1px solid var(--border);
	border-radius: 8px;
	font-family: var(--font-main);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.help-another-btn:hover {
	background: var(--hover);
	color: var(--text-main);
	border-color: var(--text-sub);
}

/* Account Info */
.account-info {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	margin-bottom: 28px;
}

.account-avatar {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	font-weight: 600;
	color: white;
	text-transform: uppercase;
}

.account-details {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.account-detail-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	background: var(--bg-input);
	border-radius: 10px;
}

.account-label {
	font-size: 13px;
	color: var(--text-sub);
}

.account-value {
	font-size: 14px;
	font-weight: 500;
	color: var(--text-main);
}

.account-status-active {
	color: #22c55e;
}

.account-status-scheduled {
	color: #f59e0b;
}

/* Account Actions */
.account-actions {
	margin-top: auto;
}

.delete-account-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 12px 20px;
	background: transparent;
	color: #ef4444;
	border: 1px solid rgba(239, 68, 68, 0.3);
	border-radius: 10px;
	font-family: var(--font-main);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.delete-account-btn:hover {
	background: rgba(239, 68, 68, 0.1);
	border-color: #ef4444;
}

.delete-account-btn svg {
	width: 18px;
	height: 18px;
}

/* ========================
   DELETION RATE LIMIT MODAL
   ======================== */

.deletion-ratelimit-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10002;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	padding: 20px;
}

.deletion-ratelimit-overlay.active {
	opacity: 1;
	visibility: visible;
}

.deletion-ratelimit-card {
	background: var(--bg-sidebar);
	border: 1px solid var(--border);
	border-radius: 16px;
	width: 100%;
	max-width: 360px;
	padding: 32px;
	text-align: center;
	box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
	transform: scale(0.9) translateY(20px);
	transition: transform 0.3s ease;
}

.deletion-ratelimit-overlay.active .deletion-ratelimit-card {
	transform: scale(1) translateY(0);
}

.deletion-ratelimit-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 20px;
	color: #f59e0b;
}

.deletion-ratelimit-icon svg {
	width: 100%;
	height: 100%;
}

.deletion-ratelimit-title {
	font-size: 20px;
	font-weight: 600;
	color: var(--text-main);
	margin: 0 0 12px;
}

.deletion-ratelimit-text {
	font-size: 14px;
	color: var(--text-sub);
	margin: 0 0 8px;
	line-height: 1.5;
}

.deletion-ratelimit-date {
	font-size: 14px;
	color: var(--text-sub);
	margin: 0 0 24px;
}

.deletion-ratelimit-date strong {
	color: #f59e0b;
	font-weight: 600;
}

.deletion-ratelimit-ok {
	width: 100%;
	padding: 12px 24px;
	background: var(--text-main);
	color: var(--bg-body);
	border: none;
	border-radius: 10px;
	font-family: var(--font-main);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.deletion-ratelimit-ok:hover {
	opacity: 0.9;
}

/* ========================
   DELETE CONFIRMATION MODAL
   ======================== */

.delete-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10001;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	padding: 20px;
}

.delete-modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

.delete-modal-card {
	background: var(--bg-sidebar);
	border: 1px solid var(--border);
	border-radius: 16px;
	width: 100%;
	max-width: 420px;
	padding: 28px;
	position: relative;
	box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
	transform: scale(0.9) translateY(20px);
	transition: transform 0.3s ease;
}

.delete-modal-overlay.active .delete-modal-card {
	transform: scale(1) translateY(0);
}

.delete-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: var(--text-sub);
	cursor: pointer;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, color 0.2s ease;
}

.delete-modal-close:hover {
	background: var(--hover);
	color: var(--text-main);
}

.delete-modal-close svg {
	width: 18px;
	height: 18px;
}

.delete-modal-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.delete-modal-icon {
	width: 56px;
	height: 56px;
	color: #ef4444;
}

.delete-modal-icon svg {
	width: 100%;
	height: 100%;
}

.delete-modal-title {
	font-size: 20px;
	font-weight: 600;
	color: var(--text-main);
	margin: 0;
}

.delete-modal-warning {
	font-size: 14px;
	color: var(--text-sub);
	line-height: 1.6;
	text-align: center;
	margin-bottom: 24px;
}

/* Delete Form */
.delete-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.delete-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.delete-form-group label {
	font-size: 13px;
	font-weight: 500;
	color: var(--text-sub);
}

.delete-form-group label strong {
	color: #ef4444;
}

.delete-form-group input {
	width: 100%;
	background: var(--bg-input);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 12px 14px;
	color: var(--text-main);
	font-family: var(--font-main);
	font-size: 14px;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.delete-form-group input:focus {
	border-color: var(--text-sub);
	background: var(--bg-sidebar);
	outline: none;
}

.delete-form-group input::placeholder {
	color: var(--text-sub);
	opacity: 0.6;
}

.delete-form-group input[readonly] {
	background: var(--hover);
	color: var(--text-sub);
	cursor: not-allowed;
	opacity: 0.8;
}

.delete-error {
	color: #ef4444;
	font-size: 13px;
	min-height: 18px;
}

.delete-form-actions {
	display: flex;
	gap: 12px;
	margin-top: 8px;
}

.delete-cancel-btn {
	flex: 1;
	padding: 12px 20px;
	background: transparent;
	color: var(--text-sub);
	border: 1px solid var(--border);
	border-radius: 10px;
	font-family: var(--font-main);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.delete-cancel-btn:hover {
	background: var(--hover);
	color: var(--text-main);
	border-color: var(--text-sub);
}

.delete-confirm-btn {
	flex: 1;
	padding: 12px 20px;
	background: #ef4444;
	color: white;
	border: none;
	border-radius: 10px;
	font-family: var(--font-main);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.delete-confirm-btn:hover {
	opacity: 0.9;
}

.delete-confirm-btn:active {
	transform: scale(0.98);
}

.delete-confirm-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Delete Success */
.delete-success {
	text-align: center;
	padding: 20px 0;
}

.delete-success-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	color: #22c55e;
}

.delete-success-icon svg {
	width: 100%;
	height: 100%;
}

.delete-success h3 {
	font-size: 18px;
	font-weight: 600;
	color: var(--text-main);
	margin: 0 0 8px 0;
}

.delete-success p {
	font-size: 14px;
	color: var(--text-sub);
	line-height: 1.6;
	margin-bottom: 24px;
}

.delete-countdown {
	background: rgba(239, 68, 68, 0.1);
	border: 1px solid rgba(239, 68, 68, 0.3);
	border-radius: 10px;
	padding: 16px;
	margin-bottom: 16px;
}

.delete-countdown p {
	font-size: 14px;
	color: #ef4444;
	margin: 0;
	font-weight: 500;
}

.delete-countdown #delete-countdown-timer {
	font-size: 18px;
	font-weight: 700;
}

.delete-done-btn {
	padding: 12px 32px;
	background: var(--text-main);
	color: var(--bg-body);
	border: none;
	border-radius: 10px;
	font-family: var(--font-main);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.delete-done-btn:hover {
	opacity: 0.9;
}

/* Mobile Responsive - Info Modal */
@media (max-width: 768px) {
	.info-btn {
		right: 60px;
	}
	
	.info-modal-container {
		max-width: 100%;
		max-height: 95vh;
		border-radius: 16px;
	}
	
	.info-tabs {
		padding: 12px 16px 0;
	}
	
	.info-tab {
		padding: 10px 16px;
		font-size: 13px;
	}
	
	.info-tab svg {
		width: 16px;
		height: 16px;
	}
	
	.info-tab-content {
		padding: 20px 16px;
	}
	
	.info-panel-title {
		font-size: 18px;
	}
	
	.deletion-ratelimit-card {
		max-width: 100%;
		padding: 24px;
		border-radius: 14px;
	}
	
	.delete-modal-card {
		max-width: 100%;
		padding: 24px;
		border-radius: 14px;
	}
	
	.delete-form-actions {
		flex-direction: column-reverse;
	}
}