/* Arabic search bar: stretch middle field cleanly */
@media (min-width: 775px) {
	html[dir="rtl"] .home-search-form .search-row > .search-col:nth-child(2) {
		position: relative;
		z-index: 8;
		transform: scaleX(1.16);
	}

	html[dir="rtl"] .home-search-form .search-row > .search-col:nth-child(2) .hstack {
		border-left: 20px !important;
		border-right: 20px !important;
	}
}

/* MOBILE BOTTOM NAV */
.mobile-bottom-nav {
	position: fixed !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
	height: 80px !important;
	background: #fff !important;
	border-top: 1px solid #e8e8e8 !important;
	display: grid !important;
	grid-template-columns: 1fr 1fr 1.2fr 1fr 1fr !important;
	align-items: end !important;
	padding: 0 8px calc(env(safe-area-inset-bottom, 0) + 6px) !important;
	box-shadow: 0 -3px 14px rgba(0, 0, 0, 0.08) !important;
	z-index: 999999 !important;
	margin: 0 !important;
	box-sizing: border-box !important;
	transition: transform 0.25s ease, opacity 0.25s ease !important;
}

.mobile-bottom-nav .nav-item {
	height: 70px !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: flex-end !important;
	text-align: center !important;
	text-decoration: none !important;
	color: #000 !important;
	padding: 4px 2px 8px !important;
	margin: 0 !important;
	box-sizing: border-box !important;
}

.mobile-bottom-nav .nav-icon {
	position: relative !important;
	width: 34px !important;
	height: 34px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	margin: 0 auto 7px !important;
}

.mobile-bottom-nav .nav-item i {
	font-size: 26px !important;
	line-height: 1 !important;
	margin: 0 !important;
	display: block !important;
	color: #000 !important;
}

.mobile-bottom-nav .nav-label {
	display: block !important;
	font-size: 11px !important;
	line-height: 1.05 !important;
	font-weight: 500 !important;
	margin: 0 !important;
	padding: 0 !important;
	white-space: nowrap !important;
	text-align: center !important;
	color: #000 !important;
}

.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item.active .nav-label,
.mobile-bottom-nav .nav-item.active i {
	color: #000 !important;
	font-weight: 700 !important;
}

.mobile-bottom-nav .nav-item:nth-child(1) {
	padding-left: 8px !important;
}
.mobile-bottom-nav .nav-item:nth-child(2) {
	padding-left: 4px !important;
	padding-right: 8px !important;
}
.mobile-bottom-nav .nav-item:nth-child(4) {
	padding-left: 8px !important;
	padding-right: 4px !important;
}
.mobile-bottom-nav .nav-item:nth-child(5) {
	padding-right: 8px !important;
}

.mobile-bottom-nav .nav-center {
	position: relative !important;
	top: -14px !important;
	height: 76px !important;
	justify-content: center !important;
	padding: 0 !important;
}

.mobile-bottom-nav .center-btn {
	width: 68px !important;
	height: 68px !important;
	border-radius: 50% !important;
	background: #000 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18) !important;
	margin: 0 auto !important;
}

.mobile-bottom-nav .center-btn i {
	font-size: 31px !important;
	color: #fff !important;
	margin: 0 !important;
	line-height: 1 !important;
}

.mobile-bottom-nav .icon-wrap {
	position: relative !important;
}

.mobile-bottom-nav .badge-count {
	position: absolute !important;
	top: -6px !important;
	right: -10px !important;
	min-width: 19px !important;
	height: 19px !important;
	padding: 0 4px !important;
	border-radius: 20px !important;
	background: #ff0000 !important;
	color: #fff !important;
	font-size: 10px !important;
	font-weight: 700 !important;
	line-height: 19px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
}

.mobile-bottom-nav .nav-item:active {
	transform: scale(0.97);
}

@media (min-width: 768px) {
	.mobile-bottom-nav {
		display: none !important;
	}
}

@media (max-width: 767.98px) {
	main {
		padding-bottom: 86px !important;
	}

	body {
		padding-bottom: 0 !important;
	}
}

@media (max-width: 420px) {
	.mobile-bottom-nav {
		height: 76px !important;
		grid-template-columns: 1fr 1fr 1.15fr 1fr 1fr !important;
		padding-left: 4px !important;
		padding-right: 4px !important;
	}

	.mobile-bottom-nav .nav-item {
		height: 66px !important;
		padding-bottom: 7px !important;
	}

	.mobile-bottom-nav .nav-icon {
		width: 32px !important;
		height: 32px !important;
		margin-bottom: 6px !important;
	}

	.mobile-bottom-nav .nav-item i {
		font-size: 24px !important;
	}

	.mobile-bottom-nav .nav-label {
		font-size: 10px !important;
	}

	.mobile-bottom-nav .nav-center {
		top: -12px !important;
	}

	.mobile-bottom-nav .center-btn {
		width: 62px !important;
		height: 62px !important;
	}

	.mobile-bottom-nav .center-btn i {
		font-size: 28px !important;
	}
}

.mobile-bottom-nav a::after,
.mobile-bottom-nav .nav-item::after,
.mobile-bottom-nav .dropdown-toggle::after {
	display: none !important;
	content: none !important;
	border: none !important;
}

/* AUTH POPUP */
.auth-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.auth-popup-box {
	position: relative;
	width: 100%;
	max-width: 380px;
	background: #fff;
	border-radius: 22px;
	padding: 22px 18px 18px;
	box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
	box-sizing: border-box;
}

.auth-popup-close {
	position: absolute;
	top: 10px;
	right: 12px;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #333;
	padding: 0;
}

html[dir="rtl"] .auth-popup-close {
	right: auto;
	left: 12px;
}

.auth-popup-header h3 {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 700;
	text-align: center;
	color: #111;
}

.auth-popup-header p {
	margin: 0 0 18px;
	font-size: 14px;
	color: #666;
	text-align: center;
}

.auth-step {
	display: block;
}

.auth-field {
	margin-bottom: 14px;
}

.auth-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #222;
}

.auth-input {
	width: 100%;
	height: 48px;
	border: 1px solid #ddd;
	border-radius: 14px;
	padding: 0 14px;
	font-size: 16px;
	outline: none;
	box-sizing: border-box;
	background: #fff;
	color: #111;
}

.auth-input:focus {
	border-color: #111;
	box-shadow: none;
}

.auth-main-btn {
	width: 100%;
	height: 48px;
	border: 0;
	border-radius: 14px;
	background: #111;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	box-sizing: border-box;
}

.auth-link-btn {
	width: 100%;
	margin-top: 10px;
	border: 0;
	background: transparent;
	color: #111;
	font-size: 14px;
	cursor: pointer;
	padding: 8px 0;
}

.auth-popup-message {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 12px;
	font-size: 13px;
	text-align: center;
	background: #f5f5f5;
	color: #222;
}

html[dir="rtl"] .auth-popup-box,
html[dir="rtl"] .auth-field label,
html[dir="rtl"] .auth-input,
html[dir="rtl"] .auth-link-btn,
html[dir="rtl"] .auth-popup-message {
	text-align: right;
}

html[dir="rtl"] .auth-popup-header h3,
html[dir="rtl"] .auth-popup-header p {
	text-align: center;
}

@media (max-width: 420px) {
	.auth-popup-box {
		max-width: 100%;
		border-radius: 18px;
		padding: 20px 16px 16px;
	}

	.auth-popup-header h3 {
		font-size: 20px;
	}

	.auth-input,
	.auth-main-btn {
		height: 46px;
	}
}

/* Register page - mobile only improvement */
@media (max-width: 767.98px) {
	#signupForm {
		background: #fff;
		padding: 16px;
		border-radius: 16px;
		box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
		margin-top: 10px;
	}

	#signupForm .form-control,
	#signupForm .form-select,
	#signupForm .select2-container--default .select2-selection--single,
	#signupForm .iti input,
	#signupForm input[type="text"],
	#signupForm input[type="email"],
	#signupForm input[type="password"],
	#signupForm input[type="tel"] {
		min-height: 50px !important;
		border-radius: 12px !important;
		font-size: 16px !important;
	}

	#signupForm .btn.btn-lg,
	#signupBtn {
		min-height: 52px !important;
		border-radius: 12px !important;
		font-size: 16px !important;
		font-weight: 700;
	}

	#signupForm .mb-3,
	#signupForm .mb-4,
	#signupForm .form-group {
		margin-bottom: 14px !important;
	}

	h3.fw-600 {
		font-size: 24px !important;
		text-align: center !important;
		margin-bottom: 8px !important;
	}

	p.text-muted.mb-4 {
		text-align: center !important;
		font-size: 14px !important;
		margin-bottom: 14px !important;
	}

	#signupForm label {
		font-size: 14px !important;
		font-weight: 600 !important;
		margin-bottom: 6px !important;
	}

	.d-grid.my-4 {
		margin-top: 16px !important;
		margin-bottom: 14px !important;
	}

	.text-center.text-muted.mb-0 {
		font-size: 14px !important;
		padding: 0 10px !important;
	}
}

.alert {
	word-break: break-word;
}

html[dir="rtl"] .alert {
	text-align: right;
}

/* Login/Register auth page mobile UI improvement */
@media (max-width: 767.98px) {
	.auth-login-register .container.my-auto.py-5 {
		padding-top: 18px !important;
		padding-bottom: 24px !important;
	}

	.auth-login-register .col-12.col-sm-12.col-md-12.col-lg-12.col-xl-11.col-xxl-10.mx-auto {
		max-width: 100% !important;
	}

	.auth-login-register h3.fw-600 {
		font-size: 34px !important;
		line-height: 1.2 !important;
		text-align: center !important;
		margin-bottom: 10px !important;
	}

	.auth-login-register p.text-muted.mb-4 {
		text-align: center !important;
		font-size: 15px !important;
		line-height: 1.8 !important;
		margin-bottom: 18px !important;
		color: #6c757d !important;
	}

	.auth-login-register .alert {
		border-radius: 14px !important;
		padding: 14px 16px !important;
		font-size: 15px !important;
		margin-bottom: 18px !important;
	}

	.auth-login-register .form-label,
	.auth-login-register label {
		font-size: 15px !important;
		font-weight: 700 !important;
		margin-bottom: 8px !important;
	}

	.auth-login-register .form-control,
	.auth-login-register .form-select,
	.auth-login-register .iti input {
		min-height: 54px !important;
		border-radius: 14px !important;
		font-size: 16px !important;
		padding-top: 12px !important;
		padding-bottom: 12px !important;
	}

	.auth-login-register .btn.btn-primary.btn-lg,
	.auth-login-register .btn.btn-lg {
		min-height: 56px !important;
		border-radius: 14px !important;
		font-size: 18px !important;
		font-weight: 700 !important;
	}

	.auth-login-register .logo img,
	.auth-login-register .d-block.d-md-none img {
		max-height: 70px !important;
		width: auto !important;
	}

	.auth-login-register .text-muted,
	.auth-login-register .small,
	.auth-login-register a {
		font-size: 15px !important;
	}

	.auth-login-register .row.g-0.min-vh-100 {
		min-height: auto !important;
	}
}

/* === AUTH PAGE MODERN STYLE === */
@media (max-width: 767.98px) {
	.auth-login-register .container.my-auto.py-5 {
		background: #ffffff;
		border-radius: 20px;
		box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
		padding: 20px 18px !important;
		margin: 10px !important;
	}

	.auth-login-register .d-block.d-md-none {
		margin-bottom: 8px !important;
	}

	.auth-login-register h3,
	.auth-login-register h2,
	.auth-login-register h1 {
		font-size: 30px !important;
		font-weight: 800 !important;
		margin-bottom: 8px !important;
	}

	.auth-login-register p {
		color: #6c757d !important;
		font-size: 14px !important;
		margin-bottom: 20px !important;
	}

	.auth-login-register .form-control {
		border: 1px solid #e5e7eb !important;
		box-shadow: none !important;
		transition: all 0.2s ease;
	}

	.auth-login-register .form-control:focus {
		border-color: #0d6efd !important;
		box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1) !important;
	}

	.auth-login-register .input-group-text,
	.auth-login-register .toggle-password {
		border-radius: 14px !important;
	}

	.auth-login-register .d-flex,
	.auth-login-register .form-check {
		font-size: 14px !important;
	}

	.auth-login-register .btn-primary {
		background: linear-gradient(135deg, #0d6efd, #0a58ca) !important;
		border: none !important;
		box-shadow: 0 6px 14px rgba(13, 110, 253, 0.3);
		transition: 0.2s ease;
	}

	.auth-login-register .btn-primary:active {
		transform: scale(0.98);
	}

	.auth-login-register .text-center a {
		font-weight: 600;
		color: #0d6efd !important;
	}

	.auth-login-register .language-switcher {
		margin-top: 12px !important;
		font-size: 14px !important;
	}

	.auth-login-register .row > div {
		margin-bottom: 12px;
	}
}

/* Safe intl-tel-input alignment fix */
.iti {
	width: 100% !important;
}

.iti__flag-container {
	left: 0 !important;
	right: auto !important;
	direction: ltr !important;
}

.iti--separate-dial-code .iti__selected-country {
	padding-left: 12px !important;
	padding-right: 10px !important;
}

.iti--separate-dial-code .iti__selected-dial-code {
	direction: ltr !important;
	font-weight: 600 !important;
	margin-left: 6px !important;
}

.iti input,
.iti input.iti-phone-number,
input.iti-phone-number {
	width: 100% !important;
	direction: ltr !important;
	text-align: right !important;
}

.iti--separate-dial-code input,
html[dir="rtl"] .iti--separate-dial-code input {
	padding-left: 96px !important;
	padding-right: 14px !important;
}

html[dir="rtl"] .iti__flag-container {
	left: 0 !important;
	right: auto !important;
}

/* =========================
   MODERN CHAT UI
========================= */

.modern-chat-wrapper {
	padding: 0;
}

.modern-chat-card {
	background: #ffffff;
	border: 1px solid #e7ebf0;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 8px 30px rgba(18, 38, 63, 0.06);
}

.modern-chat-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	padding: 18px 20px;
	background: #ffffff;
	border-bottom: 1px solid #edf1f5;
}

.modern-chat-header-left {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.modern-chat-user-avatar-wrap {
	flex: 0 0 auto;
}

.modern-chat-user-avatar {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	border: 2px solid #eef2f6;
}

.modern-chat-user-avatar-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #eef2f6;
	color: #6c757d;
	font-size: 18px;
}

.modern-chat-user-info {
	min-width: 0;
}

.modern-chat-user-name {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	color: #1d2a3b;
	margin-bottom: 4px;
}

.modern-chat-user-name a {
	text-decoration: none;
}

.modern-chat-post-title {
	font-size: 13px;
	color: #7a8697;
	line-height: 1.4;
	word-break: break-word;
}

.modern-chat-post-title a {
	text-decoration: none;
	font-weight: 600;
}

.modern-online-dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	margin-inline-end: 6px;
	border-radius: 50%;
	background: #28a745;
	vertical-align: middle;
}

.modern-chat-header-right .btn {
	border-radius: 10px;
}

.modern-chat-body-wrap {
	background: #f5f7fb;
	flex: 1 1 auto;
	min-height: 0;
}

.modern-chat-body {
	height: 560px;
	overflow-y: auto;
	padding: 12px !important;
	background:
		radial-gradient(circle at top left, rgba(13, 110, 253, 0.04), transparent 20%),
		radial-gradient(circle at bottom right, rgba(25, 135, 84, 0.04), transparent 20%),
		#f5f7fb;
}

.modern-chat-pagination {
	margin-bottom: 18px;
}

.modern-chat-messages-list {
	width: 100%;
}

.modern-chat-bubble {
	display: inline-block;
	max-width: 100%;
	border-radius: 18px;
	word-break: break-word;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.modern-chat-bubble-me {
	background: linear-gradient(135deg, #0d6efd, #2b7bff);
	color: #ffffff;
	border-bottom-right-radius: 6px;
}

.modern-chat-bubble-me a {
	color: #ffffff !important;
	text-decoration: underline;
}

.modern-chat-bubble-other {
	background: #ffffff;
	color: #223042;
	border: 1px solid #e9eef5;
	border-bottom-left-radius: 6px;
}

.modern-chat-bubble-other a {
	text-decoration: underline;
}

.modern-chat-message-text {
	font-size: 14px;
	line-height: 1.6;
}

.modern-chat-time {
	display: inline-block;
	margin-top: 6px;
	font-size: 11px;
	color: #7b8794 !important;
}

.modern-chat-attachment {
	font-size: 13px;
	line-height: 1.4;
}

.modern-chat-attachment i {
	margin-inline-end: 6px;
}

.modern-chat-other-avatar-col {
	width: auto;
	flex: 0 0 auto;
}

.modern-chat-avatar {
	width: 38px;
	height: 38px;
	object-fit: cover;
	border: 2px solid #ffffff;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.modern-chat-other-name {
	font-size: 12px;
	font-weight: 700;
	margin-bottom: 6px;
	color: #667085;
}

.modern-chat-other-name a {
	text-decoration: none;
}

.modern-chat-footer {
	background: #ffffff;
	border-top: 1px solid #edf1f5;
	padding: 14px 16px;
	position: sticky;
	bottom: 0;
	z-index: 2;
}

.modern-chat-input-wrap {
	display: flex;
	align-items: flex-end;
	gap: 10px;
}

.modern-chat-attach-wrap {
	flex: 0 0 auto;
}

.modern-chat-textarea-wrap {
	flex: 1 1 auto;
}

.modern-chat-textarea {
	min-height: 58px;
	max-height: 140px;
	resize: vertical;
	border-radius: 18px;
	border: 1px solid #dfe6ee;
	background: #f8fafc;
	padding: 14px 16px;
	box-shadow: none !important;
}

.modern-chat-textarea:focus {
	border-color: #86b7fe;
	background: #ffffff;
}

.modern-chat-send-wrap {
	flex: 0 0 auto;
}

.modern-chat-send-btn {
	width: 52px;
	height: 52px;
	border-radius: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 18px rgba(13, 110, 253, 0.25);
}

.modern-chat-attach-btn,
.modern-chat-attach-btn.btn,
.modern-chat-attach-btn.fileinput-remove,
.modern-chat-attach-btn.fileinput-cancel {
	min-width: 52px;
	height: 52px;
	border-radius: 16px !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	border: 1px solid #dfe6ee !important;
	background: #f8fafc !important;
	color: #4d5b6a !important;
	box-shadow: none !important;
}

.modern-chat-empty-icon {
	font-size: 40px;
	color: #b6c0cc;
}

.modern-chat-empty-title {
	color: #4c5a67;
}

.object-me .chat-item-content,
.object-user .chat-item-content {
	padding-top: 2px;
	padding-bottom: 2px;
}

.my-message-wrap {
	display: inline-block;
	max-width: 100%;
}

.chat-item {
	margin-bottom: 8px !important;
}

.file-input .kv-file-remove,
.file-input .fileinput-remove-button,
.file-input .btn-close {
	display: none !important;
}

.file-input .file-caption-main,
.file-input .input-group {
	margin: 0 !important;
}

.file-input .kv-fileinput-caption {
	display: none !important;
}

html[dir="rtl"] .modern-chat-header-left,
html[dir="rtl"] .modern-chat-input-wrap {
	flex-direction: row;
}

html[dir="rtl"] .modern-chat-bubble-me {
	border-bottom-right-radius: 18px;
	border-bottom-left-radius: 6px;
}

html[dir="rtl"] .modern-chat-bubble-other {
	border-bottom-left-radius: 18px;
	border-bottom-right-radius: 6px;
}

/* =========================
   MESSENGER SIDEBAR
========================= */

.modern-messenger-sidebar-card {
	background: #ffffff;
	border: 1px solid #e7ebf0;
	border-radius: 18px;
	padding: 14px;
	box-shadow: 0 8px 30px rgba(18, 38, 63, 0.05);
}

.modern-messenger-sidebar-title {
	font-size: 14px;
	font-weight: 700;
	color: #1d2a3b;
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid #edf1f5;
}

.modern-messenger-sidebar-nav {
	gap: 8px;
	list-style: none;
	padding-left: 0;
	margin-bottom: 0;
	width: 100%;
}

.modern-messenger-sidebar-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	border-radius: 14px;
	padding: 12px 14px;
	color: #425466;
	text-decoration: none;
	background: transparent;
	transition: all 0.2s ease;
}

.modern-messenger-sidebar-link:hover {
	background: #f5f8fc;
	color: #0d6efd;
}

.modern-messenger-sidebar-link.active {
	background: linear-gradient(135deg, #0d6efd, #2b7bff);
	color: #ffffff;
	box-shadow: 0 10px 22px rgba(13, 110, 253, 0.18);
}

.modern-messenger-sidebar-link-left {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.modern-messenger-sidebar-icon {
	font-size: 14px;
	width: 18px;
	text-align: center;
}

.modern-messenger-sidebar-label {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
}

.modern-messenger-sidebar-badge {
	background: #e9f2ff;
	color: #0d6efd;
	font-size: 11px;
	font-weight: 700;
	min-width: 24px;
	text-align: center;
}

.modern-messenger-sidebar-link.active .modern-messenger-sidebar-badge {
	background: rgba(255, 255, 255, 0.18);
	color: #ffffff;
}

.modern-messenger-filter-item {
	list-style: none;
}

/* =========================
   THREAD LIST
========================= */

.modern-thread-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.modern-thread-card {
	background: #fff;
	border: 1px solid #edf1f5;
	border-radius: 16px;
	padding: 10px !important;
	transition: all 0.2s ease;
}

.modern-thread-card.is-unread {
	background: #f0f7ff;
	border-color: #cfe2ff;
}

.modern-thread-card:hover {
	background: #f8fbff;
	border-color: #d9e7fb;
}

.modern-thread-main {
	display: flex;
	align-items: center;
	gap: 12px;
}

.modern-thread-check {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
}

.modern-thread-check input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
}

.modern-thread-item {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1 1 auto;
	min-width: 0;
	text-decoration: none;
	color: inherit;
	border-radius: 14px;
	background: #fff;
	border: 1px solid #edf1f5;
	padding: 12px;
	transition: 0.2s;
}

.modern-thread-item:hover {
	background: #f5f8fc;
}

.modern-thread-avatar-wrap {
	flex: 0 0 auto;
}

.modern-thread-avatar {
	width: 45px;
	height: 45px;
	border-radius: 50%;
	object-fit: cover;
}

.modern-thread-avatar-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #eef2f6;
	color: #7b8794;
}

.modern-thread-content {
	flex: 1;
	min-width: 0;
	line-height: 1.2;
}

.modern-thread-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 4px;
}

.modern-thread-name-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.modern-thread-name {
	color: #111;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.modern-thread-time {
	color: #888;
	font-size: 12px;
	white-space: nowrap;
}

.modern-thread-subject {
	font-size: 14px;
	font-weight: 700;
	color: #1d2a3b;
	margin-bottom: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.modern-thread-ad-title {
	font-size: 13px;
	font-weight: 700;
	color: #111;
	margin-bottom: 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.modern-thread-price {
	font-size: 12px;
	font-weight: 700;
	color: #0d6efd;
	margin-bottom: 4px;
}

.modern-thread-online-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #22c55e;
	margin-inline-end: 6px;
	vertical-align: middle;
}

.modern-thread-important {
	color: #f59e0b;
	font-size: 13px;
	flex: 0 0 auto;
}

.modern-thread-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 13px;
	color: #666;
}

.modern-thread-message {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.modern-thread-unread-badge {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #0d6efd;
	flex: 0 0 auto;
}

.modern-thread-actions {
	flex: 0 0 auto;
}

.modern-thread-btn-group {
	gap: 4px;
}

.modern-thread-btn-group .btn {
	width: 32px;
	height: 32px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px !important;
	border: 1px solid #e5eaf0;
	background: #fff;
	font-size: 13px;
}

.modern-thread-btn-group .btn:hover {
	background: #f5f8fc;
}

.modern-thread-btn-group .btn + .btn {
	margin-left: 4px;
}

html[dir="rtl"] .modern-thread-btn-group .btn + .btn {
	margin-left: 0;
	margin-right: 4px;
}

/* =========================
   CHAT AD CARD
========================= */

.modern-chat-ad-card {
	display: flex;
	gap: 12px;
	align-items: center;
	background: #ffffff;
	border: 1px solid #e7ebf0;
	border-radius: 12px;
	padding: 8px;
	margin: 8px 10px 6px;
}

.modern-chat-ad-left {
	flex: 0 0 auto;
}

.modern-chat-ad-img {
	width: 70px;
	height: 70px;
	border-radius: 10px;
	object-fit: cover;
	display: block;
	background: #f3f5f8;
}

.modern-chat-ad-img-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #98a2b3;
	font-size: 22px;
}

.modern-chat-ad-content {
	flex: 1;
	min-width: 0;
}

.modern-chat-ad-title {
	font-size: 14px;
	font-weight: 700;
	color: #111827;
	margin-bottom: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.modern-chat-ad-meta {
	font-size: 13px;
	color: #666;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin-bottom: 6px;
}

.modern-chat-ad-price {
	font-weight: 700;
	color: #0d6efd;
}

.modern-chat-ad-location {
	color: #667085;
}

.modern-chat-ad-btn {
	font-size: 12px;
	font-weight: 700;
	color: #0d6efd;
	text-decoration: none;
}

.modern-chat-ad-btn:hover {
	text-decoration: underline;
}

/* =========================
   INBOX STYLE
========================= */

.modern-inbox-shell {
	background: #fff;
	border-radius: 20px;
	padding: 18px;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.modern-inbox-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.modern-inbox-title {
	font-size: 22px;
	font-weight: 800;
	display: flex;
	gap: 10px;
}

.modern-inbox-refresh-btn {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	border: 1px solid #e7ebf0;
	background: #fff;
}

.modern-inbox-body {
	width: 100%;
}

/* =========================
   FULL PAGE CHAT
========================= */

.messenger-full {
	background: #f5f7fb;
	min-height: 100vh;
}

.messenger-full-wrap {
	width: 100%;
	min-height: calc(100vh - 80px);
	display: flex;
	flex-direction: column;
}

.messenger-page-shell {
	border-radius: 0;
	box-shadow: none;
	padding: 0;
	background: transparent;
}

.messenger-page-row {
	min-height: calc(100vh - 140px);
}

.messenger-full-card {
	border-radius: 0 !important;
	border-left: 0 !important;
	border-right: 0 !important;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.main-container {
	padding: 0 !important;
}

/* =========================
   MOBILE FILTERS
========================= */

.modern-messenger-filters-wrap {
	width: 100%;
}

.modern-messenger-filters-nav {
	width: 100%;
}

@media (max-width: 991.98px) {
	.modern-messenger-sidebar-card {
		margin-bottom: 16px;
	}

	.modern-thread-main {
		align-items: flex-start;
	}

	.modern-thread-actions {
		display: none;
	}

	.modern-chat-header {
		padding: 14px;
	}

	.modern-chat-body {
		height: 65vh;
		padding: 14px 10px;
	}

	.modern-chat-footer {
		padding: 12px 10px;
	}

	.modern-chat-user-avatar {
		width: 44px;
		height: 44px;
	}

	.modern-chat-send-btn {
		width: 48px;
		height: 48px;
		border-radius: 14px;
	}

	.modern-chat-attach-btn,
	.modern-chat-attach-btn.btn {
		min-width: 48px;
		height: 48px;
		border-radius: 14px !important;
	}

	.modern-chat-textarea {
		min-height: 52px;
		padding: 12px 14px;
	}
}

@media (max-width: 767.98px) {
	.modern-chat-header {
		align-items: flex-start;
		flex-direction: column;
	}

	.modern-chat-header-right {
		width: 100%;
	}

	.modern-chat-header-right .btn-group {
		width: 100%;
		display: flex;
	}

	.modern-chat-header-right .btn-group .btn {
		flex: 1 1 auto;
	}

	.modern-chat-body {
		height: 60vh;
	}

	.modern-chat-input-wrap {
		gap: 8px;
	}

	.modern-chat-avatar {
		width: 34px;
		height: 34px;
	}

	.modern-chat-message-text {
		font-size: 13px;
	}

	.modern-thread-item {
		padding: 10px;
	}

	.modern-thread-avatar {
		width: 40px;
		height: 40px;
	}

	.modern-thread-top {
		font-size: 13px;
	}

	.modern-thread-bottom {
		font-size: 12px;
	}

	.modern-thread-card {
		padding: 10px;
	}

	.modern-thread-main {
		gap: 10px;
	}

	.modern-thread-item {
		gap: 10px;
	}

	.modern-thread-subject {
		font-size: 13px;
	}

	.modern-thread-message {
		font-size: 12px;
	}

	.modern-messenger-filters-wrap {
		background: transparent !important;
		border: 0 !important;
		box-shadow: none !important;
		border-radius: 0 !important;
		padding: 0 !important;
		margin-bottom: 14px !important;
	}

	.modern-messenger-filters-nav {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
		gap: 10px !important;
		overflow-x: auto !important;
		overflow-y: hidden !important;
		-webkit-overflow-scrolling: touch !important;
		scrollbar-width: none !important;
		width: 100% !important;
		padding: 2px 0 8px 0 !important;
		margin: 0 !important;
	}

	.modern-messenger-filters-nav::-webkit-scrollbar {
		display: none !important;
	}

	.modern-messenger-filter-item {
		flex: 0 0 auto !important;
		width: auto !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	.modern-messenger-filter-link {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		gap: 8px !important;
		min-height: 42px !important;
		padding: 10px 14px !important;
		border-radius: 999px !important;
		border: 1px solid #e7ebf0 !important;
		background: #ffffff !important;
		white-space: nowrap !important;
		text-decoration: none !important;
		box-shadow: 0 3px 10px rgba(18, 38, 63, 0.04) !important;
		width: auto !important;
	}

	.modern-messenger-filter-link.active {
		background: #0d6efd !important;
		border-color: #0d6efd !important;
		color: #ffffff !important;
		box-shadow: 0 8px 18px rgba(13, 110, 253, 0.22) !important;
	}

	.modern-messenger-filter-link:hover {
		background: #f8fbff !important;
		color: #0d6efd !important;
	}

	.modern-messenger-filter-link.active:hover {
		background: #0d6efd !important;
		color: #ffffff !important;
	}

	.modern-messenger-filter-link .modern-messenger-sidebar-label {
		font-size: 13px !important;
		font-weight: 700 !important;
	}

	.modern-messenger-filter-link .modern-messenger-sidebar-icon {
		font-size: 13px !important;
		width: auto !important;
	}

	.modern-messenger-filter-link .modern-messenger-sidebar-badge {
		margin-left: 2px !important;
		min-width: 20px !important;
		font-size: 10px !important;
		line-height: 1.2 !important;
		padding: 4px 6px !important;
	}

	html[dir="rtl"] .modern-messenger-filters-nav {
		direction: rtl !important;
	}

	html[dir="rtl"] .modern-messenger-filter-link {
		flex-direction: row !important;
	}

	.modern-chat-ad-card {
		margin: 8px 10px 6px;
		padding: 8px;
		gap: 10px;
	}

	.modern-chat-ad-img {
		width: 60px;
		height: 60px;
	}

	.modern-chat-ad-title {
		font-size: 13px;
	}

	.modern-chat-ad-meta {
		font-size: 12px;
	}
}
/* =========================
   STICKY CHAT INPUT FOOTER
========================= */

.messenger-full {
	background: #f5f7fb;
	min-height: 100vh;
}

.messenger-full-wrap {
	width: 100%;
	height: calc(100vh - 80px);
	min-height: calc(100vh - 80px);
	display: flex;
	flex-direction: column;
}

.messenger-page-shell {
	border-radius: 0;
	box-shadow: none;
	padding: 0;
	background: transparent;
	height: 100%;
	min-height: 100%;
	display: flex;
	flex-direction: column;
}

.messenger-page-row {
	min-height: 0;
	height: 100%;
	display: flex;
	flex-wrap: nowrap;
}

.messenger-page-row > .col-12,
.messenger-page-row > .col-md-3,
.messenger-page-row > .col-md-9,
.messenger-page-row > .col-lg-10 {
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.modern-chat-wrapper {
	padding: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.messenger-full-card,
.modern-chat-card {
	border-radius: 0 !important;
	border-left: 0 !important;
	border-right: 0 !important;
	height: 100%;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.modern-chat-header {
	flex: 0 0 auto;
}

.modern-chat-ad-card {
	flex: 0 0 auto;
}

.modern-chat-body-wrap {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	background: #f5f7fb;
}

.modern-chat-body {
	height: 100% !important;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 12px !important;
	scroll-behavior: smooth;
}

.modern-chat-footer {
	flex: 0 0 auto;
	position: sticky;
	bottom: 0;
	z-index: 5;
	background: #ffffff;
	border-top: 1px solid #edf1f5;
	padding: 12px 14px;
	box-shadow: 0 -6px 16px rgba(18, 38, 63, 0.05);
}

.modern-chat-input-wrap {
	display: flex;
	align-items: flex-end;
	gap: 10px;
}

.modern-chat-textarea-wrap {
	flex: 1 1 auto;
}

.modern-chat-textarea {
	min-height: 54px;
	max-height: 120px;
	resize: none;
	border-radius: 18px;
	border: 1px solid #dfe6ee;
	background: #f8fafc;
	padding: 14px 16px;
	box-shadow: none !important;
}

.modern-chat-send-wrap,
.modern-chat-attach-wrap {
	flex: 0 0 auto;
}

@media (max-width: 991.98px) {
	.messenger-full-wrap {
		height: calc(100vh - 70px);
		min-height: calc(100vh - 70px);
	}

	.modern-chat-footer {
		padding: 10px;
	}

	.modern-chat-textarea {
		min-height: 50px;
		max-height: 110px;
	}
}

@media (max-width: 767.98px) {
	.messenger-full {
		min-height: 100dvh;
	}

	.messenger-full-wrap {
		height: calc(100dvh - 64px);
		min-height: calc(100dvh - 64px);
	}

	.messenger-page-shell {
		height: 100%;
	}

	.messenger-page-row {
		flex-direction: column;
		height: 100%;
	}

	.modern-chat-wrapper {
		height: 100%;
	}

	.modern-chat-card {
		height: 100%;
	}

	.modern-chat-body {
		padding: 10px !important;
	}

	.modern-chat-footer {
		position: sticky;
		bottom: 0;
		padding: 10px 8px calc(env(safe-area-inset-bottom, 0) + 8px);
		background: #ffffff;
	}

	.modern-chat-input-wrap {
		gap: 8px;
	}

	.modern-chat-textarea {
		min-height: 48px;
		max-height: 96px;
		font-size: 14px;
		padding: 12px 14px;
	}

	.modern-chat-send-btn,
	.modern-chat-attach-btn,
	.modern-chat-attach-btn.btn {
		width: 46px;
		height: 46px;
		min-width: 46px;
		border-radius: 14px !important;
	}
}
/* =========================
   STICKY CHAT INPUT FOOTER
========================= */

.messenger-full {
	background: #f5f7fb;
	min-height: 100vh;
}

.messenger-full-wrap {
	width: 100%;
	height: calc(100vh - 80px);
	min-height: calc(100vh - 80px);
	display: flex;
	flex-direction: column;
}

.messenger-page-shell {
	border-radius: 0;
	box-shadow: none;
	padding: 0;
	background: transparent;
	height: 100%;
	min-height: 100%;
	display: flex;
	flex-direction: column;
}

.messenger-page-row {
	min-height: 0;
	height: 100%;
	display: flex;
	flex-wrap: nowrap;
}

.messenger-page-row > .col-12,
.messenger-page-row > .col-md-3,
.messenger-page-row > .col-md-9,
.messenger-page-row > .col-lg-10 {
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.modern-chat-wrapper {
	padding: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.messenger-full-card,
.modern-chat-card {
	border-radius: 0 !important;
	border-left: 0 !important;
	border-right: 0 !important;
	height: 100%;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.modern-chat-header {
	flex: 0 0 auto;
}

.modern-chat-ad-card {
	flex: 0 0 auto;
}

.modern-chat-body-wrap {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	background: #f5f7fb;
}

.modern-chat-body {
	height: 100% !important;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 12px !important;
	scroll-behavior: smooth;
}

.modern-chat-footer {
	flex: 0 0 auto;
	position: sticky;
	bottom: 0;
	z-index: 5;
	background: #ffffff;
	border-top: 1px solid #edf1f5;
	padding: 12px 14px;
	box-shadow: 0 -6px 16px rgba(18, 38, 63, 0.05);
}

.modern-chat-input-wrap {
	display: flex;
	align-items: flex-end;
	gap: 10px;
}

.modern-chat-textarea-wrap {
	flex: 1 1 auto;
}

.modern-chat-textarea {
	min-height: 54px;
	max-height: 120px;
	resize: none;
	border-radius: 18px;
	border: 1px solid #dfe6ee;
	background: #f8fafc;
	padding: 14px 16px;
	box-shadow: none !important;
}

.modern-chat-send-wrap,
.modern-chat-attach-wrap {
	flex: 0 0 auto;
}

@media (max-width: 991.98px) {
	.messenger-full-wrap {
		height: calc(100vh - 70px);
		min-height: calc(100vh - 70px);
	}

	.modern-chat-footer {
		padding: 10px;
	}

	.modern-chat-textarea {
		min-height: 50px;
		max-height: 110px;
	}
}

@media (max-width: 767.98px) {
	.messenger-full {
		min-height: 100dvh;
	}

	.messenger-full-wrap {
		height: calc(100dvh - 64px);
		min-height: calc(100dvh - 64px);
	}

	.messenger-page-shell {
		height: 100%;
	}

	.messenger-page-row {
		flex-direction: column;
		height: 100%;
	}

	.modern-chat-wrapper {
		height: 100%;
	}

	.modern-chat-card {
		height: 100%;
	}

	.modern-chat-body {
		padding: 10px !important;
	}

	.modern-chat-footer {
		position: sticky;
		bottom: 0;
		padding: 10px 8px calc(env(safe-area-inset-bottom, 0) + 8px);
		background: #ffffff;
	}

	.modern-chat-input-wrap {
		gap: 8px;
	}

	.modern-chat-textarea {
		min-height: 48px;
		max-height: 96px;
		font-size: 14px;
		padding: 12px 14px;
	}

	.modern-chat-send-btn,
	.modern-chat-attach-btn,
	.modern-chat-attach-btn.btn {
		width: 46px;
		height: 46px;
		min-width: 46px;
		border-radius: 14px !important;
	}
}
.modern-chat-status {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.modern-chat-status.sent {
	color: #7b8794;
}

.modern-chat-status.seen {
	color: #0d6efd;
}
/* ===== MODERN CARD STYLE (like screenshot) ===== */

.modern-thread-card {
	background: #ffffff;
	border: none !important;
	border-radius: 18px;
	padding: 14px;
	box-shadow: 0 6px 18px rgba(0,0,0,0.06);
	margin-bottom: 12px;
}

.modern-thread-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Name */
.modern-thread-name {
	font-size: 16px;
	font-weight: 800;
	color: #111;
}

/* Message preview */
.modern-thread-message {
	font-size: 14px;
	color: #6c757d;
	margin-top: 2px;
}

/* Time */
.modern-thread-time {
	font-size: 12px;
	color: #9aa3ad;
}

/* Avatar */
.modern-thread-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
}
.modern-thread-item {
	padding: 10px !important;
}

.modern-thread-main {
	align-items: center;
}

.modern-thread-content {
	line-height: 1.3;
}
.modern-thread-unread-badge {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #000;
}
.modern-chat-bubble-me {
	background: #1e6fff;
	color: white;
	border-radius: 18px 18px 4px 18px;
}

.modern-chat-bubble-other {
	background: #f1f3f5;
	border-radius: 18px 18px 18px 4px;
}
.chat-item {
	margin-bottom: 6px !important;
}
/* ===== CHAT PAGE LOOK LIKE APP SCREEN ===== */

.messenger-full {
	background: #f5f6f8 !important;
}

.modern-inbox-shell {
	background: transparent !important;
	box-shadow: none !important;
	padding: 12px !important;
	border-radius: 0 !important;
}

.modern-inbox-header {
	padding: 4px 4px 10px;
	margin-bottom: 10px;
}

.modern-inbox-title {
	font-size: 22px !important;
	font-weight: 900 !important;
	color: #111 !important;
}

.modern-inbox-refresh-btn {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	border: 1px solid #e7e7e7;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ===== FILTER PILLS ===== */

.modern-messenger-filters-wrap {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin-bottom: 14px !important;
}

.modern-messenger-sidebar-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.modern-messenger-filter-item {
	margin: 0 !important;
}

.modern-messenger-filter-link,
.modern-messenger-sidebar-link {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	min-height: 46px !important;
	padding: 10px 18px !important;
	border-radius: 999px !important;
	border: 1px solid #e8e8e8 !important;
	background: #ffffff !important;
	color: #111 !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	text-decoration: none !important;
	box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.modern-messenger-filter-link.active,
.modern-messenger-sidebar-link.active {
	background: #1677f2 !important;
	color: #fff !important;
	border-color: #1677f2 !important;
	box-shadow: 0 8px 18px rgba(22,119,242,0.22) !important;
}

.modern-messenger-sidebar-badge {
	background: rgba(0,0,0,0.06);
	color: inherit;
}

/* ===== THREAD LIST ===== */

.modern-thread-list {
	gap: 14px !important;
}

.modern-thread-card {
	background: #fff !important;
	border: 1px solid #ececec !important;
	border-radius: 22px !important;
	padding: 16px !important;
	box-shadow: 0 8px 20px rgba(0,0,0,0.06) !important;
	margin-bottom: 0 !important;
}

.modern-thread-card:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 24px rgba(0,0,0,0.08) !important;
}

.modern-thread-card.is-unread {
	background: #ffffff !important;
	border-color: #e8e8e8 !important;
}

.modern-thread-main {
	align-items: flex-start !important;
	gap: 12px !important;
}

.modern-thread-check {
	display: none !important;
}

.modern-thread-item {
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	box-shadow: none !important;
	gap: 12px !important;
	align-items: flex-start !important;
}

.modern-thread-avatar {
	width: 56px !important;
	height: 56px !important;
	border-radius: 50% !important;
	object-fit: cover;
}

.modern-thread-avatar-placeholder {
	width: 56px !important;
	height: 56px !important;
	border-radius: 50% !important;
}

.modern-thread-content {
	line-height: 1.35 !important;
}

.modern-thread-top {
	margin-bottom: 6px !important;
	align-items: flex-start !important;
}

.modern-thread-name {
	font-size: 17px !important;
	font-weight: 900 !important;
	color: #111 !important;
}

.modern-thread-time {
	font-size: 12px !important;
	color: #8f96a3 !important;
	font-weight: 600;
}

.modern-thread-ad-title {
	font-size: 14px !important;
	font-weight: 700 !important;
	color: #6d6d6d !important;
	margin-bottom: 4px !important;
}

.modern-thread-price {
	font-size: 14px !important;
	font-weight: 900 !important;
	color: #111 !important;
	margin-bottom: 6px !important;
}

.modern-thread-message {
	font-size: 15px !important;
	color: #555 !important;
	white-space: normal !important;
	overflow: hidden;
	text-overflow: ellipsis;
}

.modern-thread-bottom {
	align-items: center !important;
	justify-content: space-between !important;
	margin-top: 6px;
}

.modern-thread-unread-badge {
	width: 10px !important;
	height: 10px !important;
	background: #1f1f1f !important;
	border-radius: 50% !important;
}

.modern-thread-actions {
	display: none !important;
}

/* ===== CHAT BOX ===== */

.modern-chat-card {
	background: #fff !important;
	border: 0 !important;
	box-shadow: none !important;
}

.modern-chat-header {
	padding: 14px 16px !important;
	border-bottom: 1px solid #ececec !important;
}

.modern-chat-user-name {
	font-size: 18px !important;
	font-weight: 900 !important;
	color: #111 !important;
}

.modern-chat-post-title {
	font-size: 13px !important;
	color: #7b7b7b !important;
}

.modern-chat-ad-card {
	background: #fff !important;
	border: 1px solid #ececec !important;
	border-radius: 18px !important;
	box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

.modern-chat-body {
	background: #eef1f5 !important;
}

.modern-chat-bubble-me {
	background: #1677f2 !important;
	color: #fff !important;
	border-radius: 18px 18px 6px 18px !important;
	box-shadow: none !important;
}

.modern-chat-bubble-other {
	background: #fff !important;
	color: #222 !important;
	border: 0 !important;
	border-radius: 18px 18px 18px 6px !important;
	box-shadow: 0 3px 10px rgba(0,0,0,0.04) !important;
}

.modern-chat-footer {
	background: #f7f7f8 !important;
	border-top: 1px solid #ececec !important;
}

.modern-chat-textarea {
	background: #fff !important;
	border: 1px solid #e4e4e4 !important;
	border-radius: 18px !important;
}

.modern-chat-send-btn {
	background: #0f79d0 !important;
	border-color: #0f79d0 !important;
	box-shadow: 0 8px 16px rgba(15,121,208,0.25) !important;
}

/* ===== MOBILE TUNING ===== */

@media (max-width: 767.98px) {
	.modern-inbox-shell {
		padding: 10px !important;
	}

	.modern-inbox-title {
		font-size: 20px !important;
	}

	.modern-thread-card {
		border-radius: 20px !important;
		padding: 14px !important;
	}

	.modern-thread-avatar,
	.modern-thread-avatar-placeholder {
		width: 52px !important;
		height: 52px !important;
	}

	.modern-thread-name {
		font-size: 16px !important;
	}

	.modern-thread-message {
		font-size: 14px !important;
	}

	.modern-messenger-sidebar-nav {
		flex-wrap: nowrap !important;
		overflow-x: auto !important;
		padding-bottom: 4px !important;
	}

	.modern-messenger-sidebar-nav::-webkit-scrollbar {
		display: none;
	}
}
/* ===== FIX BROKEN CHAT LAYOUT ===== */

/* Fix main layout height */
.messenger-page-row {
	display: flex;
	height: calc(100vh - 120px);
}

/* Sidebar + chat alignment */
.messenger-page-row > div {
	display: flex;
	flex-direction: column;
}

/* Chat container fix */
.modern-chat-wrapper {
	height: 100%;
	display: flex;
	flex-direction: column;
}

/* Chat card fix */
.modern-chat-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}

/* Chat body scroll fix */
.modern-chat-body-wrap {
	flex: 1;
	overflow: hidden;
}

.modern-chat-body {
	height: 100%;
	overflow-y: auto;
}

/* Footer fix */
.modern-chat-footer {
	position: sticky;
	bottom: 0;
	background: #fff;
	z-index: 10;
}
/* ===== CLEAN INBOX STYLE ===== */

.modern-inbox-shell {
	background: transparent;
	padding: 10px;
}

.modern-thread-list-wrap {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.modern-thread-card {
	display: block;
	background: #fff;
	border-radius: 16px;
	padding: 14px;
	box-shadow: 0 4px 14px rgba(0,0,0,0.05);
	text-decoration: none;
	color: inherit;
}

.modern-thread-main {
	display: flex;
	gap: 12px;
}

.modern-thread-avatar {
	width: 50px;
	height: 50px;
	border-radius: 50%;
}

.modern-thread-content {
	flex: 1;
}

.modern-thread-top {
	display: flex;
	justify-content: space-between;
}

.modern-thread-name {
	font-weight: 800;
}

.modern-thread-message {
	color: #666;
}

.modern-thread-unread-badge {
	width: 8px;
	height: 8px;
	background: black;
	border-radius: 50%;
}

