/* =====================================================================
   Progressive Discount's product page (product-page-progressive-discount.js
   draws the widgets).

   1. The plugin's progress widget — a copy of Progressive Discount 1.20.1's
      assets/css/frontend.css (without the Side Cart drawer overrides), so
      the page shows exactly what shoppers see. Copy it again when the
      plugin's widget changes.
   2. The page's own visuals (.edp-pd-*).
   ===================================================================== */

/* ----- 1. Progress widget (from the plugin) ----- */
.pd-progress-wrapper {
	margin: 0 0 1.5em;
	padding: 22px 26px 26px;
	border-radius: 16px;
	background: #ffffff;
}

/* Placeholder printed when there's nothing to show yet (see PD_Frontend::render_in_cart()). */
.pd-progress-wrapper:empty {
	display: none;
}

.pd-progress-message {
	margin: 0 0 1.2em;
	font-size: 15px;
	text-align: center;
	font-weight: 500;
}

/* "Sale items don't count" note under the bar — informative, not a warning. */
.pd-progress-note {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 6px;
	margin: 0.6em 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: #6b7280;
	text-align: left;
}

.pd-progress-note__icon {
	flex: 0 0 auto;
	margin-top: 1px;
	color: var( --pd-accent-color, #2f62a8 );
}

/* The markers row is shifted up with relative positioning, which leaves
   its original space below it; pull the note into that space. */
.pd-progress-bar__markers + .pd-progress-note {
	margin-top: -14px;
}

.pd-progress-bar {
	position: relative;
	height: 8px;
	border-radius: 999px;
	background: #e6ebf2;
	overflow: hidden;
}

.pd-progress-bar__fill {
	position: relative;
	height: 100%;
	background: var( --pd-accent-color, #2f62a8 );
	border-radius: 999px;
	overflow: hidden;
	/* No CSS transition here on purpose — frontend-progress.js owns the
	 * grow/shrink animation exclusively (via jQuery .animate()), since a
	 * CSS transition running concurrently on the same "width" property is
	 * a race hazard: the two animation systems could each
	 * think they were the one driving the value, and jQuery's .animate()
	 * additionally needs manual replay after AJAX fragment refresh replaces
	 * the whole element (a CSS transition can't animate across that anyway,
	 * since the new element has no prior state to transition from). */
}

.pd-progress-bar__fill--complete {
	background: var( --pd-accent-color-complete, #2f62a8 );
}

/* Shimmer sweep across the filled portion only — a subtle "keep going" cue,
   not a generic loading indicator. Stops once the max reward is reached
   (see the --complete override below), since there's nothing left to nudge
   the customer toward. */
.pd-progress-bar__fill::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 60%;
	background: linear-gradient( 90deg, transparent, rgba( 255, 255, 255, 0.45 ), transparent );
	animation: pd-progress-shimmer 2.2s ease-in-out infinite;
}

.pd-progress-bar__fill--complete::after {
	content: none;
}

@keyframes pd-progress-shimmer {
	0% {
		transform: translateX( -100% );
	}

	100% {
		transform: translateX( 250% );
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.pd-progress-bar__fill::after {
		animation: none;
	}
}

/* Icon + caption per reward-type step, positioned below the bar at each
   step's threshold percentage — replaces plain dot markers so a customer
   can tell shipping/discount/gift steps apart at a glance. */
.pd-progress-bar__markers {
	position: relative;
	height: 58px;
	top: -18px;
	line-height: 1;
}

/* Every marker is centered on its own position, so the icons always stay in
   threshold order. Its width (--pd-marker-slot, set inline by the template)
   is the smallest distance between two neighbouring markers, so centered
   labels can never overlap each other. */
.pd-progress-bar__marker-item {
	position: absolute;
	top: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: var( --pd-marker-slot, 34% );
	transform: translateX( -50% );
	text-align: center;
}

/* The last marker sits at the very end of the bar; draw it a little
   inside, so its icon and label aren't pressed against the card's edge.
   (The fill still runs to the end: at 100% it just passes under it.) */
.pd-progress-bar__marker-item:last-child {
	transform: translateX( calc( -50% - 12px ) );
}

/* Labels of markers at the bar's ends (is-edge-start / is-edge-end, set by
   the template when the marker's slot would cross the start or the end of
   the bar) only grow inward, so they don't overflow past the card's edges:
   as wide as their text (at most half a slot plus 25px), ending at most
   12px past the icon's outer edge — about centred under a short label,
   centred lines when a long one wraps. Every other label stays centred
   under its icon. */
.pd-progress-bar__marker-item.is-edge-start .pd-progress-bar__marker-label {
	align-self: flex-start;
	width: max-content;
	max-width: calc( 50% + 25px );
	margin-left: calc( 50% - 25px );
	text-align: center;
}

.pd-progress-bar__marker-item.is-edge-end .pd-progress-bar__marker-label {
	align-self: flex-end;
	width: max-content;
	max-width: calc( 50% + 25px );
	margin-right: calc( 50% - 25px );
	text-align: center;
}

.pd-progress-bar__marker-item.is-edge-start.is-edge-end .pd-progress-bar__marker-label {
	margin-left: 0;
}

.pd-progress-bar__marker-icon {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin-bottom: 4px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #dce3ec;
	color: #afbbca;
	box-sizing: border-box;
	/* White "cutout" ring so the marker reads cleanly against the track
	   behind it, regardless of exactly where along the rail it sits. */
	box-shadow: 0 0 0 4px #fff;
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* Achieved markers match whatever color the fill line itself currently is —
   the normal accent color while still filling up, switching to the
   "complete" color only once the bar itself has switched (100% reached). */
.pd-progress-bar__marker-item.is-achieved .pd-progress-bar__marker-icon {
	background: var( --pd-accent-color, #2f62a8 );
	border-color: var( --pd-accent-color, #2f62a8 );
	color: #fff;
}

.pd-progress-bar__markers--complete .pd-progress-bar__marker-item.is-achieved .pd-progress-bar__marker-icon {
	background: var( --pd-accent-color-complete, #2f62a8 );
	border-color: var( --pd-accent-color-complete, #2f62a8 );
}

/* The single step the customer is currently working toward — outlined
   rather than filled, so it visibly reads as "not yet earned" while still
   standing out from the plain grey later steps. */
.pd-progress-bar__marker-item.is-next .pd-progress-bar__marker-icon {
	border-color: var( --pd-accent-color, #2f62a8 );
	color: var( --pd-accent-color, #2f62a8 );
}

.pd-progress-bar__marker-halo {
	position: absolute;
	inset: -2px;
	border-radius: 999px;
	border: 2px solid var( --pd-accent-color, #2f62a8 );
	animation: pd-progress-halo-pulse 2s ease-out infinite;
	pointer-events: none;
}

@keyframes pd-progress-halo-pulse {
	0%,
	100% {
		transform: scale( 1 );
		opacity: 0.55;
	}

	50% {
		transform: scale( 1.5 );
		opacity: 0;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.pd-progress-bar__marker-halo {
		animation: none;
	}
}

/* At most two lines, then an ellipsis — the full text is in the title
   tooltip. Keeps labels inside the markers row however long they are. */
.pd-progress-bar__marker-label {
	display: -webkit-box;
	width: 100%;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	font-size: 11px;
	line-height: 1.15;
	color: #777;
	overflow-wrap: break-word;
}

.pd-progress-bar__marker-item.is-achieved .pd-progress-bar__marker-label {
	color: var( --pd-accent-color, #2f62a8 );
	font-weight: 600;
	line-height: 1.15 !important;
}

.pd-progress-bar__markers--complete .pd-progress-bar__marker-item.is-achieved .pd-progress-bar__marker-label {
	color: var( --pd-accent-color-complete, #2f62a8 );
}

.pd-progress-bar__marker-item.is-next .pd-progress-bar__marker-label {
	color: #1c2430;
	font-weight: 600;
	line-height: 1.15 !important;
}

/* "Segmented" layout — one grid column per step, each with its own fill and
   caption, as an alternative to the single continuous bar above. Kept as a
   fully separate class namespace (pd-progress-segmented*) so it can never
   collide with or accidentally inherit from the classic layout's rules. */
.pd-progress-segmented__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.pd-progress-wrapper .pd-progress-segmented__title {
	margin: 0;
	font-size: 1.15em;
	font-weight: 700;
	text-align: left;
}

.pd-progress-segmented__pill {
	flex: 0 0 auto;
	padding: 6px 14px;
	border-radius: 999px;
	background: #e9f5ee;
	color: #1a7f4e;
	font-size: 0.8em;
	font-weight: 600;
	white-space: nowrap;
}

.pd-progress-segmented__subtitle {
	margin: 4px 0 1.2em;
	font-size: 0.85em;
	color: #8794a4;
	text-align: left;
}

/* auto-fit + minmax lets the grid size itself to however many columns
   actually fit — full-width on the Cart page, fewer per row (wrapping
   automatically) inside Side Cart's narrower drawer — without any
   viewport-width media query, which wouldn't reflect the drawer's own
   width anyway (it's a fixed-position panel, not full-viewport). */
.pd-progress-segmented__track {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 70px, 1fr ) );
	gap: 16px 12px;
}

.pd-progress-segmented__bar {
	height: 8px;
	border-radius: 999px;
	background: #e6ebf2;
}

.pd-progress-segmented__segment.is-achieved .pd-progress-segmented__bar {
	background: var( --pd-accent-color, #2f62a8 );
}

.pd-progress-segmented__caption {
	display: flex;
	flex-direction: column;
	margin-top: 8px;
	text-align: center;
	line-height: normal;
	font-size: 15px;
}

.pd-progress-segmented__caption-label {
	font-size: 1em;
	font-weight: 700;
	color: #afbbca;
	margin-bottom: 5px;
}

.pd-progress-segmented__caption-amount {
	font-size: 0.9em;
	color: #afbbca;
}

.pd-progress-segmented__segment.is-achieved .pd-progress-segmented__caption-label {
	color: var( --pd-accent-color, #2f62a8 );
}

.pd-progress-segmented__segment.is-achieved .pd-progress-segmented__caption-amount {
	color: #1c2430;
}

.pd-progress-segmented__segment.is-next .pd-progress-segmented__caption-label {
	color: #1c2430;
}

/* "Slim" layout (templates/progress-bar-slim.php): one plain bar, no
   markers. Head row: message on the left, "1/5" rewards earned on the right. */
.pd-progress-slim__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 10px;
}

.pd-progress-slim .pd-progress-message {
	flex: 1 1 auto;
	margin: 0;
	text-align: left;
}

.pd-progress-slim__count {
	flex: 0 0 auto;
	font-size: 13px;
	color: #8794a4;
	white-space: nowrap;
}

/* One box per reward under the bar: filled = earned, outlined = next,
   grey = still ahead. Lists reset: themes style ul / li. */
.pd-progress-slim__rewards {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.pd-progress-slim__reward {
	margin: 0 !important;
	padding: 4px 12px;
	border: 1.5px solid transparent;
	border-radius: 999px;
	background: #eef1f6;
	color: #8794a4;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	list-style: none;
}

.pd-progress-slim__reward::before,
.pd-progress-slim__reward::marker {
	content: none;
}

.pd-progress-slim__reward.is-achieved {
	background: var( --pd-accent-color, #2f62a8 );
	border-color: var( --pd-accent-color, #2f62a8 );
	color: #fff;
}

.pd-progress-slim__reward.is-next {
	background: #fff;
	border-color: var( --pd-accent-color, #2f62a8 );
	color: var( --pd-accent-color, #2f62a8 );
}

/* Text for screen readers only. */
.pd-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	white-space: nowrap;
	border: 0;
}

.pd-progress-slim + .pd-progress-note {
	justify-content: flex-start;
}

/* ----- 2. Page visuals ----- */

/* The plugin's wrapper sits inside our cards: no outer margin, and the
   space the markers row leaves after its upward shift is taken back. */
.edp .pd-progress-wrapper {
	margin: 0;
}

.edp .pd-progress-bar__markers {
	margin-bottom: -18px;
}

.edp .pd-progress-bar__markers + .pd-progress-note {
	margin-top: 4px;
}

.edp .pd-progress-message,
.edp .pd-progress-segmented__title {
	color: var( --edp-ink );
}

/* Shared bits. */
.edp-pd-label {
	margin-bottom: 8px;
	font-family: var( --ed-font-mono, monospace );
	font-size: 10.5px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var( --edp-ink-3 );
}

.edp-pd-thumb {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: var( --edp-stripe );
}

.edp-pd-thumb--alt {
	background: var( --edp-stripe-alt );
}

.edp-pd-badge {
	display: inline-block;
	margin-left: 4px;
	padding: 1px 6px;
	border-radius: 5px;
	background: var( --edp-azure );
	color: #fff;
	font-size: 10.5px;
	font-weight: 700;
	vertical-align: 1px;
}

.edp-pd-badge--sale {
	background: var( --edp-red );
}

.edp-pd-tabs {
	display: flex;
	gap: 3px;
	padding: 3px;
	background: #f2f5fa;
	border-radius: 10px;
}

.edp-pd-tab {
	flex: 1;
	padding: 8px 10px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var( --edp-ink-3 );
	font: inherit;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
}

.edp-pd-tab.is-active {
	background: #fff;
	color: var( --edp-ink );
	box-shadow: 0 1px 3px rgba( 28, 40, 60, 0.12 );
}

.edp-pd-tabs--sm {
	margin-left: auto;
	padding: 3px;
	border-radius: 9px;
	gap: 2px;
}

.edp-pd-tabs--sm .edp-pd-tab {
	padding: 5px 11px;
	border-radius: 7px;
	font-size: 12px;
}

.edp-pd-chipbtn {
	padding: 6px 12px;
	border: 1px solid var( --edp-line-2 );
	border-radius: 8px;
	background: #fff;
	color: #3e4b5c;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.edp-pd-chipbtn.is-active {
	background: var( --edp-ink );
	border-color: var( --edp-ink );
	color: #fff;
}

.edp-pd-totals {
	display: flex;
	flex-direction: column;
	gap: 9px;
	font-size: 14px;
}

.edp-pd-totals--sm {
	gap: 7px;
	font-size: 13.5px;
}

.edp-pd-totals__row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.edp-pd-totals__row > span:first-child {
	color: var( --edp-ink-2 );
}

.edp-pd-totals__row > span:last-child {
	font-weight: 600;
	white-space: nowrap;
}

.edp-pd-totals__row.is-discount > span {
	color: var( --edp-green );
	font-weight: 700;
}

.edp-pd-totals__row.is-total {
	padding-top: 10px;
	border-top: 1px solid #f1f4f8;
	align-items: baseline;
}

.edp-pd-totals__row.is-total > span {
	color: var( --edp-ink );
	font-weight: 800;
}

.edp-pd-totals__row[hidden] {
	display: none;
}

.edp-pd-panel {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
	padding: 22px;
	background: #fff;
	border: 1px solid #dce6f3;
	border-radius: 18px;
}

.edp-pd-panel__head {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 8px;
}

.edp-pd-panel__head strong {
	font-size: 16px;
}

.edp-pd-panel__head span {
	font-size: 13px;
	color: var( --edp-ink-3 );
}

.edp-pd-panel__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
}

.edp-pd-panel__note {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var( --edp-ink-2 );
}

.edp-pd-panel__note[hidden],
.edp-pd-line__label[hidden],
.edp-pd-pill[hidden],
.edp-pd-base[hidden] {
	display: none;
}

.edp-pd-panel .pd-progress-wrapper {
	padding: 0;
}

/* Hero: the cart with the widget, and the slider. */
.edp-pd-hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.edp-pd-cart {
	width: 100%;
	max-width: 440px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var( --edp-line );
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba( 28, 40, 60, 0.16 );
}

.edp-pd-cart__head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	border-bottom: 1px solid #f1f4f8;
	font-size: 15px;
	font-weight: 700;
}

.edp-pd-cart__widget {
	min-height: 150px;
	background: #f7fafd;
	border-bottom: 1px solid #f1f4f8;
}

.edp-pd-cart__widget .pd-progress-wrapper {
	background: transparent;
	padding: 20px 18px 8px;
}

.edp-pd-cart .edp-pd-totals {
	padding: 14px 18px 18px;
}

.edp-pd-cart .edp-pd-totals__row.is-total > span:last-child {
	font-size: 20px;
	letter-spacing: -0.4px;
}

.edp-pd-slider {
	width: 100%;
	max-width: 440px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px 18px;
	background: var( --edp-ink );
	color: #fff;
	border-radius: 14px;
}

.edp-pd-slider__head {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.edp-pd-slider__label {
	font-family: var( --ed-font-mono, monospace );
	font-size: 10.5px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: #8da8cf;
}

.edp-pd-slider__value {
	margin-left: auto;
	font-size: 17px;
	font-weight: 800;
}

.edp-pd-slider input,
.edp-pd-preview input {
	width: 100%;
	margin: 0;
	accent-color: var( --edp-azure );
}

/* Reward cards. */
.edp-pd-mini {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 7px;
	padding: 12px;
	background: #fff;
	border: 1px solid var( --edp-line );
	border-radius: 10px;
	font-size: 12.5px;
}

.edp-pd-mini__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

.edp-pd-mini__row > span:first-child {
	color: var( --edp-ink-2 );
}

.edp-pd-mini__row > span:last-child,
.edp-pd-mini__meta,
.edp-pd-mini__name {
	white-space: nowrap;
}

.edp-pd-mini__row.is-discount span {
	color: var( --edp-green );
	font-weight: 700;
}

.edp-pd-mini__row.is-total {
	padding-top: 7px;
	border-top: 1px solid #f1f4f8;
}

.edp-pd-mini__row.is-total span {
	color: var( --edp-ink );
	font-weight: 800;
}

.edp-pd-mini s {
	margin-right: 4px;
	color: var( --edp-ink-4 );
}

.edp-pd-mini .is-free {
	color: var( --edp-green );
}

.edp-pd-mini--item {
	flex-direction: row;
	align-items: center;
	gap: 10px;
	padding: 10px;
}

.edp-pd-mini--item .edp-pd-thumb {
	width: 42px;
	height: 42px;
}

.edp-pd-mini__item {
	flex: 1;
	min-width: 0;
}

.edp-pd-mini__name {
	font-weight: 700;
}

.edp-pd-mini__meta {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
	font-size: 11px;
	color: var( --edp-ink-3 );
}

.edp-pd-mini__meta .edp-pd-badge {
	margin-left: 0;
}

/* How rewards combine. */
.edp-pd-combine {
	width: 100%;
	border-collapse: collapse;
	overflow: hidden;
	background: #fff;
	border-radius: 16px;
	font-size: 14px;
	table-layout: fixed;
}

.edp-pd-combine th,
.edp-pd-combine td {
	padding: 14px 10px;
	text-align: left;
	vertical-align: middle;
	border-top: 1px solid #f1eadf;
}

.edp-pd-combine th:first-child,
.edp-pd-combine td:first-child {
	padding-left: 18px;
}

.edp-pd-combine thead th {
	border-top: 0;
	background: #fbf8f3;
	font-family: var( --ed-font-mono, monospace );
	font-size: 10.5px;
	font-weight: 400;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #6e5b44;
}

.edp-pd-combine small {
	font-size: 12px;
	font-weight: 600;
	color: var( --edp-ink-3 );
}

.edp-pd-combine .is-on {
	font-weight: 700;
	color: var( --edp-green );
}

.edp-pd-combine .is-off {
	font-weight: 700;
	color: var( --edp-red );
}

.edp-pd-combine .is-none {
	color: var( --edp-ink-4 );
}

.edp-pd-combine tr.is-highlight {
	background: #f3faf6;
}

/* What shoppers see: the three layouts stacked on the left, the global
   colours on the right; one column on narrow screens. */
.edp-pd-display {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( min( 100%, 440px ), 1fr ) );
	gap: 18px;
	align-items: start;
}

.edp-pd-display__layouts {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

.edp-pd-swatches {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 14px;
	color: var( --edp-ink-2 );
}

.edp-pd-swatches span {
	flex: 1 1 140px;
}

.edp-pd-swatch {
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: var( --edp-swatch );
	cursor: pointer;
}

.edp-pd-swatch.is-active {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var( --edp-swatch );
}

.edp-pd-panel__preview {
	padding: 14px 14px 0;
	background: #f7fafd;
	border: 1px solid var( --edp-line );
	border-radius: 12px;
}

.edp-pd-panel__preview .pd-progress-wrapper {
	background: transparent;
}

.edp-pd-panel__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: auto;
}

.edp-pd-panel__chips span {
	padding: 5px 10px;
	background: #f7f9fc;
	border: 1px solid var( --edp-line );
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 600;
	color: #3e4b5c;
}

/* Messages. */
.edp-pd-vars {
	margin: 24px 0 0;
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( min( 100%, 210px ), 1fr ) );
	gap: 8px 16px;
	font-size: 13.5px;
	color: var( --edp-ink-2 );
}

.edp-pd-vars div {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
}

.edp-pd-vars dt,
.edp-pd-vars dd {
	margin: 0;
}

.edp-pd-vars code,
.edp-pd-messages__raw code {
	padding: 2px 6px;
	border-radius: 5px;
	background: #eaf0f8;
	color: var( --edp-azure-press );
	font-family: var( --ed-font-mono, monospace );
	font-size: 12px;
}

.edp-pd-messages {
	overflow: hidden;
	border: 1px solid var( --edp-line );
	border-radius: 18px;
	box-shadow: 0 18px 44px rgba( 28, 40, 60, 0.08 );
}

.edp-pd-messages__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 12px;
	background: #f7f9fc;
	border-bottom: 1px solid var( --edp-line );
}

.edp-pd-messages__body {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 22px;
}

.edp-pd-messages__raw {
	padding: 12px 14px;
	border: 1px solid var( --edp-line-2 );
	border-radius: 10px;
	font-size: 15px;
	line-height: 1.9;
}

.edp-pd-messages__widget {
	border: 1px solid var( --edp-line );
	border-radius: 12px;
	background: #f7fafd;
}

.edp-pd-messages__widget .pd-progress-wrapper {
	background: transparent;
	padding: 18px 18px 0;
}

.edp-pd-messages__note {
	margin: 0;
	padding-top: 16px;
	border-top: 1px solid #f1f4f8;
	font-size: 14px;
	line-height: 1.6;
	color: var( --edp-ink-2 );
}

.edp-pd-messages__note strong {
	color: var( --edp-ink );
}

/* Rules. */
.edp-pd-rules {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( min( 100%, 440px ), 1fr ) );
	gap: 18px;
	align-items: start;
}

.edp-pd-panel--rule {
	padding: 24px;
	border-color: var( --edp-line );
}

.edp-pd-box {
	overflow: hidden;
	border: 1px solid var( --edp-line );
	border-radius: 14px;
}

.edp-pd-box__widget {
	background: #f7fafd;
	border-bottom: 1px solid #f1f4f8;
}

.edp-pd-box__widget .pd-progress-wrapper {
	background: transparent;
	padding: 16px 16px 4px;
}

.edp-pd-box__items {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid #f1f4f8;
}

.edp-pd-line {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 13.5px;
}

.edp-pd-line__name {
	flex: 1;
	min-width: 0;
	font-weight: 600;
}

.edp-pd-line__label {
	display: block;
	margin-top: 3px;
	font-size: 12px;
	font-weight: 400;
	color: #6b7280;
}

.edp-pd-line__price {
	text-align: right;
	font-weight: 700;
}

.edp-pd-line__price s {
	display: block;
	font-size: 11.5px;
	font-weight: 400;
	color: var( --edp-ink-4 );
}

.edp-pd-line__price .is-sale {
	color: var( --edp-red );
}

.edp-pd-box .edp-pd-totals {
	padding: 12px 16px;
}

.edp-pd-box__coupon {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	background: #f7fafd;
	border-bottom: 1px solid #f1f4f8;
	font-size: 13.5px;
	color: var( --edp-ink-2 );
}

.edp-pd-code {
	padding: 3px 8px;
	border: 1px dashed var( --edp-ink-4 );
	border-radius: 6px;
	font-family: var( --ed-font-mono, monospace );
	font-size: 12px;
	color: var( --edp-ink );
}

.edp-pd-pill {
	margin-left: auto;
	padding: 3px 8px;
	border-radius: 6px;
	background: #f2f5fa;
	color: var( --edp-ink-2 );
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.edp-pd-pill.is-on {
	background: #e5f4ec;
	color: var( --edp-green );
}

.edp-pd-base {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 10px;
	font-size: 13.5px;
	color: var( --edp-ink-2 );
}

/* Campaign editor. */
.edp-pd-editor {
	overflow: hidden;
	background: #fff;
	border: 1px solid var( --edp-line-2 );
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba( 28, 40, 60, 0.12 );
}

.edp-pd-editor__bar {
	height: 38px;
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 0 14px;
	background: #f2f5fa;
	border-bottom: 1px solid var( --edp-line );
}

.edp-pd-editor__bar span {
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: var( --edp-line-2 );
}

.edp-pd-editor__bar em {
	margin-left: 10px;
	overflow: hidden;
	font-size: 12px;
	font-style: normal;
	color: var( --edp-ink-3 );
	white-space: nowrap;
	text-overflow: ellipsis;
}

.edp-pd-editor__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 18px 20px;
}

.edp-pd-wizard {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 12px;
	font-weight: 700;
}

.edp-pd-wizard span {
	padding: 6px 10px;
	border-radius: 999px;
	background: #f2f5fa;
	color: var( --edp-ink-3 );
	white-space: nowrap;
}

.edp-pd-wizard .is-done {
	background: #e5f4ec;
	color: var( --edp-green );
}

.edp-pd-wizard .is-current {
	background: var( --edp-ink );
	color: #fff;
}

.edp-pd-steps {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	border: 1px solid var( --edp-line );
	border-radius: 10px;
	font-size: 13px;
}

.edp-pd-steps th,
.edp-pd-steps td {
	padding: 9px 12px;
	text-align: left;
	border-top: 1px solid #f1f4f8;
}

.edp-pd-steps thead th {
	border-top: 0;
	background: #f7f9fc;
	font-family: var( --ed-font-mono, monospace );
	font-size: 10px;
	font-weight: 400;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var( --edp-ink-3 );
}

.edp-pd-steps tbody th {
	width: 70px;
}

.edp-pd-steps tfoot td {
	font-weight: 700;
	color: var( --edp-azure );
}

.edp-pd-steps tfoot span {
	font-weight: 600;
	color: var( --edp-ink-3 );
}

.edp-pd-preview {
	padding: 14px;
	background: #f7fafd;
	border: 1px solid var( --edp-line );
	border-radius: 12px;
}

.edp-pd-preview__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 4px;
}

.edp-pd-preview__head .edp-pd-label {
	margin: 0;
	color: var( --edp-azure );
}

.edp-pd-preview__head input {
	flex: 1;
	min-width: 0;
}

.edp-pd-preview__head span {
	width: 66px;
	text-align: right;
	font-size: 13px;
	font-weight: 800;
}

.edp-pd-preview .pd-progress-wrapper {
	background: transparent;
	padding: 10px 6px 0;
}

/* Templates. */
.edp-pd-templates {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( min( 100%, 300px ), 1fr ) );
	gap: 18px;
}

.edp-pd-template {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 22px;
	border: 1px solid var( --edp-line );
	border-radius: 16px;
}

.edp-pd-template.is-popular {
	border-color: var( --edp-azure );
	box-shadow: 0 0 0 3px #eaf0f8;
}

.edp-pd-template__head {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 17px;
}

.edp-pd-template__badge {
	margin-left: auto;
	padding: 3px 9px;
	border-radius: 999px;
	background: var( --edp-azure );
	color: #fff;
	font-size: 11.5px;
	font-weight: 700;
	white-space: nowrap;
}

.edp-pd-template__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.edp-pd-template__chips span {
	padding: 4px 9px;
	border-radius: 7px;
	background: #f2f5fa;
	font-size: 12.5px;
	font-weight: 700;
}

.edp-pd-template p {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.6;
	color: var( --edp-ink-2 );
}

/* Order. */
.edp-pd-order {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px;
	background: #fff;
	color: var( --edp-ink );
	border-radius: 16px;
}

.edp-pd-order__head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	font-size: 16px;
}

.edp-pd-order__head span {
	margin-left: auto;
	padding: 3px 8px;
	border-radius: 6px;
	background: #e5f4ec;
	color: var( --edp-green );
	font-size: 12px;
	font-weight: 700;
}

.edp-pd-order .edp-pd-totals {
	padding-top: 12px;
	border-top: 1px solid #f1f4f8;
}

.edp-pd-order .edp-pd-totals__row > span:first-child {
	color: var( --edp-ink );
}

.edp-pd-order .edp-pd-totals__row.is-total {
	padding-top: 0;
	border-top: 0;
	font-size: 15px;
}

.edp-pd-order__note {
	padding: 12px;
	background: #fff8e6;
	border: 1px solid #f2e2b5;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.55;
	color: #4a4236;
}

.edp-pd-order__note .edp-pd-label {
	margin-bottom: 4px;
	color: #8c6d1f;
}

@media ( max-width: 640px ) {
	.edp-pd-combine {
		font-size: 13px;
	}

	.edp-pd-combine th,
	.edp-pd-combine td {
		padding: 12px 6px;
	}

	.edp-pd-combine th:first-child,
	.edp-pd-combine td:first-child {
		padding-left: 12px;
	}

	.edp-pd-combine small {
		display: block;
	}

	.edp-pd-panel,
	.edp-pd-panel--rule {
		padding: 18px 16px;
	}
}
