/**
 * Lemorau Newsletters — Presentation Styles (WP-21)
 * Aligned with Fabrik / VamTam design system (#0054A4 accent, #191817 dark, Lato typography)
 */

.lemorau-newsletters {
	font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	width: 100%;
	max-width: 1140px;
	margin: 0 auto;
	padding: 0;
	box-sizing: border-box;
}

.lemorau-newsletters--empty {
	padding: 40px 24px;
	background-color: #f8fafc;
	border-radius: 12px;
	border: 2px dashed #cbd5e1;
	text-align: center;
}

.lemorau-newsletters__empty-message {
	margin: 0;
	color: #64748b;
	font-size: 1.05rem;
	font-weight: 500;
}

.lemorau-newsletters__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.lemorau-newsletters__item {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 22px 28px;
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.03);
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	position: relative;
}

.lemorau-newsletters__item:hover,
.lemorau-newsletters__item:focus-within {
	border-color: #0054A4;
	box-shadow: 0 10px 25px -5px rgba(0, 84, 164, 0.12), 0 8px 10px -6px rgba(0, 84, 164, 0.04);
	transform: translateY(-2px);
}

.lemorau-newsletters__meta {
	display: flex;
	align-items: center;
}

.lemorau-newsletters__date {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	background-color: #f1f5f9;
	color: #475569;
	font-size: 0.825rem;
	font-weight: 600;
	letter-spacing: 0.5px;
	border-radius: 20px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.lemorau-newsletters__item:hover .lemorau-newsletters__date,
.lemorau-newsletters__item:focus-within .lemorau-newsletters__date {
	background-color: #e0f2fe;
	color: #0369a1;
}

.lemorau-newsletters__link {
	font-size: 1.15rem;
	font-weight: 700;
	color: #0f172a;
	text-decoration: none;
	line-height: 1.45;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: color 0.2s ease;
}

.lemorau-newsletters__link::after {
	content: "↗";
	font-size: 1rem;
	font-weight: 400;
	color: #94a3b8;
	transition: color 0.2s ease, transform 0.2s ease;
}

/*
 * The whole card is the click target, not just the title.
 *
 * A transparent overlay stretched from the link across the card, rather than
 * wrapping the card in the <a>: this keeps the link's accessible name to the
 * title alone, leaves the flex layout and the reordering below untouched, and
 * needs no change to the markup. The card already carries position: relative,
 * which is what the overlay anchors to.
 *
 * An absolutely positioned pseudo-element is not a flex item, so it adds no
 * gap inside the link.
 *
 * The trade-off, said out loud: dragging to select the date or the title stops
 * working, because the overlay swallows the drag. On a list where every row is
 * a link, that is the right side to err on.
 */
.lemorau-newsletters__link::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 12px;
}

.lemorau-newsletters__link:hover,
.lemorau-newsletters__link:focus-visible {
	color: #0054A4;
}

.lemorau-newsletters__link:hover::after,
.lemorau-newsletters__link:focus-visible::after {
	color: #0054A4;
	transform: translate(2px, -2px);
}

/*
 * Keyboard parity. The clickable area is now the card, so the focus ring has to
 * be the card too: it goes on the overlay, and the browser default on the text
 * box is dropped so there is one ring and not two.
 */
.lemorau-newsletters__link:focus-visible {
	outline: none;
}

.lemorau-newsletters__link:focus-visible::before {
	outline: 2px solid #0054A4;
	outline-offset: 3px;
}

.lemorau-newsletters__title {
	font-size: 1.15rem;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.45;
}

/* Accessibility helper */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

@media (min-width: 640px) {
	.lemorau-newsletters__item {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}

	.lemorau-newsletters__meta {
		order: 2;
	}

	.lemorau-newsletters__link,
	.lemorau-newsletters__title {
		order: 1;
		max-width: 75%;
	}
}
