/**
 * CareEarth checkout: payment step — list rows (icon left, title + description right)
 */

.ce-payment-checkout {
	--ce-pay-accent: #0d9488;
	--ce-pay-accent-rgb: 13, 148, 136;
	--ce-pay-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ce-pay-border: rgba(15, 23, 42, 0.16);
	--ce-pay-border-active: #0d9488;
	--ce-pay-radius: 12px;
	--ce-pay-row-bg: #f8fafc;
	max-width: min(40rem, 100%);
	margin-inline: auto;
}

.checkout-standard-payment.ce-payment-checkout .ce-payment-option-label,
.checkout-standard-payment.ce-payment-checkout .item-service .description {
	max-width: 100%;
	min-width: 0;
	width: 100%;
}

.ce-payment-checkout .ce-payment-headline {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin: 0 0 0.35rem;
	font-size: clamp(1.45rem, 4vw, 1.8rem);
	font-weight: 700;
	color: #0f172a;
}

.ce-payment-checkout .ce-payment-headline__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 12px;
	color: var(--ce-pay-accent);
	background: linear-gradient(145deg, rgba(var(--ce-pay-accent-rgb), 0.14) 0%, rgba(var(--ce-pay-accent-rgb), 0.05) 100%);
	border: 1px solid rgba(var(--ce-pay-accent-rgb), 0.2);
	flex-shrink: 0;
}

.ce-payment-checkout .ce-payment-headline__icon svg {
	width: 1.65rem;
	height: 1.65rem;
}

.ce-payment-checkout .ce-payment-note {
	margin: 0 0 1.25rem;
	font-size: 1.05rem;
	color: #64748b;
}

.ce-payment-checkout .ce-payment-options-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

/* Payment row cards — visible border on every option */
.checkout-standard-payment.ce-payment-checkout .item.item-service.row.ce-payment-service-row {
	margin: 0;
	padding: 0;
	border-radius: var(--ce-pay-radius);
	border: 2px solid var(--ce-pay-border) !important;
	background: var(--ce-pay-row-bg);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
	transition:
		border-color 0.25s var(--ce-pay-ease),
		background 0.25s ease,
		box-shadow 0.25s ease;
	animation: ce-payment-option-enter 0.45s var(--ce-pay-ease) both;
}

.checkout-standard-payment.ce-payment-checkout .item.item-service.row.ce-payment-service-row:nth-of-type(1) {
	animation-delay: 0ms;
}

.checkout-standard-payment.ce-payment-checkout .item.item-service.row.ce-payment-service-row:nth-of-type(2) {
	animation-delay: 60ms;
}

.checkout-standard-payment.ce-payment-checkout .item.item-service.row.ce-payment-service-row:nth-of-type(3) {
	animation-delay: 120ms;
}

@keyframes ce-payment-option-enter {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.checkout-standard-payment.ce-payment-checkout .item.item-service.row.ce-payment-service-row:hover {
	background: #f1f5f9;
	border-color: rgba(var(--ce-pay-accent-rgb), 0.45) !important;
	transform: none;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.checkout-standard-payment.ce-payment-checkout .item.item-service.row.ce-payment-service-row:has(.option:checked) {
	border-color: var(--ce-pay-border-active) !important;
	background: #fff;
	box-shadow: 0 2px 14px rgba(var(--ce-pay-accent-rgb), 0.18);
	transform: none;
}

.ce-payment-checkout .ce-payment-service-row__main {
	padding: 0;
}

/* Row: radio | icon | text */
.ce-payment-checkout .ce-payment-option-label {
	display: grid;
	grid-template-columns: auto auto minmax(0, 1fr);
	align-items: center;
	gap: 0.85rem 1rem;
	margin: 0;
	padding: 0.95rem 1.1rem;
	cursor: pointer;
}

.ce-payment-checkout .ce-payment-option-radio,
.ce-payment-checkout .ce-payment-service-row .option {
	accent-color: var(--ce-pay-accent);
	width: 1.25rem;
	height: 1.25rem;
	margin: 0 !important;
	align-self: center;
	justify-self: center;
	flex-shrink: 0;
}

/* Icon — image only (no extra white tile); border on the asset */
.ce-payment-checkout .ce-payment-icon-frame {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	min-width: 0;
	padding: 0;
	background: transparent;
	border: none;
	box-shadow: none;
}

.ce-payment-checkout .ce-payment-icon-frame img,
.checkout-standard-payment.ce-payment-checkout .ce-payment-icon-frame .ce-payment-icons-slot img,
.checkout-standard-payment.ce-payment-checkout .ce-payment-icon-frame .icon img,
.checkout-standard-payment.ce-payment-checkout .item-service .description .icons img {
	display: block;
	width: auto !important;
	height: auto !important;
	max-width: clamp(5.5rem, 18vw, 7.25rem);
	max-height: clamp(5rem, 16vw, 6.5rem);
	min-width: 0;
	object-fit: contain;
	margin: 0 !important;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 10px;
	box-shadow: none;
}

.ce-payment-checkout .ce-payment-icon-frame--media .ce-payment-icons-slot {
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
}

/* Text — right column */
.ce-payment-checkout .ce-payment-option-body {
	min-width: 0;
	flex: 1 1 auto;
}

.ce-payment-checkout .ce-payment-option-title-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.35rem 0.75rem;
}

.ce-payment-checkout .ce-payment-option-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.35;
	color: #0f172a;
}

.ce-payment-checkout .ce-payment-option-price {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--ce-pay-accent);
	white-space: nowrap;
}

.ce-payment-checkout .ce-payment-option-desc {
	margin: 0.35rem 0 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: #64748b;
	font-weight: 400;
}

.ce-payment-checkout .ce-payment-text:empty {
	display: none;
}

.ce-payment-checkout .ce-payment-text {
	margin-top: 0.5rem;
	padding-top: 0.5rem;
	border-top: 1px dashed rgba(15, 23, 42, 0.1);
}

.ce-payment-checkout .ce-payment-text p {
	margin: 0.25rem 0 0;
	font-size: 0.875rem;
	line-height: 1.45;
	color: #64748b;
}

.ce-payment-checkout .ce-payment-service-row__attrs {
	padding: 0 1.1rem 0.95rem;
}

.checkout-standard-payment.ce-payment-checkout .button-group .btn {
	min-width: 10rem;
	min-height: 3.25rem;
	font-size: 1.125rem;
	padding: 0.85rem 1.75rem;
}

@media (max-width: 575.98px) {
	.ce-payment-checkout .ce-payment-option-label {
		grid-template-columns: auto auto minmax(0, 1fr);
		gap: 0.65rem 0.75rem;
		padding: 0.85rem 0.95rem;
	}

	.ce-payment-checkout .ce-payment-icon-frame img {
		max-width: 6.25rem;
		max-height: 5.5rem;
	}

	.ce-payment-checkout .ce-payment-option-title {
		font-size: 1rem;
	}

	.ce-payment-checkout .ce-payment-option-desc {
		font-size: 0.85rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.checkout-standard-payment.ce-payment-checkout .item.item-service.row.ce-payment-service-row {
		animation: none;
		transition: none;
	}
}
