/*
 * Autoport – ПЦД (Препоръчителна цена от доставчик)
 * Price hierarchy: ПЦД (informational, muted) → regular (reference) → sale (strongest, theme styles untouched).
 */

/* ---------- Component ---------- */
.ap-pcd {
	--ap-pcd-fg: #6b7480;
	--ap-pcd-label: #4b5563;
	--ap-pcd-icon: #9aa1ad;
	--ap-pcd-accent: #067ecd;
	--ap-pcd-accent-soft: rgba(6, 126, 205, .12);
	--ap-pcd-icon-size: 15px;
	display: block;
	margin: 0 0 .3em;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ap-pcd-fg);
	font-size: 12px;
	font-style: normal;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: .01em;
	text-decoration: none;
	text-transform: none;
	white-space: normal;
}

.ap-pcd .ap-pcd__label {
	margin-right: .35em;
	color: var(--ap-pcd-label);
	font-weight: 600;
	letter-spacing: .06em;
}

.ap-pcd .ap-pcd__value {
	color: inherit;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* PCD amount must never inherit the theme's real-price styling (green/bold/large). */
.ap-pcd .ap-pcd__amount,
.ap-pcd .ap-pcd__amount bdi,
.ap-pcd .ap-pcd__currency {
	display: inline !important;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
	color: inherit !important;
	font: inherit !important;
	letter-spacing: inherit !important;
	text-decoration: none !important;
	vertical-align: baseline !important;
}

/* ---------- Info button ---------- */
.ap-pcd .ap-pcd__info {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--ap-pcd-icon-size);
	height: var(--ap-pcd-icon-size);
	margin: 0 0 0 .3em;
	padding: 0;
	border-radius: 50%;
	color: var(--ap-pcd-icon);
	vertical-align: -.2em;
	cursor: pointer;
	outline: 0;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	-webkit-user-select: none;
	user-select: none;
	transition: color .16s ease, transform .16s ease, background-color .16s ease, box-shadow .16s ease;
}

/* Comfortable ~30px touch target without changing the layout. */
.ap-pcd .ap-pcd__info::after {
	content: "";
	position: absolute;
	top: -7px;
	right: -7px;
	bottom: -7px;
	left: -7px;
	border-radius: 50%;
}

.ap-pcd .ap-pcd__icon {
	display: block;
	width: 100%;
	height: 100%;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2.25a9.75 9.75 0 1 0 0 19.5 9.75 9.75 0 0 0 0-19.5Zm0 1.7a8.05 8.05 0 1 1 0 16.1 8.05 8.05 0 0 1 0-16.1ZM12 6.6a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5Zm0 3.85c.5 0 .92.41.92.92v5.25a.92.92 0 1 1-1.84 0v-5.25c0-.51.41-.92.92-.92Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2.25a9.75 9.75 0 1 0 0 19.5 9.75 9.75 0 0 0 0-19.5Zm0 1.7a8.05 8.05 0 1 1 0 16.1 8.05 8.05 0 0 1 0-16.1ZM12 6.6a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5Zm0 3.85c.5 0 .92.41.92.92v5.25a.92.92 0 1 1-1.84 0v-5.25c0-.51.41-.92.92-.92Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (hover: hover) {
	.ap-pcd .ap-pcd__info:hover {
		color: var(--ap-pcd-accent);
		transform: scale(1.08);
	}
}

.ap-pcd .ap-pcd__info[aria-expanded="true"] {
	color: var(--ap-pcd-accent);
	background-color: var(--ap-pcd-accent-soft);
	box-shadow: 0 0 0 3px var(--ap-pcd-accent-soft);
	transform: scale(1.08);
}

.ap-pcd .ap-pcd__info:focus-visible {
	color: var(--ap-pcd-accent);
	outline: 2px solid var(--ap-pcd-accent);
	outline-offset: 2px;
}

/* Screen-reader only text (full meaning of the abbreviation). */
.ap-pcd .ap-pcd__sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ---------- Contexts ---------- */

/* Product page, Quick View, selected variation. */
p.price > .ap-pcd,
.summary .price > .ap-pcd,
.woocommerce-variation-price .ap-pcd {
	--ap-pcd-icon-size: 16px;
	margin-bottom: .2em;
	font-size: 13.5px;
}

/* Compact: sidebar/product widgets, header live search, sticky add-to-cart bars. */
.product_list_widget .ap-pcd,
.live-search-list .ap-pcd,
.autocomplete-suggestions .ap-pcd,
.sticky-product p.price > .ap-pcd,
.merchant-sticky-add-to-cart-wrapper .ap-pcd {
	--ap-pcd-icon-size: 13px;
	margin-bottom: 1px;
	font-size: 11px;
	line-height: 1.35;
}

/* Product cards on phones. */
@media (max-width: 575px) {
	.products .ap-pcd,
	ul.products .ap-pcd {
		--ap-pcd-icon-size: 14px;
		font-size: 11.5px;
	}

	p.price > .ap-pcd,
	.summary .price > .ap-pcd {
		font-size: 13px;
	}
}

@media (min-width: 1200px) {
	.single-product .summary p.price > .ap-pcd {
		font-size: 14px;
	}
}

@media print {
	.ap-pcd .ap-pcd__info {
		display: none;
	}
}

/* ---------- Shared tooltip (one per page, body level → never clipped) ---------- */
.ap-pcd-tip {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1000000;
	box-sizing: border-box;
	max-width: 272px;
	margin: 0;
	padding: 9px 12px 10px;
	border-radius: 10px;
	background: #131a27;
	color: #f2f4f7;
	box-shadow: 0 14px 34px -12px rgba(15, 23, 42, .6), 0 2px 8px rgba(15, 23, 42, .18);
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.45;
	letter-spacing: .005em;
	text-align: left;
	text-transform: none;
	white-space: normal;
	-webkit-font-smoothing: antialiased;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate3d(0, 4px, 0) scale(.98);
	transform-origin: var(--ap-pcd-arrow-x, 50%) 100%;
	transition: opacity .15s ease, transform .15s cubic-bezier(.2, .7, .3, 1), visibility 0s linear .15s;
}

.ap-pcd-tip[hidden] {
	display: none !important;
}

.ap-pcd-tip[data-placement="bottom"] {
	transform: translate3d(0, -4px, 0) scale(.98);
	transform-origin: var(--ap-pcd-arrow-x, 50%) 0;
}

.ap-pcd-tip.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

.ap-pcd-tip::before {
	content: "";
	position: absolute;
	bottom: -5px;
	left: var(--ap-pcd-arrow-x, 50%);
	width: 10px;
	height: 10px;
	margin-left: -5px;
	border-radius: 2px;
	background: inherit;
	transform: rotate(45deg);
}

.ap-pcd-tip[data-placement="bottom"]::before {
	top: -5px;
	bottom: auto;
}

@media (prefers-reduced-motion: reduce) {
	.ap-pcd .ap-pcd__info,
	.ap-pcd-tip {
		transition: none;
	}
}
