/* wp-content/plugins/ceca-widgets/widgets/linkedin-feed/linkedin-feed.css */
/* LinkedIn Feed: horizontal scroller of post cards CONSTRAINED to the
   widget's container — the parent's gutters align the first card with every
   other widget, and the row clips at the container's right edge, where a
   partial card peeks as the cue that it scrolls. Default card width is 290px
   (not the grid's 306px) deliberately: 306 cards fit the 1296px content box
   exactly 4-up, which would leave NO visible peek; 290 leaves a 40px sliver.
   Card anatomy from the homepage design screenshot: 40px avatar + name/age,
   "in" tile, 3-line clamped text + Read more, image, like/comment/share. */

.ceca-lif {
	--ceca-lif-card-w: 290px;
	--ceca-lif-gap: 24px;
	--ceca-lif-img-h: 300px;
	--ceca-lif-lines: 3;
	--ceca-lif-badge: #0a66c2;
	--ceca-lif-link: #0a66c2;
	--ceca-lif-meta: #666666;

	padding: 40px 0;
}

.ceca-lif__track {
	display: flex;
	gap: var(--ceca-lif-gap);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	/* card snapping off: ceca-slider.js settles onto PAGE positions now */
	scroll-snap-type: none;
	scrollbar-width: none;
	cursor: grab;
}

.ceca-lif__track::-webkit-scrollbar {
	display: none;
}

.ceca-lif__track.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
}

.ceca-lif__track:focus-visible {
	outline: 2px solid var(--ceca-lif-badge);
	outline-offset: 4px;
}

.ceca-lif__card {
	flex: 0 0 var(--ceca-lif-card-w);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

/* --- header ------------------------------------------------------------- */

.ceca-lif__head {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 16px 16px 12px;
}

.ceca-lif__identity {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	text-decoration: none;
	color: inherit;
}

.ceca-lif a.ceca-lif__identity:hover .ceca-lif__name {
	text-decoration: underline;
}

.ceca-lif__avatar {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;
	background: #f1f1f1;
}

.ceca-lif__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ceca-lif__avatar-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: #411024;
	color: #fff;
	font-size: 18px;
	font-weight: 700;
}

.ceca-lif__who {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ceca-lif .ceca-lif__name {
	font-size: 15px;
	line-height: 20px;
	font-weight: 700;
	color: #1a1a1a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ceca-lif .ceca-lif__time {
	font-size: 13px;
	line-height: 18px;
	color: #666;
}

.ceca-lif__badge {
	flex: 0 0 auto;
	margin-left: auto;
	width: 24px;
	height: 24px;
	border-radius: 4px;
	color: var(--ceca-lif-badge);
}

.ceca-lif__badge svg {
	width: 100%;
	height: 100%;
	display: block;
}

.ceca-lif a.ceca-lif__badge:hover,
.ceca-lif a.ceca-lif__badge:focus {
	opacity: 0.8;
}

/* --- body --------------------------------------------------------------- */

.ceca-lif__body {
	padding: 0 16px 12px;
}

.ceca-lif .ceca-lif__text {
	margin: 0;
	font-size: 14px;
	line-height: 20px;
	color: #1a1a1a;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--ceca-lif-lines);
	line-clamp: var(--ceca-lif-lines);
	overflow: hidden;
}

/* Double specificity + explicit states so theme/kit link globals cannot
   repaint the LinkedIn-blue links. */
.ceca-lif a.ceca-lif__more {
	display: inline-block;
	margin-top: 4px;
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	color: var(--ceca-lif-link);
	text-decoration: none;
}

.ceca-lif a.ceca-lif__more:hover,
.ceca-lif a.ceca-lif__more:focus {
	color: var(--ceca-lif-link);
	text-decoration: underline;
}

/* --- media -------------------------------------------------------------- */

.ceca-lif__media {
	display: block;
	flex: 1 1 auto;
	min-height: var(--ceca-lif-img-h);
	background: #f1f1f1;
	position: relative;
}

.ceca-lif__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* --- footer ------------------------------------------------------------- */

/* margin-top auto keeps the footer pinned to the bottom of a card without an
   image, so rows of mixed cards still read as one line. */
.ceca-lif__foot {
	margin-top: auto;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
	color: var(--ceca-lif-meta);
}

.ceca-lif__stat {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	line-height: 20px;
}

.ceca-lif__stat svg,
.ceca-lif__share svg {
	width: 20px;
	height: 20px;
	display: block;
}

.ceca-lif a.ceca-lif__share {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	color: var(--ceca-lif-meta);
	text-decoration: none;
}

.ceca-lif a.ceca-lif__share:hover,
.ceca-lif a.ceca-lif__share:focus {
	color: #1a1a1a;
	text-decoration: none;
}

/* --- reveal ------------------------------------------------------------- */
/* Cards drop in at a slight angle, one after another (same --ceca-i stagger
   pattern as the region-nav drawer). JS adds .is-revealed when the widget
   scrolls into view. Guarded by the scripting media query so cards are never
   hidden without JS, and by prefers-reduced-motion. */

@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
	.ceca-lif--reveal .ceca-lif__card {
		opacity: 0;
		transform: translateY(-34px) rotate(-2.5deg);
	}

	.ceca-lif--reveal.is-revealed .ceca-lif__card {
		opacity: 1;
		transform: translateY(0) rotate(0deg);
		transition:
			opacity 0.45s ease-out,
			transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
		transition-delay: calc(var(--ceca-i, 0) * 90ms);
	}
}

/* --- editor ------------------------------------------------------------- */

.ceca-lif__empty {
	padding: 24px;
	background: #f7f7f7;
	border: 1px dashed #c4c4c4;
	border-radius: 8px;
	font-size: 14px;
	color: #666;
}

/* --- small screens ------------------------------------------------------ */
/* The gutter vars shrink at the child theme's breakpoints, so the edge
   padding follows the grid automatically; only the card slims down. */

@media (max-width: 767px) {
	.ceca-lif {
		--ceca-lif-card-w: 280px;
		--ceca-lif-img-h: 260px;
	}

	/* Like the shop feed: the row runs off the right edge of the screen
	   (no right gutter clipping the peeking card); the gutter comes back as
	   trailing padding so the LAST card still ends 20px in (user,
	   2026-10-05). */
	.ceca-lif__track {
		margin-right: calc(-1 * var(--ceca-gutter, 20px));
		padding-right: var(--ceca-gutter, 20px);
	}
}
