/**
 * Markup added by inc/block-theme/behaviours.php and assets/js/site-interactions.js.
 *
 * Block layouts set display on most elements, so hidden states need the attribute selector.
 */

[data-download-page] [hidden],
[data-download-cta] [hidden],
[data-account-button][hidden] {
	display: none !important;
}

/* On phones the script turns the header button into an inline-block store badge; top alignment
   keeps the line box from adding descender space under it. */
[data-download-button] {
	vertical-align: top;
}

/* Download CTA on phones: a large badge for the visitor's store replaces the desktop button. */
.beeper-download-cta-badge {
	display: inline-block;
	line-height: 0;
	transition: opacity 0.2s, transform 0.2s;
}

.beeper-download-cta-badge:hover {
	opacity: 0.9;
	transform: translateY(-2px);
}

.beeper-download-cta-badge img {
	width: auto;
	height: 60px;
}

@media (max-width: 640px) {
	.beeper-download-cta-badge img {
		height: 54px;
	}
}

/* On phones the script hides the desktop button; its empty row would still take a gap. */
[data-download-cta] .wp-block-buttons:has([data-download-cta-primary][hidden]) {
	display: none;
}

/* The home page keeps production's wider spacing around the phone badges as well. */
.beeper-download-cta-spacious:has(> .beeper-download-cta-badge:not([hidden])) {
	padding-top: 62px;
	padding-bottom: 50px !important;
}

/* The script shows the store cards with display: inline-flex, which would lay out their QR popover. */
[data-download-cta-mobile-option]:not([hidden]) {
	display: block !important;
}

/* The script shows these with inline display values that would undo their block layout. */
[data-download-page-subtitle].has-text-align-center {
	justify-content: center;
}

[data-download-mobile-section]:not([hidden]) {
	display: flex !important;
}

/* Download page: the automatic-download notice and the other platforms. */
.beeper-download-auto-message {
	margin-block-start: var(--wp--preset--spacing--40);
	text-align: center;
}

.beeper-download-autoText {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.beeper-download-inlineLink {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}

.beeper-download-alternatives {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	color: var(--wp--preset--color--muted);
}

/* Under the phone badges the list wraps at production's 400px, which the column's centring and the
   screenshot below it depend on. */
.wp-block-group > .beeper-download-alternatives {
	max-width: 400px;
}

/* The download page's left column follows production: the list of other platforms sits a set
   distance below the phone badges, and the column has no bottom padding, so its content centres
   the same way and a phone visitor, whose badges are hidden, gets no empty space under the list. */
[data-download-page] .wp-block-group.is-style-download-columns > .wp-block-group:first-child {
	row-gap: 3rem;
	padding-bottom: 0;
}

@media (max-width: 1440px) {
	[data-download-page] .wp-block-group.is-style-download-columns > .wp-block-group:first-child {
		row-gap: 2rem;
	}
}

@media (max-width: 1024px) {
	[data-download-page] .wp-block-group.is-style-download-columns > .wp-block-group:first-child {
		padding-bottom: 28px;
	}
}

@media (max-width: 640px) {
	[data-download-page] .wp-block-group.is-style-download-columns > .wp-block-group:first-child {
		row-gap: 1.5rem;
		padding-bottom: 0;
	}

	/* Production's phone badges: 20px under the heading, 8px apart, in a 47px row. */
	[data-download-page] .wp-block-group.is-style-download-columns > .wp-block-group:first-child > .wp-block-group.beeper-download-mobile {
		gap: 20px;
	}

	[data-download-page] .beeper-download-mobile > .wp-block-group {
		gap: 8px;
		padding-bottom: 7px;
	}

	.beeper-download-alternatives {
		font-size: 0.85rem;
		line-height: 1.6;
	}
}

.beeper-download-centered-alternatives {
	margin-block-start: var(--wp--preset--spacing--60);
	text-align: center;
}

.beeper-download-centered-alternatives .beeper-download-alternatives,
.beeper-download-alternatives-label {
	margin: 0;
	font-size: var(--wp--preset--font-size--medium);
}

.beeper-download-alternatives-label {
	margin-block-end: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--muted);
}

.beeper-download-linkInline {
	font-weight: 500;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	transition: color 0.2s;
}

.beeper-download-linkInline:hover {
	color: var(--wp--preset--color--primary-hover);
	text-decoration: underline;
}

/* Plus page: a ?offer= campaign in place of the price line. */
.beeper-plus-offer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.beeper-plus-offer p {
	margin: 0;
}

.beeper-plus-offer__badge {
	padding: 8px 16px;
	border-radius: 24px;
	background: #ebaa00;
	color: #202124;
	font-size: 14px;
	font-weight: 590;
	line-height: 18px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

.beeper-plus-offer__price s {
	margin-inline-end: 8px;
	color: #808080;
}

.beeper-plus-offer__price strong {
	font-weight: 600;
}

.beeper-plus-offer__copy {
	font-size: 13px;
	line-height: 16px;
	color: var(--wp--preset--color--muted);
}

/* Plus page: the trial button's loading state while checkout opens (assets/js/plus.js). */
.beeper-plus-cta .wp-block-button__link.is-loading {
	position: relative;
	pointer-events: none;
}

.beeper-plus-cta .is-loading .beeper-plus-cta__label {
	visibility: hidden;
}

.beeper-plus-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.beeper-plus-loading span {
	width: 0.25rem;
	height: 0.25rem;
	border-radius: 50%;
	background: var(--beeper-plus-loading-color, currentColor);
	animation: beeper-plus-loading 500ms ease-in-out infinite alternate-reverse;
}

.beeper-plus-loading span:nth-child(2) {
	animation-delay: -167ms;
}

.beeper-plus-loading span:nth-child(3) {
	animation-delay: -333ms;
}

@keyframes beeper-plus-loading {
	from {
		transform: translateY(-33%);
	}

	to {
		transform: translateY(33%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.beeper-plus-loading span {
		animation: none;
	}
}
