/* PK Checkout – legal links shared by checkout and order-pay. */
.woocommerce-terms-and-conditions-wrapper a.pk-legal-page-link,
.woocommerce-terms-and-conditions-wrapper.pk-legal-enhanced a.woocommerce-terms-and-conditions-link,
.woocommerce-terms-and-conditions-wrapper.pk-legal-enhanced a.woocommerce-privacy-policy-link {
	display: inline !important;
	position: relative !important;
	z-index: 3 !important;
	pointer-events: auto !important;
	cursor: pointer !important;
	text-decoration: underline !important;
	text-decoration-thickness: 1.5px !important;
	text-underline-offset: 3px !important;
}

.woocommerce-terms-and-conditions-wrapper.pk-legal-enhanced .woocommerce-privacy-policy-text,
.woocommerce-terms-and-conditions-wrapper.pk-legal-enhanced .woocommerce-terms-and-conditions-checkbox-text,
.woocommerce-terms-and-conditions-wrapper.pk-legal-enhanced .pk-legal-terms-row,
.woocommerce-terms-and-conditions-wrapper.pk-legal-enhanced .pk-legal-terms-label {
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

.woocommerce-terms-and-conditions-wrapper.pk-legal-enhanced .woocommerce-terms-and-conditions {
	display: none !important;
}

/* Theme-proof clickability: a theme (or an AJAX fragment refresh) must not be
   able to disable the legal link by setting pointer-events:none on any ancestor
   inside the wrapper, nor let the styled checkbox overlap and swallow the click. */
.woocommerce-terms-and-conditions-wrapper,
.woocommerce-terms-and-conditions-wrapper .pk-legal-terms-row,
.woocommerce-terms-and-conditions-wrapper .pk-terms-row,
.woocommerce-terms-and-conditions-wrapper .pk-legal-terms-label,
.woocommerce-terms-and-conditions-wrapper .pk-terms-label,
.woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text,
.woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text {
	pointer-events: auto !important;
}

.woocommerce-terms-and-conditions-wrapper a.pk-legal-page-link,
.woocommerce-terms-and-conditions-wrapper a.woocommerce-terms-and-conditions-link,
.woocommerce-terms-and-conditions-wrapper a.woocommerce-privacy-policy-link {
	position: relative !important;
	z-index: 5 !important;
	pointer-events: auto !important;
	cursor: pointer !important;
}

/* The custom checkbox is decorative-styled; keep it from covering the label text
   or the link (some themes stretch the accessible checkbox to fill its row). */
.woocommerce-terms-and-conditions-wrapper input[type="checkbox"][name="terms"] {
	position: static !important;
	z-index: 1 !important;
}

html.pk-checkout-legal-modal-open,
html.pk-checkout-legal-modal-open body {
	overflow: hidden !important;
}

.pk-checkout-legal-modal[hidden] {
	display: none !important;
}

/* Safety net: the PickUP overlay-suppression class must never hide the legal
   modal (that would leave the page locked with an invisible popup). When the
   modal is open it always wins. */
.pk-checkout-legal-modal.pk-pickup-backdrop-suppressed:not([hidden]) {
	display: block !important;
	visibility: visible !important;
}

.pk-checkout-legal-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	direction: rtl;
}

.pk-checkout-legal-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.pk-checkout-legal-modal__dialog {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(760px, calc(100% - 32px));
	max-height: min(80vh, 760px);
	background: #fff;
	border-radius: var(--pk-legal-modal-radius, 14px);
	overflow: hidden;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
}

.pk-checkout-legal-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 22px;
	border-bottom: 1px solid #e8e8e8;
	flex: 0 0 auto;
}

.pk-checkout-legal-modal__title {
	margin: 0;
	font-size: 22px;
	line-height: 1.3;
}

/* Styled through CSS variables written by the Elementor controls, so the
   base rule and the panel never race on specificity or load order.
   background-color (not the `background` shorthand) so nothing gets reset. */
.pk-checkout-legal-modal__close {
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background-color: var(--pk-legal-close-bg, transparent);
	color: var(--pk-legal-close-color, #333);
	border-radius: var(--pk-legal-close-radius, 8px);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.pk-checkout-legal-modal__close:hover {
	color: var(--pk-legal-close-color-hover, var(--pk-legal-close-color, #333));
	background-color: var(--pk-legal-close-bg-hover, var(--pk-legal-close-bg, transparent));
}

/* High specificity (0-2-1) on the contested properties so stale generated
   CSS from older versions (0-1-0 element rules) can never override them,
   regardless of file order. Values come from the CSS variables printed by
   the widget itself. */
body .pk-checkout-legal-modal .pk-checkout-legal-modal__dialog {
	border-radius: var(--pk-legal-modal-radius, 14px);
}

/* Full reset at 0-2-1 so the theme/kit global button styles
   (.elementor-kit-XX button, theme reset.css `button {}`) can never inflate
   the X: they add padding, a border, min-width and the site's button font. */
body .pk-checkout-legal-modal .pk-checkout-legal-modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	box-sizing: border-box;
	width: 32px;
	height: 32px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	outline: none;
	box-shadow: none;
	background-color: var(--pk-legal-close-bg, transparent);
	background-image: none;
	color: var(--pk-legal-close-color, #333);
	border-radius: var(--pk-legal-close-radius, 8px);
	font-family: inherit;
	font-size: 26px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	text-shadow: none;
	cursor: pointer;
	transform: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

body .pk-checkout-legal-modal .pk-checkout-legal-modal__close:hover,
body .pk-checkout-legal-modal .pk-checkout-legal-modal__close:focus,
body .pk-checkout-legal-modal .pk-checkout-legal-modal__close:active {
	border: 0;
	box-shadow: none;
	text-decoration: none;
	transform: none;
	color: var(--pk-legal-close-color-hover, var(--pk-legal-close-color, #333));
	background-color: var(--pk-legal-close-bg-hover, var(--pk-legal-close-bg, transparent));
}

body .pk-checkout-legal-modal .pk-checkout-legal-modal__close:focus-visible {
	outline: 2px solid var(--pk-legal-close-color, #333);
	outline-offset: 2px;
}

.pk-checkout-legal-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	max-height: none;
	overflow: auto;
	padding: 22px; /* uniform inner padding - equal on all four sides */
	line-height: 1.7;
}

.pk-checkout-legal-modal__body > :first-child {
	margin-top: 0;
}

/* Elementor content brings its own leading margins - pull the first block
   flush against the modal head. */
.pk-checkout-legal-modal__body .elementor {
	margin-block-start: 0 !important;
}

.pk-checkout-legal-modal__body .elementor-widget:first-child,
.pk-checkout-legal-modal__body .elementor-widget:first-child > .elementor-widget-container,
.pk-checkout-legal-modal__body .e-con:first-child,
.pk-checkout-legal-modal__body .elementor-section:first-child,
.pk-checkout-legal-modal__body h1:first-child,
.pk-checkout-legal-modal__body h2:first-child,
.pk-checkout-legal-modal__body h3:first-child {
	margin-block-start: 0 !important;
	padding-block-start: 0 !important;
}

.pk-checkout-legal-modal__body > :last-child {
	margin-bottom: 0;
}

@media (max-width: 767px) {
	.pk-checkout-legal-modal__dialog {
		width: calc(100% - 20px);
		max-height: 88vh;
	}

	.pk-checkout-legal-modal__head {
		padding: 8px 16px;
	}

	.pk-checkout-legal-modal__body {
		padding: 16px; /* uniform on mobile too */
	}
}

.pk-checkout-legal-modal__loading,
.pk-checkout-legal-modal__error {
	margin: 0;
	text-align: center;
}

.pk-checkout-legal-modal__external {
	display: table;
	margin: 16px auto 0;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- 2.0.46 (extended in 2.0.48): neutralize Elementor page padding inside the modal ---------- */
/* The terms/privacy page is built with Elementor, and its containers carry
   their own block padding (e.g. .e-con-inner { padding: 80px 0 }), which
   showed up as a large empty gap above and below the content in the modal.
   Applies to every nesting level (and to legacy sections) - inside a modal
   these page-level paddings are never wanted. Spacing between text elements
   (headings/paragraph margins, container gap) is untouched. */
.pk-checkout-legal-modal__body .e-con,
.pk-checkout-legal-modal__body .e-con-inner,
.pk-checkout-legal-modal__body .elementor-section,
.pk-checkout-legal-modal__body .elementor-container {
	padding-block-start: 0 !important;
	padding-block-end: 0 !important;
}
