/**
 * About Section — Live Inbox Stream
 * Replaces the old .holle-* orbit visual.
 */

.live-section {
	position: relative;
	z-index: 2;
	width: 100%;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.336);
	overflow: hidden;
	padding: 80px 20px;
}

/* ---- Ambient glows ---- */
.live-glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(90px);
	pointer-events: none;
	z-index: 0;
}

.live-glow-1 {
	width: 480px;
	height: 480px;
	top: -120px;
	left: -140px;
	background: radial-gradient(circle, rgba(255, 61, 90, 0.16), transparent 70%);
}

.live-glow-2 {
	width: 420px;
	height: 420px;
	bottom: -140px;
	right: -120px;
	background: radial-gradient(circle, rgba(255, 215, 0, 0.10), transparent 70%);
}

.live-container {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 1200px;
	align-items: center;
	gap: 40px;
	position: relative;
	z-index: 1;
}

.live-container .section-header {
	width: 100%;
	text-align: center;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--border-glass);
}

.live-inner {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: center;
	gap: 60px;
}

/* ---- Text column ---- */
.live-text {
	flex: 1 1 460px;
	max-width: 540px;
	text-align: left;
}

.live-text h2 {
	font-family: 'Syne', sans-serif;
	font-size: clamp(1.8rem, 4vw, 2.8rem);
	font-weight: 800;
	letter-spacing: -1px;
	margin-bottom: 24px;
	line-height: 1.1;
	color: var(--text-primary);
}

.gradient-text {
	background: linear-gradient(135deg, var(--accent-red), var(--accent-gold));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.live-text p {
	font-size: 1.05rem;
	line-height: 1.8;
	color: var(--text-secondary);
	margin-bottom: 20px;
}

.live-text .btn-templatemo {
	margin-top: 8px;
}

/* ---- Count-up stats ---- */
.live-stats {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	margin: 28px 0 32px;
}

.live-stat {
	flex: 1 1 120px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 18px;
	background: var(--bg-glass);
	border: 1px solid var(--border-glass);
	border-radius: 16px;
	transition: transform 0.3s ease, border-color 0.3s ease;
}

.live-stat:hover {
	transform: translateY(-4px);
	border-color: var(--border-glow);
}

.live-stat-value {
	font-family: 'Syne', sans-serif;
	font-weight: 800;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--accent-gold);
}

.live-stat:nth-child(1) .live-stat-value { color: var(--accent-red); }
.live-stat:nth-child(2) .live-stat-value { color: var(--accent-gold); }
.live-stat:nth-child(3) .live-stat-value { color: var(--accent-orange); }

.live-stat-label {
	font-size: 0.78rem;
	color: var(--text-secondary);
	line-height: 1.3;
}

/* ---- Visual column: the live window ---- */
.live-visual {
	flex: 1 1 420px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	min-width: 0;
}

.live-window {
	position: relative;
	width: 100%;
	max-width: 460px;
	border-radius: 24px;
	background: rgba(14, 14, 22, 0.85);
	border: 1px solid var(--border-glass);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
	overflow: hidden;
}

/* Gradient rim */
.live-window::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 24px;
	padding: 1px;
	background: linear-gradient(135deg, rgba(255, 61, 90, 0.45), rgba(251, 176, 11, 0.3) 55%, rgba(255, 215, 0, 0.35));
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
}

/* ---- Title bar ---- */
.live-titlebar {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--border-glass);
	background: rgba(255, 255, 255, 0.02);
}

.live-wdot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}

.live-wdot.r { background: var(--accent-red); }
.live-wdot.y { background: var(--accent-gold); }
.live-wdot.g { background: var(--accent-orange); }

.live-title {
	margin-left: 8px;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.5px;
	color: var(--text-dim);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.live-badge {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 100px;
	background: rgba(255, 61, 90, 0.12);
	border: 1px solid rgba(255, 61, 90, 0.35);
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 2px;
	color: var(--accent-red);
}

.live-pulse {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--accent-red);
	animation: live-pulse 1.4s ease-in-out infinite;
}

@keyframes live-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(255, 61, 90, 0.55); }
	50% { box-shadow: 0 0 0 6px rgba(255, 61, 90, 0); }
}

/* ---- Body: channel rail + feed ---- */
.live-body {
	display: flex;
	height: 320px;
}

.live-rail {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	padding: 18px 12px;
	border-right: 1px solid var(--border-glass);
	background: rgba(255, 255, 255, 0.015);
}

.live-rail-bot {
	position: relative;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: var(--bg-glass);
	border: 1px solid var(--border-glass);
	transition: transform 0.25s ease, border-color 0.25s ease;
}

.live-rail-bot svg {
	width: 20px;
	height: 20px;
}

.live-rail-bot {
	margin-top: auto;
	color: var(--text-primary);
	background: linear-gradient(135deg, rgba(255, 61, 90, 0.22), rgba(251, 176, 11, 0.22), rgba(255, 215, 0, 0.22));
	border-color: var(--border-glow);
	animation: live-bot-breathe 3s ease-in-out infinite;
}

/* ---- Customer contact list — one avatar per customer, badge shows their platform ---- */
.live-cust {
	position: relative;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-family: 'Syne', sans-serif;
	font-weight: 800;
	font-size: 0.8rem;
	color: #fff;
	border: 2px solid transparent;
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.live-cust[data-ch="ig"]  { background: linear-gradient(135deg, #ff3d5a, #ff7a1e); }
.live-cust[data-ch="ms"]  { background: linear-gradient(135deg, #0084ff, #33c2ff); }
.live-cust[data-ch="web"] { background: linear-gradient(135deg, #fbb00b, #ffd700); color: #1a1208; }

.live-cust:hover {
	transform: translateY(-2px);
}

.live-cust.live-cust-ping {
	transform: scale(1.15);
}

.live-cust.live-cust-active {
	border-color: #fff;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.35);
}

.live-cust-badge {
	position: absolute;
	right: -3px;
	bottom: -3px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	outline: 2px solid rgba(14, 14, 22, 0.95);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.live-cust-badge svg { width: 100%; height: 100%; display: block; }

.live-cust-unread {
	position: absolute;
	top: -3px;
	right: -3px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--accent-red);
	border: 1.5px solid rgba(14, 14, 22, 0.95);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.live-cust.live-cust-unread-on .live-cust-unread { opacity: 1; }

@keyframes live-bot-breathe {
	0%, 100% { box-shadow: 0 0 14px rgba(255, 215, 0, 0.12); }
	50% { box-shadow: 0 0 26px rgba(255, 215, 0, 0.3); }
}

/* ---- Feed ---- */
.live-feed {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 10px;
	padding: 18px 16px;
	overflow: hidden;
	/* fade the oldest messages at the top */
	-webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
	mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
}

.live-msg {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: 85%;
	animation: live-msg-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes live-msg-in {
	from {
		opacity: 0;
		transform: translateY(14px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.live-msg.out {
	align-self: flex-end;
	align-items: flex-end;
}

.live-msg-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.6rem;
	font-weight: 600;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: var(--text-dim);
}

/* customer avatar with a tiny platform badge tucked in the corner */
.live-msg-avatar {
	position: relative;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	flex-shrink: 0;
	background: linear-gradient(135deg, var(--accent-red), var(--accent-gold));
}

.live-msg[data-ch="ig"]  .live-msg-avatar { background: linear-gradient(135deg, #ff3d5a, #ff7a1e); }
.live-msg[data-ch="ms"]  .live-msg-avatar { background: linear-gradient(135deg, #0084ff, #33c2ff); }
.live-msg[data-ch="web"] .live-msg-avatar { background: linear-gradient(135deg, #fbb00b, #ffd700); }

.live-msg-platform {
	position: absolute;
	right: -3px;
	bottom: -3px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	outline: 1.5px solid rgba(14, 14, 22, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.live-msg-platform svg { width: 100%; height: 100%; display: block; }

.live-msg-bubble {
	padding: 9px 14px;
	border-radius: 14px;
	font-size: 0.82rem;
	line-height: 1.45;
	color: var(--text-primary);
	background: var(--bg-glass);
	border: 1px solid var(--border-glass);
	border-bottom-left-radius: 4px;
}

.live-msg.out .live-msg-bubble {
	background: linear-gradient(135deg, rgba(255, 61, 90, 0.85), rgba(251, 176, 11, 0.85));
	border: none;
	color: #fff;
	border-bottom-left-radius: 14px;
	border-bottom-right-radius: 4px;
}

/* typing indicator */
.live-typing {
	display: inline-flex;
	gap: 4px;
	padding: 12px 14px;
}

.live-typing i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	animation: live-typing 1s ease-in-out infinite;
}

.live-typing i:nth-child(2) { animation-delay: 0.15s; }
.live-typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes live-typing {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
	30% { transform: translateY(-4px); opacity: 1; }
}

/* ---- Status bar ---- */
.live-statusbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	border-top: 1px solid var(--border-glass);
	background: rgba(255, 255, 255, 0.02);
	font-size: 0.7rem;
	color: var(--text-dim);
}

.live-statusbar b {
	font-family: 'Syne', sans-serif;
	font-weight: 700;
	color: var(--accent-gold);
	font-style: normal;
}

.live-status-reply b {
	color: var(--accent-orange);
}

#liveConvCount.tick {
	animation: live-tick 0.4s ease;
	display: inline-block;
}

@keyframes live-tick {
	0% { transform: translateY(-6px); opacity: 0; }
	100% { transform: translateY(0); opacity: 1; }
}

/* ---- Responsive ---- */
@media (max-width: 920px) {
	.live-inner {
		flex-direction: column;
		gap: 40px;
	}

	.live-text {
		width: 100%;
		max-width: 100%;
		text-align: center;
	}

	.live-text p {
		text-align: left;
	}

	.live-text h2 {
		font-size: clamp(1.5rem, 4vw, 2.5rem);
	}

	.live-window {
		max-width: 100%;
	}

	.live-body {
		height: 280px;
	}
}

@media (max-width: 480px) {
	.live-rail {
		padding: 14px 8px;
		gap: 14px;
	}

	.live-ch,
	.live-rail-bot {
		width: 32px;
		height: 32px;
	}

	.live-title {
		display: none;
	}
}
