/* =========================================================
	1. Containers
	========================================================= */
#uz-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.95);
	z-index: 999999;
	display: none;
	justify-content: center;
	align-items: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

#uz-overlay.active {
	display: flex;
	opacity: 1;
}

.uz-content {
	background: #1e293b;
	width: 90%;
	max-width: 750px;
	height: 85vh;
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: hidden;
	font-family: system-ui, -apple-system, sans-serif;
}

/* =========================================================
	2. Head and close
	========================================================= */
.uz-header {
	padding: 0px 20px 10px 20px;
	border-bottom: 1px solid #334155;
	display: flex;
	justify-content: flex-end;
}

.uz-close {
	font-size: 50px !important;
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	padding: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #FFFFFF;
	transition: transform 0.2s ease;
}

.uz-close:hover {
	transform: scale(1.1);
}

/* =========================================================
	3. Messages area
	========================================================= */
#uz-chat-history {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	scroll-behavior: smooth;
}

.uz-msg {
	margin-bottom: 25px;
	line-height: 1.6;
	font-size: 1.05rem;
	color: #e2e8f0;
	animation: fadeIn 0.3s ease;
}

.uz-msg-user {
	text-align: right;
}

.uz-user-bubble {
	display: inline-block;
	background: #3b82f6;
	color: white;
	padding: 10px 18px;
	border-radius: 20px 20px 0 20px;
	font-weight: 500;
}

.uz-msg-ai {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding-right: 20px;
}

.uz-ai-name {
	font-size: 0.8rem;
	color: #94a3b8;
	margin-bottom: 5px;
	display: block;
}

/* =========================================================
	4. Form and inputs
	========================================================= */
.uz-input-area {
	padding: 20px;
	background: #0f172a;
	border-top: 1px solid #334155;
	display: flex;
	gap: 10px;
	align-items: center;
}

#uz-chat-input {
	flex: 1;
	background: #334155;
	border: 1px solid #475569;
	color: white;
	padding: 5px 16px;
	border-radius: 30px;
	font-size: 1rem;
	outline: none;
}

#uz-chat-input:focus {
	border-color: #3b82f6;
}

/* =========================================================
	5. Buttons
	========================================================= */
#uz-chat-submit,
#uz-chat-clear {
	border: none;
	width: 45px;
	height: 45px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
	flex-shrink: 0;
	padding: 0;
}

#uz-chat-submit {
	background: #3b82f6;
	color: #ffffff;
}

#uz-chat-submit:hover {
	background: #2563eb;
}

#uz-chat-clear {
	background: #cbd5e1;
	color: #475569;
	margin-right: 8px;
}

#uz-chat-clear:hover {
	background: #ef4444;
	color: #ffffff;
}

#uz-chat-submit:active,
#uz-chat-clear:active {
	transform: scale(0.95);
}

#uz-chat-submit svg,
#uz-chat-clear svg {
	width: 20px;
	height: 20px;
	fill: none !important;
	stroke: currentColor;
	stroke-width: 2;
}

/* =========================================================
	6. Pills and animations
	========================================================= */
.uz-sources-title {
	width: 100%;
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	color: #94a3b8;
	margin-top: 15px;
	margin-bottom: 8px;
	letter-spacing: 0.5px;
}

.uz-sources-row {
	margin-top: 15px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.uz-source-btn {
	background: #334155;
	color: #cbd5e1;
	padding: 6px 12px;
	border-radius: 15px;
	font-size: 0.85rem;
	text-decoration: none;
	border: 1px solid transparent;
	transition: all 0.2s;
}

.uz-source-btn:hover {
	background: #475569;
	color: #fff !important;
	border-color: #64748b;
}

.uz-cursor::after {
	content: '▋';
	animation: blink 1s step-start infinite;
	color: #38bdf8;
}

@keyframes blink {
	50% {
		opacity: 0;
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* =========================================================
	7. Layouts
	========================================================= */
.uz-layout-center .uz-content {
	margin: auto;
	transform: scale(0.95);
	opacity: 0;
	transition: all 0.3s ease;
}

.uz-layout-center.active .uz-content {
	transform: scale(1);
	opacity: 1;
}

.uz-layout-fullscreen .uz-content {
	width: 100%;
	height: 100%;
	max-width: none;
	border-radius: 0;
	transform: scale(1);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.uz-layout-fullscreen.active .uz-content {
	opacity: 1;
}

.uz-layout-sidebar-right {
	justify-content: flex-end !important;
}

.uz-layout-sidebar-right .uz-content {
	width: 400px;
	max-width: 100vw;
	height: 100%;
	border-radius: 0;
	margin-right: 0;
	transform: translateX(100%);
	transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.uz-layout-sidebar-right.active .uz-content {
	transform: translateX(0);
}

.uz-layout-sidebar-left {
	justify-content: flex-start !important;
}

.uz-layout-sidebar-left .uz-content {
	width: 400px;
	max-width: 100vw;
	height: 100%;
	border-radius: 0;
	margin-left: 0;
	transform: translateX(-100%);
	transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.uz-layout-sidebar-left.active .uz-content {
	transform: translateX(0);
}

@media (max-width: 600px) {

	.uz-layout-sidebar-right .uz-content,
	.uz-layout-sidebar-left .uz-content {
		width: 100%;
	}
}

/* =========================================================
	8. Shortcode
	========================================================= */
.uz-trigger-form {
	width: 100%;
	max-width: 600px;
	margin: 20px auto;
	font-family: inherit;
}

.uz-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 50px;
	padding: 4px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
	transition: all 0.3s ease;
	width: 100%;
	box-sizing: border-box;
}

.uz-input-wrapper:focus-within {
	border-color: #3b82f6;
	box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
	transform: translateY(-1px);
}

input.uz-shortcode-input {
	flex: 1;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
	padding: 12px 20px !important;
	margin: 0 !important;
	font-size: 16px !important;
	color: #334155 !important;
	height: auto !important;
	line-height: normal !important;
	border-radius: 0 !important;
}

input.uz-shortcode-input::placeholder {
	color: #94a3b8;
	opacity: 1;
}

button.uz-shortcode-btn {
	width: 44px;
	height: 44px;
	border: none;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.2s, transform 0.1s;
	margin-right: 2px;
	padding: 0 !important;
	background: transparent;
	color: #64748b;
	border-radius: 50%;
	display: flex;
}

button.uz-shortcode-btn:hover {
	background: #f1f5f9;
	color: #3b82f6;
}

button.uz-shortcode-btn:active {
	transform: scale(0.95);
}

/* =========================================================
	9. Light Theme
	========================================================= */
.uz-theme-light .uz-content {
	background: #ffffff;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.uz-theme-light .uz-header {
	border-bottom: 1px solid #e2e8f0;
}

.uz-theme-light .uz-close {
	color: #64748b;
}

.uz-theme-light .uz-msg {
	color: #334155;
}

.uz-theme-light .uz-ai-name {
	color: #94a3b8;
}

.uz-theme-light .uz-input-area {
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
}

.uz-theme-light #uz-chat-input {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	color: #1e293b;
}

.uz-theme-light #uz-chat-input:focus {
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.uz-theme-light .uz-sources-title {
	color: #64748b;
}