/* TND Partial COD — front end */
.tnd-pcod {
	--pcod-accent: #6b1d3a;
	--pcod-soft: color-mix(in srgb, var(--pcod-accent) 7%, #fff);
	--pcod-line: #ebe3da;
	--pcod-green: #1f8f55;
	--pcod-amber: #b45309;
	margin: 0 0 22px;
	padding: 18px;
	border-radius: 18px;
	background: linear-gradient(180deg, var(--pcod-soft), #fff 70%);
	border: 1px solid var(--pcod-line);
	font-size: 15px;
	line-height: 1.45;
	transition: opacity .2s;
}
.tnd-pcod.is-loading { opacity: .6; pointer-events: none; }
.tnd-pcod__heading { margin: 0 0 12px !important; font-weight: 600; font-size: 15px; color: #1f1a17; letter-spacing: .01em; }
.tnd-pcod__opt {
	position: relative;
	display: flex !important;
	gap: 14px;
	align-items: flex-start;
	padding: 16px 16px 16px 14px;
	margin: 0 0 10px !important;
	border: 1.5px solid var(--pcod-line);
	border-radius: 14px;
	background: #fff;
	cursor: pointer;
	transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tnd-pcod__opt:hover { border-color: color-mix(in srgb, var(--pcod-accent) 45%, #fff); }
.tnd-pcod__opt.is-active {
	border-color: var(--pcod-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--pcod-accent) 14%, transparent), 0 10px 24px -14px color-mix(in srgb, var(--pcod-accent) 60%, transparent);
}
.tnd-pcod__opt input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tnd-pcod__radio {
	flex: 0 0 auto;
	width: 20px; height: 20px;
	margin-top: 2px;
	border-radius: 50%;
	border: 2px solid #c9bfb4;
	position: relative;
	transition: border-color .2s;
}
.tnd-pcod__opt.is-active .tnd-pcod__radio { border-color: var(--pcod-accent); }
.tnd-pcod__opt.is-active .tnd-pcod__radio::after {
	content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--pcod-accent);
}
.tnd-pcod__opt input:focus-visible + .tnd-pcod__radio { outline: 2px solid var(--pcod-accent); outline-offset: 2px; }
.tnd-pcod__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.tnd-pcod__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; color: #1f1a17; font-size: 15.5px; }
.tnd-pcod__badge {
	font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .04em;
	padding: 3px 9px; border-radius: 999px;
	background: var(--pcod-accent); color: #fff;
}
.tnd-pcod__sub { font-size: 13px; color: #7a7068; }
.tnd-pcod__split {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: stretch;
	gap: 8px;
	margin-top: 10px;
}
.tnd-pcod__split--single { grid-template-columns: 1fr; }
.tnd-pcod__now, .tnd-pcod__later {
	display: flex; flex-direction: column;
	padding: 10px 12px;
	border-radius: 10px;
}
.tnd-pcod__now { background: #e9f7ef; }
.tnd-pcod__later { background: #fff6e5; }
.tnd-pcod__now small, .tnd-pcod__later small { font-size: 11.5px; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; }
.tnd-pcod__now small { color: var(--pcod-green); }
.tnd-pcod__later small { color: var(--pcod-amber); }
.tnd-pcod__now strong, .tnd-pcod__later strong { font-size: 18px; color: #1f1a17; line-height: 1.25; }
.tnd-pcod__plus { align-self: center; font-weight: 600; color: #b3a89d; }
.tnd-pcod__opt:not(.is-active) .tnd-pcod__split { filter: saturate(.4); opacity: .8; }
.tnd-pcod__note {
	margin: 4px 2px 0 !important;
	font-size: 12.5px;
	color: #7a7068;
	padding-left: 18px;
	position: relative;
}
.tnd-pcod__note::before { content: "ⓘ"; position: absolute; left: 0; top: 0; color: var(--pcod-accent); }

/* Review table rows */
.woocommerce-checkout-review-order-table .tnd-pcod-row th,
.woocommerce-checkout-review-order-table .tnd-pcod-row td { border-top: 1px dashed #e5dccf !important; }
.tnd-pcod-row--now th, .tnd-pcod-row--now td strong { color: #1f8f55 !important; }
.tnd-pcod-row--cod th, .tnd-pcod-row--cod td strong { color: #b45309 !important; }
.woocommerce-checkout-review-order-table .fee td .amount { white-space: nowrap; }

/* Product badge */
.tnd-pcod-badge {
	--pcod-accent: #6b1d3a;
	display: flex; align-items: center; gap: 10px;
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--pcod-accent) 7%, #fff);
	border: 1px dashed color-mix(in srgb, var(--pcod-accent) 40%, #fff);
	font-size: 14px;
	color: #3d3530;
}
.tnd-pcod-badge strong { color: var(--pcod-accent); }
.tnd-pcod-badge__ico {
	flex: 0 0 auto;
	display: grid; place-items: center;
	width: 30px; height: 30px; border-radius: 50%;
	background: var(--pcod-accent); color: #fff; font-weight: 700;
}

/* Cart notice */
.tnd-pcod-cartnote {
	--pcod-accent: #6b1d3a;
	margin: 0 0 14px;
	padding: 10px 14px;
	border-radius: 10px;
	background: color-mix(in srgb, var(--pcod-accent) 7%, #fff);
	font-size: 13.5px;
	line-height: 1.45;
	color: #3d3530;
}
.tnd-pcod-cartnote strong { color: var(--pcod-accent); }

/* Thank-you / My account summary */
.tnd-pcod-summary {
	--pcod-accent: #6b1d3a;
	margin: 0 0 28px;
	border: 1.5px solid var(--pcod-accent);
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
}
.tnd-pcod-summary__head {
	display: flex; gap: 12px; align-items: center;
	padding: 14px 18px;
	background: var(--pcod-accent);
	color: #fff;
}
.tnd-pcod-summary__head strong { display: block; font-size: 16px; color: #fff; }
.tnd-pcod-summary__head span { font-size: 13px; opacity: .85; }
.tnd-pcod-summary__ico {
	display: grid; place-items: center;
	width: 36px; height: 36px; border-radius: 50%;
	background: rgba(255, 255, 255, .18); font-weight: 700; font-size: 17px;
}
.tnd-pcod-summary__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.tnd-pcod-summary__grid > div { padding: 16px; text-align: center; border-right: 1px solid #eee5db; display: flex; flex-direction: column; gap: 2px; }
.tnd-pcod-summary__grid > div:last-child { border-right: 0; }
.tnd-pcod-summary__grid small { font-size: 12px; color: #7a7068; text-transform: uppercase; letter-spacing: .04em; }
.tnd-pcod-summary__grid strong { font-size: 19px; color: #1f1a17; }
.tnd-pcod-summary__grid .is-paid small, .tnd-pcod-summary__grid .is-paid strong { color: #1f8f55; }
.tnd-pcod-summary__grid .is-due { background: #fff6e5; }
.tnd-pcod-summary__grid .is-due small, .tnd-pcod-summary__grid .is-due strong { color: #b45309; }

@media (max-width: 520px) {
	.tnd-pcod { padding: 14px; }
	.tnd-pcod__split { grid-template-columns: 1fr 1fr; }
	.tnd-pcod__plus { display: none; }
	.tnd-pcod__now strong, .tnd-pcod__later strong { font-size: 16px; }
	.tnd-pcod-summary__grid { grid-template-columns: 1fr; }
	.tnd-pcod-summary__grid > div { border-right: 0; border-bottom: 1px solid #eee5db; flex-direction: row; justify-content: space-between; align-items: center; text-align: left; }
}
