/**
 * Download Buttons Component (Group 431)
 * Reusable component for App Store download buttons
 */

.download-buttons-group {
	display: flex;
	gap: 1rem;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
}

.primary-button {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	width: auto;
	height: 62px;
	flex-shrink: 0;
	display: inline-block;
	text-decoration: none;
}

/* Ratings graphic is only a link when Ratings URL is set; otherwise avoid pointer cursor. */
div.primary-button.primary-button--ratings {
	cursor: default;
}

.primary-button__img {
	height: 100%;
	width: auto;
	object-fit: contain;
	display: block;
}

/* White badge button - border is in SVG */

/* Paired strip: grid so App Store cell and upsell share one track width.
   Block grid + fit-content + auto margins (inline-grid would ignore horizontal auto margins). */
.download-buttons-group--with-upsell {
	display: grid;
	grid-auto-flow: column;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 1rem;
	justify-content: center;
	width: fit-content;
	max-width: 100%;
	margin-inline: auto;
	box-sizing: border-box;
}

.download-buttons-group--with-upsell .download-buttons-group__upsell {
	display: contents;
}

.download-buttons-group--with-upsell .primary-button.primary-button--app-store {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
	align-items: center;
}

.download-buttons-group--with-upsell .upsell-button {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

/* Teal (2-line): match badge height only; width stays intrinsic (wide copy). Not equal-width grid. */
.download-buttons-group--with-upsell:has(.upsell-button--teal-two) {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	width: auto;
	max-width: 100%;
}

.download-buttons-group--with-upsell:has(.upsell-button--teal-two) .primary-button.primary-button--app-store {
	width: auto;
	min-width: 0;
	display: inline-flex;
	justify-content: center;
	align-items: center;
}

.download-buttons-group--with-upsell:has(.upsell-button--teal-two) .upsell-button {
	width: auto;
	min-width: 0;
	flex-shrink: 0;
}

/* Desktop: layouts that insist on flex-start for the strip stay left-aligned (no auto-margin centering) */
@media (min-width: 1024px) {
	.hero-1 .hero-buttons .download-buttons-group--with-upsell,
	.hero-2__downloads .download-buttons-group--with-upsell,
	.section-image-tout__content .download-buttons-group--with-upsell {
		margin-inline: 0;
	}
}

.download-buttons-group__upsell {
	display: flex;
	flex-shrink: 0;
	justify-content: center;
	align-items: center;
	min-width: 0;
}

@media (max-width: 1023px) {
	.download-buttons-group {
		gap: 12px;
	}

	.download-buttons-group--with-upsell {
		grid-auto-flow: row;
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	/* Figma mobile App Store badge ~61.7px when stacked with upsell (not plain 50px row) */
	.download-buttons-group--with-upsell .primary-button {
		height: 61.7px;
	}

	.download-buttons-group--with-upsell .upsell-button {
		height: 61.7px;
	}

	.primary-button {
		height: 50px;
	}

	/* Teal upsell hidden on small screens; show App Store badge only at standard mobile badge height */
	.download-buttons-group--with-upsell:has(.upsell-button--teal-two) {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		justify-content: center;
		width: 100%;
		max-width: 100%;
	}

	.download-buttons-group--with-upsell:has(.upsell-button--teal-two) .upsell-button {
		display: none;
	}

	.download-buttons-group--with-upsell:has(.upsell-button--teal-two) .primary-button {
		height: 50px;
	}
}


