/**
 * CP - Facebook Feed — Front-end styles
 *
 * @package CP_Facebook_Feed
 */

/* ============================================
   Container
   ============================================ */
.cp-fbfeed {
	margin: 0 auto;
	padding: 0;
	box-sizing: border-box;
}

/* Grid layout */
.cp-fbfeed--grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 24px;
}

/* List layout */
.cp-fbfeed--list {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* ============================================
   Single item
   ============================================ */
.cp-fbfeed__item {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease;
}

.cp-fbfeed__item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================
   Date
   ============================================ */
.cp-fbfeed__date {
	display: block;
	padding: 12px 16px 0;
	font-size: 0.8rem;
	color: #65676b;
}

/* ============================================
   Image
   ============================================ */
.cp-fbfeed__image {
	margin-top: 12px;
	line-height: 0;
}

.cp-fbfeed__image img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

/* ============================================
   Message
   ============================================ */
.cp-fbfeed__message {
	padding: 16px;
	font-size: 0.95rem;
	line-height: 1.5;
	color: #1c1e21;
	word-wrap: break-word;
	overflow-wrap: break-word;
	flex: 1;
}

/* ============================================
   Facebook link
   ============================================ */
.cp-fbfeed__link {
	display: inline-block;
	margin: 0 16px 16px;
	padding: 8px 16px;
	background: #1877f2;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.85rem;
	font-weight: 600;
	text-align: center;
	transition: background 0.2s ease;
	align-self: flex-start;
}

.cp-fbfeed__link:hover,
.cp-fbfeed__link:focus {
	background: #166fe5;
	color: #fff;
	text-decoration: none;
}

/* ============================================
   Error / empty states
   ============================================ */
.cp-fbfeed--error,
.cp-fbfeed--empty {
	text-align: center;
	padding: 24px;
	color: #65676b;
	font-style: italic;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 600px) {
	.cp-fbfeed--grid {
		grid-template-columns: 1fr;
	}
}

/* List layout item in wider viewports */
@media (min-width: 768px) {
	.cp-fbfeed--list .cp-fbfeed__item {
		flex-direction: row;
	}

	.cp-fbfeed--list .cp-fbfeed__image {
		flex: 0 0 250px;
		margin-top: 0;
	}

	.cp-fbfeed--list .cp-fbfeed__image img {
		height: 100%;
		object-fit: cover;
	}

	.cp-fbfeed--list .cp-fbfeed__date {
		padding-top: 16px;
	}
}
