/*
 * cjpt-site: Kit opt-in pop-ups and the homepage fly-in (inc/optins.php + assets/js/optins.js).
 * Recreates Bloom 1.3.12's "form right" layout as live shows it (computed styles captured 2026-09-28):
 * header (image + copy) 66% | form column 34%, stacked below 768px; square white box, 0 0 60px rgba(0,0,0,.2) shadow;
 * 30px white round close button; lime #c3e800 buttons; teal form column with a wedge (SVG) or carrot (CSS) edge.
 * Selectors are doubled up (.cjpt-optin.cjpt-optin) so Hello Elementor's reset and the Elementor kit never win.
 */

.cjpt-optin[hidden] { display: none !important; }
.cjpt-optin.cjpt-optin,
.cjpt-optin.cjpt-optin * { box-sizing: border-box; }
.cjpt-optin.cjpt-optin {
	--cjpt-optin-ease: cubic-bezier(0.77, 0, 0.175, 1);
	font-family: "Open Sans", Helvetica, Arial, Lucida, sans-serif;
	font-size: 16px;
	line-height: 1;
	letter-spacing: normal;
	text-align: left;
	color: #666666;
}

/* ------------------------------------------------------------------ box */
.cjpt-optin.cjpt-optin .cjpt-optin__box {
	position: relative;
	background: #ffffff;
	box-shadow: 0 0 60px rgba(0, 0, 0, 0.2);
	border-radius: 0;
	outline: none;
}
/* The box takes focus when a pop-up opens (tabindex=-1; the dialog is announced by its role and name): no frame. */
.cjpt-optin.cjpt-optin .cjpt-optin__box:focus,
.cjpt-optin.cjpt-optin .cjpt-optin__box:focus-visible { outline: none; }
.cjpt-optin.cjpt-optin .cjpt-optin__inner {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}
.cjpt-optin.cjpt-optin .cjpt-optin__header {
	flex: 0 0 66%;
	width: 66%;
	min-width: 0;
	padding: 15px;
	background-color: var(--cjpt-optin-header-bg, #ffffff);
}
.cjpt-optin.cjpt-optin .cjpt-optin__image {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0;
	padding: 15px;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}
.cjpt-optin.cjpt-optin .cjpt-optin__text { padding: 15px; }
.cjpt-optin.cjpt-optin .cjpt-optin__title {
	margin: 0;
	padding: 0;
	font-family: "Open Sans", Helvetica, Arial, Lucida, sans-serif;
	font-size: 24px;
	font-weight: 600;
	font-style: normal;
	line-height: 1.1em;
	letter-spacing: normal;
	text-transform: none;
	color: #36b6c5;
}
.cjpt-optin.cjpt-optin .cjpt-optin__desc {
	margin: 8.8px 0 0 0;
	padding: 0;
	font-family: "Open Sans", Helvetica, Arial, Lucida, sans-serif;
	font-size: 17.6px;
	font-weight: 400;
	line-height: 28.16px;
	letter-spacing: normal;
	color: rgba(0, 0, 0, 0.5);
}
.cjpt-optin.cjpt-optin--dark .cjpt-optin__desc { color: #ffffff; }

/* ------------------------------------------------------------------ form column + edges */
.cjpt-optin.cjpt-optin .cjpt-optin__content {
	position: relative;
	flex: 0 0 34%;
	width: 34%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 30px 30px 40px 30px;
	background-color: var(--cjpt-optin-form-bg, #36b6c5);
}
.cjpt-optin.cjpt-optin--wedge .cjpt-optin__content { padding-left: 35px; }
.cjpt-optin.cjpt-optin .cjpt-optin__wedge { position: absolute; left: -1px; top: 0; z-index: 2; display: block; overflow: hidden; }
.cjpt-optin.cjpt-optin .cjpt-optin__wedge--side { width: 20px; height: 100%; }
.cjpt-optin.cjpt-optin .cjpt-optin__wedge--top { display: none; width: calc(100% + 1px); height: 20px; }
.cjpt-optin.cjpt-optin--carrot .cjpt-optin__content::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 0;
	height: 0;
	margin-top: -10px;
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
	border-left: 10px solid var(--cjpt-optin-header-bg, #ffffff);
}

/* ------------------------------------------------------------------ Kit form */
.cjpt-optin.cjpt-optin .cjpt-optin__form { margin: 0; padding: 0; width: 100%; background: none; border: 0; }
.cjpt-optin.cjpt-optin .cjpt-optin__form [data-style] { margin: 0; padding: 0; }
.cjpt-optin.cjpt-optin .cjpt-optin__form .formkit-fields { display: flex; flex-direction: column; gap: 15px; margin: 0; padding: 0; }
.cjpt-optin.cjpt-optin .cjpt-optin__form .formkit-field { margin: 0; padding: 0; }
.cjpt-optin.cjpt-optin .cjpt-optin__form input.formkit-input {
	display: block;
	width: 100%;
	height: 39px;
	margin: 0;
	padding: 10px;
	border: 0;
	border-radius: 3px;
	box-shadow: none;
	background-color: #ffffff;
	font-family: "Open Sans", Helvetica, Arial, Lucida, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: normal;
	letter-spacing: normal;
	color: rgba(0, 0, 0, 0.5);
	transition: none;
}
.cjpt-optin.cjpt-optin .cjpt-optin__form input.formkit-input::placeholder { color: #757575; opacity: 1; }
.cjpt-optin.cjpt-optin .cjpt-optin__form input.formkit-input:focus { border: 0; outline: 2px solid rgba(255, 255, 255, 0.9); outline-offset: 1px; }
.cjpt-optin.cjpt-optin .cjpt-optin__form button.formkit-submit {
	position: relative;
	display: block;
	width: 100%;
	height: 39px;
	margin: 0;
	padding: 10px;
	border: 0;
	border-radius: 3px;
	box-shadow: none;
	background-color: #c3e800;
	font-family: "Open Sans", Helvetica, Arial, Lucida, sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 19px;
	letter-spacing: 1px;
	text-transform: none;
	text-align: center;
	white-space: nowrap;
	color: #ffffff;
	cursor: pointer;
	transition: none;
}
.cjpt-optin.cjpt-optin .cjpt-optin__form button.formkit-submit:hover,
.cjpt-optin.cjpt-optin .cjpt-optin__form button.formkit-submit:focus { background-color: #c3e800; color: #ffffff; border: 0; }
.cjpt-optin.cjpt-optin .cjpt-optin__form button.formkit-submit:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.cjpt-optin.cjpt-optin .formkit-spinner { display: none; }
.cjpt-optin.cjpt-optin button.formkit-submit[data-active] .cjpt-optin__button-text { visibility: hidden; }
.cjpt-optin.cjpt-optin button.formkit-submit[data-active] .formkit-spinner {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}
.cjpt-optin.cjpt-optin .formkit-spinner span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #ffffff;
	animation: cjpt-optin-dots 1.2s infinite ease-in-out both;
}
.cjpt-optin.cjpt-optin .formkit-spinner span:nth-child(1) { animation-delay: -0.3s; }
.cjpt-optin.cjpt-optin .formkit-spinner span:nth-child(2) { animation-delay: -0.15s; }
@keyframes cjpt-optin-dots { 0%, 80%, 100% { transform: scale(0.4); } 40% { transform: scale(1); } }

.cjpt-optin.cjpt-optin .formkit-alert-error:empty { display: none; }
.cjpt-optin.cjpt-optin .formkit-alert-error {
	margin: 0 0 15px 0;
	padding: 8px 10px;
	list-style: none;
	border-radius: 3px;
	background: #ffffff;
	font-family: "Open Sans", Helvetica, Arial, Lucida, sans-serif;
	font-size: 13px;
	line-height: 1.4;
	color: #c0392b;
}
.cjpt-optin.cjpt-optin .formkit-alert-error li { margin: 0; padding: 0; }

/* Success (Kit's message, dressed as Bloom's: green check + white speech bubble) */
.cjpt-optin.cjpt-optin .formkit-alert-success {
	position: relative;
	width: 80%;
	max-width: 300px;
	margin: 50px auto 0 auto;
	padding: 10px 10%;
	border-radius: 5px;
	background: #ffffff;
	font-family: "Open Sans", Helvetica, Arial, Lucida, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4em;
	text-align: center;
	color: #888888;
	animation: cjpt-optin-fade-in-top 1s 1 var(--cjpt-optin-ease) both;
}
.cjpt-optin.cjpt-optin .formkit-alert-success::before {
	content: "";
	position: absolute;
	left: 50%;
	top: -50px;
	width: 40px;
	height: 40px;
	margin-left: -20px;
	border-radius: 50%;
	background: #82c016 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 24px 24px no-repeat;
}
.cjpt-optin.cjpt-optin .formkit-alert-success::after {
	content: "";
	position: absolute;
	left: 50%;
	top: -5px;
	width: 0;
	height: 0;
	margin-left: -5px;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-bottom: 5px solid #ffffff;
}

/* ------------------------------------------------------------------ close button (30px white circle) */
.cjpt-optin.cjpt-optin .cjpt-optin__close {
	position: absolute;
	top: -10px;
	right: -10px;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 30px;
	background: #ffffff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.34);
	color: #666666;
	cursor: pointer;
	line-height: 1;
	transition: none;
}
.cjpt-optin.cjpt-optin .cjpt-optin__close:hover,
.cjpt-optin.cjpt-optin .cjpt-optin__close:focus { background: #ffffff; color: #666666; border: 0; }
.cjpt-optin.cjpt-optin .cjpt-optin__close:focus-visible { outline: 2px solid #36b6c5; outline-offset: 2px; }
.cjpt-optin.cjpt-optin .cjpt-optin__close svg { display: block; width: 16px; height: 16px; }

/* ------------------------------------------------------------------ pop-up (modal) */
.cjpt-optin.cjpt-optin--popup {
	position: fixed;
	inset: 0;
	z-index: 99999999;
}
.cjpt-optin.cjpt-optin--popup::before {
	content: "";
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.6);
}
.cjpt-optin.cjpt-optin--popup .cjpt-optin__scroller {
	position: fixed;
	inset: 0;
	display: flex;
	padding: 20px 0;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}
.cjpt-optin.cjpt-optin--popup .cjpt-optin__box {
	width: 80%;
	max-width: 740px;
	margin: auto;
	z-index: 1;
}
.cjpt-optin.cjpt-optin--popup .cjpt-optin__inner { overflow: visible; }
.cjpt-optin.cjpt-optin--popup.is-open::before { animation: cjpt-optin-fade-in 1s 1 var(--cjpt-optin-ease) both; }
.cjpt-optin.cjpt-optin--popup.is-open .cjpt-optin__box { animation: cjpt-optin-fade-in 1s 1 var(--cjpt-optin-ease) both; }
.cjpt-optin.cjpt-optin--popup.is-open .cjpt-optin__image { animation: cjpt-optin-fade-in-top 1s 0.5s 1 var(--cjpt-optin-ease) both; }
.cjpt-optin.cjpt-optin--popup.is-closing { animation: cjpt-optin-fade-out 0.5s 1 var(--cjpt-optin-ease) both; }

/* Kit's own overlay (ck.5.js: spam-check challenge, consent, Creator Network recommendations) is appended to <body> at
   z-index 1000002; it has to sit above an open pop-up (99999999) or the visitor cannot see or answer it. */
.formkit-overlay { z-index: 100000000 !important; }

/* Screen-reader-only live region (optins.js announces the fly-in). */
.cjpt-optin-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.cjpt-optin.cjpt-optin .formkit-alert-success:focus { outline: none; }

/* ------------------------------------------------------------------ fly-in (right side, top 20%) */
.cjpt-optin.cjpt-optin--flyin .cjpt-optin__box {
	position: fixed;
	top: 20%;
	right: 0;
	z-index: 999999;
	width: 580px;
	max-width: 90%;
}
.cjpt-optin.cjpt-optin--flyin .cjpt-optin__close { right: auto; left: -10px; }
.cjpt-optin.cjpt-optin--flyin .cjpt-optin__desc,
.cjpt-optin.cjpt-optin--flyin .cjpt-optin__form input.formkit-input,
.cjpt-optin.cjpt-optin--flyin .cjpt-optin__form button.formkit-submit {
	font-family: "Source Sans Pro", "Source Sans 3", Helvetica, Arial, Lucida, sans-serif;
}
.cjpt-optin.cjpt-optin--flyin .cjpt-optin__form input.formkit-input {
	height: 38px;
	background-color: rgba(0, 0, 0, 0.15);
	color: #ffffff;
}
.cjpt-optin.cjpt-optin--flyin .cjpt-optin__form input.formkit-input::placeholder { color: #ffffff; }
.cjpt-optin.cjpt-optin--flyin .cjpt-optin__form input.formkit-input:-webkit-autofill { -webkit-text-fill-color: #ffffff; transition: background-color 9999s; }
.cjpt-optin.cjpt-optin--flyin .cjpt-optin__form button.formkit-submit { line-height: 18px; }
.cjpt-optin.cjpt-optin--flyin.is-open .cjpt-optin__box { animation: cjpt-optin-fade-in-right 1s 1 var(--cjpt-optin-ease) both; }
.cjpt-optin.cjpt-optin--flyin.is-closing .cjpt-optin__box { animation: cjpt-optin-slide-down 0.5s 1 var(--cjpt-optin-ease) both; }

/* ------------------------------------------------------------------ phones (Bloom: max-width 767px) */
@media (max-width: 767px) {
	.cjpt-optin.cjpt-optin .cjpt-optin__inner { flex-direction: column; }
	.cjpt-optin.cjpt-optin .cjpt-optin__header,
	.cjpt-optin.cjpt-optin .cjpt-optin__content { flex: 0 0 auto; width: 100%; }
	.cjpt-optin.cjpt-optin .cjpt-optin__text { text-align: center; }
	.cjpt-optin.cjpt-optin .cjpt-optin__title { text-align: center; }
	.cjpt-optin.cjpt-optin .cjpt-optin__desc { text-align: center; }
	.cjpt-optin.cjpt-optin .cjpt-optin__content { padding: 40px 30px 40px 30px; }
	.cjpt-optin.cjpt-optin--wedge .cjpt-optin__content { padding: 30px 30px 40px 35px; }
	.cjpt-optin.cjpt-optin .cjpt-optin__form .formkit-fields { gap: 10px; }
	.cjpt-optin.cjpt-optin .cjpt-optin__wedge--side { display: none; }
	.cjpt-optin.cjpt-optin .cjpt-optin__wedge--top { display: block; }
	.cjpt-optin.cjpt-optin--carrot .cjpt-optin__content::before {
		left: 50%;
		top: 0;
		margin: 0 0 0 -20px;
		border-top: 20px solid var(--cjpt-optin-header-bg, #ffffff);
		border-bottom: 0;
		border-left: 20px solid transparent;
		border-right: 20px solid transparent;
	}
	.cjpt-optin.cjpt-optin--flyin .cjpt-optin__box { left: 10%; right: 10%; width: auto; max-width: none; }
}

/* ------------------------------------------------------------------ animations (Bloom's keyframes) */
@keyframes cjpt-optin-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cjpt-optin-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes cjpt-optin-fade-in-top { from { opacity: 0; transform: translateY(30%); } to { opacity: 1; transform: translateY(0); } }
@keyframes cjpt-optin-fade-in-right { from { opacity: 0; transform: translateX(-30%); } to { opacity: 1; transform: translateX(0); } }
@keyframes cjpt-optin-slide-down { from { transform: translateY(0); } to { transform: translateY(100vh); } }

@media (prefers-reduced-motion: reduce) {
	.cjpt-optin.cjpt-optin *,
	.cjpt-optin.cjpt-optin::before,
	.cjpt-optin.cjpt-optin.is-open .cjpt-optin__box,
	.cjpt-optin.cjpt-optin.is-closing,
	.cjpt-optin.cjpt-optin.is-closing .cjpt-optin__box { animation: none !important; }
}
