/* =============================================
   LaundDry — Live machine status
   Statuspagina (/live-machine-status/) en de "live"-chip over de
   hero-foto op de homepage en Self-Service.
   ============================================= */

.ld-ms {
	/* Bovenaan ruimte voor de vaste header */
	padding: calc(var(--ld-pill-top) + var(--ld-pill-h) + clamp(18px, 3vw, 40px)) clamp(20px, 5vw, 72px) clamp(64px, 7vw, 100px);
	--ld-ms-free: #2f8a55;
	--ld-ms-busy: #b7791f;
	--ld-ms-off: #8a948f;
	--ld-ms-ooo: #b4472f;
}

.ld-ms__inner {
	max-width: 1180px;
	margin: 0 auto;
}

.ld-ms__head {
	max-width: 680px;
	margin: 0 auto clamp(24px, 3vw, 36px);
	text-align: center;
}

.ld-ms__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.ld-ms__title {
	margin: 0 0 12px;
	font-family: var(--ld-font-display);
	font-size: clamp(34px, 5vw, 58px);
	font-weight: 400;
	line-height: 1.06;
	color: var(--ld-green);
}

.ld-ms__intro {
	margin: 0 auto;
	max-width: 48ch;
	font-family: var(--ld-font-body);
	font-size: clamp(15px, 1.3vw, 17px);
	line-height: 1.6;
	color: rgba(34, 48, 42, .72);
}

.ld-ms__updated {
	margin: 14px 0 0;
	font-family: var(--ld-font-body);
	font-size: 13px;
	letter-spacing: .4px;
	color: rgba(34, 48, 42, .55);
}

/* --- Samenvatting --- */
.ld-ms__summary {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	max-width: 720px;
	margin: 0 auto clamp(30px, 4vw, 48px);
}

.ld-ms__tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 22px 18px 20px;
	border-radius: 15px;
	background: var(--ld-green);
	color: var(--ld-bg);
	text-align: center;
}

.ld-ms__tile.is-busy {
	background: #6b5a2e;
}

.ld-ms__tile-num {
	font-family: var(--ld-font-display);
	font-size: clamp(40px, 5vw, 58px);
	line-height: 1;
}

.ld-ms__tile-num small {
	font-size: .45em;
	color: var(--ld-accent);
}

.ld-ms__tile-label {
	font-family: var(--ld-font-body);
	font-size: 14.5px;
	color: rgba(236, 235, 232, .82);
}

.ld-ms__tile-next {
	font-family: var(--ld-font-body);
	font-size: 13px;
	color: rgba(236, 235, 232, .7);
}

/* --- Groepen en kaarten --- */
.ld-ms__group + .ld-ms__group {
	margin-top: clamp(30px, 4vw, 44px);
}

.ld-ms__group-title {
	margin: 0 0 14px;
	font-family: var(--ld-font-display);
	font-size: clamp(24px, 2.6vw, 32px);
	font-weight: 400;
	color: var(--ld-green);
}

.ld-ms__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ld-ms__card {
	--ld-ms-c: var(--ld-ms-free);
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	grid-template-areas: "icon name" "icon state";
	align-items: center;
	gap: 2px 14px;
	margin: 0;
	padding: 16px 18px;
	border-radius: 15px;
	background: rgba(255, 255, 255, .6);
	border: 1px solid rgba(24, 65, 39, .1);
	box-shadow: inset 4px 0 0 var(--ld-ms-c);
}

.ld-ms__card.is-in-use       { --ld-ms-c: var(--ld-ms-busy); }
.ld-ms__card.is-offline      { --ld-ms-c: var(--ld-ms-off); }
.ld-ms__card.is-out-of-order { --ld-ms-c: var(--ld-ms-ooo); }

.ld-ms__icon {
	grid-area: icon;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: rgba(24, 65, 39, .07);
	color: var(--ld-green);
}

.ld-ms__icon svg {
	width: 24px;
	height: 24px;
}

.ld-ms__name {
	grid-area: name;
	font-family: var(--ld-font-display);
	font-size: 18px;
	line-height: 1.2;
	color: var(--ld-green);
}

.ld-ms__kg {
	margin-left: 6px;
	font-family: var(--ld-font-body);
	font-size: 13px;
	color: rgba(34, 48, 42, .55);
}

.ld-ms__state {
	grid-area: state;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: var(--ld-font-body);
	font-size: 14px;
	color: var(--ld-ms-c);
}

.ld-ms__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ld-ms-c);
}

.ld-ms__card.is-available .ld-ms__dot {
	box-shadow: 0 0 0 0 rgba(47, 138, 85, .45);
	animation: ld-ms-pulse 2.4s infinite;
}

@keyframes ld-ms-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(47, 138, 85, .45); }
	70%  { box-shadow: 0 0 0 7px rgba(47, 138, 85, 0); }
	100% { box-shadow: 0 0 0 0 rgba(47, 138, 85, 0); }
}

/* --- Reserve: BubblePay's eigen overzicht --- */
.ld-ms__fallback {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
}

.ld-ms__fallback[hidden] {
	display: none;
}

.ld-ms__fallback-text {
	max-width: 52ch;
	margin: 0;
	font-family: var(--ld-font-body);
	font-size: 15px;
	line-height: 1.6;
	color: rgba(34, 48, 42, .72);
}

.ld-ms__frame {
	width: 100%;
	max-width: 900px;
	height: 900px;
	border: 1px solid rgba(24, 65, 39, .12);
	border-radius: 15px;
	background: #fff;
}

.ld-ms__help {
	margin-top: clamp(40px, 5vw, 64px);
}

/* --- "Live"-chip over de hero-foto --- */
.ld-hero__live {
	position: absolute;
	left: 16px;
	bottom: 16px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: calc(100% - 32px);
	padding: 9px 14px;
	border-radius: 12px;
	background: linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .55));
	border: 1px solid rgba(255, 255, 255, .7);
	box-shadow: 0 6px 20px rgba(34, 48, 42, .18), inset 0 1px 0 rgba(255, 255, 255, .9);
	backdrop-filter: blur(18px) saturate(180%);
	-webkit-backdrop-filter: blur(18px) saturate(180%);
	font-family: var(--ld-font-body);
	font-size: 13px;
	line-height: 1.2;
	color: var(--ld-ink);
	text-decoration: none;
	white-space: nowrap;
	transition: transform .2s var(--ld-ease);
}

.ld-hero__live[hidden] {
	display: none;
}

.ld-hero__live:hover,
.ld-hero__live:focus-visible {
	transform: translateY(-1px);
	color: var(--ld-green);
}

.ld-hero__live-arrow {
	color: var(--ld-green);
}

/* --- Tablet en mobiel --- */
@media (max-width: 600px) {
	.ld-ms__summary {
		gap: 10px;
	}

	.ld-ms__tile {
		padding: 18px 12px 16px;
	}

	/* Twee smalle kaarten naast elkaar, zonder icoon */
	.ld-ms__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.ld-ms__card {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "name" "state";
		gap: 4px;
		padding: 12px 12px 12px 16px;
	}

	.ld-ms__icon {
		display: none;
	}

	.ld-ms__name {
		font-size: 16px;
	}

	.ld-ms__kg {
		display: block;
		margin: 2px 0 0;
		font-size: 12px;
	}

	.ld-ms__state {
		align-items: flex-start;
		font-size: 13px;
		line-height: 1.3;
	}

	.ld-ms__dot {
		flex: none;
		margin-top: 4px;
	}

	.ld-ms__frame {
		height: 760px;
	}

	.ld-hero__live {
		left: 10px;
		bottom: 10px;
		font-size: 12px;
		padding: 8px 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ld-ms__card.is-available .ld-ms__dot {
		animation: none;
	}
}
