/* Community Posts - front-end styles */

.cp-listing-wrapper { max-width: 900px; margin: 0 auto; }

.cp-listing-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}
.cp-listing-title { margin: 0; }

.cp-create-post-btn,
.cp-submit-btn {
	background: #2271b1;
	color: #fff;
	border: none;
	padding: 10px 18px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
}
.cp-create-post-btn:hover,
.cp-submit-btn:hover { background: #135e96; }

.cp-create-form-panel {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 20px;
	margin-bottom: 24px;
}

.cp-notice { padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; }
.cp-notice-success { background: #edfaef; border: 1px solid #68de7c; }
.cp-notice-error { background: #fcf0f1; border: 1px solid #d63638; }

.cp-post-form .cp-field { margin-bottom: 16px; }
.cp-post-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.cp-post-form input[type="text"],
.cp-post-form input[type="email"],
.cp-post-form input[type="url"],
.cp-post-form input[type="search"],
.cp-post-form select {
	width: 100%;
	max-width: 480px;
	padding: 8px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
}
.cp-post-form .req { color: #d63638; }

.cp-anon-fieldset { border: 1px solid #dcdcde; border-radius: 4px; padding: 12px; }
.cp-anon-fieldset legend { font-weight: 600; padding: 0 6px; }
.cp-anon-fieldset label { display: inline-block; font-weight: normal; margin-right: 16px; }
.cp-name-field-wrap { display: block; margin-top: 10px; }

.cp-image-tools { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; }
.cp-insert-image-btn {
	background: #fff;
	border: 1px solid #2271b1;
	color: #2271b1;
	padding: 6px 12px;
	border-radius: 4px;
	cursor: pointer;
}
.cp-image-upload-status { font-size: 12px; color: #646970; }

.cp-honeypot { position: absolute; left: -9999px; top: -9999px; }

.cp-submit-row { display: flex; align-items: center; gap: 12px; }
.cp-submit-note { font-size: 12px; color: #646970; }

.cp-filter-form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}
.cp-filter-form input[type="search"] { flex: 1 1 220px; padding: 8px; }
.cp-filter-form select { padding: 8px; }
.cp-filter-form button {
	background: #2271b1;
	color: #fff;
	border: none;
	padding: 8px 16px;
	border-radius: 4px;
	cursor: pointer;
}

.cp-post-card {
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 18px;
	margin-bottom: 18px;
	background: #fff;
}
.cp-post-thumb img { max-width: 100%; height: auto; border-radius: 4px; margin-bottom: 10px; }
.cp-post-title { margin: 0 0 8px; }
.cp-post-title a { text-decoration: none; }
.cp-post-meta { font-size: 13px; color: #646970; margin-bottom: 10px; }
.cp-post-meta .cp-post-date { margin-left: 8px; }
.cp-anon-badge { font-style: italic; }
.cp-contact-links a { text-decoration: none; }
.cp-post-excerpt { margin-bottom: 12px; }

.cp-post-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.cp-vote-widget { display: inline-flex; gap: 8px; }
.cp-vote-btn {
	background: #f0f0f1;
	border: 1px solid #c3c4c7;
	border-radius: 20px;
	padding: 4px 12px;
	cursor: pointer;
	font-size: 13px;
	color: #000;
}
.cp-vote-btn .cp-like-count,
.cp-vote-btn .cp-dislike-count { color: #000; font-weight: 600; }
.cp-vote-btn.is-active { background: #2271b1; color: #fff; border-color: #2271b1; }
.cp-vote-btn.is-active .cp-like-count,
.cp-vote-btn.is-active .cp-dislike-count { color: #fff; }
.cp-comment-link { font-size: 13px; text-decoration: none; color: #646970; }
.cp-comment-link i { margin-right: 3px; }

/* Share buttons */
.cp-share-widget { display: inline-flex; align-items: center; gap: 6px; }
.cp-share-label { font-size: 12px; color: #646970; margin-right: 2px; }
.cp-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #f0f0f1;
	border: 1px solid #c3c4c7;
	color: #3c434a;
	text-decoration: none;
	font-size: 13px;
	cursor: pointer;
}
.cp-share-btn:hover { opacity: 0.85; }
.cp-share-facebook { background: #1877f2; border-color: #1877f2; color: #fff; }
.cp-share-linkedin { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.cp-share-twitter { background: #000; border-color: #000; color: #fff; }
.cp-share-whatsapp { background: #25d366; border-color: #25d366; color: #fff; }
.cp-share-copy { background: #f0f0f1; color: #3c434a; }

/* Toast notification (popup) */
.cp-toast {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 99999;
	max-width: 360px;
	padding: 14px 18px;
	border-radius: 6px;
	font-size: 14px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.15);
	opacity: 0;
	transform: translateY(-10px);
	transition: opacity 0.25s ease, transform 0.25s ease;
	background: #fff;
	border-left: 4px solid #2271b1;
}
.cp-toast-visible { opacity: 1; transform: translateY(0); }
.cp-toast-success { border-left-color: #00a32a; background: #edfaef; color: #1e4620; }
.cp-toast-error { border-left-color: #d63638; background: #fcf0f1; color: #7a1c1e; }

.cp-pagination { text-align: center; margin-top: 20px; }
.cp-pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	margin: 0 2px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	text-decoration: none;
}
.cp-pagination .page-numbers.current { background: #2271b1; color: #fff; }

/* Single post view */
.cp-single-post-meta { font-size: 14px; color: #646970; margin-bottom: 16px; }
.cp-single-post-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 20px; }
.cp-single-vote-widget { margin-top: 0; }

/* Comments */
.cp-comment { list-style: none; margin-bottom: 16px; }
.cp-comment-body { border: 1px solid #eee; border-radius: 6px; padding: 12px; }
.cp-comment-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.cp-comment-meta img { border-radius: 50%; }
.cp-comment-date { color: #999; margin-left: auto; }
.cp-comment-footer { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
