/*
 * App-mockup -- opmaak voor het shortcode [zuuvr_app]
 * (zie inc/shortcode-app-mockup.php).
 *
 * Alles staat onder .zvapp zodat er niets botst met de thema- of
 * Elementor-stijlen. De widget heeft bewust geen eigen achtergrond: die komt
 * van de Elementor-sectie eronder.
 *
 * De schakelaars (verlichting, verwarming, filtratie) zijn de enige
 * bedienbare elementen; koptekst en tabbalk zijn decor.
 */

.zvapp {
	/* Blauwzwarte neutralen: dezelfde familie als het accent, nooit vlak grijs. */
	--zv-screen: #0a0f16;
	--zv-card: #141c26;
	--zv-line: rgba(255, 255, 255, 0.07);
	--zv-text: #ffffff;
	--zv-muted: #8593a3;
	--zv-faint: #5c6b7b;

	/* Kleur per rol, niet als versiering. */
	--zv-cyan: #4cb9e8;   /* meetwaarden: watertemperatuur, verbruik vandaag */
	--zv-amber: #f5a524;  /* actuator AAN: verlichting, verwarming */
	--zv-blue: #2f8fe8;   /* filtratie draait */
	--zv-mint: #6fca9a;   /* besparing */
	--zv-warm: #ffc46b;   /* gloeilamp */
	--zv-off: #38424e;
	--zv-switch-off: #46525f;  /* schakelaar UIT: lichter dan --zv-off, anders valt hij weg op de kaart */

	--zv-r: 22px;
	--zv-dur: 0.35s;
	--zv-ease: cubic-bezier(0.16, 1, 0.3, 1);

	display: flex;
	justify-content: center;
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.zvapp *,
.zvapp *::before,
.zvapp *::after { box-sizing: border-box; }

.zvapp p { margin: 0; }

.zvapp button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.zvapp button:focus-visible {
	outline: 2px solid var(--zv-cyan);
	outline-offset: 3px;
	border-radius: 8px;
}

/* ------------------------------------------------------------- toestel --- */

.zvapp__stage { position: relative; flex: none; }

.zvapp__phone {
	position: relative;
	width: 320px;
	height: 694px;
	padding: 9px;
	background: linear-gradient(160deg, #222c37, #0d131a 42%, #10171f);
	border-radius: 48px;
	box-shadow: 0 26px 60px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.zvapp__island {
	position: absolute;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	width: 86px;
	height: 25px;
	background: #000;
	border-radius: 13px;
	z-index: 5;
}

.zvapp__screen {
	position: relative;
	height: 100%;
	display: flex;
	flex-direction: column;
	background:
		radial-gradient(120% 46% at 50% 0%, #12202c 0%, rgba(10, 15, 22, 0) 62%),
		var(--zv-screen);
	border-radius: 40px;
	overflow: hidden;
}

/* ----------------------------------------------------------- statusbalk --- */

.zvapp__statusbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 2px;
	color: var(--zv-text);
}

.zvapp__time {
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.zvapp__sysicons {
	display: flex;
	align-items: center;
	gap: 5px;
	color: var(--zv-text);
}

/* --------------------------------------------------------------- header --- */

.zvapp__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px 10px;
	color: var(--zv-text);
}

.zvapp__pool {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
}

.zvapp__pool svg { color: var(--zv-muted); }

/* Header en tabbalk zijn schermdecor, geen bediening: geen hover, geen klik. */
.zvapp__iconbtn {
	position: relative;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	color: var(--zv-muted);
}

.zvapp__bell-dot {
	position: absolute;
	top: 2px;
	right: 3px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--zv-cyan);
	box-shadow: 0 0 0 2px var(--zv-screen);
}

/* --------------------------------------------------------------- inhoud --- */

.zvapp__body {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
	padding: 2px 14px 6px;
}

.zvapp__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 9px;
}

.zvapp__card {
	background: var(--zv-card);
	border: 1px solid var(--zv-line);
	border-radius: var(--zv-r);
	padding: 12px 13px;
}

.zvapp__label {
	font-size: 8.5px;
	font-weight: 700;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--zv-faint);
}

/* Alle afleeswaarden op tabular-nums: cijfers springen dan niet tijdens het tellen. */
.zvapp__metric,
.zvapp__gauge-value,
.zvapp__arc-value,
.zvapp__foot,
.zvapp__filter-sub {
	font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------- poolstatuskaart --- */

.zvapp__card--status {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 13px;
}

.zvapp__statuscopy { flex: 1; min-width: 0; }

.zvapp__headline {
	margin-top: 4px;
	font-size: 19px;
	font-weight: 600;
	color: var(--zv-cyan);
	letter-spacing: -0.01em;
}

.zvapp__sub {
	margin-top: 5px;
	font-size: 9.5px;
	line-height: 1.5;
	color: var(--zv-muted);
}

.zvapp__gauge {
	position: relative;
	flex: none;
	width: 92px;
	height: 92px;
	display: grid;
	place-items: center;
}

.zvapp__gauge-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.zvapp__tick {
	stroke: rgba(255, 255, 255, 0.09);
	stroke-width: 2.4;
	stroke-linecap: round;
	transition: stroke 0.4s ease var(--d, 0ms);
}

.zvapp__tick.is-on { stroke: var(--zv-cyan); }

.zvapp__gauge-center {
	position: relative;
	text-align: center;
	line-height: 1;
}

.zvapp__gauge-value {
	display: block;
	font-size: 19px;
	font-weight: 600;
	color: var(--zv-text);
	letter-spacing: -0.02em;
}

.zvapp__gauge-label {
	display: block;
	margin-top: 4px;
	font-size: 7.5px;
	letter-spacing: 0.08em;
	color: var(--zv-faint);
}

/* ------------------------------------------------------- bedieningskaart --- */

.zvapp__cardhead {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.zvapp__state {
	margin-top: 3px;
	font-size: 13px;
	font-weight: 600;
	color: var(--zv-text);
	transition: color var(--zv-dur) var(--zv-ease);
}

.zvapp__card--lights:not(.is-on) .zvapp__state,
.zvapp__card--heat:not(.is-on) .zvapp__state { color: var(--zv-faint); }

/* schakelaars */

/* De selectors hieronder staan bewust op .zvapp .zvapp__switch en herhalen
   :hover/:focus/:active. Reden: de reset van het moederthema kleurt élke
   button op hover en focus (`[type=button]:hover, button:focus { background-color: #c36 }`)
   en `.zvapp button { background: none }` hierboven is specifieker dan een
   losse `.zvapp__switch`. Zonder deze extra klasse en toestanden verdween de
   uit-achtergrond helemaal en bleef de aan-kleur weg zolang de knop nog
   focus had -- je moest ergens anders klikken voor het geel terugkwam. */
.zvapp .zvapp__switch,
.zvapp .zvapp__switch:hover,
.zvapp .zvapp__switch:focus,
.zvapp .zvapp__switch:active {
	flex: none;
	position: relative;
	width: 34px;
	height: 20px;
	border-radius: 10px;
	background: var(--zv-switch-off);
	color: inherit;
	transition: background-color var(--zv-dur) var(--zv-ease);
}

.zvapp__knob {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
	transition: transform var(--zv-dur) var(--zv-ease);
}

.zvapp .zvapp__switch.is-on,
.zvapp .zvapp__switch.is-on:hover,
.zvapp .zvapp__switch.is-on:focus,
.zvapp .zvapp__switch.is-on:active { background: var(--zv-amber); }

.zvapp .zvapp__switch--blue.is-on,
.zvapp .zvapp__switch--blue.is-on:hover,
.zvapp .zvapp__switch--blue.is-on:focus,
.zvapp .zvapp__switch--blue.is-on:active { background: var(--zv-blue); }

.zvapp__switch.is-on .zvapp__knob { transform: translateX(14px); }

/* gloeilamp */

.zvapp__bulb {
	position: relative;
	display: grid;
	place-items: center;
	height: 74px;
	margin-top: 2px;
}

.zvapp__bulb-glow {
	position: absolute;
	width: 78px;
	height: 78px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 196, 107, 0.5), rgba(255, 170, 60, 0) 66%);
	opacity: 0;
	transition: opacity 0.5s var(--zv-ease);
}

.zvapp__card--lights.is-on .zvapp__bulb-glow {
	opacity: 1;
	animation: zvapp-breathe 3.4s ease-in-out infinite;
}

@keyframes zvapp-breathe {
	0%, 100% { opacity: 0.78; }
	50%      { opacity: 1; }
}

.zvapp__bulb-svg { position: relative; }

.zvapp__bulb-glass {
	fill: rgba(255, 255, 255, 0.05);
	stroke: var(--zv-off);
	stroke-width: 1.6;
	transition: fill 0.5s var(--zv-ease), stroke 0.5s var(--zv-ease);
}

.zvapp__bulb-fil {
	stroke: var(--zv-off);
	stroke-width: 1.6;
	stroke-linecap: round;
	fill: none;
	transition: stroke 0.5s var(--zv-ease);
}

.zvapp__bulb-base { fill: #46525f; }

.zvapp__card--lights.is-on .zvapp__bulb-glass {
	fill: rgba(255, 196, 107, 0.22);
	stroke: var(--zv-warm);
}

.zvapp__card--lights.is-on .zvapp__bulb-fil { stroke: #fff0d0; }

/* verwarming: doel-boog */

.zvapp__arc {
	position: relative;
	height: 74px;
	display: grid;
	place-items: center;
	margin-top: 2px;
}

.zvapp__arc-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.zvapp__arc-bg {
	fill: none;
	stroke: rgba(255, 255, 255, 0.08);
	stroke-width: 6;
	stroke-linecap: round;
}

.zvapp__arc-fg {
	fill: none;
	stroke: var(--zv-amber);
	stroke-width: 6;
	stroke-linecap: round;
	stroke-dasharray: 100;
	stroke-dashoffset: 100;
	transition: stroke-dashoffset 1.1s var(--zv-ease) 0.25s, stroke 0.4s var(--zv-ease);
}

/* --zv-arc-offset komt uit het shortcode: de boog volgt de ingestelde doeltemperatuur. */
.zvapp.is-live .zvapp__arc-fg { stroke-dashoffset: var(--zv-arc-offset, 32); }

.zvapp__card--heat:not(.is-on) .zvapp__arc-fg { stroke: var(--zv-off); }

.zvapp__arc-center { position: relative; text-align: center; line-height: 1.25; }

.zvapp__arc-label {
	display: block;
	font-size: 7.5px;
	letter-spacing: 0.08em;
	color: var(--zv-faint);
}

.zvapp__arc-value {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--zv-text);
	transition: color var(--zv-dur) var(--zv-ease);
}

.zvapp__card--heat:not(.is-on) .zvapp__arc-value { color: var(--zv-faint); }

.zvapp__foot {
	margin-top: 4px;
	font-size: 9px;
	color: var(--zv-muted);
	text-align: center;
}

/* -------------------------------------------------------------- metriek --- */

.zvapp__metric {
	margin-top: 5px;
	font-size: 20px;
	font-weight: 600;
	color: var(--zv-text);
	letter-spacing: -0.02em;
}

.zvapp__unit {
	font-size: 11px;
	font-weight: 500;
	color: var(--zv-muted);
	letter-spacing: 0;
}

.zvapp__delta {
	margin-top: 2px;
	font-size: 8.5px;
	color: var(--zv-faint);
}

.zvapp__chart {
	display: flex;
	align-items: flex-end;
	gap: 2.5px;
	height: 38px;
	margin-top: 9px;
}

.zvapp__bar {
	flex: 1;
	min-width: 0;
	height: var(--h);
	border-radius: 2px;
	transform: scaleY(0);
	transform-origin: bottom;
	transition: transform 0.75s var(--zv-ease) var(--d, 0ms);
}

.zvapp.is-live .zvapp__bar { transform: scaleY(1); }

.zvapp__chart--today .zvapp__bar {
	background: linear-gradient(180deg, var(--zv-cyan), rgba(76, 185, 232, 0.28));
}

.zvapp__chart--saved .zvapp__bar {
	background: linear-gradient(180deg, var(--zv-mint), rgba(111, 202, 154, 0.24));
}

/* Laatste balk is vandaag: die krijgt nadruk in plaats van in de rij te verdwijnen. */
.zvapp__bar--now { box-shadow: 0 0 8px rgba(76, 185, 232, 0.55); }

/* ------------------------------------------------------------- filtratie --- */

/* Geen kaart maar een strip: andere rol, dus andere vorm. */
.zvapp__filter {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	background: linear-gradient(90deg, rgba(47, 143, 232, 0.14), rgba(20, 28, 38, 0.6) 55%);
	border: 1px solid var(--zv-line);
	border-radius: var(--zv-r);
}

.zvapp__filter-icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 9px;
	background: var(--zv-blue);
	color: #fff;
	transition: background-color var(--zv-dur) var(--zv-ease);
}

.zvapp__filter:not(.is-on) .zvapp__filter-icon { background: var(--zv-off); }

.zvapp__filter.is-on .zvapp__filter-icon svg {
	animation: zvapp-spin 5s linear infinite;
}

@keyframes zvapp-spin { to { transform: rotate(360deg); } }

.zvapp__filter-copy { flex: 1; min-width: 0; }

.zvapp__filter-state {
	margin-top: 2px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--zv-text);
}

.zvapp__filter-sub {
	font-size: 8.5px;
	color: var(--zv-faint);
}

/* ---------------------------------------------------------------- tabbar --- */

.zvapp__tabs {
	display: flex;
	justify-content: space-between;
	gap: 2px;
	padding: 9px 12px 2px;
	border-top: 1px solid var(--zv-line);
	background: rgba(8, 12, 18, 0.86);
}

.zvapp__tab {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	color: var(--zv-faint);
}

.zvapp__tab.is-active { color: var(--zv-cyan); }

.zvapp__tab-label {
	font-size: 7.5px;
	font-weight: 500;
	letter-spacing: 0.01em;
}

.zvapp__home {
	width: 106px;
	height: 4px;
	margin: 6px auto 8px;
	border-radius: 2px;
	background: #38424e;
}

/* ----------------------------------------------------------- responsive --- */

@media (max-width: 420px) {
	.zvapp__phone { transform: scale(0.82); transform-origin: top center; }
	.zvapp__stage { margin-bottom: -125px; }
}

@media (prefers-reduced-motion: reduce) {
	.zvapp *,
	.zvapp *::before,
	.zvapp *::after {
		animation: none !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0ms !important;
	}
}
