/* Android App Promo. Hidden everywhere unless <html> has "aap-android". */

.aap-card,
.aap-bar,
.aap-pop { display: none !important; }

html.aap-android .aap-card { display: flex !important; }
html.aap-android .aap-bar:not([hidden]) { display: flex !important; }
html.aap-android .aap-pop:not([hidden]) { display: block !important; }

html.aap-lock,
html.aap-lock body { overflow: hidden !important; }

.aap-card,
.aap-bar,
.aap-pop,
.aap-card *,
.aap-bar *,
.aap-pop * { box-sizing: border-box; }

.aap-card p,
.aap-bar p,
.aap-pop p {
	margin: 0;
	padding: 0;
	text-transform: none;
	letter-spacing: normal;
}

/* Button shared by all three */
.aap-card a.aap-btn,
.aap-bar a.aap-btn,
.aap-pop a.aap-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	border: 0;
	border-radius: 12px;
	background: var(--aap-color, #477746);
	color: var(--aap-on-color, #fff);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	white-space: nowrap;
	box-shadow: none;
	cursor: pointer;
}
.aap-card a.aap-btn:hover,
.aap-bar a.aap-btn:hover,
.aap-pop a.aap-btn:hover { filter: brightness(0.92); color: var(--aap-on-color, #fff); }

.aap-card a.aap-btn:focus-visible,
.aap-bar a.aap-btn:focus-visible,
.aap-pop a.aap-btn:focus-visible,
.aap-x:focus-visible,
.aap-pop__later:focus-visible {
	outline: 3px solid var(--aap-color, #477746);
	outline-offset: 2px;
}

/* Close (X) button */
.aap-bar button.aap-x,
.aap-pop button.aap-x {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #5b6470;
	box-shadow: none;
	cursor: pointer;
}
.aap-bar button.aap-x:hover,
.aap-pop button.aap-x:hover { background: #f1f3f4; color: #111; }
.aap-x svg { display: block; }

/* ---------------------------------------------------------------------------
   Card after the recipe
   ------------------------------------------------------------------------ */

.aap-card {
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	margin: 32px 0;
	padding: 18px;
	border-radius: 16px;
	background: #f4f6f3;
	border: 1px solid #e1e6df;
	font-family: inherit;
	color: #1f2421;
}

.aap-card img.aap-card__icon {
	flex: none;
	width: 56px;
	height: 56px;
	margin: 0;
	border-radius: 14px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.aap-card__body { flex: 1 1 180px; min-width: 0; }

.aap-card p.aap-card__title {
	font-size: 18px;
	font-weight: 800;
	line-height: 1.25;
	color: #1f2421;
}

.aap-card p.aap-card__text {
	margin-top: 3px;
	font-size: 15px;
	line-height: 1.45;
	color: #4a524c;
}

.aap-card a.aap-card__btn { flex: 1 1 100%; }

@media (min-width: 560px) {
	.aap-card a.aap-card__btn { flex: none; }
}

/* ---------------------------------------------------------------------------
   Bottom bar
   ------------------------------------------------------------------------ */

.aap-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99990;
	align-items: center;
	gap: 10px;
	padding: 10px 6px 10px 12px;
	padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
	background: #fff;
	border-top: 1px solid #e3e6e8;
	box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
	font-family: inherit;
	transform: translateY(110%);
	transition: transform 0.25s ease-out;
}
.aap-bar.is-in { transform: translateY(0); }

.aap-bar img.aap-bar__icon {
	flex: none;
	width: 44px;
	height: 44px;
	margin: 0;
	border-radius: 11px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.aap-bar__body { flex: 1; min-width: 0; }

.aap-bar p.aap-bar__title {
	font-size: 15px;
	font-weight: 800;
	line-height: 1.25;
	color: #1f2421;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.aap-bar p.aap-bar__text {
	margin-top: 1px;
	font-size: 13px;
	line-height: 1.3;
	color: #5b6470;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.aap-bar a.aap-bar__btn { flex: none; padding: 10px 14px; font-size: 14px; }

body.aap-bar-on { padding-bottom: 78px; }

/* ---------------------------------------------------------------------------
   Popup: a sheet that slides up from the bottom on phones, a centered card on tablets
   ------------------------------------------------------------------------ */

.aap-pop {
	position: fixed;
	inset: 0;
	z-index: 99999;
	font-family: inherit;
}

.aap-pop__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 20, 18, 0.55);
	opacity: 0;
	transition: opacity 0.2s ease-out;
}
.aap-pop.is-in .aap-pop__backdrop { opacity: 1; }

.aap-pop__sheet {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	max-height: 92vh;
	overflow-y: auto;
	padding: 26px 20px 16px;
	padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	border-radius: 22px 22px 0 0;
	background: #fff;
	color: #1f2421;
	box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
	transform: translateY(100%);
	transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
	outline: none;
}
.aap-pop.is-in .aap-pop__sheet { transform: translateY(0); }

.aap-pop button.aap-pop__close {
	position: absolute;
	top: 8px;
	right: 8px;
}

.aap-pop__app {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-right: 40px;
}

.aap-pop img.aap-pop__icon {
	flex: none;
	width: 64px;
	height: 64px;
	margin: 0;
	border-radius: 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.aap-pop p.aap-pop__name {
	font-size: 16px;
	font-weight: 800;
	line-height: 1.25;
	color: #1f2421;
}

.aap-pop p.aap-pop__store {
	margin-top: 2px;
	font-size: 14px;
	line-height: 1.3;
	color: #5b6470;
}

.aap-pop p.aap-pop__title {
	margin-top: 20px;
	font-size: 23px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: #1f2421;
}

.aap-pop p.aap-pop__text {
	margin-top: 8px;
	font-size: 16px;
	line-height: 1.45;
	color: #4a524c;
}

.aap-pop ul.aap-pop__points {
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.aap-pop ul.aap-pop__points li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 10px;
	padding: 0;
	font-size: 16px;
	line-height: 1.4;
	color: #1f2421;
	list-style: none;
}
.aap-pop ul.aap-pop__points li::before,
.aap-pop ul.aap-pop__points li::marker { content: none; }

.aap-pop ul.aap-pop__points svg {
	flex: none;
	margin-top: 1px;
	color: var(--aap-color, #477746);
}

.aap-pop a.aap-pop__btn {
	display: flex;
	width: 100%;
	min-height: 52px;
	margin-top: 18px;
	font-size: 17px;
	border-radius: 14px;
}

.aap-pop button.aap-pop__later {
	display: block;
	width: 100%;
	min-height: 44px;
	margin: 6px 0 0;
	padding: 10px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: #4a524c;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
}
.aap-pop button.aap-pop__later:hover { background: #f1f3f4; color: #1f2421; }

@media (min-width: 600px) {
	.aap-pop__sheet {
		left: 50%;
		right: auto;
		bottom: auto;
		top: 50%;
		width: 420px;
		border-radius: 22px;
		padding: 28px 24px 18px;
		transform: translate(-50%, -45%);
		opacity: 0;
		transition: transform 0.25s ease-out, opacity 0.2s ease-out;
	}
	.aap-pop.is-in .aap-pop__sheet { transform: translate(-50%, -50%); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.aap-bar,
	.aap-pop__sheet,
	.aap-pop__backdrop { transition: none; }
}
