/* Product page "Check delivery" box (store-profile feature "pincode_checker").
   Sits under the trust badges. A transparent "legend" box: a light-green border
   with the title centred in the top edge. The field + button are the same fused
   bar as the checkout's coupon field (40px), tinted with the trust-badge green;
   after a check the bar changes state (PIN + place, "Change") like an applied
   coupon, with a compact delivery timeline underneath.

   Fonts follow the theme: Lexend for text, the theme's button font (Montserrat)
   for the field and the button. */

.wd-pc {
	--wd-pc-accent: var(--theme-button-background-initial-color, var(--theme-palette-color-1, #1e7a4c));
	--wd-pc-font: var(--theme-font-family, Lexend, sans-serif);
	--wd-pc-btn-font: var(--theme-button-font-family, Montserrat, sans-serif);
	--wd-pc-line: color-mix(in srgb, var(--wd-pc-accent) 40%, #fff);
	display: block;
	min-width: 0;
	margin: 18px 0 0;
	padding: 4px 14px 14px;
	box-sizing: border-box;
	background: transparent;
	border: 1.5px solid var(--wd-pc-line);
	border-radius: 14px;
	font-family: var(--wd-pc-font);
	color: var(--theme-text-color, #1a1a17);
	text-align: center; /* centres the <legend>; everything inside resets below */
}
.wd-pc *,
.wd-pc *::before,
.wd-pc *::after { box-sizing: border-box; }

.wd-pc__title {
	float: none;
	width: auto;
	margin: 0 auto;
	padding: 0 10px;
	font-family: var(--wd-pc-font);
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--theme-palette-color-2, #0e3d27);
}
.wd-pc__form,
.wd-pc__result { text-align: left; }
.wd-pc__form { margin: 8px 0 0; }

/* ── the fused bar (same construction as .wd-nchk-coupon-row) ───────────── */
.wd-pc__row {
	display: flex;
	align-items: stretch;
	height: 45px;
	background: transparent;
	border: 1.5px solid var(--wd-pc-line);
	border-radius: 999px;
	padding-right: 3px;
	overflow: hidden;
	transition: border-color .15s ease;
}
.wd-pc__row:focus-within { border-color: var(--wd-pc-accent); }
.wd-pc.is-err .wd-pc__row { border-color: #d64545; }
.wd-pc.is-warn .wd-pc__row { border-color: #d9a21b; }

.wd-pc__pinicon {
	flex: none;
	display: flex;
	align-items: center;
	padding: 0 2px 0 12px;
	color: var(--wd-pc-accent);
}
.wd-pc__pinicon svg { display: block; width: 18px; height: 18px; }

.wd-pc__field { flex: 1 1 auto; min-width: 0; display: block; margin: 0; }
.wd-pc .wd-pc__input {
	display: block;
	width: 100%;
	height: 42px;
	min-height: 0;
	margin: 0;
	padding: 0 10px 0 8px;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: 0;
	font-family: var(--wd-pc-btn-font);
	font-size: 16px; /* 16px keeps iOS from zooming on focus */
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 42px;
	color: var(--theme-palette-color-3, #1a1a17);
}
.wd-pc .wd-pc__input::placeholder { font-weight: 500; letter-spacing: 0; font-size: 14px; opacity: .55; }

/* applied state - the left half shows the PIN + place, like an applied coupon */
.wd-pc__applied {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 10px 0 8px;
	overflow: hidden;
	font-family: var(--wd-pc-btn-font);
}
.wd-pc__applied[hidden] { display: none; }
.wd-pc__appcode { flex: none; font-size: 15px; font-weight: 800; letter-spacing: .06em; color: var(--theme-palette-color-3, #111827); }
.wd-pc__appval {
	display: inline-flex;
	align-items: center;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--wd-pc-accent);
}
.wd-pc__appval svg { display: block; width: 18px; height: 18px; }
.wd-pc.is-applied .wd-pc__field { display: none; }

/* round action button inside the pill: an arrow to check, a pencil to change */
.wd-pc .wd-pc__btn {
	position: relative;
	flex: none;
	display: flex !important;
	align-items: center;
	justify-content: center;
	align-self: center;
	width: 37px;
	height: 37px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	background: var(--wd-pc-accent);
	color: #fff;
	line-height: 1 !important;
	text-transform: none !important;
	cursor: pointer;
	transition: filter .15s ease, background-color .15s ease, color .15s ease, transform .1s ease;
}
.wd-pc .wd-pc__btn::before,
.wd-pc .wd-pc__btn::after { display: none !important; }
.wd-pc .wd-pc__btn:hover:not(:disabled) { filter: brightness(1.08); }
.wd-pc .wd-pc__btn:active:not(:disabled) { transform: scale(.94); }
.wd-pc .wd-pc__btn:disabled { cursor: default; }
.wd-pc__ico { display: block; width: 18px; height: 18px; }
.wd-pc__ico--edit { display: none; }
/* applied: a quiet grey circle with a pencil, like the coupon's Remove */
.wd-pc.is-applied .wd-pc__btn { background: #eeeeee; color: #4b5563; }
.wd-pc.is-applied .wd-pc__btn:hover:not(:disabled) { filter: none; background: #e5e7eb; color: var(--theme-palette-color-2, #0e3d27); }
.wd-pc.is-applied .wd-pc__ico--go { display: none; }
.wd-pc.is-applied .wd-pc__ico--edit { display: block; }
.wd-pc.is-busy .wd-pc__ico { display: none; }

.wd-pc__spin {
	display: none;
	position: absolute;
	inset: 0;
	margin: auto;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: wd-pc-spin .7s linear infinite;
}
.wd-pc.is-busy .wd-pc__spin { display: block; }
@keyframes wd-pc-spin { to { transform: rotate(360deg); } }

/* ── result: messages + timeline ────────────────────────────────────────── */
.wd-pc__result { margin: 17px 0 0; }
.wd-pc__result[hidden] { display: none; }

.wd-pc__line { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.35; }
.wd-pc__lineicon { flex: none; display: inline-flex; margin-top: 1px; }
.wd-pc__lineicon svg { display: block; width: 18px; height: 18px; }
.wd-pc__line--warn .wd-pc__lineicon { color: #d9a21b; }
.wd-pc__line--err .wd-pc__lineicon { color: #d64545; }

/* timeline - same look as the Buy Now popup's order timeline (a dot per step,
   dashed lines to the steps still to come; done = filled accent, estimated =
   tinted + dashed ring), laid out edge to edge: the first step starts where the
   field starts, the last ends where the button ends, the lines stretch between. */
.wd-pc__timeline { display: flex; align-items: flex-start; width: 100%; margin: 0; }
.wd-pc__step { position: relative; flex: none; min-width: 56px; text-align: center; }
.wd-pc__conn {
	flex: 1 1 0;
	min-width: 12px;
	height: 0;
	margin: 17px 4px 0;
	border-top: 3px dashed color-mix(in srgb, var(--wd-pc-accent) 35%, #fff);
}
.wd-pc__dotwrap { position: relative; z-index: 1; display: flex; justify-content: center; }
.wd-pc__dot {
	width: 37px;
	height: 37px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--wd-pc-accent);
	color: #fff;
}
.wd-pc__dot svg { display: block; width: 21px; height: 21px; }
.wd-pc__step--est .wd-pc__dot {
	background: color-mix(in srgb, var(--wd-pc-accent) 12%, #fff);
	color: var(--wd-pc-accent);
	border: 2px dashed var(--wd-pc-accent);
}
.wd-pc__step--last.wd-pc__step--est .wd-pc__dot { animation: wd-pc-pulse 2s ease-in-out infinite; }
@keyframes wd-pc-pulse {
	0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--wd-pc-accent) 35%, transparent); }
	50%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--wd-pc-accent) 0%, transparent); }
}
.wd-pc__steplabel { margin-top: 6px; font-size: 12px; font-weight: 700; line-height: 1.2; color: var(--theme-palette-color-2, #0e3d27); }
.wd-pc__stepdate { margin-top: 2px; font-size: 11px; line-height: 1.3; opacity: .7; white-space: nowrap; }
.wd-pc__esttag {
	margin-top: 2px;
	font-size: 9px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--wd-pc-accent);
}

.wd-pc__cod {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 12px 0 0;
	font-size: 12px;
	font-weight: 600;
	color: var(--theme-palette-color-2, #0e3d27);
}
.wd-pc__cod svg { display: block; width: 16px; height: 16px; flex: none; color: var(--wd-pc-accent); }

@media (max-width: 360px) {
	.wd-pc { padding: 4px 10px 12px; }
	.wd-pc .wd-pc__input { letter-spacing: .04em; }
	.wd-pc__steplabel { font-size: 11.5px; }
	.wd-pc__stepdate { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
	.wd-pc__spin { animation-duration: 1.6s; }
	.wd-pc__step--last.wd-pc__step--est .wd-pc__dot { animation: none; }
}
