/*
 * Live Comments widget styles.
 * Scoped under .cvc-lc-* classes. Everything visual here is only a default:
 * the widget's Style tab controls override it via {{WRAPPER}} selectors.
 */

.cvc-lc-wrap {
	display: flex;
	justify-content: flex-start;
	width: 100%;
}

.cvc-lc {
	--cvc-lc-gap: 12px;

	/* Contains the list's negative margins (see below). */
	display: flow-root;
	position: relative;
	width: 100%;
	max-width: 100%;
	font-family: inherit;
}

.cvc-lc,
.cvc-lc *,
.cvc-lc *::before,
.cvc-lc *::after {
	box-sizing: border-box;
}

/*
 * The gap between comments is split into half-gap padding on every item
 * (and cancelled at the edges with a negative margin) instead of using
 * flex `gap`. That way the spacing belongs to the item and grows/collapses
 * with it during the height animation -- no jump when an item is added
 * or removed.
 */
.cvc-lc-list {
	display: flex;
	flex-direction: column;
	margin-block: calc(var(--cvc-lc-gap) / -2);
}

/*
 * Scroll mode: the List Max Height control (per breakpoint) caps the
 * list's height and turns on vertical scrolling. The small inline padding
 * keeps the cards' side shadows from being clipped by the scroll
 * container; the matching negative margin keeps their width.
 */
.cvc-lc-list--scroll {
	/* The script keeps the reader's position itself (see add()); the
	   browser's own anchoring would fight it and isn't in every browser. */
	overflow-anchor: none;
	overscroll-behavior-x: none;
	margin-inline: -6px;
	padding-inline: 6px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: rgba(100, 116, 139, 0.35) transparent;
}

.cvc-lc-list--scroll::-webkit-scrollbar {
	width: 6px;
}

.cvc-lc-list--scroll::-webkit-scrollbar-track {
	background: transparent;
}

.cvc-lc-list--scroll::-webkit-scrollbar-thumb {
	border-radius: 999px;
	background: rgba(100, 116, 139, 0.35);
}

.cvc-lc-list--scroll:focus {
	outline: none;
}

.cvc-lc-list--scroll:focus-visible {
	outline: 2px solid rgba(55, 48, 163, 0.4);
	outline-offset: 2px;
}

/*
 * Never let flex shrink a comment: once the list hits its Max Height the
 * items must overflow (and scroll) at full size, not get squeezed --
 * especially a new one mid-animation, whose overflow is briefly hidden.
 */
.cvc-lc-list > .cvc-lc-item {
	flex: 0 0 auto;
}

.cvc-lc-item-inner {
	padding-block: calc(var(--cvc-lc-gap) / 2);
}

.cvc-lc-comment {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 14px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.05);
}

.cvc-lc-avatar {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
}

.cvc-lc-avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cvc-lc-avatar--letter {
	background: #e0e7ff;
	color: #3730a3;
}

.cvc-lc-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.cvc-lc-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 8px;
}

.cvc-lc-name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: #0f172a;
}

.cvc-lc-time,
.cvc-lc-field {
	font-size: 12px;
	line-height: 1.4;
	color: #64748b;
}

.cvc-lc-text {
	font-size: 14px;
	line-height: 1.5;
	color: #1e293b;
	overflow-wrap: anywhere;
}

.cvc-lc-extra {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
}

/*
 * Display-only, social-media style "write a comment" bar. It isn't a form
 * control, and is made fully non-interactive here so it can't be focused,
 * selected or clicked.
 */
.cvc-lc-box {
	--cvc-lc-box-spacing: var(--cvc-lc-gap);

	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	cursor: default;
}

.cvc-lc-box--top {
	margin-bottom: var(--cvc-lc-box-spacing);
}

.cvc-lc-box--bottom {
	margin-top: var(--cvc-lc-box-spacing);
}

.cvc-lc-box-avatar {
	flex: 0 0 auto;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: hidden;
	background: #e4e6eb;
	color: #bcc0c4;
}

.cvc-lc-box-avatar svg {
	display: block;
	width: 82%;
	height: 82%;
}

.cvc-lc-box-field {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 36px;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px 8px 14px;
	border-radius: 20px;
	background: #f0f2f5;
}

.cvc-lc-box-placeholder {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 15px;
	line-height: 20px;
	color: #65676b;
}

.cvc-lc-box-icon {
	flex: 0 0 auto;
	display: flex;
	width: 18px;
	height: 18px;
	color: #bcc0c4;
}

.cvc-lc-box-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Mirror the send arrow for right-to-left pages. */
[dir="rtl"] .cvc-lc-box-icon svg {
	transform: scaleX(-1);
}

@media (max-width: 480px) {
	.cvc-lc-box-avatar {
		width: 32px;
		height: 32px;
	}

	.cvc-lc-box-field {
		min-height: 34px;
		padding: 7px 10px 7px 12px;
	}

	.cvc-lc-box-placeholder {
		font-size: 14px;
	}
}

/* Only rendered inside the Elementor editor. */
.cvc-lc-notice {
	padding: 12px 14px;
	border: 1px dashed #f59e0b;
	border-radius: 8px;
	background: #fffbeb;
	color: #92400e;
	font-size: 13px;
	line-height: 1.5;
}
