/* HCH Partial COD — uses the HCH design tokens (tokens.css) with fallbacks. */
.hch-pcod-box,
.hch-pcod-pay,
.hch-pcod-ty,
.hch-pcod-desc,
.hch-pcod-modal {
	--pc-navy: var(--hch-navy-900, #0b3954);
	--pc-navy-700: var(--hch-navy-700, #1d5375);
	--pc-amber: var(--hch-amber-500, #ffb128);
	--pc-amber-600: var(--hch-amber-600, #f29d0c);
	--pc-amber-soft: var(--hch-amber-100, #fff3dc);
	--pc-green: var(--hch-green-600, #1d7a4c);
	--pc-line: var(--hch-line, #d6dee3);
	--pc-ink: var(--hch-ink, #0f2430);
	--pc-muted: var(--hch-ink-muted, #4f6473);
	--pc-on-navy: var(--hch-on-navy-muted, #c7d4dc);
	--pc-sans: var(--hch-font-sans, Archivo, "Helvetica Neue", Arial, sans-serif);
	--pc-mono: var(--hch-font-mono, "IBM Plex Mono", ui-monospace, Menlo, monospace);
	font-family: var(--pc-sans);
}

/* ---------- Checkout: the payment box under "Cash on delivery" ---------- */
#payment div.payment_box.payment_method_hch_partial_cod {
	background: transparent !important;
	padding: 0 !important;
	margin: 8px 0 2px !important;
	border: 0 !important;
	box-shadow: none !important;
	color: inherit;
}
#payment div.payment_box.payment_method_hch_partial_cod::before { display: none !important; }

.hch-pcod-box { color: var(--pc-ink); }
.hch-pcod-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: stretch;
	gap: 8px;
}
.hch-pcod-cell {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	padding: 12px 14px;
	border: 1px solid var(--pc-line);
	border-radius: 12px;
	background: #fff;
}
.hch-pcod-cell.is-now {
	background: var(--pc-amber-soft);
	border-color: rgba(255, 177, 40, .7);
}
.hch-pcod-k {
	font: 600 10.5px/14px var(--pc-mono);
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--pc-muted);
}
.hch-pcod-cell.is-now .hch-pcod-k { color: #8a5a00; }
.hch-pcod-v,
.hch-pcod-v .woocommerce-Price-amount {
	font: 700 20px/26px var(--pc-mono);
	color: var(--pc-navy);
	white-space: nowrap;
}
.hch-pcod-s { font-size: 12px; line-height: 16px; color: var(--pc-muted); }
.hch-pcod-plus {
	align-self: center;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--pc-navy);
	color: #fff;
	font: 700 14px/1 var(--pc-mono);
}
.hch-pcod-note {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 10px 2px 0 !important;
	font-size: 12.5px;
	line-height: 17px;
	color: var(--pc-muted);
}
.hch-pcod-note .hch-pcod-i { flex: none; margin-top: 1px; color: var(--pc-green); }
.hch-pcod-desc { margin: 0 0 10px; font-size: 14px; color: var(--pc-muted); }

@media (max-width: 420px) {
	.hch-pcod-split { gap: 6px; }
	.hch-pcod-plus { width: 22px; height: 22px; font-size: 13px; }
	.hch-pcod-cell { padding: 10px; }
	.hch-pcod-k { letter-spacing: .06em; }
	.hch-pcod-v, .hch-pcod-v .woocommerce-Price-amount { font-size: 17px; line-height: 23px; }
	.hch-pcod-s { font-size: 11.5px; line-height: 15px; }
}

/* ---------- Pay page for the advance ---------- */
.hch-pcod-pay {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	margin: 16px 0 24px;
	padding: 26px 28px 24px;
	border-radius: 24px;
	background: var(--pc-navy);
	color: #fff;
	box-shadow: var(--hch-shadow-card, 0 12px 32px rgba(11, 57, 84, .12));
}
.hch-pcod-pay::before,
.hch-pcod-pay::after {
	content: "";
	position: absolute;
	z-index: -1;
	border-radius: 50%;
	filter: blur(10px);
	pointer-events: none;
}
.hch-pcod-pay::before { width: 320px; height: 320px; right: -110px; top: -150px; background: radial-gradient(closest-side, rgba(255, 177, 40, .38), rgba(255, 177, 40, 0)); }
.hch-pcod-pay::after { width: 360px; height: 360px; left: -160px; bottom: -220px; background: radial-gradient(closest-side, rgba(44, 110, 153, .7), rgba(44, 110, 153, 0)); }
.hch-pcod-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font: 600 11px/14px var(--pc-mono);
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--pc-amber);
}
.hch-pcod-pay h2 {
	margin: 10px 0 6px !important;
	font-family: var(--pc-sans);
	font-size: 26px;
	line-height: 32px;
	font-weight: 800;
	color: #fff !important;
}
.hch-pcod-pay h2 .woocommerce-Price-amount { color: var(--pc-amber); }
.hch-pcod-lead { margin: 0 !important; font-size: 15px; line-height: 22px; color: var(--pc-on-navy); }
.hch-pcod-lead .woocommerce-Price-amount { color: #fff; font-weight: 700; }
.hch-pcod-tiles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin: 20px 0 0;
}
.hch-pcod-tile {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px 14px;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, .14);
	background: rgba(255, 255, 255, .08);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}
.hch-pcod-tile span {
	font: 600 10.5px/14px var(--pc-mono);
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--pc-on-navy);
}
.hch-pcod-tile b,
.hch-pcod-tile b .woocommerce-Price-amount {
	font: 700 20px/26px var(--pc-mono);
	color: #fff;
	white-space: nowrap;
}
.hch-pcod-tile.is-now { background: var(--pc-amber); border-color: var(--pc-amber); }
.hch-pcod-tile.is-now span { color: rgba(11, 57, 84, .75); }
.hch-pcod-tile.is-now b,
.hch-pcod-tile.is-now b .woocommerce-Price-amount { color: var(--pc-navy); }
.hch-pcod-items {
	margin: 16px 0 0 !important;
	font-size: 13px;
	line-height: 19px;
	color: var(--pc-on-navy);
}
.hch-pcod-hold {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 8px 0 0 !important;
	font-size: 12.5px;
	color: var(--pc-on-navy);
}
.hch-pcod-hold .hch-pcod-i { color: var(--pc-amber); flex: none; }

/* The pay form lists no products for an advance: hide the empty table head. */
body.hch-pcod-paying #order_review table.shop_table thead { display: none; }

@media (max-width: 640px) {
	.hch-pcod-pay { padding: 20px 18px 18px; border-radius: 20px; }
	.hch-pcod-pay h2 { font-size: 21px; line-height: 27px; }
	.hch-pcod-tiles { gap: 8px; }
	.hch-pcod-tile { padding: 10px; border-radius: 12px; }
	.hch-pcod-tile b, .hch-pcod-tile b .woocommerce-Price-amount { font-size: 16px; line-height: 22px; }
	.hch-pcod-tile span { font-size: 9.5px; letter-spacing: .06em; }
}

/* ---------- Thank-you page note ---------- */
.hch-pcod-ty { margin: 0 0 6px !important; color: inherit; }
.hch-pcod-ty b, .hch-pcod-ty b .woocommerce-Price-amount { color: var(--pc-navy); font-weight: 800; }
.hch-pcod-btn {
	display: inline-flex;
	align-items: center;
	margin-top: 8px;
	padding: 9px 16px;
	border-radius: var(--hch-radius-btn, 12px);
	background: var(--pc-amber);
	color: var(--pc-navy) !important;
	font-weight: 700;
	text-decoration: none !important;
}
.hch-pcod-btn:hover { background: var(--pc-amber-600); }

/* ---------- "Cash on Delivery" popup (checkout) ---------- */
html.hch-pcod-locked { overflow: hidden; }
.hch-pcod-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	color: var(--pc-ink);
}
.hch-pcod-modal[hidden] { display: none; }
.hch-pcod-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 28, 42, .55);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity .2s ease;
}
.hch-pcod-modal.is-open .hch-pcod-modal__backdrop { opacity: 1; }
.hch-pcod-modal__card {
	position: relative;
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 28px 26px 20px;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 28px 70px rgba(11, 57, 84, .35);
	opacity: 0;
	transform: translateY(14px) scale(.98);
	transition: opacity .2s ease, transform .22s ease;
}
.hch-pcod-modal.is-open .hch-pcod-modal__card { opacity: 1; transform: none; }
.hch-pcod-modal .hch-pcod-modal__x {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--hch-surface-100, #edf4f4);
	color: var(--pc-navy);
	cursor: pointer;
	box-shadow: none;
}
.hch-pcod-modal .hch-pcod-modal__x:hover { background: var(--hch-navy-100, #e3edf2); }
.hch-pcod-modal__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: var(--pc-amber-soft);
	color: var(--pc-navy);
	box-shadow: inset 0 0 0 1px rgba(255, 177, 40, .55);
}
.hch-pcod-modal .hch-pcod-modal__title {
	margin: 14px 0 8px;
	padding: 0;
	font-family: var(--pc-sans);
	font-size: 24px;
	line-height: 30px;
	font-weight: 800;
	color: var(--pc-navy);
}
.hch-pcod-modal__text { margin: 0 0 16px; font-size: 14.5px; line-height: 22px; color: var(--pc-muted); }
.hch-pcod-modal__total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin: 0 0 10px;
	padding: 10px 2px 0;
	border-top: 1px solid var(--pc-line);
	font-size: 14px;
	color: var(--pc-muted);
}
.hch-pcod-modal__total b,
.hch-pcod-modal__total b .woocommerce-Price-amount { font: 700 16px/22px var(--pc-mono); color: var(--pc-navy); }
.hch-pcod-modal .hch-pcod-note { margin: 12px 2px 0 !important; }
.hch-pcod-modal .hch-pcod-modal__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 54px;
	margin: 20px 0 0;
	padding: 0 18px;
	border: 0;
	border-radius: 14px;
	background: var(--pc-amber);
	color: var(--pc-navy);
	font: 700 17px/1.2 var(--pc-sans);
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(255, 177, 40, .45);
	transition: background .15s ease, transform .15s ease;
}
.hch-pcod-modal .hch-pcod-modal__cta:hover { background: var(--pc-amber-600); transform: translateY(-1px); }
.hch-pcod-modal .hch-pcod-modal__cta:focus-visible,
.hch-pcod-modal .hch-pcod-modal__alt:focus-visible,
.hch-pcod-modal .hch-pcod-modal__x:focus-visible { outline: 3px solid var(--hch-navy-500, #2c6e99); outline-offset: 2px; }
.hch-pcod-modal .hch-pcod-modal__alt {
	display: block;
	width: 100%;
	min-height: 44px;
	margin: 6px 0 0;
	padding: 0 12px;
	border: 0;
	background: transparent;
	color: var(--pc-navy);
	font: 600 14px/1.3 var(--pc-sans);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-transform: none;
	cursor: pointer;
	box-shadow: none;
}
.hch-pcod-modal__secure {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 4px 0 0 !important;
	font-size: 12px;
	line-height: 16px;
	color: var(--pc-muted);
}

/* Phones: a bottom sheet. */
@media (max-width: 640px) {
	.hch-pcod-modal { align-items: flex-end; padding: 0; }
	.hch-pcod-modal__card {
		max-width: none;
		max-height: 92vh;
		padding: 26px 20px calc(16px + env(safe-area-inset-bottom, 0px));
		border-radius: 24px 24px 0 0;
		transform: translateY(100%);
	}
	.hch-pcod-modal .hch-pcod-modal__title { font-size: 22px; line-height: 28px; }
	.hch-pcod-modal__text { font-size: 14px; line-height: 21px; }
}

@media (prefers-reduced-motion: reduce) {
	.hch-pcod-modal__backdrop,
	.hch-pcod-modal__card { transition: none; }
}
