/* ==================================================================
   17 - COD ADVANCE PAYMENT
   The "pay ₹100 to confirm" widget injected by assets/js/cod-advance.js
   into WooCommerce's own .payment_box.payment_method_cod container.

   Scoped entirely to .wo-cod-advance and .wo-cod-advance-locked, so
   this cannot reach anything else on the checkout page or any other
   page.
   ================================================================== */

/* ==================================================================
   17 - COD ADVANCE PAYMENT
   The "pay ₹100 to confirm" widget injected by assets/js/cod-advance.js
   into WooCommerce's own .payment_box.payment_method_cod container.

   That container is now a light glass card (see assets/css/14-cart-
   checkout.css, section F), not the dark page background this widget
   was originally styled against. Every colour below is a light-theme
   value on purpose - the previous version used --wo-text and
   --wo-text-dim, both light colours meant for a dark background,
   which is why the text read as barely-visible white-on-cream.

   Scoped entirely to .wo-cod-advance and .wo-cod-advance-locked, so
   this cannot reach anything else on the checkout page or any other
   page.
   ================================================================== */

.wo-cod-advance {
	margin-top: var(--wo-space-4);
	padding: var(--wo-space-5);

	/* A light, warm card - gold tint over the near-white parent
	   rather than the low-alpha overlay meant for a dark background,
	   which read as a muddy tan once the parent itself went light. */
	background: rgba(245, 197, 66, 0.16);
	border: 1px solid rgba(196, 148, 30, 0.35);
	border-radius: var(--wo-radius-md);
}

.wo-cod-advance__text {
	margin: 0 0 var(--wo-space-3);
	font-size: var(--wo-text-sm);
	line-height: 1.5;
	color: #1A1330;
}

.wo-cod-advance__button {
	min-width: 160px;
}

.wo-cod-advance__status {
	min-height: 1.2em;
	margin: var(--wo-space-3) 0 0;
	font-size: var(--wo-text-sm);
	font-weight: var(--wo-weight-medium);
	color: rgba(26, 19, 48, 0.7);
}

.wo-cod-advance__status--success {
	/* Darker than --wo-success (#4ADE80) - that value is tuned for a
	   dark background and reads as too pale on this light card. */
	color: #1F9D55;
}

.wo-cod-advance__status--error {
	/* Same reasoning as --wo-success above, for the error tone. */
	color: #C23B3B;
}

.wo-cod-advance__note {
	margin: var(--wo-space-2) 0 0;
	font-size: var(--wo-text-xs);
	color: rgba(26, 19, 48, 0.6);
}

/* Visual lock on Place Order while COD is selected and unpaid. The
   actual rule is enforced server-side regardless of this - see
   inc/cod-advance.php - so this is a UX cue, not a security boundary. */
#place_order.wo-cod-advance-locked {
	opacity: 0.55;
	cursor: not-allowed;
}

@media (max-width: 479.98px) {

	.wo-cod-advance {
		padding: var(--wo-space-4);
	}

	.wo-cod-advance__button {
		width: 100%;
	}
}
