/* ==========================================================================
   LoveyDovey · India checkout payment block
   Dark editorial shell matching theme.css tokens:
   paper #100d11 · card #1c161c · line #3a2934 · ink #f7edf1 · muted #c2afb8
   accent #f0a9c3
   ========================================================================== */

/* --- shell ---------------------------------------------------------------- */

.woocommerce-checkout #payment,
.woocommerce-checkout #payment.woocommerce-checkout-payment {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0;
}

.woocommerce-checkout #payment ul.wc_payment_methods {
	list-style: none;
	margin: 0 0 6px;
	padding: 0;
	border: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: transparent;
}

.woocommerce-checkout #payment ul.wc_payment_methods::before,
.woocommerce-checkout #payment ul.wc_payment_methods::after {
	display: none;
}

/* --- row ------------------------------------------------------------------ */

.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method {
	position: relative;
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr) 20px;
	align-items: center;
	column-gap: 11px;
	margin: 0;
	padding: 11px 13px;
	list-style: none;
	border: 1px solid #3a2934;
	border-radius: 12px;
	background: #1c161c;
	transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method:hover {
	border-color: #4d3543;
}

.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method:has(input.input-radio:checked) {
	border-color: #f0a9c3;
	background: #241a22;
	box-shadow: 0 0 0 1px rgba(240, 169, 195, .26), 0 8px 24px rgba(0, 0, 0, .34);
}

/* --- icon ----------------------------------------------------------------- */

.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method::before {
	content: "";
	grid-column: 1;
	grid-row: 1;
	width: 36px;
	height: 36px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 36px 36px;
}

.woocommerce-checkout #payment ul.wc_payment_methods li.payment_method_lyd_upi::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='10' fill='%23F0A9C31F'/%3E%3Cpath d='M9 14.6h15M19.4 10.6l4.2 4-4.2 4' stroke='%23e8b9c9' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3Cpath d='M27 21.4H12M16.6 25.4l-4.2-4 4.2-4' stroke='%23e8b9c9' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.woocommerce-checkout #payment ul.wc_payment_methods li.payment_method_cod::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='10' fill='%23F0A9C31F'/%3E%3Crect x='7' y='12' width='22' height='12' rx='2.4' stroke='%23e8b9c9' stroke-width='1.7' fill='none'/%3E%3Ccircle cx='18' cy='18' r='3' stroke='%23e8b9c9' stroke-width='1.7' fill='none'/%3E%3C/svg%3E");
}

.woocommerce-checkout #payment ul.wc_payment_methods li.payment_method_bacs::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='10' fill='%23F0A9C31F'/%3E%3Cpath d='M9 16.5h18M11 16.5v9M15 16.5v9M21 16.5v9M25 16.5v9M8 25.5h20M18 8.6l9.4 7.9H8.6L18 8.6z' stroke='%23e8b9c9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method:not(.payment_method_lyd_upi):not(.payment_method_cod):not(.payment_method_bacs)::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Crect width='36' height='36' rx='10' fill='%23F0A9C31F'/%3E%3Crect x='8' y='12.5' width='20' height='13' rx='2.4' stroke='%23e8b9c9' stroke-width='1.7' fill='none'/%3E%3Cpath d='M8 17h20' stroke='%23e8b9c9' stroke-width='1.7'/%3E%3C/svg%3E");
}

/* --- radio ---------------------------------------------------------------- */

.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method > input.input-radio {
	-webkit-appearance: none;
	appearance: none;
	grid-column: 3;
	grid-row: 1;
	width: 20px;
	height: 20px;
	margin: 0;
	padding: 0;
	border: 1.5px solid #5d4552;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
}

.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method > input.input-radio:checked {
	border-color: #f0a9c3;
	background: #f0a9c3;
	box-shadow: inset 0 0 0 3px #241a22;
}

/* --- label ---------------------------------------------------------------- */

.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method > label {
	grid-column: 2;
	grid-row: 1;
	display: block;
	margin: 0;
	padding: 0;
	font-size: 13.5px !important;
	font-weight: 600;
	line-height: 1.3 !important;
	letter-spacing: .1px;
	color: #f7edf1;
	cursor: pointer;
}

.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method > label::after {
	display: block;
	margin-top: 3px;
	font-size: 11px !important;
	font-weight: 400;
	line-height: 1.35 !important;
	letter-spacing: 0;
	color: #a2909c;
}

.woocommerce-checkout #payment ul.wc_payment_methods li.payment_method_lyd_upi > label::after {
	content: "Google Pay · PhonePe · Paytm · MobiKwik";
}

.woocommerce-checkout #payment ul.wc_payment_methods li.payment_method_cod > label::after {
	content: "Pay cash at delivery · we confirm on call";
}

.woocommerce-checkout #payment ul.wc_payment_methods li.payment_method_bacs > label::after {
	content: "Manual transfer · ships after the credit clears";
}

/* --- expanded box --------------------------------------------------------- */

.woocommerce-checkout #payment ul.wc_payment_methods li div.payment_box,
.woocommerce-checkout #payment ul.wc_payment_methods li div.payment_box.payment_method_lyd_upi,
.woocommerce-checkout #payment ul.wc_payment_methods li div.payment_box.payment_method_cod {
	grid-column: 1 / -1;
	grid-row: 2;
	margin: 11px 0 0;
	padding: 13px;
	border: 1px solid #34262f;
	border-radius: 10px;
	background: #140f14;
	color: #c2afb8;
	font-size: 12.5px;
	line-height: 1.6;
}

.woocommerce-checkout #payment ul.wc_payment_methods li div.payment_box::before {
	display: none;
}

.woocommerce-checkout #payment ul.wc_payment_methods li div.payment_box p {
	margin: 0;
	font-size: 12.5px !important;
	line-height: 1.6 !important;
	color: #c2afb8;
}

.woocommerce-checkout #payment ul.wc_payment_methods li div.payment_box p + p {
	margin-top: 8px;
}

/* --- tidy the legal copy that sits directly under the payment rows -------- */

.woocommerce-checkout .woocommerce-privacy-policy-text p,
.woocommerce-checkout .woocommerce-privacy-policy-text {
	font-size: 11.5px !important;
	line-height: 1.6 !important;
	color: #a2909c !important;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper .woocommerce-form__label,
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper label {
	font-size: 11px !important;
	line-height: 1.55 !important;
	letter-spacing: .6px !important;
}

/* Theme floats the checkbox, so wrapped lines fall back to the left edge.
   Pin it absolutely and give the label a hanging indent instead. */
.woocommerce-checkout #payment .place-order .woocommerce-terms-and-conditions-wrapper label {
	display: block !important;
	position: relative;
	float: none !important;
	padding-left: 30px !important;
}

.woocommerce-checkout #payment .place-order .woocommerce-terms-and-conditions-wrapper label input[type="checkbox"] {
	position: absolute;
	left: 0;
	top: 2px;
	float: none !important;
	margin: 0 !important;
}

/* --- UPI panel inside checkout ------------------------------------------- */

.lyd-upi-desc,
.woocommerce-checkout #payment .lyd-upi-desc {
	margin: 0 0 11px;
	font-size: 12.5px !important;
	line-height: 1.55 !important;
	color: #c2afb8;
}

.lyd-upi-saving,
.woocommerce-checkout #payment .lyd-upi-saving {
	margin: 0 0 10px !important;
	font-size: 11.5px !important;
	line-height: 1.45 !important;
	font-weight: 600 !important;
	color: #c9a961 !important;
}

.lyd-upi-apps {
	display: flex;
	gap: 7px;
	max-width: 380px;
}

.lyd-upi-app {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	padding: 9px 3px;
	border: 1px solid #3a2934;
	border-radius: 10px;
	background: #1c161c;
}

.lyd-upi-app i {
	width: 24px;
	height: 24px;
	border-radius: 7px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-style: normal;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: -.2px;
}

.lyd-upi-app > span {
	max-width: 100%;
	font-size: 9px;
	line-height: 1.2;
	color: #a2909c;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lyd-upi-hint,
.woocommerce-checkout #payment .lyd-upi-hint {
	margin: 11px 0 0;
	max-width: 380px;
	font-size: 11.5px !important;
	line-height: 1.55 !important;
	color: #a2909c;
}

/* --- pay screen (thank-you / order view) ---------------------------------- */

.lyd-upi-pay {
	margin: 26px 0;
	padding: 20px;
	border: 1px solid #3a2934;
	border-radius: 14px;
	background: #1c161c;
}

.lyd-upi-pay-head {
	margin: 0 0 10px;
}

.lyd-upi-pay-cap {
	display: block;
	font-size: 9.5px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #a2909c;
}

.lyd-upi-pay-amt {
	display: block;
	margin-top: 6px;
	font-size: 27px;
	font-weight: 700;
	line-height: 1.1;
	color: #f7edf1;
}

.lyd-upi-pay-note {
	margin: 0 0 14px;
	font-size: 12.5px;
	line-height: 1.6;
	color: #c2afb8;
}

.lyd-upi-pay-note b {
	color: #f7edf1;
}

.lyd-upi-vpa {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 13px;
	border: 1px dashed #4a3340;
	border-radius: 10px;
	background: #140f14;
}

.lyd-upi-vpa-id {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	color: #f7edf1;
	word-break: break-all;
}

.lyd-upi-copy {
	flex: 0 0 auto;
	padding: 6px 12px;
	border: 1px solid #4a3340;
	border-radius: 999px;
	background: transparent;
	color: #f0a9c3;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}

.lyd-upi-copy:hover {
	background: rgba(240, 169, 195, .1);
	border-color: #f0a9c3;
}

.lyd-upi-btn,
.woocommerce .lyd-upi-btn {
	display: block;
	margin: 12px 0 0;
	padding: 15px;
	border-radius: 999px;
	background: #f0a9c3;
	color: #21131a !important;
	font-size: 14px !important;
	font-weight: 700;
	line-height: 1.4 !important;
	text-align: center;
	text-decoration: none;
	opacity: 1 !important;
	transition: filter .15s ease;
}

.lyd-upi-btn:hover,
.woocommerce .lyd-upi-btn:hover {
	filter: brightness(1.06);
	color: #21131a !important;
}

.lyd-upi-pay-foot {
	margin: 13px 0 0;
	font-size: 11px;
	line-height: 1.6;
	color: #8d7b86;
}

/* --- mobile --------------------------------------------------------------- */

@media (max-width: 480px) {

	.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method {
		grid-template-columns: 34px minmax(0, 1fr) 20px;
		padding: 10px 12px;
	}

	.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method::before {
		width: 34px;
		height: 34px;
		background-size: 34px 34px;
	}

	.woocommerce-checkout #payment ul.wc_payment_methods li.wc_payment_method > label {
		font-size: 13px;
	}

	.lyd-upi-app {
		gap: 4px;
		padding: 8px 2px;
	}

	.lyd-upi-app > span {
		font-size: 8.5px;
	}

	.lyd-upi-pay {
		padding: 16px;
	}

	.lyd-upi-pay-amt {
		font-size: 24px;
	}
}

/* --- pay screen: app action + dynamic QR --------------------------------- */

.lyd-upi-pay-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 164px;
	gap: 18px;
	align-items: start;
}

.lyd-upi-pay-main {
	min-width: 0;
}

.lyd-upi-or {
	margin: 9px 0 0;
	font-size: 10.5px;
	line-height: 1.5;
	color: #8d7b86;
	text-align: center;
}

.lyd-upi-qr {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 11px;
	border: 1px solid #3a2934;
	border-radius: 12px;
	background: #140f14;
}

.lyd-upi-qr-img {
	width: 140px;
	height: 140px;
	padding: 8px;
	background: #ffffff;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.lyd-upi-qr-img svg {
	display: block;
	width: 100%;
	height: 100%;
}

.lyd-upi-qr-cap {
	font-size: 10px;
	line-height: 1.35;
	color: #a2909c;
	text-align: center;
}

@media (max-width: 700px) {
	.lyd-upi-pay-body {
		grid-template-columns: 1fr;
		gap: 14px;
	}
	.lyd-upi-qr {
		flex-direction: row;
		justify-content: center;
	}
	.lyd-upi-qr-img {
		width: 112px;
		height: 112px;
		flex: 0 0 auto;
	}
	.lyd-upi-qr-cap {
		max-width: 120px;
		text-align: left;
	}
}

/* ==========================================================================
   Wide-screen checkout: details left, order + payment right.
   Pure CSS grid on the existing form — no template overrides.
   ========================================================================== */

@media (min-width: 1024px) {

	/* The page template caps .entry-content at 820px — far too narrow for two
	   columns. Widen it on checkout only, leaving every other page untouched. */
	body.woocommerce-checkout .entry-content,
	.entry-content:has(form.checkout.woocommerce-checkout) {
		max-width: 1180px;
	}

	form.checkout.woocommerce-checkout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(390px, 460px);
		grid-template-rows: auto auto 1fr;
		column-gap: 36px;
		align-items: start;
	}

	/* Anything WooCommerce injects above the columns stays full width. */
	form.checkout.woocommerce-checkout > *:not(#customer_details):not(#order_review):not(#order_review_heading) {
		grid-column: 1 / -1;
	}

	form.checkout.woocommerce-checkout > .woocommerce-notices-wrapper {
		grid-row: 1;
	}

	form.checkout.woocommerce-checkout > .lyd-checkout-note.lyd-privacy-note {
		grid-row: 2;
	}

	form.checkout.woocommerce-checkout > #customer_details {
		grid-column: 1;
		grid-row: 3;
		width: 100% !important;
		float: none !important;
		margin-top: 18px;
	}

	/* The heading is a separate sibling of #order_review — place both in the
	   same grid cell and pull the card down so they don't start a new row. */
	form.checkout.woocommerce-checkout > #order_review_heading {
		grid-column: 2;
		grid-row: 3;
		align-self: start;
		margin: 18px 0 0;
	}

	form.checkout.woocommerce-checkout > #order_review {
		grid-column: 2;
		grid-row: 3;
		align-self: start;
		width: 100% !important;
		float: none !important;
		margin-top: 58px;
		padding: 22px;
		border: 1px solid #3a2934;
		border-radius: 16px;
		background: #171118;
		box-sizing: border-box;
	}

	/* Collapse WooCommerce's inner col-1 / col-2 split so billing fields
	   can use the full left column instead of a cramped half. */
	form.checkout.woocommerce-checkout #customer_details .col-1,
	form.checkout.woocommerce-checkout #customer_details .col-2 {
		width: 100% !important;
		float: none !important;
		margin: 0 0 22px;
	}

	form.checkout.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
	form.checkout.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: 16px;
	}

	form.checkout.woocommerce-checkout .form-row {
		width: 100% !important;
		float: none !important;
		margin: 0 0 15px;
	}

	form.checkout.woocommerce-checkout .form-row.form-row-wide,
	form.checkout.woocommerce-checkout .form-row#order_comments_field,
	form.checkout.woocommerce-checkout #payment {
		grid-column: 1 / -1;
	}

	form.checkout.woocommerce-checkout > #order_review .shop_table {
		width: 100%;
	}

	form.checkout.woocommerce-checkout > #order_review .lyd-checkout-note {
		margin-top: 14px;
	}
}

/* --- UPI "coming soon" teaser — shown only while no VPA is configured -----
   Purely presentational: no radio, no form field, cannot be submitted.     */

.woocommerce-checkout #payment ul.wc_payment_methods li.lyd-upi-soon {
	align-items: start;
	row-gap: 11px;
	border: 1px dashed #5d4552;
	background: #191319;
	cursor: default;
}

.woocommerce-checkout #payment ul.wc_payment_methods li.lyd-upi-soon:hover {
	border-color: #6d5260;
}

.woocommerce-checkout #payment ul.wc_payment_methods li.lyd-upi-soon::before {
	margin-top: 2px;
	opacity: .8;
}

.lyd-soon-body {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
	padding-top: 3px;
}

.lyd-soon-head {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.lyd-soon-title {
	font-size: 13.5px !important;
	font-weight: 600;
	line-height: 1.3 !important;
	color: #f7edf1;
}

.lyd-soon-badge {
	padding: 3px 7px;
	border: 1px solid rgba(240, 169, 195, .32);
	border-radius: 999px;
	background: rgba(240, 169, 195, .12);
	color: #e8b9c9;
	font-size: 8.5px !important;
	font-weight: 700;
	letter-spacing: .8px;
	line-height: 1.2 !important;
	white-space: nowrap;
}

.lyd-soon-sub {
	margin-top: 4px;
	font-size: 10.5px !important;
	line-height: 1.45 !important;
	color: #a2909c;
}

.lyd-soon-lock {
	position: relative;
	grid-column: 3;
	grid-row: 1;
	width: 18px;
	height: 18px;
	margin-top: 4px;
	border: 1.5px solid #5d4552;
	border-radius: 50%;
}

.lyd-soon-lock::after {
	content: "";
	position: absolute;
	left: 2px;
	top: 7px;
	width: 14px;
	height: 1.5px;
	background: #5d4552;
	transform: rotate(-45deg);
}

.lyd-soon-apps {
	grid-column: 1 / -1;
	grid-row: 2;
	display: flex;
	gap: 7px;
	max-width: 380px;
}

.lyd-soon-app {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	padding: 9px 2px 8px;
	border: 1px solid #3a2934;
	border-radius: 10px;
	background: #211a21;
}

.lyd-soon-app i {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 7px;
	font-style: normal;
	font-size: 9.5px !important;
	font-weight: 700;
	line-height: 1 !important;
}

.lyd-soon-app > span {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 9px !important;
	line-height: 1.3 !important;
	color: #b9a6b4;
}

.lyd-soon-perk {
	grid-column: 1 / -1;
	grid-row: 3;
	font-size: 10px !important;
	line-height: 1.5 !important;
	color: #c9a961;
}

@media (max-width: 480px) {
	.lyd-soon-apps {
		gap: 5px;
	}

	.lyd-soon-app {
		padding: 8px 1px 7px;
	}

	.lyd-soon-sub {
		font-size: 10px !important;
	}
}

/* --- quiet legal strip: tuck the policy + terms below the payment cards --- */

.woocommerce-checkout #payment .place-order .woocommerce-terms-and-conditions-wrapper {
	margin: 4px 0 14px !important;
	padding-top: 14px !important;
	border-top: 1px solid rgba(240, 169, 195, .12) !important;
}

.woocommerce-checkout #payment .woocommerce-privacy-policy-text p {
	margin: 0 !important;
	font-size: 11px !important;
	line-height: 1.55 !important;
	color: #8f7f8b !important;
}

.woocommerce-checkout #payment .place-order .woocommerce-terms-and-conditions-wrapper p.form-row {
	margin: 10px 0 0 !important;
	padding: 0 !important;
}

.woocommerce-checkout #payment .place-order .woocommerce-terms-and-conditions-wrapper .woocommerce-form__label {
	text-transform: none !important;
	letter-spacing: 0 !important;
	font-size: 11px !important;
	line-height: 1.5 !important;
	color: #a2909c !important;
}

.woocommerce-checkout #payment .place-order .woocommerce-terms-and-conditions-wrapper .woocommerce-form__label abbr.required {
	color: #e8b9c9 !important;
}

/* --- rupee glyph fallback -------------------------------------------------
   Cormorant Garamond has no ₹ glyph; Georgia covers it on Windows only.
   The candidates below sit AFTER Georgia, so devices that already render ₹
   are unchanged, while iOS / low-end Android fall through to a font that has
   the glyph. tabular-nums keeps multi-digit amounts aligned.               --- */

.woocommerce-checkout #payment .lyd-soon-perk,
.woocommerce-checkout #payment .lyd-upi-saving {
	font-family: "Cormorant Garamond", Georgia, "Noto Sans", system-ui, sans-serif !important;
	font-variant-numeric: tabular-nums;
}

