/* Next to the App Store badges (added by .claude/build/getapp/getapp.py): a QR code for visitors on a
   computer, who can't install an iPhone app there, and a note for Android visitors that Wingman is coming
   to Android. A script in the head gives Android browsers html.is-android. */

.wm-qr,
.wm-android {
	display: none;
}

/* A computer: a mouse or trackpad and a wide window */
@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
	.wm-qr {
		display: flex;
		align-items: center;
		gap: 1rem;
		text-align: left;
	}

	/* In the download box at the end of a page: beside the badge, after a thin line */
	.blog-cta .wm-qr {
		display: inline-flex;
		vertical-align: middle;
		margin-left: 1.75rem;
		padding-left: 1.75rem;
		border-left: 1px solid #dee2e6;
	}

	.blog-cta > a {
		display: inline-block;
		vertical-align: middle;
	}

	/* Chrome's desktop mode on an Android tablet */
	.is-android .wm-qr {
		display: none;
	}
}

.wm-qr-code {
	flex: none;
	width: 104px;
	height: 104px;
	border-radius: 12px;
}

.wm-qr-text {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.45;
}

.wm-qr-text strong {
	display: block;
	font-size: 1rem;
}

/* Homepage hero: a button in .hero-cta's row, between the badge and the video link, as tall as both
   (57.5px, the badge's white part) and with their corners. It is the small code (qr-appstore-small.svg:
   25 modules, no icon), its caption a tooltip. The hero can't grow (its content is centred in a box as tall
   as the window), so the row doesn't wrap on a computer; it fits the column in 6 languages from 1200px. */
.wm-qr-hero .wm-qr-code {
	width: 57.5px;
	height: 57.5px;
	border-radius: 10px;
}

/* In the HTML the code comes last, with the Android note, which takes a line of its own under the two
   buttons on phones: order puts it before the video link. The badge's link carries 13px on its right
   (Bootstrap's .btn: 12px of padding, a 1px border), so the code gets the same, for equal gaps (25px) */
@media (min-width: 1200px) and (hover: hover) and (pointer: fine) {
	html:not(.is-android) .hero-cta {
		flex-wrap: nowrap;
	}

	html:not(.is-android) .hero-cta .wm-qr-hero {
		order: 1;
		margin-right: 13px;
	}

	html:not(.is-android) .hero-cta .video-link {
		order: 2;
	}
}

/* 992 to 1199px: no room for a third button in the row, so the code goes beside the lead ("Fly, Record, …"),
   25px after its longest line (the gap between the buttons) and centred on its two lines; it takes no height.
   In the HTML it sits in .hero-cta, after the lead, so CSS anchor positioning places it, and the lead's box is
   as wide as its longest line, so the code follows the text in every language. Browsers without anchor
   positioning leave the code out there. */
@media (min-width: 992px) and (max-width: 1199.98px) and (hover: hover) and (pointer: fine) {
	@supports (anchor-name: --a) {
		#slider .lead {
			width: fit-content;
			anchor-name: --wm-hero-lead;
		}

		html:not(.is-android) .wm-qr-hero {
			position: absolute;
			position-anchor: --wm-hero-lead;
			left: calc(anchor(right) + 25px);
			top: calc(anchor(center) - 57.5px / 2);
		}
	}

	@supports not (anchor-name: --a) {
		.wm-qr-hero {
			display: none;
		}
	}
}

/* The homepage's video player: beside the video, level with the App Store badge under it. The block fills
   the space right of the video (less a 28px gap and a 16px margin), so it never runs off the window: the
   caption shows when it fits, the code when it fits. */
@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
	.video-modal-inner {
		position: relative;
	}

	.wm-qr-video {
		position: absolute;
		left: calc(100% + 28px);
		bottom: 0;
		width: calc((100vw - 100%) / 2 - 44px);
		container-type: inline-size;
		color: rgba(255, 255, 255, 0.82);
	}
}

.wm-qr-video strong {
	color: #fff;
}

.wm-qr-video .wm-qr-text {
	display: none;
}

@container (min-width: 290px) {
	.wm-qr-video .wm-qr-text {
		display: block;
	}
}

@container (max-width: 103.98px) {
	.wm-qr-video .wm-qr-code {
		display: none;
	}
}

.blog-cta .wm-qr-code {
	width: 96px;
	height: 96px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.06);
}

.blog-cta .wm-qr-text {
	color: #52514e;
}

.blog-cta .wm-qr-text strong {
	color: #222;
}

/* Android: a line of its own under the badge, holding a pill */
.is-android .wm-android {
	display: block;
	flex-basis: 100%;
	margin: 0.9rem 0 0;
}

.wm-android span {
	display: inline-block;
	padding: 0.4rem 0.95rem;
	border-radius: 999px;
	background: #e9ecef;
	color: #333;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.4;
}

.is-android .hero-cta .wm-android {
	margin: 0;
}

/* On the photo: dark glass, so the text stays readable over the bright sky on phones */
.hero-cta .wm-android span {
	background: rgba(0, 0, 0, 0.42);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: #fff;
}
