/* ---------------------------------------------------------
 * Camp Checkout
 * --------------------------------------------------------- */

/* Prevent BuddyBoss page overflow rules from interfering
 * with the dedicated checkout layout.
 */
body.pmpro-checkout:has(.ww-camp-checkout-layout) #page {
	overflow-x: clip !important;
	overflow-y: visible !important;
}

/* Remove BuddyBoss sticky-header spacing on checkout. */
body.pmpro-checkout.sticky-header:has(.ww-camp-checkout-layout) .site-content {
	padding-top: 0 !important;
}


/* ---------------------------------------------------------
 * Main Layout
 * --------------------------------------------------------- */

.ww-camp-checkout-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 430px;
	gap: 2.5rem;
	align-items: start;

	width: min(1500px, calc(100% - 4rem));
	margin: 0 auto;
}

.ww-camp-checkout-layout__form,
.ww-camp-checkout-layout__sidebar {
	min-width: 0;
}

.ww-camp-checkout-layout__form {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	padding-top: 2rem;
}

.ww-camp-checkout-layout__sidebar {
	width: 430px;
}


/* ---------------------------------------------------------
 * Fixed Checkout Rail
 * --------------------------------------------------------- */

/*
 * The right rail stays fixed while the member completes
 * the form on the left.
 *
 * The grid column still reserves its space, so the fixed
 * rail does not overlap the form.
 */
.ww-camp-checkout-layout__sidebar-inner {
	position: fixed;
	top: 6.5rem;
	right: max(2rem, calc((100vw - 1500px) / 2));

	width: 430px;
	max-height: calc(100vh - 8rem);
	overflow-y: auto;

	background: transparent;
	border: 0;
	border-radius: 0;

	z-index: 20;
}

/* No sticky behavior needed now. */
.ww-camp-checkout-layout__action {
	position: static;
	display: flex;
	flex-direction: column;
	gap: 0;

	margin-top: 1.5rem;
	padding-top: 1.5rem;

	background: transparent;
	border-top: 1px solid #ddd;
}


/* ---------------------------------------------------------
 * PMPro Cards — Left Form
 * --------------------------------------------------------- */

.ww-camp-checkout-layout .pmpro_card,
.ww-camp-checkout-layout fieldset {
	margin-top: 0;
	margin-bottom: 0;
}

.ww-camp-checkout-layout__form .pmpro_card {
	width: 100%;
}

/* Logged-in Account Information stays compact. */
.ww-camp-checkout-layout__form #pmpro_user_fields .pmpro_card_content {
	padding-top: 1.25rem;
	padding-bottom: 1.25rem;
}


/* ---------------------------------------------------------
 * Membership Information — Right Rail
 * --------------------------------------------------------- */

.ww-camp-checkout-layout__sidebar .pmpro_card_title {
	padding: 0 !important;
}

.ww-camp-checkout-layout__sidebar #pmpro_pricing_fields {
	margin: 0;

	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.ww-camp-checkout-layout__sidebar #pmpro_pricing_fields .pmpro_card_content {
	padding: 0;
}


/* ---------------------------------------------------------
 * Founder Notice
 * --------------------------------------------------------- */

.ww-founder-checkout-notice {
	display: flex;
	align-items: flex-start;
	gap: 1rem;

	width: 100%;
	margin: 0;
	padding: 1rem 1.25rem;

	background: #f1f5ee;
	border: 1px solid #b9c8b2;
	border-radius: 8px;
}

.ww-founder-checkout-notice__icon {
	flex: 0 0 auto;
	margin-top: .1rem;

	font-size: 1.4rem;
	line-height: 1;
}

.ww-founder-checkout-notice__content {
	min-width: 0;
}

.ww-founder-checkout-notice__eyebrow {
	margin: 0 0 .3rem;

	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;

	opacity: .7;
}

.ww-founder-checkout-notice__text {
	margin: 0 0 .35rem;

	font-size: .95rem;
	line-height: 1.45;
}

.ww-founder-checkout-notice__date {
	margin: 0;

	font-size: .95rem;
	line-height: 1.45;
}


/* ---------------------------------------------------------
 * Order Summary
 * --------------------------------------------------------- */

.ww-checkout-summary {
	margin: 0;
	padding: 0;

	background: transparent;
	border: 0;
	border-radius: 0;
}

.ww-checkout-summary h3 {
	margin: 0 0 .8rem;
	font-size: 1.35rem;
}

.ww-checkout-summary-level {
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    color: #6c6c6c;
	margin-left: 1rem;
}

.ww-checkout-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;

	padding: .35rem 0;
}

.ww-checkout-summary__level {
	padding-bottom: .8rem;
}

.ww-checkout-summary__due {
	padding-top: .8rem;

	border-top: 1px solid rgba(0, 0, 0, .12);

	font-size: 1.05em;
}

.ww-checkout-summary__due strong:last-child {
	font-size: 1.15em;
}


/* ---------------------------------------------------------
 * Submit Button
 * --------------------------------------------------------- */

.ww-camp-checkout-layout__sidebar #pmpro_submit_span {
	display: block;
	margin: 0;
	padding: 1.25rem 1.25rem 0;
	width: 100%;

	background: transparent;	
}

.ww-camp-checkout-layout__sidebar .pmpro_btn-submit-checkout {
	display: block;
	width: 100%;
	min-height: 58px;
	margin: 0;

	padding: 1rem 1.25rem;

	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
}


/* ---------------------------------------------------------
 * Discount Button
 * --------------------------------------------------------- */

.ww-camp-checkout-layout #pmpro_discount_code_button {
	margin: 0;
	padding: .7rem 1rem;
}


/* ---------------------------------------------------------
 * Mailing Address
 * --------------------------------------------------------- */

.ww-camp-checkout-layout__form [name="street_address"],
.ww-camp-checkout-layout__form [name="mailing_address"],
.ww-camp-checkout-layout__form [name="city"],
.ww-camp-checkout-layout__form [name="state"],
.ww-camp-checkout-layout__form [name="zip_code"] {
	width: 100%;
}

/* ---------------------------------------------------------
 * Compact Mailing Address
 * --------------------------------------------------------- */

.ww-camp-checkout-layout__form .pmpro_form_fields:has(#street_address),
.ww-camp-checkout-layout__form .pmpro_form_fields:has(#mailing_address) {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 1rem;
}

/* Description spans the full row. */
.ww-camp-checkout-layout__form
.pmpro_form_fields:has(#street_address)
.pmpro_form_fields-description,
.ww-camp-checkout-layout__form
.pmpro_form_fields:has(#mailing_address)
.pmpro_form_fields-description {
	grid-column: 1 / -1;
}

/* Street address spans the full row. */
.ww-camp-checkout-layout__form #street_address_div,
.ww-camp-checkout-layout__form #mailing_address_div {
	grid-column: 1 / -1;
}

/* City / State / ZIP share the second row. */
.ww-camp-checkout-layout__form #city_div {
	grid-column: 1;
}

.ww-camp-checkout-layout__form #state_div {
	grid-column: 2;
}

.ww-camp-checkout-layout__form #zip_code_div {
	grid-column: 3;
}

.ww-camp-checkout-layout__form #street_address_div,
.ww-camp-checkout-layout__form #mailing_address_div,
.ww-camp-checkout-layout__form #city_div,
.ww-camp-checkout-layout__form #state_div,
.ww-camp-checkout-layout__form #zip_code_div {
	width: 100%;
	min-width: 0;
}

.ww-camp-checkout-layout__form #street_address,
.ww-camp-checkout-layout__form #mailing_address,
.ww-camp-checkout-layout__form #city,
.ww-camp-checkout-layout__form #state,
.ww-camp-checkout-layout__form #zip_code {
	width: 100%;
}

@media (max-width: 700px) {
	.ww-camp-checkout-layout__form .pmpro_form_fields:has(#street_address),
	.ww-camp-checkout-layout__form .pmpro_form_fields:has(#mailing_address) {
		grid-template-columns: 1fr;
	}

	.ww-camp-checkout-layout__form
	.pmpro_form_fields:has(#street_address)
	.pmpro_form_fields-description,
	.ww-camp-checkout-layout__form
	.pmpro_form_fields:has(#mailing_address)
	.pmpro_form_fields-description,
	.ww-camp-checkout-layout__form #street_address_div,
	.ww-camp-checkout-layout__form #mailing_address_div,
	.ww-camp-checkout-layout__form #city_div,
	.ww-camp-checkout-layout__form #state_div,
	.ww-camp-checkout-layout__form #zip_code_div {
		grid-column: 1;
	}
}


/* ---------------------------------------------------------
 * Error message
 * --------------------------------------------------------- */

.ww-camp-checkout-layout__form #pmpro_message,
.ww-camp-checkout-layout__form .pmpro_message,
.ww-camp-checkout-layout__form .pmpro_alert {
	width: 100%;
	margin: 0;
}

/* PMPro keeps a second message target near submit; keep it in the DOM for compatibility, but show checkout errors only in the left column. */
.ww-camp-checkout-message-mirror {
	display: none !important;
}

.ww-camp-checkout-layout__sidebar #pmpro_message_bottom {
	display: none !important;
}

/* ---------------------------------------------------------
 * Processing
 * --------------------------------------------------------- */

.ww-camp-checkout-layout__action #pmpro_processing_message {
	margin: auto;
	padding: 0 1.25rem 1.25rem;

	text-align: center;
	font-size: .95rem;
	font-weight: 600;

	animation: ww-processing-pulse 1.2s ease-in-out infinite;
}

@keyframes ww-processing-pulse {
	0%,
	100% {
		opacity: .45;
	}

	50% {
		opacity: 1;
	}
}


/* ---------------------------------------------------------
 * Pmpro Empty Captcha Slot
 * --------------------------------------------------------- */

.ww-camp-checkout-layout__sidebar .pmpro_captcha {
	margin: 0 !important;
	padding: 0 !important;
	height: 0 !important;
	min-height: 0 !important;
	overflow: visible;
}

/* ---------------------------------------------------------
 * Hide Floating reCaptcha
 * --------------------------------------------------------- */

.grecaptcha-badge {
	visibility: hidden;
}

.ww-recaptcha-disclosure {
	margin: .5rem 0 0;
	text-align: center;
	font-size: .8rem;
	opacity: .65;
}

/* ---------------------------------------------------------
 * Medium Desktop
 * --------------------------------------------------------- */

@media (max-width: 1100px) {

	.ww-camp-checkout-layout {
		grid-template-columns: minmax(0, 1fr) 350px;
		width: calc(100% - 2.5rem);
		gap: 1.75rem;
	}

	.ww-camp-checkout-layout__sidebar {
		width: 350px;
	}

	.ww-camp-checkout-layout__sidebar-inner {
		right: 1.25rem;
		width: 350px;
	}
}


/* ---------------------------------------------------------
 * Tablet / Mobile
 * --------------------------------------------------------- */

@media (max-width: 900px) {

	.ww-camp-checkout-layout {
		grid-template-columns: 1fr;

		width: min(calc(100% - 2rem), 760px);
	}

	.ww-camp-checkout-layout__form {
		order: 1;
	}

	.ww-camp-checkout-layout__sidebar {
		order: 2;
		width: 100%;
	}

	/*
	 * Return the checkout rail to normal document flow.
	 */
	.ww-camp-checkout-layout__sidebar-inner {
		position: static;

		width: 100%;
		max-height: none;
		overflow-y: visible;
	}

	.ww-founder-checkout-notice {
		width: calc(100% - 2rem);
	}
}


/* ---------------------------------------------------------
 * Small Mobile
 * --------------------------------------------------------- */

@media (max-width: 700px) {

	.ww-founder-checkout-notice {
		align-items: flex-start;
		padding: .9rem 1rem;
	}

	.ww-founder-checkout-notice__content {
		display: block;
	}

	.ww-founder-checkout-notice__eyebrow,
	.ww-founder-checkout-notice__text {
		margin-bottom: .3rem;
	}

	.ww-founder-checkout-notice__date {
		white-space: normal;
	}
}


@media (max-width: 600px) {

	.ww-camp-checkout-layout {
		width: calc(100% - 1.5rem);
		gap: 1.25rem;
	}

	.ww-founder-checkout-notice {
		width: calc(100% - 1.5rem);
	}

	.ww-checkout-summary__row {
		gap: .75rem;
	}

	.ww-camp-checkout-layout__sidebar #pmpro_submit_span {
		padding: 1.25rem 1.25rem 2.25rem;
	}
}