/**
 * Lovely Notes public styles.
 * The card inherits typography and colors from the active theme.
 */
.lovely-notes {
	--lovely-notes-media-max-height: 50vh;
	--lovely-notes-radius: 0.7rem;
	--lovely-notes-gap: clamp(1.25rem, 3vw, 2.5rem);
	--lovely-notes-padding: clamp(1.1rem, 2.4vw, 2rem);
	box-sizing: border-box;
	width: 100%;
	max-width: 56rem;
	margin-inline: auto;
}

.lovely-notes *,
.lovely-notes *::before,
.lovely-notes *::after { box-sizing: inherit; }

.lovely-notes__stage { transition: opacity 180ms ease, transform 180ms ease; }
.lovely-notes.is-loading .lovely-notes__stage {
	opacity: 0.38;
	transform: translateY(0.2rem);
	pointer-events: none;
}

.lovely-notes__note {
	display: grid;
	width: 100%;
height: clamp(20rem, 42vw, 29rem);
padding: var(--lovely-notes-padding);
	border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
	border-radius: var(--lovely-notes-radius);
	background: color-mix(in srgb, Canvas 97%, transparent);
	box-shadow: 0 0.45rem 1.8rem color-mix(in srgb, currentColor 6%, transparent);
}

.lovely-notes__note--has-media {
	grid-template-columns: minmax(12rem, 0.72fr) minmax(0, 1.28fr);
	grid-template-rows: auto 1fr auto;
	grid-template-areas:
		"date content"
		"media content"
		"navigation archive";
	column-gap: var(--lovely-notes-gap);
	row-gap: 0.85rem;
}

.lovely-notes__note--no-media {
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto 1fr auto;
	grid-template-areas:
		"date date"
		"content content"
		"navigation archive";
	row-gap: 1rem;
}

.lovely-notes__date {
	grid-area: date;
	display: block;
	margin: 0;
	font-size: 0.92em;
	font-weight: 600;
	line-height: 1.4;
}

.lovely-notes__media-column {
	grid-area: media;
	align-self: start;
	min-width: 0;
}

.lovely-notes__media { width: 100%; margin: 0; text-align: center; }
.lovely-notes__image,
.lovely-notes__video {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: var(--lovely-notes-media-max-height);
	height: auto;
	margin-inline: auto;
	object-fit: contain;
	border-radius: calc(var(--lovely-notes-radius) * 0.72);
}
.lovely-notes__media--embed iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	max-height: var(--lovely-notes-media-max-height);
	margin-inline: auto;
	border: 0;
	border-radius: calc(var(--lovely-notes-radius) * 0.72);
}

.lovely-notes__content {
	grid-area: content;
	align-self: stretch;
	min-width: 0;
	height: 100%;

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	text-align: center;
	font-size: clamp(1rem, 0.96rem + 0.15vw, 1.08rem);
	line-height: 1.72;
}
.lovely-notes__text {
	width: 100%;
	max-width: 32.5rem;
	margin-inline: auto;
	text-align: center;
}

.lovely-notes__text p {
	margin-inline: auto;
	text-align: center;
}
.lovely-notes__note--no-media .lovely-notes__content { max-width: none; }
.lovely-notes__content > :first-child,
.lovely-notes__text > :first-child { margin-top: 0; }
.lovely-notes__content > :last-child,
.lovely-notes__text > :last-child { margin-bottom: 0; }
.lovely-notes__content img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: var(--lovely-notes-media-max-height);
	height: auto;
	margin-inline: auto;
	object-fit: contain;
	border-radius: calc(var(--lovely-notes-radius) * 0.72);
}
.lovely-notes__content figure,
.lovely-notes__content .wp-block-image { max-width: 100%; }

.lovely-notes__navigation {
	grid-area: navigation;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: center;
	align-self: end;
	gap: 0.6rem 1rem;
	margin: 0;
	font-size: 0.9em;
}
.lovely-notes__archive-link-wrap {
	grid-area: archive;
	align-self: end;
	justify-self: end;
	margin: 0;
	text-align: right;
	font-size: 0.9em;
}
.lovely-notes__nav-link,
.lovely-notes__archive-link {
	color: inherit;
	font: inherit;
	text-decoration: none;
	border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent);
	transition: border-color 150ms ease;
}
.lovely-notes__nav-link:hover,
.lovely-notes__nav-link:focus-visible,
.lovely-notes__archive-link:hover,
.lovely-notes__archive-link:focus-visible { border-bottom-color: currentColor; }
.lovely-notes__nav-link:focus-visible,
.lovely-notes__archive-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 0.25rem;
}

@media (max-width: 48rem) {
	.lovely-notes__note,
	.lovely-notes__note--has-media,
	.lovely-notes__note--no-media {
		height: auto;
min-height: 0;
		grid-template-columns: 1fr;
		grid-template-rows: auto;
		grid-template-areas: "date" "media" "content" "navigation" "archive";
		row-gap: 1rem;
	}
	.lovely-notes__note--no-media { grid-template-areas: "date" "content" "navigation" "archive"; }
	.lovely-notes__content { font-size: 1rem; }
	.lovely-notes__archive-link-wrap { justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
	.lovely-notes__stage { transition: none; }
}

/* Archive page. */
.lovely-notes-archive {
	width: 100%;
}

.lovely-notes-archive__year + .lovely-notes-archive__year {
	margin-top: 4rem;
}

.lovely-notes-archive__year-title {
	margin-bottom: 2rem;
}

.lovely-notes-archive__month + .lovely-notes-archive__month {
	margin-top: 3rem;
}

.lovely-notes-archive__month-title {
	margin-bottom: 1rem;
	font-size: 1.15em;
}

.lovely-notes-archive__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
	gap: 1.25rem;
}

.lovely-notes-archive__card {
	overflow: hidden;
	border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
	border-radius: var(--lovely-notes-radius, 0.75rem);
	background: color-mix(in srgb, Canvas 97%, transparent);
}

.lovely-notes-archive__thumb,
.lovely-notes-archive__text-thumb {
	aspect-ratio: 4 / 3;
	margin: 0;
	background: color-mix(in srgb, currentColor 5%, transparent);
}

.lovely-notes-archive__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.lovely-notes-archive__text-thumb {
	display: grid;
	place-items: center;
	font-size: 2rem;
	opacity: 0.35;
}
.lovely-notes-archive__text-thumb--video {
	font-size: 2.4rem;
	padding-left: 0.15em;
}

.lovely-notes-archive__text-thumb--text {
	font-size: 2.25rem;
}

.lovely-notes-archive__card-body {
	padding: 1rem;
}

.lovely-notes-archive__date {
	display: block;
	margin-bottom: 0.65rem;
	font-size: 0.86em;
	font-weight: 600;
}

.lovely-notes-archive__card-body p {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.55;
}
/* ---------------------------------------------------------
 * Lovely Notes lightbox.
 * --------------------------------------------------------- */

.lovely-notes__image,
.lovely-notes__content img {
	cursor: zoom-in;
}

.lovely-notes__image:focus-visible,
.lovely-notes__content img:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 0.3rem;
}

/*
 * Prevents the page from scrolling while the lightbox is open.
 */
html.lovely-notes-lightbox-open,
body.lovely-notes-lightbox-open {
	overflow: hidden;
}

/*
 * The hidden attribute must always take precedence.
 */
.lovely-notes-lightbox[hidden] {
	display: none !important;
}

.lovely-notes-lightbox {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: grid;
	place-items: center;
	padding: clamp(1rem, 3vw, 2rem);
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 180ms ease,
		visibility 180ms ease;
}

.lovely-notes-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.lovely-notes-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.86);
	cursor: zoom-out;
}

.lovely-notes-lightbox__dialog {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: min(95vw, 100rem);
	height: min(92vh, 70rem);
	pointer-events: none;
}

.lovely-notes-lightbox__image {
	display: block;
	width: auto;
	max-width: 95vw;
	height: auto;
	max-height: 92vh;
	margin: auto;
	object-fit: contain;
	border-radius: 0.35rem;
	box-shadow: 0 1rem 4rem rgba(0, 0, 0, 0.45);
	pointer-events: auto;
	cursor: default;
	transform: scale(0.985);
	transition: transform 180ms ease;
}

.lovely-notes-lightbox.is-open
	.lovely-notes-lightbox__image {
	transform: scale(1);
}

.lovely-notes-lightbox__close {
	position: fixed;
	z-index: 2;
	top: max(1rem, env(safe-area-inset-top));
	right: max(1rem, env(safe-area-inset-right));
	display: grid;
	place-items: center;
	width: 2.8rem;
	height: 2.8rem;
	padding: 0;
	color: #fff;
	font-family: Arial, sans-serif;
	font-size: 2rem;
	font-weight: 300;
	line-height: 1;
	background: rgba(0, 0, 0, 0.38);
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 50%;
	box-shadow: none;
	cursor: pointer;
	pointer-events: auto;
	transition:
		background-color 150ms ease,
		border-color 150ms ease;
}

.lovely-notes-lightbox__close:hover {
	color: #fff;
	background: rgba(0, 0, 0, 0.72);
	border-color: rgba(255, 255, 255, 0.8);
}

.lovely-notes-lightbox__close:focus-visible {
	color: #fff;
	outline: 2px solid #fff;
	outline-offset: 0.25rem;
}

@media (max-width: 48rem) {
	.lovely-notes-lightbox {
		padding:
			max(0.75rem, env(safe-area-inset-top))
			max(0.75rem, env(safe-area-inset-right))
			max(0.75rem, env(safe-area-inset-bottom))
			max(0.75rem, env(safe-area-inset-left));
	}

	.lovely-notes-lightbox__image {
		max-width: calc(100vw - 1.5rem);
		max-height: calc(100vh - 1.5rem);
	}
}

@media (prefers-reduced-motion: reduce) {
	.lovely-notes-lightbox,
	.lovely-notes-lightbox__image {
		transition: none;
	}
}
/* ---------------------------------------------------------
 * Complete note viewer from the archive page.
 * --------------------------------------------------------- */

.lovely-notes-archive__card {
	position: relative;
	transition:
		transform 160ms ease,
		box-shadow 160ms ease;
}

.lovely-notes-archive__card:hover,
.lovely-notes-archive__card:focus-within {
	transform: translateY(-0.15rem);
	box-shadow:
		0 0.7rem 2rem
		color-mix(in srgb, currentColor 8%, transparent);
}

.lovely-notes-archive__open,
.lovely-notes-archive__open:hover,
.lovely-notes-archive__open:focus,
.lovely-notes-archive__open:active {
	position: absolute;
	z-index: 10;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;

	color: transparent !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;

	border: 0 !important;
	border-radius: inherit;
	box-shadow: none !important;
	opacity: 1 !important;
	transform: none !important;

	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.lovely-notes-archive__open:focus-visible {
	outline: 2px solid currentColor !important;
	outline-offset: 0.25rem;
}

html.lovely-notes-viewer-open,
body.lovely-notes-viewer-open {
	overflow: hidden;
}

.lovely-notes-viewer[hidden] {
	display: none !important;
}

.lovely-notes-viewer {
	position: fixed;
	z-index: 999998;
	inset: 0;
	display: grid;
	place-items: center;
	padding: clamp(1rem, 3vw, 2.5rem);
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 180ms ease,
		visibility 180ms ease;
}

.lovely-notes-viewer.is-open {
	opacity: 1;
	visibility: visible;
}

.lovely-notes-viewer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.78);
	cursor: zoom-out;
}

.lovely-notes-viewer__dialog {
	position: relative;
	z-index: 1;
	width: min(92vw, 58rem);
	max-height: 90vh;
	overflow: auto;
	padding: clamp(1.25rem, 3vw, 2.5rem);
	color: CanvasText;
	background: Canvas;
	border-radius: 0.8rem;
	box-shadow: 0 1.25rem 4rem rgba(0, 0, 0, 0.38);
	transform: translateY(0.35rem);
	transition: transform 180ms ease;
}

.lovely-notes-viewer.is-open
	.lovely-notes-viewer__dialog {
	transform: translateY(0);
}

.lovely-notes-viewer.is-loading
	.lovely-notes-viewer__body {
	opacity: 0.55;
	pointer-events: none;
}

.lovely-notes-viewer__body {
	display: grid;
	grid-template-columns:
		minmax(12rem, 0.75fr)
		minmax(0, 1.25fr);
	grid-template-areas:
		"date content"
		"media content"
		"navigation navigation";
	gap: 1rem clamp(1.25rem, 3vw, 2.5rem);
	transition: opacity 160ms ease;
}

.lovely-notes-viewer__date {
	grid-area: date;
	font-size: 0.92em;
	font-weight: 600;
}

.lovely-notes-viewer__media {
	grid-area: media;
	align-self: start;
	text-align: center;
}

.lovely-notes-viewer__media img,
.lovely-notes-viewer__media video,
.lovely-notes-viewer__media iframe {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 58vh;
	height: auto;
	margin-inline: auto;
	border: 0;
	border-radius: 0.55rem;
	object-fit: contain;
}

.lovely-notes-viewer__media iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
}

.lovely-notes-viewer__content {
	grid-area: content;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	text-align: center;
	font-size: clamp(1rem, 0.96rem + 0.25vw, 1.15rem);
	line-height: 1.72;
}

.lovely-notes-viewer__content > :first-child {
	margin-top: 0;
}

.lovely-notes-viewer__content > :last-child {
	margin-bottom: 0;
}

.lovely-notes-viewer__dialog--no-media
	.lovely-notes-viewer__body {
	grid-template-columns: 1fr;
	grid-template-areas:
		"date"
		"content"
		"navigation";
}

.lovely-notes-viewer__dialog--no-media
	.lovely-notes-viewer__content {
	min-height: 14rem;
	max-width: 38rem;
	margin-inline: auto;
}

.lovely-notes-viewer__navigation {
	grid-area: navigation;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	margin-top: 1rem;
}

.lovely-notes-viewer__nav-link {
	padding: 0;
	color: inherit;
	font: inherit;
	font-size: 0.9em;
	background: transparent;
	border: 0;
	border-bottom:
		1px solid
		color-mix(in srgb, currentColor 35%, transparent);
	cursor: pointer;
}

.lovely-notes-viewer__nav-link:hover,
.lovely-notes-viewer__nav-link:focus-visible {
	border-bottom-color: currentColor;
}

.lovely-notes-viewer__nav-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 0.25rem;
}

.lovely-notes-viewer__close {
	position: absolute;
	z-index: 3;
	top: 0.65rem;
	right: 0.75rem;
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	color: inherit;
	font-family: Arial, sans-serif;
	font-size: 1.8rem;
	font-weight: 300;
	line-height: 1;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.lovely-notes-viewer__close:hover {
	background:
		color-mix(in srgb, currentColor 7%, transparent);
}

.lovely-notes-viewer__close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 0.2rem;
}

@media (max-width: 48rem) {
	.lovely-notes-viewer {
		padding: 0.75rem;
	}

	.lovely-notes-viewer__dialog {
		width: 100%;
		max-height: calc(100vh - 1.5rem);
		padding: 2.8rem 1.1rem 1.25rem;
	}

	.lovely-notes-viewer__body,
	.lovely-notes-viewer__dialog--no-media
		.lovely-notes-viewer__body {
		grid-template-columns: 1fr;
		grid-template-areas:
			"date"
			"media"
			"content"
			"navigation";
	}

	.lovely-notes-viewer__media img,
	.lovely-notes-viewer__media video,
	.lovely-notes-viewer__media iframe {
		max-height: 52vh;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lovely-notes-archive__card,
	.lovely-notes-viewer,
	.lovely-notes-viewer__dialog,
	.lovely-notes-viewer__body {
		transition: none;
	}
}