/* LahoreAds Live Chat — all rules scoped under .lac- classes / #lac- ids only */

.lac-fab {
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 99998;
	background: #f9423a;
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 600;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	cursor: pointer;
}

.lac-chat-box {
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 99999;
	width: 320px;
	max-width: calc(100vw - 24px);
	height: 420px;
	max-height: 70vh;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	font-family: inherit;
}

.lac-chat-header {
	background: #f9423a;
	color: #fff;
	padding: 12px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 14px;
	font-weight: 600;
}

.lac-chat-title {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	max-width: 250px;
}

.lac-chat-title-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: block;
}

.lac-online-status {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 400;
	opacity: 0.85;
	margin-top: 1px;
}

.lac-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #9aa0a6;
	flex-shrink: 0;
}

.lac-dot.lac-online {
	background: #3ddc73;
	box-shadow: 0 0 0 2px rgba(61, 220, 115, 0.25);
}

.lac-last-seen {
	display: none;
	font-size: 10px;
	font-weight: 400;
	opacity: 0.75;
	margin-top: 1px;
}

#lac-close-chat {
	background: none;
	border: none;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 0 0 0 8px;
}

.lac-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
	background: #f7f7f7;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.lac-msg {
	max-width: 80%;
	padding: 8px 12px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.4;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.lac-msg-time {
	font-size: 10px;
	opacity: 0.65;
	align-self: flex-end;
}

.lac-theirs {
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e2e2e2;
	color: #222;
	border-bottom-left-radius: 4px;
}

.lac-mine {
	align-self: flex-end;
	background: #1c5631;
	color: #fff;
	border-bottom-right-radius: 4px;
}

.lac-system {
	align-self: center;
	max-width: 90%;
	background: #fff4e5;
	color: #8a5a00;
	border: 1px solid #ffe0a3;
	font-size: 12px;
	text-align: center;
}

.lac-chat-form {
	display: flex;
	border-top: 1px solid #eee;
	padding: 8px;
	gap: 8px;
	background: #fff;
}

.lac-chat-form input {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 20px;
	padding: 8px 14px;
	font-size: 14px;
	outline: none;
}

.lac-chat-form button {
	background: #f9423a;
	color: #fff;
	border: none;
	border-radius: 20px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.lac-attach-btn {
	background: none !important;
	color: inherit !important;
	border: 1px solid #ddd !important;
	border-radius: 50% !important;
	width: 36px;
	height: 36px;
	padding: 0 !important;
	font-size: 16px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lac-attach-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.lac-msg-image {
	max-width: 200px;
	max-height: 220px;
	border-radius: 10px;
	display: block;
	cursor: pointer;
	object-fit: cover;
}

/* Seller / buyer inbox list, used by [lahoreads_my_chats] */
.lac-inbox {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.lac-inbox-item {
	display: block;
	padding: 12px 16px;
	border: 1px solid #eee;
	border-radius: 10px;
	text-decoration: none;
	color: #222;
	background: #fff;
}

.lac-inbox-item.lac-unread {
	border-color: #f9423a;
	background: #fff7f6;
}

.lac-inbox-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.lac-unread-badge {
	background: #f9423a;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	padding: 3px 7px;
	border-radius: 999px;
	flex-shrink: 0;
}

.lac-inbox-with {
	display: block;
	color: #666;
	font-size: 13px;
	margin-top: 2px;
}

.lac-inbox-preview {
	display: block;
	color: #888;
	font-size: 12px;
	margin-top: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lac-inbox-item strong {
	color: #f9423a;
}

/* In-page popup alert for new unread messages (site-wide, not just on the
   chat/inbox page) — see showUnreadToast() in chat.js. */
.lac-toast {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 999999;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 320px;
	background: #222;
	color: #fff;
	padding: 12px 14px;
	border-radius: 10px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	font-size: 14px;
	line-height: 1.35;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.lac-toast-visible {
	opacity: 1;
	transform: translateY(0);
}

.lac-toast-text {
	flex: 1;
}

.lac-toast-close {
	background: transparent;
	border: none;
	color: #ccc;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0 2px;
	flex-shrink: 0;
}

.lac-toast-close:hover {
	color: #fff;
}

@media (max-width: 480px) {
	.lac-toast {
		left: 16px;
		right: 16px;
		max-width: none;
	}
}

