/**
 * Mudlarks Toolkit – block styles.
 * Uses the theme's colour variables where available, with sensible fallbacks.
 */

.ml-icon {
	width: 1.25em;
	height: 1.25em;
	flex-shrink: 0;
	vertical-align: -0.2em;
}

.ml-dot {
	display: inline-block;
	width: .62em;
	height: .62em;
	border-radius: 50%;
	background: #1f9d55;
	box-shadow: 0 0 0 3px rgba(31, 157, 85, .22);
	flex-shrink: 0;
}

.is-caution .ml-dot { background: #d97706; box-shadow: 0 0 0 3px rgba(217, 119, 6, .25); }
.is-closed .ml-dot { background: #c62828; box-shadow: 0 0 0 3px rgba(198, 40, 40, .22); }

@media (prefers-reduced-motion: no-preference) {
	.ml-lake-pill.is-open .ml-dot,
	.ml-webcam__live .ml-dot {
		animation: ml-pulse 2.4s ease-in-out infinite;
	}
}

@keyframes ml-pulse {
	50% { box-shadow: 0 0 0 6px rgba(31, 157, 85, 0); }
}

.ml-editor-hint {
	padding: 1rem 1.25rem;
	border: 2px dashed currentColor;
	border-radius: 12px;
	opacity: .75;
	font-size: .95rem;
}

/* ---------------------------------------------------------------------------
   Lake status – pill (header)
--------------------------------------------------------------------------- */

.ml-lake-pill {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .45rem .95rem;
	border-radius: 999px;
	background: var(--wp--preset--color--mist, #EBF8FF);
	color: var(--wp--preset--color--navy, #0F2547) !important;
	font-weight: 800;
	font-size: .9375rem;
	line-height: 1.2;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background-color .15s ease;
}

.ml-lake-pill:hover {
	background: var(--wp--preset--color--sky, #6CCBE5);
}

.ml-lake-pill__extra {
	font-weight: 700;
}

@media (max-width: 1180px) {
	.ml-lake-pill__extra + .ml-lake-pill__extra { display: none; }
}

@media (max-width: 960px) {
	.ml-lake-pill__extra { display: none; }
}

/* ---------------------------------------------------------------------------
   Lake status – strip (home page)
--------------------------------------------------------------------------- */

.ml-lake-status__items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
	gap: clamp(.75rem, 1.6vw, 1.25rem);
}

.ml-stat,
.ml-stat__link {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto auto;
	column-gap: .9rem;
	align-items: center;
}

.ml-stat {
	background: rgba(255, 255, 255, .92);
	color: var(--wp--preset--color--navy, #0F2547);
	border-radius: 20px;
	padding: 1.05rem 1.25rem 1.1rem;
	box-shadow: 0 10px 24px -16px rgba(15, 37, 71, .55);
}

.ml-stat--webcam {
	padding: 0;
	background: var(--wp--preset--color--navy, #0F2547);
	color: #fff;
}

.ml-stat__link {
	padding: 1.05rem 1.25rem 1.1rem;
	color: inherit !important;
	text-decoration: none !important;
	border-radius: 20px;
	height: 100%;
	box-sizing: border-box;
	transition: background-color .15s ease;
}

.ml-stat__link:hover {
	background: var(--wp--preset--color--lake-blue, #1E59D0);
}

.ml-stat__icon {
	grid-row: 1 / span 3;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--wp--preset--color--mist, #EBF8FF);
	color: var(--wp--preset--color--lake-blue, #1E59D0);
}

.ml-stat--webcam .ml-stat__icon {
	background: rgba(255, 255, 255, .14);
	color: #fff;
}

.ml-stat__icon .ml-icon {
	width: 1.6rem;
	height: 1.6rem;
}

.ml-stat__label {
	font-size: .8125rem;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	line-height: 1.3;
}

.ml-stat__value {
	font-family: var(--wp--preset--font-family--fredoka, inherit);
	font-size: 1.6rem;
	font-weight: 600;
	line-height: 1.15;
	display: flex;
	align-items: center;
	gap: .5rem;
}

.ml-stat__meta {
	font-size: .9375rem;
	font-weight: 600;
	line-height: 1.35;
}

.ml-lake-status__message {
	display: flex;
	align-items: center;
	gap: .6rem;
	margin: 1.1rem 0 0;
	font-weight: 800;
	font-size: 1.0625rem;
}

/* ---------------------------------------------------------------------------
   Notice banner
--------------------------------------------------------------------------- */

.ml-notice {
	background: var(--wp--preset--color--navy, #0F2547);
	color: #fff;
	padding: 1.15rem clamp(1rem, 4vw, 2.5rem);
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.ml-notice--off {
	background: transparent;
	color: inherit;
}

.ml-notice__inner {
	max-width: var(--wp--style--global--wide-size, 1240px);
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 1rem 1.25rem;
	flex-wrap: wrap;
}

.ml-notice__icon {
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--wp--preset--color--seasonal, #FF9E3D);
	color: var(--wp--preset--color--navy, #0F2547);
	flex-shrink: 0;
}

.ml-notice__icon .ml-icon {
	width: 1.5rem;
	height: 1.5rem;
}

.ml-notice__copy {
	flex: 1 1 18rem;
}

.ml-notice__copy p {
	margin: 0;
}

.ml-notice__title {
	font-family: var(--wp--preset--font-family--fredoka, inherit);
	font-weight: 600;
	font-size: 1.375rem;
	line-height: 1.25;
}

.ml-notice__text {
	opacity: .92;
	font-weight: 600;
}

.ml-notice .ml-notice__btn {
	background: var(--wp--preset--color--seasonal, #FF9E3D);
	color: var(--wp--preset--color--navy, #0F2547);
	text-decoration: none;
	white-space: nowrap;
}

.ml-notice .ml-notice__btn:hover {
	background: #fff;
	color: var(--wp--preset--color--navy, #0F2547);
}

/* ---------------------------------------------------------------------------
   Events
--------------------------------------------------------------------------- */

.ml-events {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1rem;
}

.ml-event {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 1.25rem;
	align-items: center;
	background: #fff;
	border-radius: 20px;
	padding: 1.1rem 1.4rem 1.1rem 1.1rem;
	box-shadow: 0 10px 28px -18px rgba(15, 37, 71, .5);
	outline: 1px solid rgba(15, 37, 71, .07);
	transition: transform .2s ease, box-shadow .2s ease;
}

.ml-event:hover,
.ml-event:focus-within {
	transform: translateY(-2px);
	box-shadow: 0 18px 34px -18px rgba(15, 37, 71, .5);
}

.ml-event__date {
	width: 4.75rem;
	height: 4.75rem;
	border-radius: 16px;
	background: var(--wp--preset--color--seasonal, #FF9E3D);
	color: var(--wp--preset--color--navy, #0F2547);
	display: grid;
	place-content: center;
	text-align: center;
	line-height: 1;
}

.ml-event.is-regular .ml-event__date {
	background: var(--wp--preset--color--sky, #6CCBE5);
}

.ml-event__day {
	font-family: var(--wp--preset--font-family--fredoka, inherit);
	font-size: 2rem;
	font-weight: 600;
}

.ml-event__month {
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .1em;
	font-size: .8rem;
	margin-top: .2rem;
}

.ml-event__regular {
	display: grid;
	justify-items: center;
	gap: .25rem;
	font-weight: 800;
	font-size: .68rem;
	text-transform: uppercase;
	letter-spacing: .03em;
}

.ml-event__regular .ml-icon {
	width: 1.6rem;
	height: 1.6rem;
}

.ml-event__title {
	margin: 0 0 .3rem !important;
	font-size: 1.375rem !important;
}

.ml-event__title a {
	color: var(--wp--preset--color--navy, #0F2547);
	text-decoration: none;
}

.ml-event__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 20px;
}

.ml-event__meta {
	display: flex;
	flex-wrap: wrap;
	gap: .3rem 1.1rem;
	margin: 0;
	font-weight: 700;
	font-size: .975rem;
}

.ml-event__meta span {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
}

.ml-event__meta .ml-icon {
	color: var(--wp--preset--color--lake-blue, #1E59D0);
}

.ml-event__excerpt {
	margin: .45rem 0 0;
}

.ml-event__arrow {
	color: var(--wp--preset--color--lake-blue, #1E59D0);
	transition: transform .2s ease;
}

.ml-event:hover .ml-event__arrow {
	transform: translateX(4px);
}

@media (max-width: 600px) {
	.ml-event {
		grid-template-columns: 1fr;
		gap: .75rem;
		padding: 1.1rem 1.2rem 1.2rem;
	}
	.ml-event__arrow {
		display: none;
	}
	.ml-event__date {
		width: auto;
		height: auto;
		justify-self: start;
		display: flex;
		align-items: baseline;
		gap: .35rem;
		padding: .35rem .8rem;
		border-radius: 999px;
	}
	.ml-event__day {
		font-size: 1.1rem;
	}
	.ml-event__month {
		margin-top: 0;
	}
	.ml-event__regular {
		display: flex;
		align-items: center;
		gap: .35rem;
		font-size: .75rem;
	}
	.ml-event__regular .ml-icon {
		width: 1.1rem;
		height: 1.1rem;
	}
	.ml-event__meta {
		flex-direction: column;
		gap: .3rem;
	}
}

.ml-events-empty {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	background: var(--wp--preset--color--mist, #EBF8FF);
	border-radius: 20px;
	padding: 1.5rem 1.75rem;
}

.ml-events-empty p {
	margin: 0;
}

.ml-events-empty__title {
	font-family: var(--wp--preset--font-family--fredoka, inherit);
	font-size: 1.375rem;
	font-weight: 600;
	margin-bottom: .3rem !important;
}

.ml-events-empty__icon {
	width: 3.25rem;
	height: 3.25rem;
	flex-shrink: 0;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: #fff;
	color: var(--wp--preset--color--lake-blue, #1E59D0);
}

.ml-event-details {
	background: var(--wp--preset--color--mist, #EBF8FF);
	border-radius: 20px;
	padding: 1.4rem 1.6rem;
	margin-top: calc(-1 * var(--ml-wave-h, 40px)) !important;
	position: relative;
	z-index: 3;
	box-shadow: 0 10px 28px -18px rgba(15, 37, 71, .5);
}

.ml-event-details dl {
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 1rem 1.5rem;
}

.ml-event-details dt {
	display: flex;
	align-items: center;
	gap: .4rem;
	font-size: .8125rem;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--lake-blue, #1E59D0);
}

.ml-event-details dd {
	margin: .2rem 0 0;
	font-weight: 700;
	font-size: 1.125rem;
}

.ml-event-details__btn {
	margin-top: 1.1rem;
	display: inline-block;
	text-decoration: none;
}

/* ---------------------------------------------------------------------------
   Supporters carousel
--------------------------------------------------------------------------- */

.ml-supporters__viewport {
	display: flex;
	overflow: hidden;
	-webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.ml-supporters:not(.is-animated) .ml-supporters__viewport {
	justify-content: center;
	-webkit-mask: none;
	mask: none;
}

.ml-supporters__track {
	list-style: none;
	margin: 0;
	padding: .75rem 0;
	display: flex;
	gap: 1.25rem;
	padding-right: 1.25rem;
	flex-shrink: 0;
}

.ml-supporters:not(.is-animated) .ml-supporters__track {
	flex-wrap: wrap;
	justify-content: center;
	padding-right: 0;
}

@media (prefers-reduced-motion: no-preference) {
	.ml-supporters.is-animated .ml-supporters__track {
		animation: ml-marquee calc(var(--ml-count, 6) * 5s) linear infinite;
	}
	.ml-supporters.is-animated:hover .ml-supporters__track,
	.ml-supporters.is-animated:focus-within .ml-supporters__track {
		animation-play-state: paused;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ml-supporters.is-animated .ml-supporters__viewport {
		overflow-x: auto;
	}
	.ml-supporters__track[aria-hidden="true"] {
		display: none;
	}
}

@keyframes ml-marquee {
	to { transform: translateX(-100%); }
}

.ml-supporter__inner {
	display: grid;
	place-items: center;
	align-content: center;
	gap: .35rem;
	min-width: 13rem;
	min-height: 7.5rem;
	padding: 1rem 1.5rem;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 8px 22px -16px rgba(15, 37, 71, .5);
	color: var(--wp--preset--color--navy, #0F2547) !important;
	text-decoration: none !important;
	text-align: center;
	box-sizing: border-box;
	transition: transform .2s ease;
}

a.ml-supporter__inner:hover {
	transform: translateY(-3px);
}

.ml-supporter__logo {
	max-height: 4rem;
	max-width: 10rem;
	width: auto;
	object-fit: contain;
}

.ml-supporter__name {
	font-family: var(--wp--preset--font-family--fredoka, inherit);
	font-weight: 600;
	font-size: 1.25rem;
	line-height: 1.2;
	max-width: 14rem;
}

.ml-supporter__role {
	font-size: .875rem;
	font-weight: 700;
	color: var(--wp--preset--color--lake-blue, #1E59D0);
}

/* ---------------------------------------------------------------------------
   Webcam
--------------------------------------------------------------------------- */

.ml-webcam__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 24px;
	overflow: hidden;
	background: var(--wp--preset--color--navy, #0F2547);
	box-shadow: 0 24px 50px -24px rgba(15, 37, 71, .6);
}

.ml-webcam__play {
	all: unset;
	position: absolute;
	inset: 0;
	cursor: pointer;
	display: grid;
	place-items: center;
}

.ml-webcam__play:focus-visible {
	box-shadow: inset 0 0 0 5px var(--wp--preset--color--seasonal, #FF9E3D);
}

.ml-webcam__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(1.05);
	transition: transform .6s ease;
}

.ml-webcam__play::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at center, rgba(15, 37, 71, .25), rgba(15, 37, 71, .6));
}

.ml-webcam__play:hover .ml-webcam__poster {
	transform: scale(1.03);
}

.ml-webcam__cta {
	position: relative;
	z-index: 1;
	display: grid;
	justify-items: center;
	gap: .5rem;
	color: #fff;
	text-align: center;
}

.ml-webcam__icon {
	width: 5.5rem;
	height: 5.5rem;
	border-radius: 50%;
	background: var(--wp--preset--color--seasonal, #FF9E3D);
	color: var(--wp--preset--color--navy, #0F2547);
	display: grid;
	place-items: center;
	box-shadow: 0 0 0 10px rgba(255, 255, 255, .25);
	transition: transform .2s ease, box-shadow .2s ease;
}

.ml-webcam__play:hover .ml-webcam__icon {
	transform: scale(1.06);
	box-shadow: 0 0 0 14px rgba(255, 255, 255, .25);
}

.ml-webcam__icon .ml-icon {
	width: 2.4rem;
	height: 2.4rem;
	margin-left: .3rem;
}

.ml-webcam__label {
	font-family: var(--wp--preset--font-family--fredoka, inherit);
	font-size: clamp(1.4rem, 3vw, 2rem);
	font-weight: 600;
	text-shadow: 0 2px 14px rgba(0, 0, 0, .4);
}

.ml-webcam__small {
	font-weight: 700;
	font-size: .9rem;
	opacity: .9;
}

.ml-webcam__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.ml-webcam__offline {
	position: absolute;
	inset: 0;
	display: grid;
	place-content: center;
	justify-items: center;
	gap: .5rem;
	color: #fff;
	text-align: center;
	padding: 2rem;
	font-weight: 700;
}

.ml-webcam__offline .ml-icon {
	width: 3rem;
	height: 3rem;
}

.ml-webcam__bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: .5rem 1.5rem;
	margin-top: 1rem;
	font-weight: 800;
}

.ml-webcam__bar p {
	margin: 0;
	display: flex;
	align-items: center;
	gap: .6rem;
}

.ml-webcam__note {
	margin-top: 1.25rem;
	padding: 1.2rem 1.4rem;
	border-radius: 18px;
	background: var(--wp--preset--color--seasonal-soft, #FFE7CC);
	font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Contact form
--------------------------------------------------------------------------- */

.ml-contact__form {
	display: grid;
	gap: 1.1rem;
}

.ml-contact__form p {
	margin: 0;
}

.ml-contact__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: 1.1rem;
}

.ml-field label {
	display: block;
	font-weight: 800;
	margin-bottom: .35rem;
}

.ml-field input:not([type="checkbox"]),
.ml-field select,
.ml-field textarea {
	width: 100%;
	box-sizing: border-box;
}

.ml-field--check {
	display: flex;
	gap: .7rem;
	align-items: flex-start;
}

.ml-field--check input {
	width: 1.35rem;
	height: 1.35rem;
	margin-top: .2rem;
	accent-color: var(--wp--preset--color--lake-blue, #1E59D0);
	flex-shrink: 0;
}

.ml-field--check label {
	font-weight: 600;
	margin: 0;
}

.ml-req {
	color: #b42318;
}

.ml-contact__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ml-contact__submit button {
	cursor: pointer;
	border: 0;
	font-size: 1.125rem;
}

.ml-contact__notice {
	border-radius: 16px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
	font-weight: 600;
}

.ml-contact__notice p {
	margin: 0;
}

.ml-contact__notice.is-success {
	background: #e3f6ea;
	color: #0f5132;
}

.ml-contact__notice.is-error {
	background: #fde8e6;
	color: #8a1c12;
}

/* In the editor, previews are not clickable. */
.mudlarks-ssr {
	pointer-events: none;
}
