/**
 * GW Buddy Elementor Addon - Recent Conversations widget.
 *
 * Structural defaults and visual baseline for the "Latest Messages" card list.
 * Everything is overridable from Elementor's Style tab; the values here mirror
 * the WWOOF Latest Messages mockup so the widget looks right out of the box.
 *
 * @since 2.20.0
 */

.gw-rc,
.gw-rc *,
.gw-rc *::before,
.gw-rc *::after {
	box-sizing: border-box;
}

.gw-rc {
	color: #26312b;
}

/* Header ------------------------------------------------------------------ */

.gw-rc__header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.gw-rc__heading-icon {
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background-color: #e4f3e8;
	color: #238443;
	font-size: 15px;
	line-height: 1;
}

.gw-rc__heading {
	margin: 0;
	padding: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: #26312b;
}

.gw-rc__view-all {
	margin-left: auto;
	white-space: nowrap;
	text-decoration: none;
}

/* List -------------------------------------------------------------------- */

.gw-rc__list {
	display: grid;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.gw-rc__item {
	margin: 0;
	padding: 0;
}

/* Card -------------------------------------------------------------------- */

.gw-rc__row {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	background-color: #fff;
	color: inherit;
	text-decoration: none;
	border-radius: 14px;
	box-shadow:
		0 1px 2px rgba(30, 45, 35, 0.05),
		0 4px 14px rgba(30, 45, 35, 0.06);
	transform: translateY(0);
	transition:
		transform 150ms ease,
		box-shadow 150ms ease;
}

a.gw-rc__row {
	color: inherit;
	text-decoration: none;
}

.gw-rc__row:hover {
	transform: translateY(-1px);
	box-shadow:
		0 2px 4px rgba(30, 45, 35, 0.06),
		0 8px 20px rgba(30, 45, 35, 0.09);
}

/* Avatar ------------------------------------------------------------------ */

.gw-rc__avatar {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
}

.gw-rc__avatar img {
	display: block;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	background-color: #dfe7e1;
}

/* Content ----------------------------------------------------------------- */

.gw-rc__body {
	min-width: 0;
}

.gw-rc__title {
	display: block;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 15px;
	font-weight: 700;
	color: #1d2b22;
}

.gw-rc__sub {
	display: flex;
	align-items: baseline;
	gap: 6px;
	min-width: 0;
	margin-top: 4px;
}

.gw-rc__preview {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 13px;
	color: #6f7973;
}

/* Meta column ------------------------------------------------------------- */

.gw-rc__meta {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-between;
	gap: 9px;
	padding: 1px 0;
}

.gw-rc__time {
	white-space: nowrap;
	font-size: 11px;
	color: #89928c;
}

.gw-rc__count {
	white-space: nowrap;
	font-size: 11px;
	color: #89928c;
}

/* Unread badge ------------------------------------------------------------ */

.gw-rc__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background-color: #e53935;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

/* States ------------------------------------------------------------------ */

.gw-rc--notice {
	padding: 12px;
}

@media (prefers-reduced-motion: reduce) {
	.gw-rc__row {
		transition: none;
	}

	.gw-rc__row:hover {
		transform: none;
	}
}
