/* =========================================================
   "Get HertsPartners" -- the native-app invitation.
   Loaded only while it is switched on (inc/app-download.php).

   Every colour comes from the site's own tokens, which dark mode
   (html.hp-experience-dark) redefines as a set -- so the panel and its text
   always flip together. The old PWA prompt hardcoded a white panel while its
   text followed dark mode, which is how it ended up white-on-white.
   ========================================================= */

.hp-app-download {
	position: fixed;
	z-index: 99991;
	right: max(var(--hp-space-4), env(safe-area-inset-right));
	/* Just above the mobile tab bar -- the shared clearance, see navigation.css. */
	bottom: var(--hp-tabbar-clearance, calc(1rem + env(safe-area-inset-bottom)));
	left: max(var(--hp-space-4), env(safe-area-inset-left));
	max-width: 30rem;
	margin-inline: auto;
	padding: var(--hp-space-4);
	padding-top: var(--hp-space-5, 1.25rem);
	color: var(--hp-color-ink);
	background:
		linear-gradient(var(--hp-color-surface, #fff), var(--hp-color-surface, #fff)) padding-box,
		linear-gradient(135deg, #7c3aed, #c026d3) border-box;
	border: 2px solid transparent;
	border-radius: var(--hp-radius-lg, 20px);
	box-shadow: 0 22px 60px rgba(46, 16, 101, 0.28);
	animation: hp-app-download-in 260ms ease-out both;
}

.hp-app-download__head {
	display: flex;
	align-items: center;
	gap: var(--hp-space-3);
	padding-right: 2rem;
}

.hp-app-download__mark {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.hp-app-download__eyebrow {
	margin: 0 0 2px;
	color: var(--hp-color-link, #6d28d9);
	font: 800 0.72rem/1.2 var(--hp-font-body);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hp-app-download__title {
	margin: 0;
	color: var(--hp-color-ink);
	font: 700 1.02rem/1.35 var(--hp-font-heading);
}

.hp-app-download__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--hp-space-2);
	margin-top: var(--hp-space-4);
}

.hp-app-download__store {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	min-height: 48px;
	padding: 0.55rem 1.1rem;
	color: var(--hp-color-ink);
	background: var(--hp-color-surface-muted, #f1ecff);
	border: 1px solid var(--hp-color-border, #ececec);
	border-radius: 14px;
	text-decoration: none;
}

.hp-app-download__store strong {
	font: 800 0.95rem/1.15 var(--hp-font-body);
}

.hp-app-download__store span {
	color: var(--hp-color-body);
	font-size: 0.75rem;
}

/* Scoped to the sheet and its visited/hover states so the site's own link
   colours (which are more specific than a bare class) can never turn the
   label dark on the violet button. */
.hp-app-download a.hp-app-download__store--primary,
.hp-app-download a.hp-app-download__store--primary:visited,
.hp-app-download a.hp-app-download__store--primary:hover {
	color: #fff;
	background: linear-gradient(135deg, #7c3aed, #6d28d9);
	border-color: transparent;
}

.hp-app-download a.hp-app-download__store--primary strong {
	color: #fff;
}

.hp-app-download a.hp-app-download__store--primary span {
	color: rgba(255, 255, 255, 0.88);
}

.hp-app-download a.hp-app-download__store,
.hp-app-download a.hp-app-download__store:visited {
	text-decoration: none;
}

.hp-app-download__later {
	min-height: 44px;
	padding: 0.55rem 0.9rem;
	color: var(--hp-color-link, #6d28d9);
	background: transparent;
	border: 0;
	font: 700 0.9rem/1 var(--hp-font-body);
	cursor: pointer;
}

.hp-app-download__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 44px;
	height: 44px;
	color: var(--hp-color-body);
	background: transparent;
	border: 0;
	border-radius: 50%;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}

.hp-app-download a:focus-visible,
.hp-app-download button:focus-visible {
	outline: 3px solid var(--hp-color-primary-400, #a78bfa);
	outline-offset: 3px;
}

@media (min-width: 1025px) {
	.hp-app-download {
		right: max(var(--hp-space-6), env(safe-area-inset-right));
		bottom: max(var(--hp-space-6), env(safe-area-inset-bottom));
		left: auto;
		margin: 0;
	}
}

@keyframes hp-app-download-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.hp-app-download { animation: none; }
}

/* Stevenage invitation: the approved S and palette, a compact non-blocking sheet. */
.hp-app-download--stevenage {max-width:27rem;color:var(--st-text,#081c35);background:linear-gradient(var(--st-panel,#fff),var(--st-panel,#fff)) padding-box,linear-gradient(120deg,#cffa64,#b8c5ff,#ffad8d) border-box;box-shadow:0 18px 60px #081c3533;border-radius:24px;}
.hp-app-download--stevenage .hp-app-download__mark {width:48px;height:48px;border-radius:13px;}
.hp-app-download--stevenage .hp-app-download__head {align-items:flex-start;gap:14px;}
.hp-app-download--stevenage .hp-app-download__eyebrow {color:var(--st-link,#1741e8);font-size:11px;}
.hp-app-download--stevenage .hp-app-download__title {color:var(--st-text,#081c35);font-size:20px;letter-spacing:-.5px;}
.hp-app-download--stevenage .hp-app-download__detail {color:var(--st-muted,#526278);font-size:13px;line-height:1.5;margin:7px 0 0;}
.hp-app-download--stevenage .hp-app-download__store {color:var(--st-text,#081c35);background:var(--st-soft,#eef1ff);border-color:var(--st-line,#d8dfef);font-size:12px;}
.hp-app-download--stevenage .hp-app-download__store--primary {background:#173bec!important;}
.hp-app-download--stevenage :is(.hp-app-download__later,.hp-app-download__close) {color:var(--st-text,#081c35);}
.hp-app-download--stevenage .hp-app-download__actions {gap:8px;margin-top:16px;}
@media(max-width:420px){.hp-app-download--stevenage{padding:18px;left:12px;right:12px}.hp-app-download--stevenage .hp-app-download__title{font-size:18px}.hp-app-download--stevenage .hp-app-download__store{flex:1;padding:10px;font-size:11px}.hp-app-download--stevenage .hp-app-download__later{width:100%;padding:8px;min-height:36px}}

/* Always available beneath the advert on phones; no animation or overlay. */
.st-home-store-links{display:none;}
@media(max-width:767px){
 .st-home-store-links{display:flex;align-items:center;justify-content:center;gap:8px;max-width:100%;min-height:60px;padding:0 12px 4px;box-sizing:border-box;}
 .st-home-store-links a{display:flex;align-items:center;justify-content:center;min-height:48px;flex:0 1 auto;border:0;background:transparent;border-radius:7px;text-decoration:none;}
 .st-home-store-links img{display:block;object-fit:contain;max-width:100%;}
 .st-home-store-links__apple{width:120px;}
 .st-home-store-links__google{width:135px;}
 .st-home-store-links a:focus-visible{outline:3px solid var(--hp-primary,#123ce9);outline-offset:3px;}
}
@media(display-mode:standalone){.st-home-store-links{display:none;}}

/* Clean permanent store badges: transparent row and equal touch targets. */
.st-home-store-links{background:transparent!important;border:0;box-shadow:none;}
@media(max-width:767px){
 .st-home-store-links a{box-sizing:border-box;flex:0 0 136px;width:136px;height:48px;min-height:48px;padding:0;background:transparent!important;border:0;box-shadow:none;}
 .st-home-store-links__apple img{width:120px;height:40px;}
 .st-home-store-links__google img{width:154px;height:59.6px;max-width:none;flex-shrink:0;}
}
