/* The month events list (templates/month-events-list.php) — shared by the block (a dependency of
   blocks/month-view/style.css, see astro-moon-calendar.php) and the [astro-moon-calendar]
   shortcode (inlined by class-shortcode.php), so the two can't drift apart. Where it sits in the
   page (full width under the grid and the day card from 1100px) is the block's/shortcode's own
   grid. Deliberately sets no font family: the list uses the theme's font.
   Headings are styled by class, never by tag — every property a theme's h2/h3/h4 styles might
   set is reset explicitly. */

/* --- Above the card: the <h2> "Събития през октомври 2026" and the site's .section-sub-title
   line. The spacing is set here and on the card, never the sub-title's size or colour: it keeps
   the body text's (or the theme's own .section-sub-title style). --- */

.amc-events-container .amc-month-events-title {
	margin: 0 0 8px;
	padding: 0;
	border: 0;
	background: none;
	font-size: 20px;
	line-height: 24px;
	font-weight: 600;
	font-style: normal;
	letter-spacing: normal;
	word-spacing: normal;
	text-transform: none;
	text-decoration: none;
	text-align: center;
	color: #121218;
}

.amc-events-container .section-sub-title {
	margin: 0;
	text-align: center;
}

/* No header inside the card: it starts with the first row, whose own padding is the card's top
   and bottom spacing. */
.amc-month-events {
	box-sizing: border-box;
	width: 100%;
	max-width: 1226px;
	margin: 16px 0 0;
	padding: 0 16px;
	background: #ffffff;
	border: 0;
	border-radius: 20px;
	box-shadow: none;
	color: #121218;
}

/* --- Rows --- */

.amc-month-events .amc-month-events-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.amc-month-events .amc-month-event {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 20px 0;
	border: 0;
	list-style: none;
}

/* A line between two neighbouring rows only — none above the first or below the last. */
.amc-month-events .amc-month-event + .amc-month-event {
	border-top: 1px solid #e5e7eb;
}

/* Date badge */
.amc-month-events .amc-month-event-date {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-width: 44px;
}

.amc-month-events .amc-month-event-date-month {
	font-size: 12px;
	line-height: 16px;
	font-weight: 700;
	letter-spacing: 1.4px;
	color: #747278;
}

.amc-month-events .amc-month-event-date-day {
	font-size: 24px;
	line-height: 28px;
	font-weight: 400;
	color: #121218;
}

/* Title, grey line, excerpt */
.amc-month-events .amc-month-event-body {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	min-width: 0;
}

.amc-month-events .amc-month-event-title {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-size: 16px;
	line-height: 22px;
	font-weight: 600;
	font-style: normal;
	letter-spacing: normal;
	word-spacing: normal;
	text-transform: none;
	text-decoration: none;
	color: #121218;
}

.amc-month-events .amc-month-event-link {
	color: inherit;
	text-decoration: none;
}

/* The whole row is the link's click target; the arrow is decorative. */
.amc-month-events .amc-month-event-link::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 12px;
}

.amc-month-events .amc-month-event-link:focus-visible {
	outline: none;
}

.amc-month-events .amc-month-event-link:focus-visible::after {
	outline: 2px solid #6750a4;
	outline-offset: -2px;
}

.amc-month-events .amc-month-event-meta {
	margin: 4px 0 0;
	font-size: 14px;
	/* !important: надписва глобалното body, p { line-height: 1.5 !important } на сайта. */
	line-height: 18px !important;
	font-weight: 400;
	color: #747278;
}

.amc-month-events .amc-month-event-excerpt {
	margin: 8px 0 0;
	font-size: 14px;
	/* !important: надписва глобалното body, p { line-height: 1.5 !important } на сайта. */
	line-height: 20px !important;
	font-weight: 400;
	color: #747278;
}

/* Arrow — only on rows with an article */
.amc-month-events .amc-month-event-arrow {
	display: flex;
	flex: 0 0 20px;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
}

.amc-month-events .amc-month-event-arrow-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	line-height: 1;
	font-weight: 500;
	color: #121218;
	transition: background-color 0.15s ease;
}

/* Logged-in users only (assets/month-events.js): the row's event key + copy button, above the
   row's stretched link so it stays clickable. */
.amc-month-events .amc-month-event-admin-key {
	position: relative;
	z-index: 1;
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	align-self: flex-start;
	gap: 6px;
	max-width: 100%;
	margin-top: 6px;
	font-size: 12px;
	line-height: 16px;
	color: #747278;
}

.amc-month-events .amc-month-event-admin-key code {
	padding: 1px 4px;
	border-radius: 4px;
	background: #f1f2f4;
	font-size: 12px;
	color: #747278;
	overflow-wrap: anywhere;
}

.amc-month-events .amc-month-event-admin-key button {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 0 4px;
	border: 0;
	background: transparent;
	box-shadow: none;
	font: inherit;
	font-size: 12px;
	color: #6750a4;
	text-decoration: underline;
	cursor: pointer;
}

@media (min-width: 768px) {
	.amc-events-container .amc-month-events-title {
		font-size: 36px;
		line-height: 42px;
	}

	.amc-month-events {
		margin-top: 32px;
		padding: 0 20px;
	}

	.amc-month-events .amc-month-event {
		gap: 24px;
		padding: 24px 0;
	}

	/* content-box: every badge's content area is the same 64px, so all titles start on one line. */
	.amc-month-events .amc-month-event-date {
		box-sizing: content-box;
		height: 76px;
		min-width: 64px;
		padding: 0 12px;
	}

	.amc-month-events .amc-month-event-date-day {
		font-size: 28px;
		line-height: 32px;
	}

	.amc-month-events .amc-month-event-title {
		font-size: 20px;
		line-height: 28px;
	}

	.amc-month-events .amc-month-event-excerpt {
		/* !important: надписва глобалното body, p { line-height: 1.5 !important } на сайта. */
		line-height: 18px !important;
	}

	.amc-month-events .amc-month-event-arrow {
		flex: 0 0 144px;
		justify-content: flex-end;
		width: 144px;
		height: auto;
	}

	.amc-month-events .amc-month-event-arrow-icon {
		width: 36px;
		height: 36px;
		border-radius: 50%;
	}

	.amc-month-events .amc-month-event--linked:hover .amc-month-event-arrow-icon {
		background: #f1f2f4;
	}
}
