/* Ścieżka zakupowa: pasek atutów, kroki checkoutu, podsumowanie, płatność */

/* ------------------------------- pasek atutów ---------------------------------- */

.rb-trust {
	background: var(--rb-color-bg);
	border-bottom: 1px solid var(--rb-color-border);
}
.rb-trust__inner {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 3vw, 2.5rem);
	padding-block: var(--rb-space-4);
}
.rb-trust__item { display: flex; align-items: center; gap: var(--rb-space-3); }
.rb-trust__num {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: var(--rb-radius-full);
	background: var(--rb-color-accent);
	color: #fff;
	font-size: var(--rb-fs-body-xs);
	font-weight: 700;
}
.rb-trust__text { font-size: var(--rb-fs-body-xs); line-height: 1.4; color: var(--rb-gray-600); }

@media (max-width: 700px) {
	/* Na telefonie trzy kolumny zmieniłyby się w słupki po jednym słowie. */
	.rb-trust__inner { grid-template-columns: 1fr; gap: var(--rb-space-2); }
}

/* --------------------------------- kroki --------------------------------------- */

.woocommerce-checkout .site-main { padding-block: var(--rb-space-10) var(--rb-space-16); }

.rb-checkout__title {
	font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
	margin-bottom: var(--rb-space-8);
}
.rb-checkout__title:focus { outline: none; }

.rb-checkout__actions {
	display: flex;
	justify-content: flex-end;
	gap: var(--rb-space-4);
	margin-top: var(--rb-space-8);
}
.rb-checkout__actions .btn,
.rb-checkout__prev--payment { padding: 0.8rem 1.75rem; font-size: var(--rb-fs-body-s); }
.rb-checkout__prev .rb-icon,
.rb-checkout__back-link .rb-icon { transform: rotate(180deg); }

/* ---------------------------- pola formularza ---------------------------------- */

.woocommerce-checkout .col2-set { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 42rem; }
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 { width: 100%; float: none; }

.woocommerce-checkout .form-row { margin-bottom: var(--rb-space-6); padding: 0; }
.woocommerce-checkout .form-row label { display: block; font-size: var(--rb-fs-body-s); color: var(--rb-gray-600); margin-bottom: var(--rb-space-2); }

.woocommerce-checkout .input-text,
.woocommerce-checkout select {
	width: 100%;
	padding: var(--rb-space-3) 0;
	font-family: inherit;
	font-size: var(--rb-fs-body-m);
	color: var(--rb-color-heading);
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--rb-gray-400);
	border-radius: 0;
	transition: border-color var(--rb-transition-fast);
}
.woocommerce-checkout .input-text:focus,
.woocommerce-checkout select:focus { outline: none; border-bottom-color: var(--rb-color-accent); }
.woocommerce-checkout .woocommerce-invalid .input-text { border-bottom-color: #b3261e; }
.woocommerce-checkout .woocommerce-invalid > label { color: #b3261e; }
.woocommerce-checkout .woocommerce-invalid::after {
	content: attr(data-error);
	display: block;
	margin-top: var(--rb-space-2);
	font-size: var(--rb-fs-body-xs);
	color: #b3261e;
}

.woocommerce-checkout h3 { font-size: var(--rb-fs-body-l); font-weight: 700; margin-bottom: var(--rb-space-5); }

/* ------------------------------- podsumowanie ---------------------------------- */

.rb-checkout__step[data-step="4"] { max-width: 46rem; }

.woocommerce-checkout-review-order-table { width: 100%; border-collapse: collapse; margin-bottom: var(--rb-space-8); }
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
	padding: var(--rb-space-4) 0;
	text-align: left;
	font-size: var(--rb-fs-body-s);
	border-bottom: 1px solid var(--rb-color-border);
}
.woocommerce-checkout-review-order-table .order-total td,
.woocommerce-checkout-review-order-table .order-total th {
	font-size: var(--rb-fs-body-l);
	font-weight: 700;
	color: var(--rb-color-heading);
	border-bottom: 0;
}
.woocommerce-checkout-review-order-table .variation { font-size: var(--rb-fs-body-xs); color: var(--rb-gray-500); margin: var(--rb-space-1) 0 0; }
.woocommerce-checkout-review-order-table .variation dt,
.woocommerce-checkout-review-order-table .variation dd { display: inline; margin: 0; }

/* -------------------------------- co otrzymujesz -------------------------------- */

.rb-benefits { margin-bottom: var(--rb-space-8); }

.rb-benefits__title {
	display: flex;
	align-items: center;
	gap: var(--rb-space-3);
	font-family: var(--rb-font-serif);
	font-size: var(--rb-fs-h4);
	color: var(--rb-color-heading);
	margin-bottom: var(--rb-space-5);
}
.rb-benefits__mark { color: var(--rb-color-accent); display: grid; place-items: center; }

.rb-benefits__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
	gap: var(--rb-space-5);
}
.rb-benefits__list li {
	display: grid;
	gap: var(--rb-space-3);
	font-size: var(--rb-fs-body-xs);
	line-height: 1.5;
	color: var(--rb-gray-600);
}
.rb-benefits__list img { width: 34px; height: 34px; }

/* --------------------------------- płatność ------------------------------------ */

#payment { max-width: 42rem; background: transparent; }
#payment ul.payment_methods { list-style: none; margin: 0 0 var(--rb-space-6); padding: 0; border: 0; }
#payment ul.payment_methods li { margin-bottom: var(--rb-space-4); }
#payment label { display: inline-flex; align-items: center; gap: var(--rb-space-3); font-size: var(--rb-fs-body-s); color: var(--rb-color-heading); cursor: pointer; }

#payment input[type="radio"],
.woocommerce-checkout input[type="checkbox"] {
	appearance: none;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin: 0;
	background: #fff;
	border: 1px solid var(--rb-gray-400);
	border-radius: var(--rb-radius-sm);
	cursor: pointer;
}
#payment input[type="radio"]:checked,
.woocommerce-checkout input[type="checkbox"]:checked {
	background: var(--rb-color-accent);
	border-color: var(--rb-color-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5.2 5.2L20 7' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-size: 14px;
	background-repeat: no-repeat;
	background-position: center;
}
#payment .payment_box {
	margin: var(--rb-space-3) 0 0 34px;
	padding: var(--rb-space-4);
	background: var(--rb-color-bg-alt);
	border-radius: var(--rb-radius-md);
	font-size: var(--rb-fs-body-xs);
	line-height: 1.6;
	color: var(--rb-gray-600);
}
#payment .payment_box::before { display: none; }

.woocommerce-terms-and-conditions-wrapper { font-size: var(--rb-fs-body-xs); color: var(--rb-gray-600); margin-bottom: var(--rb-space-6); }

#payment .form-row.place-order { display: flex; justify-content: space-between; align-items: center; gap: var(--rb-space-4); margin: 0; padding: 0; }
#place_order {
	padding: 1rem 2.5rem;
	font-family: inherit;
	font-size: var(--rb-fs-btn);
	font-weight: var(--rb-fw-btn);
	color: #fff;
	background: var(--rb-navy-900);
	border: 0;
	border-radius: var(--rb-radius-full);
	cursor: pointer;
	transition: background var(--rb-transition-fast);
}
#place_order:hover { background: var(--rb-navy-950); }

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

.rb-payplan { margin-bottom: var(--rb-space-8); }
.rb-payplan.is-loading { opacity: 0.5; pointer-events: none; }

.rb-payplan__title { font-weight: 700; color: var(--rb-color-heading); margin-bottom: var(--rb-space-4); }

.rb-payplan__option {
	display: flex;
	align-items: center;
	gap: var(--rb-space-3);
	margin-bottom: var(--rb-space-3);
	font-size: var(--rb-fs-body-s);
	color: var(--rb-color-heading);
	cursor: pointer;
}
.rb-payplan__option.is-disabled { opacity: 0.5; cursor: not-allowed; }
.rb-payplan__option input[type="radio"] {
	appearance: none;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin: 0;
	background: #fff;
	border: 1px solid var(--rb-gray-400);
	border-radius: var(--rb-radius-sm);
	cursor: inherit;
}
.rb-payplan__option input[type="radio"]:checked {
	background: var(--rb-color-accent);
	border-color: var(--rb-color-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5.2 5.2L20 7' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-size: 14px;
	background-repeat: no-repeat;
	background-position: center;
}

/* Gwiazdka „pole wymagane" przy pojedynczych opcjach radio tylko myli. */
.rb-role-field .required,
.rb-payplan__option .required { display: none; }

/* --------------------------------- pasek postępu -------------------------------- */

.rb-progress {
	list-style: none;
	display: flex;
	align-items: center;
	gap: var(--rb-space-3);
	margin: clamp(2.5rem, 6vw, 4rem) 0 0;
	padding: 0;
}
.rb-progress__dot {
	width: 12px;
	height: 12px;
	border-radius: var(--rb-radius-full);
	background: #fff;
	border: 2px solid var(--rb-navy-900);
	position: relative;
}
.rb-progress__dot + .rb-progress__dot::before {
	content: '';
	position: absolute;
	right: 100%;
	top: 50%;
	width: var(--rb-space-3);
	height: 2px;
	background: var(--rb-gray-300);
	transform: translateY(-50%);
}
.rb-progress__dot.is-done { background: var(--rb-navy-900); }
.rb-progress__dot.is-current { background: var(--rb-color-accent); border-color: var(--rb-color-accent); }
.rb-progress__dot.is-todo { border-color: var(--rb-gray-300); }

/* --------------------------------- podziękowanie -------------------------------- */

.woocommerce-order { max-width: 46rem; }
.woocommerce-thankyou-order-received {
	font-family: var(--rb-font-serif);
	font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
	color: var(--rb-color-heading);
	margin-bottom: var(--rb-space-6);
}
.woocommerce-order .woocommerce-bacs-bank-details { margin-top: var(--rb-space-8); }
.woocommerce-order h2, .woocommerce-order h3 { font-size: var(--rb-fs-body-l); font-weight: 700; margin-bottom: var(--rb-space-4); }
.woocommerce-order ul.order_details { list-style: none; margin: 0 0 var(--rb-space-8); padding: 0; display: grid; gap: var(--rb-space-3); }
.woocommerce-order ul.order_details li { font-size: var(--rb-fs-body-s); color: var(--rb-gray-600); }
.woocommerce-order ul.order_details strong { display: block; color: var(--rb-color-heading); }

@media (max-width: 700px) {
	.rb-checkout__actions { flex-direction: column-reverse; }
	.rb-checkout__actions .btn { width: 100%; justify-content: center; }
	#payment .form-row.place-order { flex-direction: column-reverse; align-items: stretch; }
	#place_order { width: 100%; }
}


/* Nagłówek Woo dubluje tytuły naszych kroków — chowamy go zamiast usuwać z szablonu. */
#order_review_heading { display: none; }

/*
 * „Kupuję i płacę" łamało się na dwie linie: kolumna przycisków jest wąska,
 * a szeroki padding nie zostawiał miejsca na napis.
 */
.rb-contact input[type="submit"],
#place_order {
	white-space: nowrap;
}
#place_order {
	padding-inline: var(--rb-space-8);
}
