/*
 * cjpt-site: small site-wide styles for the cjpt_* shortcodes and the few theme-independent rules that the old Divi
 * child theme carried. (The Northwell @font-face rules are added inline to this stylesheet.)
 */

/* Screen-reader-only text. */
.cjpt-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cjpt-icon {
	display: inline-block;
	width: 1em;
	height: 1em;
	vertical-align: -0.125em;
	flex: none;
}

/* The thin outline version of the header icons (phone header bar, see phone-bar.css): hidden until a bar asks for it
 * (build/site.css for the public header, member.css for the login page) and then it replaces the filled icon. */
.cjpt-icon.cjpt-icon--line {
	display: none;
	width: var(--cjpt-bar-icon, 24px);
	height: var(--cjpt-bar-icon, 24px);
	fill: none;
	stroke: currentColor;
	stroke-width: var(--cjpt-bar-stroke, 1.75);
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: 0;
}

/* [cjpt_account_link] */
.cjpt-account-link {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}

.cjpt-account-link .cjpt-icon {
	font-size: 1.15em;
}

.cjpt-account-link:hover,
.cjpt-account-link:focus-visible {
	text-decoration: underline;
}

/* Footer variant (same look as the footer's other links, teal "Login" / "My Account") */
.cjpt-account-link.cjpt-account-link--footer {
	display: inline-block;
	padding: 0;
	font-family: var(--font-accent, "Josefin Sans", Helvetica, Arial, sans-serif);
	font-size: 15px;
	font-weight: 900;
	line-height: 1.7;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-align: left;
	text-decoration: none;
	color: var(--cj-teal, #08c0d4);
}

.cjpt-account-link.cjpt-account-link--footer:hover {
	color: var(--cj-lime, #c3e800);
	text-decoration: none;
}

.cjpt-account-link.cjpt-account-link--footer:focus-visible {
	outline: 2px solid var(--cj-lime, #c3e800);
	outline-offset: 2px;
	text-decoration: none;
}

/* [cjpt_cart_link] — lime count badge like the old Divi header */
.cjpt-cart-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	color: inherit;
	text-decoration: none;
	line-height: 1;
}

.cjpt-cart-link .cjpt-icon {
	font-size: 1.3em;
}

.cjpt-cart-link__count {
	position: absolute;
	top: -0.7em;
	right: -0.85em;
	min-width: 1.55em;
	height: 1.55em;
	padding: 0 0.35em;
	box-sizing: border-box;
	border-radius: 999px;
	background: #c3e800;
	color: #262626;
	font-size: 0.68em;
	font-weight: 700;
	line-height: 1.55em;
	text-align: center;
}

.cjpt-cart-link--hide-empty .cjpt-cart-link__count[data-count="0"] {
	display: none;
}

/* [cjpt_vimeo] — responsive player (aspect ratio set inline) */
.cjpt-vimeo {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}

.cjpt-vimeo iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* CRE sample-video modal (was in Divi Theme Options > Integration > Body) */
.video-modal {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
}

.video-modal[hidden] {
	display: none !important;
}

.video-modal-content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 80%;
	max-width: 800px;
	background: #000;
	padding: 20px;
	box-sizing: border-box;
}

.video-modal iframe {
	display: block;
	width: 100%;
	height: 450px;
	border: 0;
}

@media (max-width: 767px) {
	.video-modal-content {
		width: calc(100% - 32px);
		padding: 36px 12px 12px;
	}

	.video-modal iframe {
		height: auto;
		aspect-ratio: 16 / 9;
	}
}

.close-modal {
	position: absolute;
	top: 6px;
	right: 10px;
	margin: 0;
	padding: 0 6px;
	border: 0;
	background: transparent;
	font-size: 25px;
	line-height: 1;
	color: #fff;
	cursor: pointer;
}

.close-modal:focus-visible {
	outline: 2px solid #c3e800;
	outline-offset: 2px;
}

/* Editor-only notices from cjpt_* shortcodes (shown to logged-in editors, never to visitors). */
.cjpt-editor-notice {
	display: inline-block;
	padding: 2px 6px;
	border: 1px dashed #b32d2e;
	color: #b32d2e;
	font: 12px/1.4 system-ui, sans-serif;
}

/* [mepr-custom-profile-menu] (Runner's Zone header): minimal dropdown layout outside MemberPress ReadyLaunch pages. */
.cjpt-profile-menu {
	position: relative;
	display: inline-block;
}

.cjpt-profile-menu .profile-menu__button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	text-align: left;
}

.cjpt-profile-menu .profile-menu__avatar {
	width: 2rem;
	height: 2rem;
	border-radius: 999px;
}

.cjpt-profile-menu .profile-menu__text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.cjpt-profile-menu .profile-menu__text--small {
	font-size: 0.8em;
	opacity: 0.75;
}

.cjpt-profile-menu .profile-menu__arrow_down,
.cjpt-profile-menu .profile-menu__hamburger {
	width: 20px;
	height: 20px;
}

.cjpt-profile-menu .--is-mobile {
	display: none;
}

@media (max-width: 767px) {
	.cjpt-profile-menu .--is-desktop {
		display: none;
	}

	.cjpt-profile-menu .--is-mobile {
		display: inline-flex;
	}
}

.cjpt-profile-menu .profile-menu__dropdown {
	position: absolute;
	right: 0;
	top: 100%;
	z-index: 50;
	min-width: 160px;
	padding: 6px 0;
	background: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.cjpt-profile-menu .profile-menu__dropdown-item {
	display: block;
	padding: 8px 16px;
	color: #262626;
	text-decoration: none;
	white-space: nowrap;
}

.cjpt-profile-menu .profile-menu__dropdown-item:hover,
.cjpt-profile-menu .profile-menu__dropdown-item:focus-visible {
	background: #ecf7f7;
}

/* WooCommerce checkout: links inside error notices (child theme) */
body.woocommerce-checkout .woocommerce-NoticeGroup-checkout a {
	color: #fff;
	font-weight: bold;
}

/* Bloom fly-in height fix (child theme; Bloom is a standalone plugin and stays) */
.et_bloom .et_bloom_form_container,
.et_bloom .et_bloom_form_right,
.et_bloom .et_bloom_form_header,
.et_bloom .et_bloom_form_content,
.et_bloom .et_bloom_form_container_wrapper,
.et_bloom .et_bloom_form_header .et_bloom_header_text_dark {
	height: auto !important;
}

.et_bloom .et_bloom_flyin_right {
	top: 20%;
}

/* ---------------------------------------------------------------------------------------------------------------
 * From Divi Theme Options > Custom CSS (et_divi[divi_custom_css]), which stops loading with Divi. Only the rules that
 * do not depend on Divi markup. On live before the theme switch these just repeat Divi's own copy.
 * ------------------------------------------------------------------------------------------------------------- */

/* Product pages: no gallery magnifier / lightbox trigger and no hover zoom (Hello Elementor turns both on). */
.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
	display: none !important;
}

.woocommerce div.product div.images .woocommerce-product-gallery__image {
	pointer-events: none !important;
}

/* No star ratings anywhere (product titles, loops, review form). */
.woocommerce .star-rating,
.woocommerce .comment-form-rating {
	display: none !important;
}

/* MemberPress Courses section titles (room for the accordion arrow). */
.single.mpcs-course-with-accordion #mpcs-main .mpcs-section-title {
	padding: 1em 2.5em 1em 1em;
}

.single.mpcs-sidebar-with-accordion #mpcs-sidebar .mpcs-section-title {
	padding: 1em 3em 1em 1em;
}

/* Block editor "Default" paragraph style (was in the child theme's style.css). */
.is-style-default {
	line-height: 1.7em;
}

/* Photo lightboxes (WooCommerce's and Customer Reviews' PhotoSwipe) print their hidden markup on pages where their own
   stylesheet is not loaded (inc/assets.php trims it); without it the closed viewer shows as a row of empty buttons under the
   footer. A closed viewer is never visible; an open one gets .pswp--open from the lightbox script with its stylesheet. */
.pswp:not(.pswp--open) { display: none !important; }
