/**
 * PC Precision — box rate PDP (Klarna).
 */

body.single-product .pcp-product-installments:has(.pcp-bnpl-pdp) {
	margin: 0.75rem 0 1rem;
	display: block;
}

body.single-product .pcp-bnpl-pdp {
	box-sizing: border-box;
	padding: 1rem 1.15rem 0.85rem;
	border: 1px solid rgba(15, 23, 42, 0.1);
	border-radius: 12px;
	background: linear-gradient(180deg, #f8fafc 0%, #f3f4f6 100%);
	color: #0f172a;
}

body.single-product .pcp-bnpl-pdp__title {
	margin: 0 0 0.75rem;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.35;
	color: #0f172a;
}

body.single-product .pcp-bnpl-pdp__providers {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

body.single-product .pcp-bnpl-pdp__row {
	display: flex;
	align-items: stretch;
	justify-content: flex-start;
	gap: 0.75rem;
	min-height: 2rem;
	width: 100%;
}

body.single-product .pcp-bnpl-pdp__row--klarna {
	flex-direction: column;
	min-height: 0;
}

body.single-product .pcp-bnpl-pdp__klarna-card {
	position: relative;
	width: 100%;
}

body.single-product .pcp-bnpl-pdp__klarna-card-surface {
	border-radius: 12px;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, 0.08);
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
	overflow: hidden;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

body.single-product .pcp-bnpl-pdp__klarna-card.is-plans-open .pcp-bnpl-pdp__klarna-card-surface {
	border-color: rgba(255, 179, 199, 0.85);
	box-shadow: 0 4px 16px rgba(255, 179, 199, 0.25);
}

body.single-product .pcp-bnpl-pdp__klarna-trigger {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	text-align: left;
	font: inherit;
	color: inherit;
}

body.single-product .pcp-bnpl-pdp__klarna-trigger:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: -2px;
}

body.single-product .pcp-bnpl-pdp__klarna-trigger-inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-areas: 'brand copy actions';
	align-items: start;
	gap: 0.65rem 0.85rem;
	width: 100%;
	padding: 0.85rem 0.95rem;
	box-sizing: border-box;
}

body.single-product .pcp-bnpl-pdp__klarna-brand {
	grid-area: brand;
	align-self: start;
}

body.single-product .pcp-bnpl-pdp__klarna-copy {
	grid-area: copy;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 0;
}

body.single-product .pcp-bnpl-pdp__klarna-lead {
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.35;
	color: #0f172a;
}

body.single-product .pcp-bnpl-pdp__klarna-amount {
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	color: #334155;
}

body.single-product .pcp-bnpl-pdp__klarna-amount strong,
body.single-product .pcp-bnpl-pdp__klarna-amount [data-pcp-klarna-installment] {
	font-size: 1.02rem;
	font-weight: 800;
	color: #0f172a;
	letter-spacing: -0.02em;
}

body.single-product .pcp-bnpl-pdp__klarna-detail {
	font-size: 0.78rem;
	font-weight: 500;
	line-height: 1.45;
	color: #475569;
}

body.single-product .pcp-bnpl-pdp__klarna-detail--muted {
	color: #64748b;
	font-size: 0.72rem;
}

body.single-product .pcp-bnpl-pdp__klarna-actions {
	grid-area: actions;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	gap: 0.35rem;
	flex-shrink: 0;
	padding-top: 0.15rem;
}

body.single-product .pcp-bnpl-pdp__klarna-cta {
	font-size: 0.72rem;
	font-weight: 700;
	color: #be185d;
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}

body.single-product .pcp-bnpl-pdp__klarna-chevron {
	display: block;
	width: 0.55rem;
	height: 0.55rem;
	border-right: 2px solid #64748b;
	border-bottom: 2px solid #64748b;
	transform: rotate(45deg);
	transition: transform 0.22s ease;
	margin-top: 0.1rem;
}

body.single-product .pcp-bnpl-pdp__klarna-card.is-plans-open .pcp-bnpl-pdp__klarna-chevron {
	transform: rotate(-135deg);
	margin-top: 0.35rem;
}

body.single-product .pcp-bnpl-pdp__klarna-logo {
	display: block;
	height: 42px;
	width: auto;
	max-width: 128px;
	flex: 0 0 auto;
}

body.single-product .pcp-bnpl-pdp__klarna-logo--inline,
body.single-product .pcp-bnpl-pdp__klarna-logo-fallback:not([hidden]) svg {
	display: block;
	height: 42px;
	width: auto;
	max-width: 128px;
}

body.single-product .pcp-bnpl-pdp__stripe-slot {
	width: 100%;
	min-height: 0;
	padding: 0 0.95rem 0.65rem;
	box-sizing: border-box;
}

body.single-product .pcp-bnpl-pdp__klarna-card.has-stripe-messaging .pcp-bnpl-pdp__stripe-slot {
	padding-top: 0.15rem;
	margin-top: 0;
	border-top: 1px dashed rgba(15, 23, 42, 0.08);
}

body.single-product .pcp-bnpl-pdp__klarna-card:not(.has-stripe-messaging) .pcp-bnpl-pdp__stripe-slot:empty {
	display: none;
	border: 0;
	padding: 0;
	margin: 0;
}

body.single-product .pcp-bnpl-pdp__stripe-slot .wc-stripe-bnpl-product-message {
	margin: 0 !important;
	width: 100%;
	font-size: 0.75rem;
	line-height: 1.4;
}

body.single-product .pcp-bnpl-pdp__plans-backdrop {
	position: fixed;
	inset: 0;
	z-index: 99990;
	background: rgba(15, 23, 42, 0.45);
	opacity: 0;
	animation: pcp-bnpl-fade-in 0.22s ease forwards;
}

body.single-product .pcp-bnpl-pdp__plans-backdrop[hidden] {
	display: none !important;
}

body.single-product .pcp-bnpl-pdp__plans-panel {
	position: relative;
	z-index: 1;
	margin-top: 0.65rem;
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	transform: translateY(-6px);
	transition: max-height 0.32s ease, opacity 0.28s ease, transform 0.28s ease;
}

body.single-product .pcp-bnpl-pdp__plans-panel[hidden] {
	display: block !important;
	max-height: 0;
	opacity: 0;
	pointer-events: none;
}

body.single-product .pcp-bnpl-pdp__klarna-card.is-plans-open .pcp-bnpl-pdp__plans-panel {
	max-height: 520px;
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

body.single-product .pcp-bnpl-pdp__plans-panel-inner {
	padding: 0.85rem 0.95rem 0.95rem;
	border-radius: 12px;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, 0.1);
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

body.single-product .pcp-bnpl-pdp__plans-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.65rem;
}

body.single-product .pcp-bnpl-pdp__plans-title {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 800;
	color: #0f172a;
}

body.single-product .pcp-bnpl-pdp__plans-close {
	flex-shrink: 0;
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: 999px;
	background: #f1f5f9;
	color: #334155;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}

body.single-product .pcp-bnpl-pdp__plans-stripe {
	margin-bottom: 0.55rem;
	font-size: 0.75rem;
}

body.single-product .pcp-bnpl-pdp__plans-stripe[hidden] {
	display: none !important;
}

body.single-product .pcp-bnpl-pdp__plans-list {
	list-style: none;
	margin: 0 0 0.65rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

body.single-product .pcp-bnpl-pdp__plan-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.55rem 0.65rem;
	border-radius: 8px;
	background: #f8fafc;
	border: 1px solid rgba(15, 23, 42, 0.06);
}

body.single-product .pcp-bnpl-pdp__plan-label {
	font-size: 0.78rem;
	font-weight: 600;
	color: #475569;
}

body.single-product .pcp-bnpl-pdp__plan-amount {
	font-size: 0.875rem;
	font-weight: 800;
	color: #0f172a;
	white-space: nowrap;
}

body.single-product .pcp-bnpl-pdp__plans-total {
	margin: 0 0 0.55rem;
	font-size: 0.78rem;
	color: #64748b;
}

body.single-product .pcp-bnpl-pdp__plans-total strong {
	color: #0f172a;
	font-size: 0.875rem;
}

body.single-product .pcp-bnpl-pdp__plans-legal {
	margin: 0 0 0.65rem;
	font-size: 0.68rem;
	line-height: 1.45;
	color: #64748b;
}

body.single-product .pcp-bnpl-pdp__plans-done {
	display: none;
	width: 100%;
	margin: 0;
	padding: 0.65rem 1rem;
	border: 0;
	border-radius: 8px;
	background: #0f172a;
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 700;
	cursor: pointer;
}

body.single-product .pcp-bnpl-pdp__legal {
	margin: 0.75rem 0 0;
	font-size: 0.68rem;
	line-height: 1.45;
	color: #64748b;
}

body.single-product form.cart > .wc-stripe-bnpl-product-message:not(.pcp-bnpl-pdp__stripe-slot .wc-stripe-bnpl-product-message) {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	padding: 0 !important;
	margin: -1px !important;
}

body.single-product .pcp-bnpl-pdp--empty:not(:has(.pcp-bnpl-pdp__row--klarna)):not(:has([data-pcp-klarna-card])) .pcp-bnpl-pdp__providers {
	display: none;
}

@keyframes pcp-bnpl-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@media (min-width: 768px) {
	body.single-product .pcp-bnpl-pdp__klarna-logo {
		height: 46px;
		max-width: 140px;
	}

	body.single-product .pcp-bnpl-pdp__klarna-amount [data-pcp-klarna-installment] {
		font-size: 1.08rem;
	}

	body.single-product .pcp-bnpl-pdp__plans-backdrop {
		display: none !important;
	}

	body.single-product .pcp-bnpl-pdp__plans-panel {
		z-index: 2;
	}
}

@media (max-width: 767px) {
	html.pcp-bnpl-pdp-modal-open {
		overflow: hidden;
	}

	body.single-product .pcp-bnpl-pdp__plans-panel[hidden] {
		display: none !important;
	}

	body.single-product .pcp-bnpl-pdp {
		padding: 0.9rem 0.95rem 0.75rem;
	}

	body.single-product .pcp-bnpl-pdp__title {
		font-size: 0.9rem;
	}

	body.single-product .pcp-bnpl-pdp__klarna-trigger-inner {
		grid-template-columns: 1fr auto;
		grid-template-areas:
			'brand actions'
			'copy copy';
		padding: 0.75rem 0.8rem;
		gap: 0.5rem 0.65rem;
	}

	body.single-product .pcp-bnpl-pdp__stripe-slot {
		padding-left: 0.8rem;
		padding-right: 0.8rem;
	}

	body.single-product .pcp-bnpl-pdp__klarna-logo {
		height: 36px;
		max-width: 108px;
	}

	body.single-product .pcp-bnpl-pdp__klarna-actions {
		flex-direction: row;
		align-items: center;
		gap: 0.45rem;
	}

	body.single-product .pcp-bnpl-pdp__plans-panel {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 99991;
		margin: 0;
		max-height: none;
		transform: translateY(100%);
		transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
	}

	body.single-product .pcp-bnpl-pdp__klarna-card.is-plans-open .pcp-bnpl-pdp__plans-panel {
		max-height: none;
		transform: translateY(0);
	}

	body.single-product .pcp-bnpl-pdp__plans-panel-inner {
		border-radius: 16px 16px 0 0;
		padding-bottom: calc(0.95rem + env(safe-area-inset-bottom, 0px));
		max-height: min(78vh, 520px);
		overflow-y: auto;
	}

	body.single-product .pcp-bnpl-pdp__plans-done {
		display: block;
	}

	body.single-product .pcp-bnpl-pdp__plans-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
}
