/*
 * Email sign-up slide-in: a card in the bottom-right corner, or a sheet along the bottom of the screen on phones.
 * Every property the theme styles is set here, so the slide-in looks the same on every page.
 */
.yayy-signup {
	--yayy-signup-accent: var(--theme-palette-color-1, #ffcd05);
	--yayy-signup-accent-hover: var(--theme-palette-color-2, #f9b559);
	--yayy-signup-ink: var(--theme-palette-color-4, #0a0500);
	--yayy-signup-text: var(--theme-palette-color-3, #504e4a);
	position: fixed;
	right: 24px;
	/* --yayy-signup-lift is the height of the on-screen keyboard, set by email-signup.js. */
	bottom: calc(24px + var(--yayy-signup-lift, 0px));
	z-index: 99990;
	box-sizing: border-box;
	width: 380px;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding: 24px;
	border-radius: 14px;
	background: #fff;
	color: var(--yayy-signup-text);
	box-shadow: 0 20px 50px rgba(10, 5, 0, 0.28);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	text-align: left;
	opacity: 0;
	transform: translateX(calc(100% + 32px));
	transition: transform 0.4s ease, opacity 0.4s ease;
}

.yayy-signup.is-open {
	opacity: 1;
	transform: none;
}

.yayy-signup[hidden],
.yayy-signup [hidden] {
	display: none !important;
}

.yayy-signup *,
.yayy-signup *::before,
.yayy-signup *::after {
	box-sizing: border-box;
}

.yayy-signup .yayy-signup__close {
	position: absolute;
	top: 8px;
	right: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--yayy-signup-text);
	font-family: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.yayy-signup .yayy-signup__close:hover,
.yayy-signup .yayy-signup__close:focus-visible {
	background: #f3f2ef;
	color: var(--yayy-signup-ink);
}

.yayy-signup .yayy-signup__title {
	margin: 0 36px 6px 0;
	padding: 0;
	color: var(--yayy-signup-ink);
	font-family: inherit;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
}

.yayy-signup .yayy-signup__message {
	margin: 0 0 16px;
	padding: 0;
	color: var(--yayy-signup-text);
	font-size: 15px;
}

.yayy-signup .yayy-signup__form {
	margin: 0;
	padding: 0;
}

.yayy-signup .yayy-signup__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.yayy-signup .yayy-signup__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.yayy-signup .yayy-signup__email {
	flex: 1 1 170px;
	min-width: 0;
	height: 46px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #cfcbc4;
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
	color: var(--yayy-signup-ink);
	font-family: inherit;
	font-size: 16px; /* At least 16px, so iPhones don't zoom in on the field. */
	line-height: normal;
}

.yayy-signup .yayy-signup__email:focus {
	border-color: var(--yayy-signup-ink);
	outline: 2px solid var(--yayy-signup-accent);
	outline-offset: 0;
}

.yayy-signup .yayy-signup__submit {
	flex: 0 0 auto;
	height: 46px;
	min-height: 0;
	margin: 0;
	padding: 0 20px;
	border: 0;
	border-radius: 8px;
	background: var(--yayy-signup-accent);
	box-shadow: none;
	color: var(--yayy-signup-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
}

.yayy-signup .yayy-signup__submit:hover,
.yayy-signup .yayy-signup__submit:focus-visible {
	background: var(--yayy-signup-accent-hover);
	color: var(--yayy-signup-ink);
}

.yayy-signup .yayy-signup__submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

.yayy-signup .yayy-signup__consent {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 14px 0 0;
	color: var(--yayy-signup-text);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.45;
	cursor: pointer;
}

.yayy-signup .yayy-signup__consent input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--yayy-signup-ink);
}

.yayy-signup .yayy-signup__consent a {
	color: inherit;
	text-decoration: underline;
}

.yayy-signup .yayy-signup__trap {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.yayy-signup .yayy-signup__status {
	margin: 10px 0 0;
	color: var(--yayy-signup-text);
	font-size: 13px;
}

.yayy-signup .yayy-signup__status:empty {
	display: none;
}

.yayy-signup .yayy-signup__status.is-error {
	color: #b42318;
}

.yayy-signup .yayy-signup__done {
	margin: 4px 0 0;
	color: var(--yayy-signup-ink);
	font-size: 16px;
	font-weight: 600;
}

@media (max-width: 599px) {
	.yayy-signup {
		right: 0;
		bottom: var(--yayy-signup-lift, 0px);
		left: 0;
		width: 100%;
		max-width: none;
		max-height: 85vh;
		max-height: 85dvh;
		padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
		border-radius: 16px 16px 0 0;
		box-shadow: 0 -10px 40px rgba(10, 5, 0, 0.25);
		transform: translateY(100%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.yayy-signup {
		transition: none;
	}
}
