/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: templates page / part
Version: 1.0
*/
/* Nút toggle */
.menu-toggle {
	display: none;
	background: none;
	border: none;
	color: #fff;
	font-size: 26px;
	cursor: pointer;
}
#ai-agents button.close-btn.close-sub__sidebar {
	background: none;
	top: 10px;
	right: 5px;
	padding: 0;
}
/* Tích hợp fanpage */
.page-list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	width: 100%;
	max-width: 100% !important;
	list-style: none;
	padding: 0;
	margin: 0;
}
.page-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 5px;
	margin-bottom: 0px;
	background: #fafafa;
}
.page-list li .page-info.page-info--integrate span{
	width: 100%;
	display: block;
}
.page-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	margin-right: 10px;
	object-fit: cover;
}
.page-info {
	display: flex;
	align-items: center;
	gap: 10px;
}
.save-token-button,
.delete-token-button {
	background: #0069d9;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 6px 12px;
	cursor: pointer;
	transition: all 0.2s;
	margin: 0;
}
.save-token-button:hover {
	background: #0056b3;
}
.delete-token-button {
	display: flex;
	justify-content: center;
	align-items: center;
	background: #d9534f;
}
.delete-token-button:hover {
	background: #c9302c;
}
.login-button {
	background: #1877f2;
	color: #fff;
	border: none;
	padding: 10px 20px;
	border-radius: 6px;
	font-size: 16px;
	cursor: pointer;
	transition: 0.2s;
	margin: 0;
}
.login-button:hover {
	background: #145dbf;
}
/* End tích hợp fanapge */
/* Sidebar */
:root {
	--sidebar-bg: #1e1e2d;
	--sidebar-width: 280px;
	--text-color: #a5a4b1;
	--text-active: #ffffff;
	--active-bg: #5a32a3;
	--logout-bg: #e53935;
	--breakpoint-desktop: 768px;
}
body.page-template-page-login {
	background-color: #f0f2f5;
	margin: 0;
}
.page-container {
	display: flex;
}
.sidebar {
	width: var(--sidebar-width);
	position: sticky;
	background-color: var(--sidebar-bg);
	color: var(--text-color);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 99;
	transition: transform 0.6s ease-in-out;
}
.sidebar-header {
	padding: 10px 15px;
	border-bottom: 1px solid #333;
	flex-shrink: 0;
}
.user-info {
	display: flex;
	align-items: center;
}
.user-info img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: #555;
	margin-right: 10px;
}
.user-info .details strong {
	color: var(--text-active);
	font-size: 16px;
}
.user-info .details span {
	background-color: #3a3b4f;
	color: #8950fc;
	padding: 2px 6px;
	border-radius: 4px;
	font-weight: bold;
}
.usage-info {
	margin-top: 15px;
	font-size: 13px;
}
.sidebar-nav {
	flex: 1;
	overflow-y: auto;
	padding: 10px;
}
.sidebar-nav::-webkit-scrollbar {
	width: 6px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
	background-color: #444;
	border-radius: 3px;
}
.nav-link {
	display: flex;
	align-items: center;
	padding: 12px 15px;
	margin-bottom: 5px;
	color: var(--text-color);
	text-decoration: none;
	border-radius: 6px;
	transition: background-color 0.2s, color 0.2s;
	cursor: pointer;
}
.nav-link:hover {
	background-color: #2a2a3a;
	color: var(--text-active);
}
.nav-link.active {
	background-color: var(--active-bg);
	color: var(--text-active);
	font-weight: bold;
}
.nav-link i {
	margin-right: 12px;
	width: 20px;
}
.sidebar-footer {
	padding: 20px;
	border-top: 1px solid #333;
	flex-shrink: 0;
}
.logout-button {
	display: block;
	background-color: var(--logout-bg);
	color: white;
	text-align: center;
	padding: 12px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: bold;
}
.main-content {
	padding: 30px;
	/* 	min-height: 100vh; */
	background-color: #f9faff;
	box-sizing: border-box;
	width: calc(100% - var(--sidebar-width));
}
.content-panel {
	display: none;
}
.content-panel.active {
	display: block;
}
#panel-profile{
	position: relative;
}
.menu-toggle,
.close-btn {
	display: none;
	cursor: pointer;
	background: none;
	border: none;
	color: #fff;
	font-size: 28px;
}
.menu-toggle {
	color: #333;
	padding: 15px;
	position: absolute;
	top: 0;
	left: 0;
}
.close-btn {
	position: absolute;
	top: 10px;
	right: 15px;
}
.sidebar.sidebar--sub.split-left-pane.open {
	height: 100vh;
	width: 80%;
	left: 0;
	border-radius: 0;
}
/* Sub sidebar */
.sidebar.split-left-pane .nav-group-title {
	padding: 8px 10px;
	display: flex;
	align-items: center;
	gap: 5px;
	font-weight: bold;
	border-bottom: 1px dashed;
}
/* End sub sidebar */
@media (max-width: 767.98px) {
	.page-container {
		flex-wrap: wrap;
	}
	button.menu-toggle {
		position: unset;
		top: unset;
		margin: 0;
		left: 0;
		right: 0;
		padding: 0;
		color: #fff;
		min-height: unset;
		line-height: unset;
	}
	.sidebar {
		transform: translateX(-160%);
	}
	.sidebar.open {
		transform: translateX(0);
		width: 100%;
		position: fixed;
		top: 0;
		z-index: 99999;
	}
	.main-content {
		margin-left: 0;
		padding: 10px;
		padding-top: 30px;
		order: -1;
		width: 100%;
	}
	.menu-toggle,
	.close-btn {
		display: block;
	}
	.close-btn {
		display: flex !important;
		position: absolute;
		top: 2px;
		right: -15px;
		margin: 0;
		padding: 0;
		padding: 25px 25px;
		justify-content: center;
		align-items: center;
		height: 30px;
		border-radius: 4px;
		font-size: 48px;
		min-height: unset;
	}
}
/* End sidebar */
.split-content-container {
	display: flex;
	width: 100%;
	max-width: 100%;
}
.split-content-container .split-left-pane {
	max-width: 300px;
	width: 40%;
	border-radius: 5px;
}
.split-content-container .sidebar.split-left-pane .nav-link {
	border-radius: 0;
}
.sidebar.split-left-pane .nav-group-title {
	padding: 8px 10px;
}
.split-content-container .split-right-pane {
	width: 100%;
	max-width: 100%;
}
.split-content-container #chatBox {
	margin-top: 0;
	padding-top: 0;
}
.split-content-container #ai-agents .section-chatbox {
	padding: 0 10px;
}
.sub__panel {
	display: none;
	width: 100%;
	margin-left: 15px;
}
.sub__panel.active {
	display: block;
	width: 100%;
}

.login-button {
	background-color: #1877f2;
	color: white;
	padding: 12px 20px;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 16px;
	font-weight: bold;
	display: inline-flex;
	align-items: center;
	transition: background-color 0.3s;
}
.login-button:hover {
	background-color: #1465c4;
}
.facebook-icon {
	margin-right: 8px;
	/* --- THÊM MỚI: Sử dụng Font Awesome --- */
	font-family: "Font Awesome 5 Brands";
	font-size: 20px;
}
/* --- THÊM MỚI: Mã icon Facebook --- */
.facebook-icon::before {
	content: "\f39e";
}
.page-list {
	list-style: none;
	padding: 0;
	margin-top: 15px;
	max-width: 800px;
}

/* --- THÊM MỚI: CSS cho phần thông tin page --- */
.page-info {
	flex-grow: 1; /* Chiếm hết không gian bên trái */
	display: flex;
	align-items: center;
}
.page-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	margin-right: 15px;
}
/* --- THÊM MỚI: CSS cho nút Lưu Token --- */
.save-token-button {
	background-color: #4caf50; /* Màu xanh */
	color: white;
	padding: 8px 12px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	margin-left: auto; /* Đẩy nút về bên phải */
}
.save-token-button:hover {
	background-color: #45a049;
}
.save-token-button:disabled {
	background-color: #ccc;
	cursor: not-allowed;
}
/* --- THÊM MỚI: CSS cho các tiêu đề --- */
.page-list-container h2 {
	font-size: 18px;
	margin-top: 25px;
}
#status {
	margin-top: 15px;
	font-weight: bold;
}
.toggle__setting,
.toggle__box strong{
	display: none;
}

@media (min-width: 768px) {
	textarea#post-content {
		min-height: 250px;
	}
}
@media (min-width:767px) and (max-width:849px){
	.medium-logo-center .flex-left{
		height: 100%;
	}
	.menu-toggle{
		display: block;
		padding: 0;
		color: #fff;
	}
	.main-content{
		width: 100%;
	}
	.sidebar.sidebar--main,
	.sidebar.sidebar--sub.split-left-pane{
		width: 100%;
		transform: translateX(-100%);
		font-size: 150%;
	}
	.user-info .details strong {
		font-size: 150%;
	}
	.usage-info{
		font-size: 120%;
	}
	.user-info img{
		width: 80px; 
		height: 80px;
	}
	.sidebar.sidebar--main.open,
	.sidebar.sidebar--sub.split-left-pane.open{
		transform: translatex(0);
	}
	.close-btn {
		display: block;
		padding: 0;
		top: -45px;
		right: 15px;
		margin: 0;
		font-size: 70px;
		line-height: 1;
	}
}
@media (max-width: 769px) {
	.main-content{
		padding: 15px;
	}
	.page-info--details span {
		display: none;
	}
	.toggle__box {
		display: flex;
		gap: 5px;
		align-items: center;
		margin-bottom: 10px;
	}
	.toggle__box:hover{
		color: green;
	}
	.toggle__setting {
		padding: 15px; 
		display: flex;
		justify-content: center;
		align-items: center; 
		border: 1px solid #fff;
		background: #fff;
		box-shadow: 2px 2px 4px rgba(0,0,0,0.4);
		border-radius: 4px;
		width: 40px; 
		height: 40px;
	}
	.sidebar {
		top: 0;
		position: fixed;
		bottom: 0;
		height: 100vh;
	}
	.sidebar.sidebar--main {
		position: fixed;
	}
	.sidebar.sidebar--sub {
		position: fixed;
	}
	.split-content-container .sidebar.sidebar--sub.split-left-pane {
		height: 100vh;
		width: 100%;
		max-width: 100%;
		left: 0;
		border-radius: 0;
	}
	.sub__panel {
		margin: 0;
	}
	.nav-link{
		padding: 15px 0;
		font-size: 18px; 
	}
	/* Tích hợp Page	 */
	.page-info.page-info--integrate {
		max-width: 70%;
	}
	/*  End tích hợp Page	 */
}
@media (max-width: 541px) {
	.main-content {
		min-height: 88vh;
	}
}
