/* ================================================================
   LPCF Vendor Modules — Shared Styles
   ListingPro Custom Features v2.1.0
   ================================================================ */

/* ── Card Container ── */
.lpcf-vm-card {
	background: #fff;
	border-radius: 12px;
	padding: 22px 24px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	margin-bottom: 16px;
}
.lpcf-vm-card-title {
	font-size: 17px;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f1f5f9;
}

/* ── Buttons ── */
.lpcf-vm-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	border: none;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1.4;
	text-decoration: none !important;
}
.lpcf-vm-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.lpcf-vm-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}
.lpcf-vm-btn-primary {
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: #fff !important;
}
.lpcf-vm-btn-secondary {
	background: #f1f5f9;
	color: #475569 !important;
	border: 1px solid #e2e8f0;
}
.lpcf-vm-btn-secondary:hover {
	background: #e2e8f0;
}
.lpcf-vm-btn-danger {
	background: linear-gradient(135deg, #ef4444, #dc2626);
	color: #fff !important;
}

/* ── Badges ── */
.lpcf-vm-badge {
	display: inline-block;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	padding: 2px 7px;
	border-radius: 10px;
	font-weight: 700;
	margin-left: 6px;
	vertical-align: middle;
	line-height: 1.4;
}
.lpcf-vm-badge-success {
	display: inline-block;
	background: linear-gradient(135deg, #22c55e, #16a34a);
	color: #fff;
	font-size: 11px;
	padding: 3px 10px;
	border-radius: 10px;
	font-weight: 600;
}
.lpcf-vm-badge-warning {
	display: inline-block;
	background: linear-gradient(135deg, #f59e0b, #d97706);
	color: #fff;
	font-size: 11px;
	padding: 3px 10px;
	border-radius: 10px;
	font-weight: 600;
}
.lpcf-vm-badge-danger {
	display: inline-block;
	background: linear-gradient(135deg, #ef4444, #dc2626);
	color: #fff;
	font-size: 11px;
	padding: 3px 10px;
	border-radius: 10px;
	font-weight: 600;
}
.lpcf-vm-badge-muted {
	display: inline-block;
	background: #e2e8f0;
	color: #64748b;
	font-size: 11px;
	padding: 3px 10px;
	border-radius: 10px;
	font-weight: 600;
}

/* ── Stat Grid (Analytics) ── */
.lpcf-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 12px;
}
.lpcf-stat-box {
	text-align: center;
	padding: 18px 12px;
	background: linear-gradient(135deg, #f8fafc, #f1f5f9);
	border-radius: 10px;
	border: 1px solid #e2e8f0;
}
.lpcf-stat-number {
	font-size: 28px;
	font-weight: 800;
	color: #1e293b;
	line-height: 1;
}
.lpcf-stat-label {
	font-size: 12px;
	color: #64748b;
	margin-top: 6px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-weight: 600;
}

/* ── Chat Widget ── */
.lpcf-chat-messages {
	max-height: 320px;
	min-height: 150px;
	overflow-y: auto;
	padding: 12px;
	background: #f8fafc;
	border-radius: 8px;
	margin-bottom: 12px;
}
.lpcf-chat-empty {
	text-align: center;
	color: #94a3b8;
	padding: 30px 0;
	font-size: 14px;
}
.lpcf-chat-msg {
	margin-bottom: 10px;
	display: flex;
	flex-direction: column;
}
.lpcf-chat-mine {
	align-items: flex-end;
}
.lpcf-chat-theirs {
	align-items: flex-start;
}
.lpcf-chat-bubble {
	max-width: 75%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.5;
	word-break: break-word;
}
.lpcf-chat-mine .lpcf-chat-bubble {
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.lpcf-chat-theirs .lpcf-chat-bubble {
	background: #fff;
	color: #1e293b;
	border: 1px solid #e2e8f0;
	border-bottom-left-radius: 4px;
}
.lpcf-chat-time {
	font-size: 11px;
	color: #94a3b8;
	margin-top: 3px;
	padding: 0 4px;
}
.lpcf-chat-input-wrap {
	display: flex;
	gap: 8px;
}
.lpcf-chat-input-wrap input {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	font-size: 14px;
	outline: none;
	transition: border-color 0.2s;
}
.lpcf-chat-input-wrap input:focus {
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ── Floating Chat Trigger Button ── */
.lpcf-chat-fab {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: #fff;
	border: none;
	font-size: 26px;
	cursor: pointer;
	box-shadow: 0 4px 20px rgba(102,126,234,0.45);
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.25s, box-shadow 0.25s;
	animation: lpcf-fab-entrance 0.5s ease;
}
.lpcf-chat-fab:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 28px rgba(102,126,234,0.55);
}
.lpcf-chat-fab .lpcf-fab-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	min-width: 20px;
	height: 20px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	padding: 0 5px;
	box-shadow: 0 2px 6px rgba(239,68,68,0.4);
}
@keyframes lpcf-fab-entrance {
	from { transform: scale(0) rotate(-180deg); opacity: 0; }
	to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ── Floating Chat Popup Window ── */
.lpcf-chat-popup {
	position: fixed;
	bottom: 94px;
	right: 24px;
	width: 380px;
	max-height: 520px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 12px 48px rgba(0,0,0,0.18);
	z-index: 99991;
	display: none;
	flex-direction: column;
	overflow: hidden;
	animation: lpcf-popup-in 0.3s ease;
}
.lpcf-chat-popup.lpcf-popup-open {
	display: flex;
}
@keyframes lpcf-popup-in {
	from { transform: translateY(20px) scale(0.95); opacity: 0; }
	to   { transform: translateY(0) scale(1); opacity: 1; }
}
.lpcf-chat-popup-header {
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: #fff;
	padding: 16px 20px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}
.lpcf-chat-popup-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255,255,255,0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	flex-shrink: 0;
}
.lpcf-chat-popup-info {
	flex: 1;
	min-width: 0;
}
.lpcf-chat-popup-name {
	font-weight: 700;
	font-size: 15px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.lpcf-chat-popup-listing {
	font-size: 12px;
	opacity: 0.85;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.lpcf-chat-popup-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	padding: 4px 8px;
	opacity: 0.8;
	transition: opacity 0.15s;
	flex-shrink: 0;
}
.lpcf-chat-popup-close:hover {
	opacity: 1;
}
.lpcf-chat-popup .lpcf-chat-messages {
	flex: 1;
	max-height: 330px;
	min-height: 180px;
	margin: 0;
	border-radius: 0;
	background: #f8fafc;
}
.lpcf-chat-popup .lpcf-chat-input-wrap {
	padding: 12px 14px;
	border-top: 1px solid #e2e8f0;
	background: #fff;
	flex-shrink: 0;
}
.lpcf-chat-popup .lpcf-chat-input-wrap input {
	font-size: 14px;
}

/* ── Chat Inbox (Dashboard) ── */
.lpcf-inbox-item {
	padding: 14px 16px;
	border-bottom: 1px solid #f1f5f9;
	cursor: pointer;
	transition: background 0.15s;
}
.lpcf-inbox-item:hover {
	background: #f8fafc;
}
.lpcf-inbox-item-active {
	background: #eff6ff !important;
	border-left: 3px solid #667eea;
}
.lpcf-inbox-item-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 4px;
}
.lpcf-inbox-item-listing {
	font-size: 12px;
	color: #667eea;
	margin-bottom: 3px;
}
.lpcf-inbox-item-preview {
	font-size: 13px;
	color: #64748b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.lpcf-inbox-item-time {
	font-size: 11px;
	color: #94a3b8;
	margin-top: 4px;
}

/* ── Coupon Items ── */
.lpcf-coupon-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 0;
	border-bottom: 1px solid #f1f5f9;
	gap: 12px;
}
.lpcf-coupon-item:last-child {
	border-bottom: none;
}
.lpcf-coupon-left {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
}
.lpcf-coupon-icon {
	font-size: 24px;
	flex-shrink: 0;
}
.lpcf-coupon-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.lpcf-coupon-info strong {
	color: #1e293b;
	font-size: 14px;
}
.lpcf-coupon-discount {
	color: #22c55e;
	font-weight: 700;
	font-size: 13px;
}
.lpcf-coupon-code {
	display: inline-block;
	background: #f1f5f9;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-family: monospace;
	color: #475569;
	border: 1px dashed #cbd5e1;
}

/* ── Booking Form ── */
.lpcf-booking-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.lpcf-form-row {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.lpcf-form-row label {
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}
.lpcf-form-row input,
.lpcf-form-row textarea {
	padding: 9px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: 14px;
	outline: none;
	transition: border-color 0.2s;
	width: 100%;
	box-sizing: border-box;
}
.lpcf-form-row input:focus,
.lpcf-form-row textarea:focus {
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ── Boost Badge ── */
.lpcf-boost-badge {
	display: inline-block;
	background: linear-gradient(135deg, #f59e0b, #ef4444);
	color: #fff;
	font-size: 11px;
	padding: 3px 10px;
	border-radius: 10px;
	font-weight: 700;
	vertical-align: middle;
	margin-left: 8px;
	animation: lpcf-pulse 2s infinite;
}
@keyframes lpcf-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.7; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
	.lpcf-vm-card {
		padding: 16px;
		border-radius: 10px;
	}
	.lpcf-stat-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
	}
	.lpcf-stat-number {
		font-size: 22px;
	}
	.lpcf-chat-messages {
		max-height: 250px;
	}
	.lpcf-chat-bubble {
		max-width: 85%;
	}
	#lpcf-inbox-wrap {
		flex-direction: column !important;
	}
	#lpcf-inbox-list {
		width: 100% !important;
		max-height: 250px;
		border-right: none !important;
		border-bottom: 1px solid #e2e8f0;
	}
	.lpcf-coupon-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
	.lpcf-booking-form {
		gap: 8px;
	}
}

@media (max-width: 480px) {
	.lpcf-stat-grid {
		grid-template-columns: 1fr;
	}
	.lpcf-chat-popup {
		width: calc(100% - 20px);
		right: 10px;
		bottom: 80px;
		max-height: 70vh;
		border-radius: 14px;
	}
	.lpcf-chat-fab {
		width: 52px;
		height: 52px;
		bottom: 16px;
		right: 16px;
		font-size: 22px;
	}
}
