/* ==========================================================
   臻品箱包 · 在线客服 · 前台挂件
   ========================================================== */
.zpc-btn {
	position: fixed; right: 22px; bottom: 26px; z-index: 99998;
	width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
	background: #e60012; color: #fff; box-shadow: 0 12px 28px -8px rgba(230,0,18,.75);
	display: flex; align-items: center; justify-content: center;
	transition: transform .18s, box-shadow .18s;
}
.zpc-btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 16px 34px -8px rgba(230,0,18,.85); }
.zpc-btn svg { width: 26px; height: 26px; }
.zpc-badge {
	position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
	background: #1a1a1a; color: #fff; border-radius: 10px; font-size: 12px; line-height: 20px;
	font-weight: 700; border: 2px solid #fff;
}
.zpc-badge[hidden] { display: none; }
.zpc-btn.zpc-shake { animation: zpc-shake .55s; }
@keyframes zpc-shake {
	0%,100% { transform: translateX(0) }
	20% { transform: translateX(-5px) } 40% { transform: translateX(5px) }
	60% { transform: translateX(-4px) } 80% { transform: translateX(4px) }
}

.zpc-panel {
	position: fixed; right: 22px; bottom: 94px; z-index: 99999;
	width: 348px; height: 468px; display: flex; flex-direction: column;
	background: #fff; border-radius: 12px; overflow: hidden;
	box-shadow: 0 24px 60px -18px rgba(0,0,0,.42);
	animation: zpc-in .22s ease;
}
.zpc-panel[hidden] { display: none; }
@keyframes zpc-in { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }

.zpc-head {
	background: linear-gradient(135deg, #e60012 0%, #a8000d 100%);
	color: #fff; padding: 12px 14px; cursor: grab; user-select: none;
	display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.zpc-head:active { cursor: grabbing; }
.zpc-head-txt { flex: 1; min-width: 0; }
.zpc-head strong { display: block; font-size: 14.5px; letter-spacing: .04em; }
.zpc-status { font-size: 12px; opacity: .9; }
.zpc-status i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6ee7a8; margin-right: 5px; }
.zpc-status.off i { background: #ffd166; }
.zpc-close {
	background: rgba(255,255,255,.18); border: 0; color: #fff; width: 26px; height: 26px;
	border-radius: 6px; cursor: pointer; font-size: 16px; line-height: 1; flex-shrink: 0;
}
.zpc-close:hover { background: rgba(255,255,255,.3); }

.zpc-body { flex: 1; overflow-y: auto; padding: 14px; background: #f7f7f8; }
.zpc-body::-webkit-scrollbar { width: 6px; }
.zpc-body::-webkit-scrollbar-thumb { background: #d8d8dc; border-radius: 3px; }

.zpc-msg { display: flex; margin-bottom: 12px; }
.zpc-msg .zpc-bubble {
	max-width: 78%; padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.6;
	word-break: break-word; white-space: pre-wrap;
}
.zpc-msg.me { justify-content: flex-end; }
.zpc-msg.me .zpc-bubble { background: #e60012; color: #fff; border-bottom-right-radius: 4px; }
.zpc-msg.you .zpc-bubble { background: #fff; color: #1a1a1a; border: 1px solid #ececec; border-bottom-left-radius: 4px; }
.zpc-time { font-size: 11px; color: #b0b0b6; text-align: center; margin: 6px 0 12px; }
.zpc-sys { text-align: center; color: #9a9a9a; font-size: 12px; margin: 8px 0 12px; }

.zpc-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.zpc-quick button {
	background: #fff; border: 1px solid #e60012; color: #e60012; border-radius: 14px;
	padding: 5px 11px; font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.zpc-quick button:hover { background: #e60012; color: #fff; }

.zpc-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #ececec; background: #fff; flex-shrink: 0; }
.zpc-form textarea {
	flex: 1; resize: none; border: 1px solid #e2e2e6; border-radius: 8px; padding: 9px 10px;
	font-size: 14px; font-family: inherit; line-height: 1.5; max-height: 96px; outline: none;
}
.zpc-form textarea:focus { border-color: #e60012; }
.zpc-form button {
	background: #e60012; color: #fff; border: 0; border-radius: 8px; padding: 0 16px;
	font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit;
}
.zpc-form button:disabled { background: #c9c9c9; cursor: default; }

.zpc-tip { font-size: 12px; color: #9a9a9a; text-align: center; padding: 8px 0 0; }

@media (max-width: 560px) {
	.zpc-panel { right: 10px; left: 10px; width: auto; bottom: 88px; height: 66vh; }
	.zpc-btn { right: 14px; bottom: 18px; }
}

/* 新消息预览气泡（按钮上方） */
.zpc-preview {
	position: fixed; right: 22px; bottom: 92px; z-index: 99997;
	max-width: 268px; background: #fff; border-radius: 12px; padding: 10px 13px;
	box-shadow: 0 14px 34px -12px rgba(0,0,0,.4); cursor: pointer;
	font-size: 13.5px; line-height: 1.5; color: #333; animation: zpc-in .2s ease;
}
.zpc-preview[hidden] { display: none; }
.zpc-preview b { display: block; color: #e60012; font-size: 12.5px; margin-bottom: 3px; }
.zpc-preview::after {
	content: ""; position: absolute; right: 22px; bottom: -7px; width: 14px; height: 14px;
	background: #fff; transform: rotate(45deg); box-shadow: 4px 4px 8px -4px rgba(0,0,0,.25);
}
@media (max-width: 560px) {
	.zpc-preview { right: 14px; bottom: 84px; max-width: 240px; }
}
