/* Metody wysyłki (koszyk, zamówienie) i płatności – kafelki (szablon: woocommerce/cart/cart-shipping.php). */

.wnp-shipping,
#payment {
	--wnp-ink: #141414;
	--wnp-green: #112926;
	--wnp-gold: #bfa069;
	--wnp-line: rgba(150, 120, 68, 0.25);
	--wnp-muted: #b3ab9d;
}

table.shop_table tr.wnp-shipping td.wnp-shipping__cell {
	display: table-cell;
	width: auto;
	padding: 18px 0 !important;
	text-align: left !important;
	vertical-align: top;
}
table.shop_table tr.wnp-shipping td.wnp-shipping__cell::before {
	display: none !important;
}

.wnp-shipping__title {
	margin: 0 0 12px;
	color: var(--wnp-ink);
	font-weight: 600;
}

.wnp-shipping ul#shipping_method {
	display: grid;
	gap: 8px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	text-align: left;
}

.wnp-shipping ul#shipping_method li.wnp-rate {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	position: relative;
	margin: 0 !important;
	padding: 0 !important;
	text-indent: 0 !important;
	border: 1px solid var(--wnp-line);
	border-radius: 8px;
	background: #fff;
	line-height: 1.35;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.wnp-shipping ul#shipping_method li.wnp-rate:hover {
	border-color: rgba(150, 120, 68, 0.55);
}
.wnp-shipping ul#shipping_method li.wnp-rate:has(> input.shipping_method:checked),
.wnp-shipping ul#shipping_method li.wnp-rate.is-single {
	border-color: var(--wnp-green);
	box-shadow: 0 0 0 1px var(--wnp-green);
}

.wnp-shipping .woocommerce-shipping-destination {
	margin: 12px 0 4px;
}

/* Radio */
.wnp-shipping ul#shipping_method li.wnp-rate > input[type="radio"].shipping_method {
	-webkit-appearance: none;
	appearance: none;
	flex: none;
	display: grid;
	place-content: center;
	width: 18px;
	height: 18px;
	margin: 0 0 0 16px !important;
	padding: 0;
	border: 1.5px solid #9c9486;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
	vertical-align: middle;
}
.wnp-shipping ul#shipping_method li.wnp-rate > input[type="radio"].shipping_method::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--wnp-green);
	transform: scale(0);
	transition: transform .12s ease;
}
.wnp-shipping ul#shipping_method li.wnp-rate > input[type="radio"].shipping_method:checked {
	border-color: var(--wnp-green);
}
.wnp-shipping ul#shipping_method li.wnp-rate > input[type="radio"].shipping_method:checked::before {
	transform: scale(1);
}
.wnp-shipping ul#shipping_method li.wnp-rate > input[type="radio"].shipping_method:focus-visible {
	outline: 2px solid var(--wnp-gold);
	outline-offset: 2px;
}

/* Nazwa | ikona | cena */
.wnp-shipping ul#shipping_method li.wnp-rate > label {
	display: flex !important;
	flex: 1 1 0;
	align-items: center;
	gap: 12px;
	min-width: 0;
	margin: 0 !important;
	padding: 14px 16px 14px 12px !important;
	color: var(--wnp-ink) !important;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	cursor: pointer;
}
.wnp-shipping ul#shipping_method li.wnp-rate.is-single > label {
	padding-left: 16px !important;
}
.wnp-rate__name {
	flex: 1 1 auto;
	min-width: 0;
}
.wnp-rate__icon {
	flex: none;
	display: inline-flex;
	width: 24px;
	height: 24px;
	color: var(--wnp-muted);
	transition: color .15s ease;
}
.wnp-rate__icon svg {
	width: 100%;
	height: 100%;
}
.wnp-shipping li.wnp-rate:has(> input:checked) .wnp-rate__icon,
.wnp-shipping li.wnp-rate.is-single .wnp-rate__icon {
	color: var(--wnp-green);
}
/* Logo przewoźnika: szare, w kolorze po wybraniu */
.wnp-rate__icon:has(> .wnp-rate__logo) {
	width: 58px;
	height: 35px;
	margin: -6px 0;
}
.wnp-rate__icon > img.wnp-rate__logo {
	width: 100%;
	height: 100%;
	object-fit: contain;
	filter: grayscale(1);
	opacity: .45;
	transition: filter .15s ease, opacity .15s ease;
}
.wnp-shipping li.wnp-rate:has(> input:checked) .wnp-rate__logo,
.wnp-shipping li.wnp-rate.is-single .wnp-rate__logo {
	filter: none;
	opacity: 1;
}
.wnp-rate__price {
	flex: none;
	min-width: 62px;
	text-align: right;
	white-space: nowrap;
	font-weight: 600;
}
.wnp-rate__price .amount {
	color: var(--wnp-ink) !important;
	font-weight: inherit;
}

/* TikTok – pole na nick / podpowiedź w koszyku */
.wnp-shipping .wnp-tiktok {
	display: none;
	flex: 0 0 100%;
	padding: 0 16px 16px 46px;
}
.wnp-shipping li.wnp-rate:has(> input:checked) .wnp-tiktok,
.wnp-shipping li.wnp-rate.is-single .wnp-tiktok {
	display: block;
}
.wnp-shipping .wnp-tiktok--hint {
	margin-top: -4px;
	color: #6b6b6b;
	font-size: 12px;
	line-height: 1.4;
}
.wnp-shipping .wnp-tiktok__row {
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}
.wnp-shipping .wnp-tiktok__row > label {
	display: block !important;
	margin: 0 0 6px !important;
	padding: 0 !important;
	color: var(--wnp-ink) !important;
	font-size: 13px !important;
	font-weight: 500;
	line-height: 1.3;
}
.wnp-shipping .wnp-tiktok__row abbr.required {
	color: #c0392b;
	text-decoration: none;
	border: 0;
}
.wnp-shipping .wnp-tiktok__input {
	display: flex;
	align-items: stretch;
	border: 1px solid rgba(150, 120, 68, 0.35);
	border-radius: 6px;
	background: rgba(150, 120, 68, 0.05);
	overflow: hidden;
	transition: border-color .15s ease;
}
.wnp-shipping .wnp-tiktok__input:focus-within {
	border-color: var(--wnp-green);
}
.wnp-shipping .woocommerce-invalid .wnp-tiktok__input {
	border-color: #c0392b;
}
.wnp-shipping .wnp-tiktok__at {
	display: flex;
	align-items: center;
	padding: 0 10px;
	border-right: 1px solid rgba(150, 120, 68, 0.2);
	color: #8a7a5c;
	font-weight: 600;
}
.wnp-shipping .wnp-tiktok__input input#tiktok_nick {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 10px 12px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--wnp-ink);
	font-size: 14px;
	line-height: 1.4;
}
.wnp-shipping .wnp-tiktok__input input#tiktok_nick:focus {
	outline: none;
}
.wnp-shipping .wnp-tiktok__row small {
	display: block;
	margin-top: 6px;
	color: #6b6b6b;
	font-size: 12px;
	line-height: 1.4;
}

@media (max-width: 480px) {
	.wnp-shipping ul#shipping_method li.wnp-rate > label {
		gap: 10px;
		padding: 13px 12px 13px 10px !important;
		font-size: 13px;
	}
	.wnp-shipping ul#shipping_method li.wnp-rate > input[type="radio"].shipping_method {
		margin-left: 12px !important;
	}
	.wnp-shipping .wnp-tiktok {
		padding: 0 12px 14px 12px;
	}
}

/* ---------- Metody płatności ---------- */

/* Nagłówek w ramce płatności (lista jest przeładowywana AJAX-em, więc przez CSS). */
#payment ul.wc_payment_methods::before {
	content: "Płatność" !important;
	display: block !important;
	margin-bottom: 4px;
	color: var(--wnp-ink);
	font-weight: 600;
}
#payment ul.wc_payment_methods::after {
	display: none !important;
}

#payment {
	background: transparent !important;
	border-radius: 0 !important;
}
#payment ul.wc_payment_methods {
	display: grid;
	gap: 8px;
	margin: 0 0 20px !important;
	padding: 0 !important;
	border: 0 !important;
	list-style: none !important;
	text-align: left;
}
#payment ul.wc_payment_methods li.wc_payment_method {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--wnp-line) !important;
	border-radius: 8px;
	background: #fff !important;
	line-height: 1.35;
	transition: border-color .15s ease, box-shadow .15s ease;
}
#payment ul.wc_payment_methods li.wc_payment_method:hover {
	border-color: rgba(150, 120, 68, 0.55) !important;
}
#payment ul.wc_payment_methods li.wc_payment_method:has(> input:checked),
#payment ul.wc_payment_methods li.wc_payment_method:only-child {
	border-color: var(--wnp-green) !important;
	box-shadow: 0 0 0 1px var(--wnp-green);
}

#payment ul.wc_payment_methods li.wc_payment_method > input.input-radio {
	-webkit-appearance: none;
	appearance: none;
	flex: none;
	display: grid;
	place-content: center;
	width: 18px;
	height: 18px;
	margin: 0 0 0 16px !important;
	padding: 0;
	border: 1.5px solid #9c9486;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
}
#payment ul.wc_payment_methods li.wc_payment_method > input.input-radio::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--wnp-green);
	transform: scale(0);
	transition: transform .12s ease;
}
#payment ul.wc_payment_methods li.wc_payment_method > input.input-radio:checked {
	border-color: var(--wnp-green);
}
#payment ul.wc_payment_methods li.wc_payment_method > input.input-radio:checked::before {
	transform: scale(1);
}
#payment ul.wc_payment_methods li.wc_payment_method > input.input-radio:focus-visible {
	outline: 2px solid var(--wnp-gold);
	outline-offset: 2px;
}

#payment ul.wc_payment_methods li.wc_payment_method > label {
	display: flex !important;
	flex: 1 1 0;
	align-items: center;
	gap: 12px;
	min-width: 0;
	margin: 0 !important;
	padding: 14px 16px 14px 12px !important;
	color: var(--wnp-ink) !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	line-height: 1.35;
	cursor: pointer;
}
#payment ul.wc_payment_methods li.wc_payment_method > input[style*="none"] + label {
	padding-left: 16px !important;
}
#payment ul.wc_payment_methods li.wc_payment_method > label > img,
#payment ul.wc_payment_methods li.wc_payment_method > label > .wnp-pay__icon {
	flex: none;
	margin: 0 0 0 auto !important;
	float: none !important;
}
/* Logo bramek (np. ingpay ma własne, większe na telefonie): szare, w kolorze po wybraniu */
#payment ul.wc_payment_methods li.wc_payment_method > label > img {
	display: block !important;
	width: auto !important;
	height: 24px !important;
	max-width: 72px !important;
	max-height: none !important;
	object-fit: contain;
	filter: grayscale(1);
	opacity: .45;
	transition: filter .15s ease, opacity .15s ease;
}
#payment ul.wc_payment_methods li.wc_payment_method:has(> input:checked) > label > img,
#payment ul.wc_payment_methods li.wc_payment_method:only-child > label > img {
	filter: none;
	opacity: 1;
}
#payment ul.wc_payment_methods li.wc_payment_method > label > img ~ img {
	margin-left: 4px !important;
}
.wnp-pay__icon {
	display: inline-flex;
	width: 24px;
	height: 24px;
	color: var(--wnp-muted);
	transition: color .15s ease;
}
.wnp-pay__icon svg {
	width: 100%;
	height: 100%;
}
#payment li.wc_payment_method:has(> input:checked) .wnp-pay__icon,
#payment li.wc_payment_method:only-child .wnp-pay__icon {
	color: var(--wnp-green);
}

#payment ul.wc_payment_methods li.wc_payment_method > .payment_box {
	flex: 0 0 100%;
	margin: 0 !important;
	padding: 0 16px 16px 46px !important;
	background: transparent !important;
	border: 0 !important;
	color: #5f5f5f !important;
	font-size: 13px !important;
	line-height: 1.5;
}
#payment ul.wc_payment_methods li.wc_payment_method > input[style*="none"] ~ .payment_box {
	padding-left: 16px !important;
}
#payment ul.wc_payment_methods li.wc_payment_method > .payment_box::before {
	display: none !important;
}
#payment ul.wc_payment_methods li.wc_payment_method > .payment_box p:last-child {
	margin-bottom: 0;
}

@media (max-width: 480px) {
	#payment ul.wc_payment_methods li.wc_payment_method > label {
		gap: 10px;
		padding: 13px 12px 13px 10px !important;
		font-size: 13px !important;
	}
	#payment ul.wc_payment_methods li.wc_payment_method > input.input-radio {
		margin-left: 12px !important;
	}
	#payment ul.wc_payment_methods li.wc_payment_method > .payment_box {
		padding: 0 12px 14px !important;
	}
}
