*, ::after, ::before {
    box-sizing: border-box;
}
@font-face {
  font-family: 'Vazir';
  font-style: normal;
  font-weight: 300;
  src: url(/theme/panel_v5/assets/css/fonts/Vazir.woff) format('woff');
}
@font-face {
    font-family: 'Vazir';
    font-style: normal;
    font-weight: 300;
    src: url(/theme/panel_v5/assets/css/fonts/Vazir-Light.woff) format('woff');
}

@font-face {
    font-family: 'Vazir';
    font-style: normal;
    font-weight: 400;
    src: url(/theme/panel_v5/assets/css/fonts/Vazir.woff) format('woff');
}

@font-face {
    font-family: 'Vazir';
    font-style: normal;
    font-weight: 600;
    src: url(/theme/panel_v5/assets/css/fonts/Vazir-Medium.woff) format('woff');
}

@font-face {
    font-family: 'Vazir';
    font-style: normal;
    font-weight: bold;
    src: url(/theme/panel_v5/assets/css/fonts/Vazir-Bold.woff) format('woff');
}
body {
    font-family: Vazir;
    background-color: #f3f3f3;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
	direction:rtl;
}

body *{font-family:Vazir}

.chat-container{width:100%;margin:20px;height: calc(100vh - 44px);background-color:#fff;border-radius:8px;overflow:hidden;box-shadow:0 0 10px rgba(0, 0, 0, 0.1)}.chat-header{justify-content:space-evenly;display: flex;align-items: center;background-color:#007BFF;color:#fff;padding:20px;text-align:center}.chat-main{display:flex;flex-direction:column;flex-grow:1}.chat-contents{display:flex;flex-grow:1;height: calc(100% - 64px);}.chat-sidebar{width:30%;border-right:1px solid #ddd;padding:10px;overflow-y:auto}.chat-sidebar h2{margin:0;text-align:center}.chat-content ul{list-style-type:none;padding:0;margin:0}.chat-content-private ul li,.chat-content ul li{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;margin-bottom:10px;padding:10px;border-radius:8px;background-color:#f1f1f1;position: relative;word-wrap: break-word;word-break: break-word;}.chat-info{display:flex;align-items: center;}.chat-user{font-weight:bold;margin-left:5px;display:flex;align-items: center;}.chat-message{flex-grow:1;text-align:left;display: flex;margin-top: 8px;}.chat-time{font-size:12px;color:#888;display:flex;align-items:center}.chat-footer{display:flex;gap:5px;padding:10px;background-color:#f9f9f9;border-top:1px solid #ddd}.chat-item{display:flex;align-items:center;justify-content:space-between}.chat-online-item{border: 1px solid #e2e2e2;padding: 7px;border-radius: 11px;display:flex;align-items:center;justify-content:space-between;flex-direction:row-reverse}input{flex-grow:1;padding:10px;border-radius:8px;border:1px solid #ddd}input:focus{outline:1px solid #ddd;;border:1px solid #ddd;;}button,.btn_act{padding:10px 20px;background-color:#007BFF;color:#fff;border:none;border-radius:8px;cursor:pointer}button:hover,.btn_act:hover{background-color:#0056b3}.online-users{margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.chat-header h1{margin:0px;font-size:24px;}
.chat-info-user a{color:#FFF;}


.chat-messages {
    width: 100%;
    padding: 0;
    margin: 0;
}

.chat-info{display:flex;align-items: center;}

.chat-content-private,
.chat-content {
    width: 70%;
    padding: 10px;
    overflow-y: auto;
	height: calc(100% - 0px);
	flex-grow:1;
}

.chat-container {
    width: calc(100% - 40px);
    margin: 20px;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.chat-main {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
	height: calc(100% - 192px);
}

.chat-footer {
    flex-shrink: 0;
    background-color: #f9f9f9;
    padding: 10px;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
}



/*scroll*/
.chat-content::-webkit-scrollbar{width:10px}.chat-content::-webkit-scrollbar-track{background:#f1f1f1}.chat-content::-webkit-scrollbar-thumb{background:#888;border-radius:5px}.chat-content::-webkit-scrollbar-thumb:hover{background:#555}
::-webkit-scrollbar{width:10px}::-webkit-scrollbar-track{background:#f1f1f1}::-webkit-scrollbar-thumb{background:#888;border-radius:5px}::-webkit-scrollbar-thumb:hover{background:#555}

.chat-delete
{
	fill:red;
	cursor:pointer;
}
.chat-banned
{
	fill:red;
	cursor:pointer;
}



/* برای ایجاد پنجره کناری */
#sidebar {
    position: fixed;
    right: -320px;
    top: 0;
    width: 300px;
    height: 100%;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    padding: 10px;
}



.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.sidebar-content {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: block;
    margin: 0 auto 20px auto;
}

.hamburger-menu {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
	display:none;
}
#close-sidebar {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
	color: #0a9cc5;
	display:none;
}
.chat-sidebar-head
{
    display: flex;
    align-items: center;
    justify-content: space-between;
	margin-bottom: 15px;
}
.chat-time-del
{
	display:flex;gap:5px;
}
	.chat-info 
	{
		flex-direction: column;
		align-items:unset;
	}
	.chat-time-del
	{
		position: absolute;
		left: 10px;
		top: -6px;
	}
	.chat-message{text-align:right;}

.chat-content-private ul li.chat-sender
{
	background-color: #8ee07859;
}
.chat-content-private ul li.chat-receiver
{
	background-color: #e6efff;
}
@media (max-width:768px)
{
	.hamburger-menu 
	{
		display:block;
	}
	.chat-sidebar
	{
		position: fixed;
		left: -320px;
		top: 0;
		width: 300px;
		height: 100%;
		background-color: #fff;
		box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
		transition: left 0.3s ease;
		z-index: 1000;
	}
	.chat-sidebar.open {
		left: 0;
	}
	#close-sidebar {
		display:block;
	}
	.chat-container {
		width:100%;
		margin:0px;
		height:100vh;
	}
	.chat-info-text{display:none;}
}


.sidebar-content a {
    display: block;
    width: 100%;
    padding: 10px;
    color: #007BFF;
    text-decoration: none;
    background-color: #f9f9f9;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.sidebar-content a:hover {
    background-color: #007BFF;
    color: #fff;
}




/*---------------------------------tab---------*/
.chat-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.chat-tab {
    padding: 10px 15px;
    background: #f1f1f1;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-right: 0px;
    justify-content: space-between;
    gap: 10px;
}

.chat-tab.active {
    background: #007bff;
    color: white;
}
.chat-user-private.active 
{
    background: #007BFF;
	color:#FFF;
}
.chat-tab.active .close-tab 
{
    color: #FFF;
}
.close-tab {
    background: none;
    border: none;
    font-size: 14px;
    padding:0;
    display: flex;
    border-radius: 50%;
	color: #000;
}
.close-tab svg{
    width:23px;
	height:23px;
}
.close-tab:hover {
    background:red;
	color:#fff;
}



/* تب‌ها */

.tab-list {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
}
.tab-item {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    margin-right: 5px;
    transition: background-color 0.3s;
}

.tab-item.active {
    background-color: #fff;
    font-weight: bold;
}

.tab-item:hover {
    background-color: #ddd;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}


.emoji-img {
    width: 23px;
    height: 23px;
	margin:0 4px;
}

#emoji-popup {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	max-width: 400px;
}

.fr-toolbar .fr-command.fr-btn,.fr-popup .fr-command.fr-btn{background:transparent;color:#333333;-moz-outline:0;outline:none;border:0;line-height:1;cursor:pointer;text-align:left;margin:4px 2px;padding:0;-webkit-transition:all 0.5s;-moz-transition:all 0.5s;-ms-transition:all 0.5s;-o-transition:all 0.5s;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;z-index:2;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;text-decoration:none;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;float:left;height:40px;}
.fr-toolbar .fr-command.fr-btn img,.fr-popup .fr-command.fr-btn img{margin:8px 7px;width:24px;}
.fr-toolbar .fr-tabs .fr-command.fr-btn,.fr-popup .fr-tabs .fr-command.fr-btn{margin:0;width:46px;height:40px;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;}
.fr-toolbar .fr-tabs .fr-command.fr-btn:not(:hover):not(:focus).fr-active,.fr-toolbar .fr-tabs .fr-command.fr-btn:not(:hover):not(:focus).fr-active-tab,.fr-popup .fr-tabs .fr-command.fr-btn:not(:hover):not(:focus).fr-active,.fr-popup .fr-tabs .fr-command.fr-btn:not(:hover):not(:focus).fr-active-tab{background:#FFF;}
.fr-toolbar .fr-tabs .fr-command.fr-btn img,.fr-popup .fr-tabs .fr-command.fr-btn img{margin:8px 11px;width:24px;height:24px;}
.fr-toolbar.fr-rtl .fr-command.fr-btn,.fr-popup.fr-rtl .fr-command.fr-btn{float:right;}
.fr-desktop .fr-command:hover,.fr-desktop .fr-command:focus{outline:0;color:#333333;}
.fr-desktop .fr-command:hover:not(.fr-table-cell),.fr-desktop .fr-command:focus:not(.fr-table-cell){background:#ebebeb;}
.fr-desktop .fr-command:hover::after,.fr-desktop .fr-command:focus::after{border-top-color:#333333;}
.fr-desktop .fr-command:active{color:#333333;background:#d6d6d6;}
.fr-desktop .fr-command.fr-active:hover,.fr-desktop .fr-command.fr-active:focus{background:#ebebeb;}
.fr-desktop .fr-command.fr-active:active{background:#d6d6d6;}
.fr-popup{position:absolute;display:none;color:#222222;background:#FFF;-webkit-box-shadow:0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);-moz-box-shadow:0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);box-shadow:0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);font-family:Arial, Helvetica, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;margin-top:10px;z-index:2147483635;text-align:left;border-radius:6px;-moz-border-radius:6px;-webkit-border-radius:6px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1.2;}
.fr-popup .fr-icon{text-align:center;vertical-align:middle;line-height:1;cursor:pointer;font-weight:400;box-sizing:content-box;padding:6px;}
.fr-popup .fr-icon-container{padding:20px;max-height:200px;overflow:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
@media (min-width: 768px){
.fr-popup .fr-icon-container{min-width:276px;}
}
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none){
.fr-popup .fr-icon-container{display:inline-flex;-ms-flex-flow:row wrap;}
}
@media screen and (-ms-high-contrast: active) and (max-width: 768px), (-ms-high-contrast: none) and (max-width: 768px){
.fr-popup .fr-icon-container{width:236px;}
}
.fr-popup.fr-active{display:block;}
.fr-popup .fr-buttons{white-space:nowrap;line-height:0;}
.fr-popup .fr-buttons .fr-btn{margin-left:4px;margin-right:4px;display:inline-block;float:none;}
.fr-popup .fr-buttons.fr-tabs{border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;-webkit-border-radius:6px 6px 0 0;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#f5f5f5;overflow:hidden;}
@media (max-width: 768px){
.fr-popup .fr-buttons.fr-tabs.fr-tabs-scroll{overflow:scroll;overflow-y:hidden;}
}
.fr-popup.fr-rtl{direction:rtl;text-align:right;}
span.fr-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;}

.fr-popup .fr-emoticon{width:24px;height:24px;font-family:"Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;}
.fr-popup .fr-emoticon img{height:24px;width:24px;}
@media screen and (-ms-high-contrast: active) and (min-width: 768px), (-ms-high-contrast: none) and (min-width: 768px){
.fr-popup .fr-icon-container.fr-emoticon-container{width:368px;}
}

.fr-popup .fr-emoticon{width:24px;height:24px;font-family:"Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;}
.fr-popup .fr-emoticon img{height:24px;width:24px;}
@media screen and (-ms-high-contrast: active) and (min-width: 768px), (-ms-high-contrast: none) and (min-width: 768px){
.fr-popup .fr-icon-container.fr-emoticon-container{width:368px;}
}






/* استایل textarea */
.chat-footer textarea {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
	outline: 0;
}

/* استایل پیام طولانی */
.chat-message-content {
    position: relative;
    overflow: hidden;
    max-height: 100px;
    transition: max-height 0.3s ease;
}

.chat-message-content.expanded {
    max-height: none;
}

.show-more-btn {
    display: block;
    margin-top: 5px;
    color: #007bff;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
}

.show-more-btn:hover {
    color: #0056b3;
}

/* استایل reply */
.reply-btn {
    cursor: pointer;
    margin-left: 5px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.reply-btn:hover {
    opacity: 1;
}

.reply-preview {
    display: none;
    background: #f0f0f0;
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    border-right: 3px solid #007bff;
}

.reply-preview.show {
    display: block;
}

.reply-preview .reply-text {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

.reply-preview .cancel-reply {
    cursor: pointer;
    color: #dc3545;
    margin-left: 10px;
    font-size: 12px;
}

.replied-message {
    background: #f8f9fa;
    border-right: 3px solid #007bff;
    padding: 5px 8px;
    margin-bottom: 5px;
    font-size: 12px;
    color: #666;
    border-radius: 3px;
}