.bbfct-newsletter-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
	margin: 24px 0;
}

.bbfct-newsletter-card {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.bbfct-newsletter-card:hover {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.bbfct-newsletter-thumb {
	aspect-ratio: 4 / 3;
	background: #f4f4f4;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bbfct-newsletter-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bbfct-newsletter-thumb-placeholder {
	font-size: 48px;
	opacity: 0.4;
}

.bbfct-newsletter-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.bbfct-newsletter-title {
	margin: 0 0 4px;
	font-size: 1.05em;
}

.bbfct-newsletter-date {
	margin: 0 0 8px;
	font-size: 0.85em;
	opacity: 0.65;
}

.bbfct-newsletter-desc {
	margin: 0 0 14px;
	font-size: 0.92em;
	line-height: 1.5;
	flex: 1;
}

.bbfct-newsletter-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.bbfct-newsletter-view,
.bbfct-newsletter-download {
	display: inline-block;
	text-align: center;
	padding: 10px 16px;
	border-radius: 5px;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9em;
	flex: 1;
}

.bbfct-newsletter-view {
	background: #eef3f0;
	color: #1a5f3f;
	border: 1px solid #1a5f3f;
}

.bbfct-newsletter-view:hover {
	background: #dcebe3;
	color: #124a30;
}

.bbfct-newsletter-download {
	background: #1a5f3f;
	color: #fff;
}

.bbfct-newsletter-download:hover {
	background: #124a30;
	color: #fff;
}

/* Single newsletter page: embedded viewer */
.bbfct-newsletter-single {
	margin-top: 20px;
}

.bbfct-newsletter-single-desc {
	font-size: 1.05em;
	opacity: 0.75;
	margin-bottom: 20px;
}

.bbfct-newsletter-viewer {
	width: 100%;
	aspect-ratio: 8.5 / 11;
	max-height: 1100px;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	overflow: hidden;
	background: #f4f4f4;
}

.bbfct-newsletter-viewer iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.bbfct-newsletter-single-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 16px;
}

.bbfct-newsletter-open-tab {
	display: inline-block;
	padding: 10px 16px;
	border-radius: 5px;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9em;
	background: #eef3f0;
	color: #1a5f3f;
	border: 1px solid #1a5f3f;
}

.bbfct-newsletter-open-tab:hover {
	background: #dcebe3;
	color: #124a30;
}

.bbfct-newsletter-viewer-fallback {
	font-size: 0.85em;
	opacity: 0.65;
	margin-top: 8px;
}

/* On-page modal viewer (opened by the "View" button, no page navigation) */
body.bbfct-modal-open {
	overflow: hidden;
}

.bbfct-newsletter-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
}

.bbfct-newsletter-modal.is-open {
	display: block;
}

.bbfct-newsletter-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.bbfct-newsletter-modal-dialog {
	position: relative;
	z-index: 1;
	max-width: 900px;
	width: 92%;
	height: 88vh;
	margin: 4vh auto;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.bbfct-newsletter-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-bottom: 1px solid #e2e2e2;
	flex-shrink: 0;
}

.bbfct-newsletter-modal-title {
	font-weight: 600;
	font-size: 1em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding-right: 12px;
}

.bbfct-newsletter-modal-header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.bbfct-newsletter-modal-download {
	color: #1a5f3f;
	font-weight: 600;
	text-decoration: none;
	font-size: 0.9em;
}

.bbfct-newsletter-modal-download:hover {
	text-decoration: underline;
}

.bbfct-newsletter-modal-close {
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #555;
	padding: 0 4px;
}

.bbfct-newsletter-modal-close:hover {
	color: #000;
}

.bbfct-newsletter-modal-body {
	flex: 1;
	background: #f4f4f4;
}

.bbfct-newsletter-modal-iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

@media (max-width: 600px) {
	.bbfct-newsletter-modal-dialog {
		width: 100%;
		height: 100%;
		margin: 0;
		border-radius: 0;
	}
}
