/**
 * TuliRytmika — checkout flow (cart / checkout / thank-you)
 * Design tokens + reusable steps nav + cart redesign.
 * 1rem = 10px (html { font-size: 62.5% } w style.css motywu).
 * Scope: body.woocommerce-cart / body.woocommerce-checkout / body.woocommerce-order-received
 */

/* ── Font: Grandstander (variable 600-700, self-hosted) ── */
@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('../fonts/grandstander-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('../fonts/grandstander-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Tokens (kolory dziedziczą z :root motywu) ── */
:root {
  --tr-ink: var(--color-primary-black, #181818);
  --tr-blue: var(--color-primary-blue, #0158de);
  --tr-cta: #1e56d9;
  --tr-cta-hover: #1747b8;
  --tr-muted: #8a93a0;
  --tr-line: var(--edublink-color-border, #dde3e8);
  --tr-line-soft: #eef1f6;
  --tr-card-border: var(--edublink-color-border, #e6e9f0);
  --tr-card-shadow: 0 1.4rem 4rem rgba(24, 24, 24, 0.06);
  --tr-badge-bg: var(--color-light-blue, #e8f0fe);
  --tr-radius-card: 2rem;
  --tr-radius-btn: 0.6rem;
  --tr-steps-gap: clamp(4rem, 5vw, 5.6rem); /* above and below the steps nav */
  --tr-font-accent: 'Grandstander', cursive;
}

/* Fallback, gdy motyw nie definiuje .screen-reader-text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* ── Reusable steps nav ── */
/* same gap above the steps as below them (overrides the theme's container padding) */
.woocommerce-cart .edublink-main-content-inner,
.woocommerce-checkout .edublink-main-content-inner {
  padding-top: var(--tr-steps-gap);
}

.tr-steps {
  align-items: center;
  color: var(--tr-muted);
  display: flex;
  font-size: 1.4rem;
  font-weight: 500;
  gap: 1rem;
  justify-content: center;
  list-style: none;
  margin: 0 0 var(--tr-steps-gap);
  padding: 0;
}

.tr-steps li {
  align-items: center;
  display: flex;
  gap: 0.8rem;
}

.tr-steps a.tr-steps__link {
  align-items: center;
  color: inherit;
  display: flex;
  gap: 0.8rem;
  text-decoration: none;
}

.tr-steps a.tr-steps__link:hover .tr-steps__label,
.tr-steps a.tr-steps__link:focus-visible .tr-steps__label {
  text-decoration: underline;
  color: var(--tr-cta-hover);
}

.tr-steps li.is-active {
  color: var(--tr-ink);
  font-weight: 600;
}

.tr-steps__badge {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  font-family: var(--tr-font-accent);
  font-size: 1.3rem;
  font-weight: 700;
  height: 2.6rem;
  justify-content: center;
  width: 2.6rem;
}

.is-active .tr-steps__badge,
.is-done .tr-steps__badge {
  background: var(--tr-blue);
  color: #fff;
}

.is-done .tr-steps__badge svg {
  height: 1.2rem;
  width: 1.2rem;
}

.is-upcoming .tr-steps__badge {
  border: 0.2rem solid var(--tr-line);
  color: var(--tr-muted);
}

.tr-steps__sep {
  background: var(--tr-line);
  height: 0.2rem;
  width: 2.8rem;
}

/* ── CTA button ── */
.tr-btn-cta,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  background: var(--tr-cta) !important;
  border-radius: var(--tr-radius-btn) !important;
  color: #fff !important;
  display: block !important;
  font-family: var(--tr-font-accent) !important;
  font-size: 1.8rem !important;
  font-weight: 600 !important;
  line-height: 1.6 !important;
  padding: 2rem !important;
  text-align: center !important;
  transition: background 0.15s ease;
}

.tr-btn-cta:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
  background: var(--tr-cta-hover) !important;
  color: #fff !important;
}

/* ── Cart layout: produkty | podsumowanie ── */
.woocommerce-cart .tr-cart-grid {
  align-items: start;
  display: grid;
  gap: 3.2rem;
  grid-template-columns: 1.6fr 1fr;
}

.woocommerce-cart .tr-cart-grid > * {
  min-width: 0;
}

.woocommerce-cart .woocommerce-cart-form {
  margin: 0;
}

/* ── Produkty (karta + shop_table jako lista wierszy) ── */
.woocommerce-cart .tr-cart-card {
  background: #fff;
  border: 0.1rem solid var(--tr-card-border);
  border-radius: var(--tr-radius-card);
  box-shadow: var(--tr-card-shadow);
  overflow: hidden;
}

.woocommerce-cart table.shop_table.cart {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: block;
  margin: 0;
  width: 100%;
}

/* display:block na <table> bez resetu grup tworzy anonimową tabelę shrink-to-fit:
   wiersze są ~30px węższe od karty i prawy padding tabeli ucieka. */
.woocommerce-cart table.shop_table.cart thead,
.woocommerce-cart table.shop_table.cart tbody {
  display: block;
}

.woocommerce-cart table.shop_table.cart thead tr {
  border-bottom: 0.1rem solid var(--tr-card-border);
  column-gap: 2rem;
  display: grid;
  grid-template-columns: 7.2rem 1fr auto;
}

.woocommerce-cart table.shop_table.cart thead th.product-remove {
  display: none;
}

/* (0,3,4) — tie z theme `.woocommerce table.shop_table.cart > thead > tr > th { border-bottom: 1px }`;
   bez tego th dokładają drugą linię obok obramowania wiersza */
.woocommerce-cart table.shop_table.cart > thead > tr > th {
  border: 0;
  font-family: var(--tr-font-accent);
  font-size: 1.5rem;
  font-weight: 700;
  padding: 2rem 2.4rem;
}

.woocommerce-cart table.shop_table.cart thead th.product-subtotal {
  text-align: right;
}

.woocommerce-cart table.shop_table.cart thead th.product-price,
.woocommerce-cart table.shop_table.cart thead th.product-quantity {
  display: none;
}

.woocommerce-cart table.shop_table.cart tbody tr {
  column-gap: 2rem;
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  padding: 2.6rem 2.4rem;
}

.woocommerce-cart table.shop_table.cart tbody tr + tr {
  border-top: 0.1rem dashed #e9e1cf;
}

/* motyw: shop_table_responsive tr:nth-child(2n) td + table-bordered/striped
   dodają td tła i obramowania (widoczne zwłaszcza na mobile) */
.woocommerce-cart table.shop_table.cart tbody tr td {
  background: transparent;
  border: 0;
  padding: 0;
}

.woocommerce-cart table.shop_table.cart td.product-thumbnail {
  grid-area: 1 / 1 / 3 / 2;
  padding-right: 0;
}

.woocommerce-cart table.shop_table.cart td.product-thumbnail img {
  background: #fff;
  border: 0;
  border-radius: 1.2rem;
  height: 7.2rem;
  max-width: none;
  object-fit: contain;
  padding: 0.6rem;
  width: 7.2rem;
}

.woocommerce-cart table.shop_table.cart td.product-name {
  align-self: center;
  grid-area: 1 / 2 / 3 / 3;
  padding-right: 2rem;
}

.woocommerce-cart table.shop_table.cart td.product-name a {
  color: var(--tr-ink);
  font-family: var(--tr-font-accent);
  font-size: 1.5rem;
  font-weight: 700;
}

.woocommerce-cart table.shop_table.cart td.product-price,
.woocommerce-cart table.shop_table.cart td.product-quantity {
  display: none;
}

.woocommerce-cart table.shop_table.cart td.product-subtotal {
  color: var(--tr-ink);
  font-family: var(--tr-font-accent);
  font-size: 1.5rem;
  font-weight: 700;
  grid-area: 1 / 3 / 2 / 4;
  text-align: right;
  white-space: nowrap;
}

.woocommerce-cart table.shop_table.cart td.product-remove {
  grid-area: 2 / 3 / 3 / 4;
  justify-self: end;
  padding-top: 0.8rem;
  text-align: right;
}

.woocommerce-cart table.shop_table.cart td.product-remove a.remove {
  align-items: center;
  background: none;
  border-radius: 0;
  color: var(--tr-muted) !important;
  display: inline-flex;
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 500;
  gap: 0.6rem;
  height: auto;
  line-height: 1.4;
  padding: 0;
  text-indent: 0;
  width: auto;
}

.woocommerce-cart table.shop_table.cart td.product-remove a.remove:hover,
.woocommerce-cart table.shop_table.cart td.product-remove a.remove:focus {
  background: none;
  color: var(--tr-blue) !important;
}

.woocommerce-cart table.shop_table.cart td.product-remove a.remove svg {
  display: block;
  flex: 0 0 auto;
  height: 1.4rem;
  width: 1.4rem;
}

/* motyw nadaje spanom w td 16px/ink (0,2,5) — przywróć kolor linku */
.woocommerce-cart table.shop_table.cart td.product-remove a.remove span {
  color: var(--tr-muted);
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 500;
}

/* krótki opis produktu pod nazwą */
.tr-item-sub {
  color: #5b6273;
  font-size: 1.3rem;
  line-height: 1.5;
  margin: 0.4rem 0 0;
}

/* kategorie produktu pod nazwą („·” jako separator)
   (0,4,1) — musi bić theme `.woocommerce table.shop_table tr :last-child { text-align: end }` */
.woocommerce-cart table.shop_table.cart .tr-item-cats {
  color: #5b6273;
  font-size: 1.3rem;
  line-height: 1.5;
  margin: 0.4rem 0 0;
  text-align: left;
}

/* iloczyn „1 ×” przed ceną (wyższa specyficzność niż style motywu na span w td) */
.woocommerce-cart table.shop_table.cart td.product-subtotal .tr-qty {
  color: var(--tr-muted);
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: inherit;
  margin-right: 0.6rem;
}

/* kwota dziedziczy typografię i kolor z td (wiersz zestawu = zielony) */
.woocommerce-cart table.shop_table.cart td.product-subtotal .woocommerce-Price-amount,
.woocommerce-cart table.shop_table.cart td.product-subtotal .woocommerce-Price-amount span {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* wiersz „W ZESTAWIE” (dodatek w cenie pakietu) — żółte tło + strzałka */
.woocommerce-cart table.shop_table.cart tr.tr-item-included {
  background: #fbf7ef;
  padding: 1.8rem 2.4rem 2rem;
}

.woocommerce-cart table.shop_table.cart tr.tr-item-included td.product-name {
  font-size: 1.5rem;
  font-weight: 500;
}

/* tylko bezpośredni link nazwy — nie łap linków kategorii w .tr-item-cats */
.woocommerce-cart table.shop_table.cart tr.tr-item-included td.product-name > a {
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 500;
}

.woocommerce-cart table.shop_table.cart tr.tr-item-included td.product-subtotal {
  color: #2f8a5c;
}

.woocommerce-cart table.shop_table.cart tr.tr-item-included td.product-subtotal .tr-included-note {
  color: var(--tr-muted);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.4;
}

.woocommerce-cart table.shop_table.cart tr.tr-item-included .tr-item-sub {
  color: #7a6a3f;
}

/* kompaktowa miniatura dodatku + strzałka w kolumnie produktu */
.woocommerce-cart table.shop_table.cart tr.tr-item-included td.product-thumbnail {
  align-items: center;
  display: flex;
  gap: 0.4rem;
}

.woocommerce-cart table.shop_table.cart tr.tr-item-included td.product-thumbnail img {
  border: 0;
  border-radius: 0.6rem;
  box-shadow: 0 0.4rem 1rem rgba(24, 24, 24, 0.12);
  height: 4.4rem;
  padding: 0;
  width: 4.4rem;
}

/* łącznik schodzący z wiersza produktu do dodatku */
.woocommerce-cart table.shop_table.cart tr.tr-item-included td.product-thumbnail::before {
  background: url('../img/icon-included-arrow.svg') center / contain no-repeat;
  content: '';
  display: block !important;
  flex: 0 0 auto;
  height: 3.8rem;
  width: 2.4rem;
}

/* scoped, by przebić theme'owy span w td (0,2,5) */
.woocommerce-cart table.shop_table.cart .tr-badge-included {
  background: var(--color-primary-yellow, #f7bf43);
  border-radius: 4rem;
  color: var(--tr-ink);
  display: inline-block;
  font-family: var(--tr-font-accent);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
  margin-left: 1rem;
  padding: 0.3rem 1rem;
  text-transform: uppercase;
  vertical-align: middle;
}

.tr-included-note {
  color: var(--tr-muted);
  display: block;
  font-size: 1.25rem;
  font-weight: 400;
  margin-top: 0.4rem;
}

/* wiersz akcji formularza koszyka (ukryty — aktualizacja przez AJAX) */
.woocommerce-cart table.shop_table.cart td.actions {
  border: 0;
  grid-column: 1 / -1;
  padding: 0;
}

/* sam wiersz akcji też ukryty — bez pustego pasa pod produktami */
.woocommerce-cart table.shop_table.cart tbody tr:has(> td.actions) {
  display: none;
}

/* ── Kupon jako akordeon (osobna karta) ── */
.tr-coupon {
  background: #fff;
  border: 0.1rem solid #e6e9f0;
  border-radius: 1.6rem;
  margin-top: 2rem;
}

.tr-coupon summary {
  align-items: center;
  color: var(--tr-ink);
  cursor: pointer;
  display: flex;
  font-family: var(--tr-font-accent);
  font-size: 1.5rem;
  font-weight: 700;
  gap: 1rem;
  list-style: none;
  padding: 1.6rem 2.2rem;
  user-select: none;
}

.tr-coupon summary::-webkit-details-marker {
  display: none;
}

.tr-coupon summary img {
  height: 2rem;
  width: 2rem;
}

.tr-coupon summary .tr-coupon__toggle {
  height: 1.8rem;
  margin-left: auto;
  transition: transform 0.15s ease;
  width: 1.8rem;
}

/* otwarty akordeon: „+” obrócony do „×” */
.tr-coupon[open] summary .tr-coupon__toggle {
  transform: rotate(45deg);
}

.tr-coupon .tr-coupon__body {
  padding: 0 2.2rem 1.6rem;
}

.tr-coupon .tr-coupon__label {
  color: var(--tr-ink);
  display: block;
  font-family: var(--tr-font-accent);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.tr-coupon .tr-coupon__fields {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.tr-coupon .tr-coupon__fields .input-text {
  border: 0.1rem solid var(--tr-line);
  border-radius: 0.8rem;
  flex: 1 1 20rem;
  font-size: 1.5rem;
  height: 5.6rem;
  min-width: 0;
  padding: 0 1.8rem;
}

.tr-coupon .tr-coupon__fields button.button {
  background: var(--tr-cta) !important;
  border: 0;
  border-radius: var(--tr-radius-btn);
  color: #fff !important;
  cursor: pointer;
  font-family: var(--tr-font-accent);
  font-size: 1.6rem;
  font-weight: 600;
  height: 5.6rem;
  margin: 0 !important;
  padding: 0 2.8rem;
  transition: background 0.15s ease;
}

.tr-coupon .tr-coupon__fields button.button:hover {
  background: var(--tr-cta-hover) !important;
}

/* ── Karta „Podsumowanie” ── */
/* Wyższa specyficzność niż woocommerce-layout.css:
   .woocommerce-cart .cart-collaterals .cart_totals { float: right; width: 48% } */
.woocommerce-cart .cart-collaterals {
  float: none;
  margin: 0;
  width: 100%;
}

.woocommerce-cart .cart-collaterals .cart_totals {
  background: #fff;
  border: 0.1rem solid var(--tr-card-border);
  border-radius: var(--tr-radius-card);
  box-shadow: var(--tr-card-shadow);
  float: none;
  margin: 0;
  max-width: none;
  padding: 3.2rem 3rem 4rem;
  position: sticky;
  top: 9.6rem;
  width: 100%;
}

.woocommerce-cart .cart_totals > h2 {
  font-family: var(--tr-font-accent);
  font-size: 2.8rem;
  font-weight: 800;
  margin: 0 0 2.4rem;
}

.woocommerce-cart .cart_totals table.shop_table {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: block;
  margin: 0;
}

.woocommerce-cart .cart_totals table.shop_table thead,
.woocommerce-cart .cart_totals table.shop_table tbody {
  display: block;
}

.woocommerce-cart .cart_totals table.shop_table tr {
  border-top: 0.1rem solid var(--tr-line-soft);
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 1.4rem 0;
}

.woocommerce-cart .cart_totals table.shop_table tr:first-child {
  border-top: 0;
  padding-top: 0;
}

/* theme: `.woocommerce .cart_totals table.shop_table > tbody > tr > td { padding: 15px }` (0,3,4) */
.woocommerce-cart .cart_totals table.shop_table > tbody > tr > th,
.woocommerce-cart .cart_totals table.shop_table > tbody > tr > td {
  background: none;
  border: 0 !important;
  font-size: 1.5rem;
  font-weight: 500;
  padding: 0;
  text-align: left;
}

.woocommerce-cart .cart_totals table.shop_table td {
  text-align: right;
}

.woocommerce-cart .cart_totals table.shop_table td::before {
  display: none;
}

/* "Łącznie": label left, amount right like the rows above; the VAT note under the amount in one style */
.woocommerce-cart .cart_totals table.shop_table tr.order-total {
  align-items: flex-start;
  border: 0;
  border-top: 0.1rem solid var(--tr-line-soft);
  display: flex;
  gap: 1.2rem;
  justify-content: space-between;
  margin: 0;
  padding: 1.6rem 0 0;
}

.woocommerce-cart .cart_totals table.shop_table tr.order-total th {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  padding-top: 0.4rem;
}

.woocommerce-cart .cart_totals table.shop_table tr.order-total td {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  text-align: right;
}

.woocommerce-cart .cart_totals table.shop_table tr.order-total strong .woocommerce-Price-amount {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

/* decimals and currency in the same size as the amount */
.woocommerce-cart .cart_totals table.shop_table tr.order-total strong .woocommerce-Price-amount span {
  font-size: inherit;
  font-weight: inherit;
}

.woocommerce-cart .cart_totals table.shop_table tr.order-total small,
.woocommerce-cart .cart_totals table.shop_table tr.order-total small * {
  color: var(--tr-muted);
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 400;
  white-space: nowrap;
}

.woocommerce-cart .cart_totals table.shop_table tr.cart-subtotal th {
  font-weight: 700;
}

/* metody dostawy (radio-boxy) w karcie */
.woocommerce-cart .cart_totals table.shop_table tr.woocommerce-shipping-totals {
  display: block;
  padding: 1.4rem 0;
}

.woocommerce-cart .cart_totals table.shop_table tr.woocommerce-shipping-totals th {
  align-items: center;
  display: flex;
  font-weight: 700;
  gap: 1rem;
  justify-content: space-between;
  width: 100%;
}

/* darmowa dostawa — znacznik przy labelce (debt: przy płatnych metodach usunąć) */
.woocommerce-cart .woocommerce-shipping-totals th::after {
  color: #2f8a5c;
  content: 'gratis';
  font-size: 1.4rem;
  font-weight: 600;
}

.woocommerce-cart .cart_totals tr.woocommerce-shipping-totals td {
  display: block;
  text-align: left;
  width: 100%;
}

.woocommerce-cart ul#shipping_method {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  width: 100%;
}

.woocommerce-cart #shipping_method li {
  align-items: center;
  background: #fff;
  border: 0.1rem solid var(--tr-line);
  border-radius: 1rem;
  cursor: pointer;
  display: flex;
  gap: 1.4rem;
  margin: 0 0 1rem;
  padding: 1.4rem 1.8rem;
  text-align: left;
}

.woocommerce-cart #shipping_method li:has(input:checked) {
  background: #e8ecfb;
  border-color: var(--tr-blue);
}

.woocommerce-cart #shipping_method li label {
  flex: 1;
  font-weight: 500;
  margin-left: 0;
  text-align: left;
}

.woocommerce-cart #shipping_method input[type='radio'] {
  accent-color: var(--tr-blue);
  flex: 0 0 auto;
  height: 2.2rem;
  margin: 0;
  width: 2.2rem;
}

.woocommerce-cart .woocommerce-shipping-destination {
  color: var(--tr-muted);
  font-size: 1.3rem;
  grid-column: 1 / -1;
  margin: 0.8rem 0 0;
}

.woocommerce-cart .woocommerce-shipping-destination strong {
  color: var(--tr-ink);
}

/* CTA pod tabelą w karcie */
.woocommerce-cart .wc-proceed-to-checkout {
  margin-top: 2.4rem;
  padding: 0;
}

/* ── Stopka zaufania: SSL + metody płatności (wycentrowana) ── */
.tr-trust {
  margin-top: 1.6rem;
  text-align: center;
}

/* SSL zaraz pod przyciskiem, separator dopiero pod nim */
.tr-trust__secure {
  align-items: center;
  border-bottom: 0.1rem solid var(--tr-line-soft);
  color: #5b6273;
  display: flex;
  font-size: 1.3rem;
  gap: 0.8rem;
  justify-content: center;
  padding-bottom: 1.8rem;
}

.tr-trust__secure img {
  height: 1.4rem;
  width: 1.4rem;
}

.tr-trust__label {
  color: var(--tr-muted);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin: 1.8rem 0 1rem;
}

.tr-trust__marks {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tr-trust__mark {
  display: inline-flex;
  line-height: 0;
  margin: 0;
  padding: 0;
}

/* (0,2,0) to beat the theme's `.entry-content img { height: auto }`; 2.2rem keeps all six marks in one row from 360 px */
.tr-trust .tr-trust__mark img {
  display: block;
  height: 2.2rem;
  max-width: 100%;
  width: auto;
}

/* Visa and Mastercard are the bare marks, without a badge: smaller */
.tr-trust .tr-trust__mark--mastercard img {
  height: 1.4rem;
}

.tr-trust .tr-trust__mark--visa img {
  height: 0.9rem;
}

/* installments and deferred payment, as ING describes them; no amounts (that would need the APR notice) */
.tr-trust .tr-trust__note {
  color: var(--tr-muted);
  font-size: 1.3rem;
  line-height: 1.5;
  margin: 1.2rem auto 0;
  max-width: 32rem;
}

/* ── Responsywność (wg designu: kolaps 880px) ── */
@media (max-width: 880px) {
  /* steps nav: three columns, label under the number, line between the circles */
  .tr-steps {
    align-items: start;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tr-steps li.tr-steps__sep {
    display: none;
  }

  .tr-steps li,
  .tr-steps a.tr-steps__link {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }

  .tr-steps li {
    margin: 0;
    min-height: 4.4rem; /* touch target */
    position: relative;
  }

  .tr-steps__label {
    line-height: 1.3;
    padding: 0 0.4rem;
  }

  /* line halves at the circle's centre, 1rem away from the circle */
  .tr-steps li::before,
  .tr-steps li::after {
    background: var(--tr-line);
    content: '';
    height: 0.2rem;
    position: absolute;
    top: 1.2rem;
    width: calc(50% - 2.3rem);
  }

  .tr-steps li::before {
    left: 0;
  }

  .tr-steps li::after {
    right: 0;
  }

  .tr-steps li:first-child::before,
  .tr-steps li:last-child::after {
    display: none;
  }

  /* blue up to the active step */
  .tr-steps li.is-done::before,
  .tr-steps li.is-done::after,
  .tr-steps li.is-active::before {
    background: var(--tr-blue);
  }

  .woocommerce-cart .tr-cart-grid {
    grid-template-columns: 1fr;
  }

  .woocommerce-cart .cart_totals {
    position: static;
  }

  .woocommerce-cart table.shop_table.cart thead {
    display: none;
  }

  /* reset CSS responsywnych tabel WC (woocommerce-smallscreen.css) */
  .woocommerce-cart table.shop_table.cart tbody tr {
    display: grid;
    grid-template-columns: 6.4rem minmax(0, 1fr) auto;
    padding: 2rem 1.6rem;
  }

  .woocommerce-cart table.shop_table.cart tbody tr.tr-item-included {
    background: #fbf7ef;
    padding: 1.6rem 1.6rem 1.8rem;
  }

  /* mobile: bez przerywanego obramowania i pasów tła na wierszach
     (theme ≤767 dokłada też tr margin-bottom: 30px — psuje się dolny padding karty) */
  .woocommerce-cart table.shop_table.cart tbody tr,
  .woocommerce-cart table.shop_table.cart tbody tr + tr {
    border: 0;
    margin: 0;
  }

  .woocommerce-cart table.shop_table.cart tr.tr-item-included td.product-name {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
  }

  /* gap flexa zamiast marginesu — badge po zawinięciu bez wcięcia z lewej */
  .woocommerce-cart table.shop_table.cart tr.tr-item-included td.product-name .tr-badge-included {
    margin-left: 0;
  }

  /* flex (strzałka + miniatura) mimo resetu display:block !important wyżej */
  .woocommerce-cart table.shop_table.cart tr.tr-item-included td.product-thumbnail {
    display: flex !important;
  }

  .woocommerce-cart table.shop_table.cart tr.tr-item-included td.product-thumbnail::before {
    height: 3.2rem;
    width: 1.8rem;
  }

  /* !important: WC smallscreen nadaje `text-align: right !important`,
     theme `td.product-name { min-width: 20rem }` */
  .woocommerce-cart table.shop_table.cart tbody td {
    display: block;
    float: none;
    min-width: 0 !important;
    text-align: left !important;
    width: auto;
  }

  .woocommerce-cart table.shop_table.cart tbody td::before {
    content: none !important;
    display: none !important;
  }

  /* przywróć strzałkę „łącznika” na żółtym wierszu */
  .woocommerce-cart table.shop_table.cart tr.tr-item-included td.product-thumbnail::before {
    content: '' !important;
    display: block !important;
  }

  .woocommerce-cart table.shop_table.cart td.product-subtotal {
    text-align: right !important;
    white-space: normal;
  }

  /* miniatura ukrywana przez woocommerce-smallscreen.css / learnpress woocommerce.css */
  .woocommerce-cart table.shop_table.cart tbody td.product-thumbnail {
    display: block !important;
  }

  .woocommerce-cart table.shop_table.cart tbody td.product-thumbnail img {
    height: 6.4rem;
    width: 6.4rem;
  }

  .woocommerce-cart table.shop_table.cart tr.tr-item-included td.product-thumbnail img {
    height: 4.2rem;
    width: 4.2rem;
  }

  .woocommerce-cart .cart_totals {
    padding: 2.4rem 2rem 3.2rem;
  }

  /* theme ≤767px: tbody tr dostaje border i margin-bottom 30px */
  .woocommerce-cart .cart_totals table.shop_table tbody tr {
    border: 0;
    margin: 0;
  }

  /* mobile: nagłówki podsumowania wracają (WC smallscreen ukrywa th),
     wartości wyrównane do lewej jak na desktopie (WC wymusza right !important) */
  .woocommerce-cart .cart_totals table.shop_table tbody th {
    display: block !important;
  }

  /* „Dostawa” + „gratis” z powrotem rozsunięte (flex) */
  .woocommerce-cart .cart_totals table.shop_table tr.woocommerce-shipping-totals th {
    display: flex !important;
  }

  .woocommerce-cart .cart_totals table.shop_table tbody td {
    text-align: left !important;
  }

  .woocommerce-cart .cart_totals table.shop_table td::before {
    content: none !important;
    display: none !important;
  }

  /* "Łącznie" keeps label left / amount right on mobile too */
  .woocommerce-cart .cart_totals table.shop_table tr.order-total {
    flex-direction: row;
  }

  .woocommerce-cart .cart_totals table.shop_table tr.order-total td {
    text-align: right !important;
  }
}

/* ── Checkout fields: 5.2rem high with a 1.6rem inset, 1.4rem labels, 1.6rem between rows
   (the theme's 60 px / 25 px / 16 px / 20 px made the form a third taller than it needs to be) ── */
.woocommerce-checkout .woocommerce form .form-row input.input-text,
.woocommerce-checkout .woocommerce form .form-row select,
.woocommerce-checkout .woocommerce form .form-row .select2-container .select2-selection--single {
  height: 5.2rem;
  padding: 0 1.6rem;
}

.woocommerce-checkout .woocommerce form .form-row .select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 5.2rem;
  padding-left: 0;
}

.woocommerce-checkout .woocommerce form .form-row .select2-container .select2-selection--single .select2-selection__arrow {
  height: 5.2rem;
}

.woocommerce-checkout .woocommerce form .form-row textarea {
  height: 10rem;
  padding: 1.2rem 1.6rem;
}

.woocommerce-checkout .woocommerce form .form-row label {
  font-size: 1.4rem;
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

/* !important: the theme sets the row margin with !important for the checkout */
.woocommerce-checkout .woocommerce form .form-row {
  margin-bottom: 1.6rem !important;
}

/* ING Pay wallet method: the Apple Pay and Google Pay marks at the height of the other method icons */
.woocommerce-checkout #payment ul.payment_methods li label img.tr-gateway-mark {
  display: inline-block;
  height: 2.8rem;
  margin: 0 0 0 0.6rem;
  vertical-align: middle;
  width: auto;
}

/* ═══════════════════════════════════════════════════════════
   Checkout — sekcja dostawy ujednolicona z koszykiem
   (port reguł z bloku .woocommerce-cart .cart_totals powyżej)
   ═══════════════════════════════════════════════════════════ */

/* tabela podsumowania jako lista wierszy (jak cart_totals)
   border zostaje — karta podsumowania rysuje ją theme */
.woocommerce-checkout table.woocommerce-checkout-review-order-table {
  background: transparent;
  display: block;
  margin-bottom: 2.2rem;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table thead,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot {
  display: block;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr {
  border-top: 0.1rem solid var(--tr-line-soft);
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 1.4rem 0;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr:first-child {
  border-top: 0.1rem solid var(--tr-line-soft);
  /* padding-top: 0; */
}

/* reset paddingów i obramowań theme'owych komórek (tbody + tfoot) */
.woocommerce-checkout table.woocommerce-checkout-review-order-table > tbody > tr > th,
.woocommerce-checkout table.woocommerce-checkout-review-order-table > tbody > tr > td,
.woocommerce-checkout table.woocommerce-checkout-review-order-table > tfoot > tr > th,
.woocommerce-checkout table.woocommerce-checkout-review-order-table > tfoot > tr > td {
  background: none;
  border: 0 !important;
  padding: 0;
  text-align: left;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table thead th {
  border: 0 !important;
  padding: 0 0 1.4rem;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table thead th:last-child {
  text-align: right;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table td {
  text-align: right;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table td::before {
  display: none;
}

/* "Łącznie" on the checkout: the same row as in the cart, amount 2rem */
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total {
  align-items: flex-start;
  border: 0;
  border-top: 0.1rem solid var(--tr-line-soft);
  display: flex;
  gap: 1.2rem;
  justify-content: space-between;
  margin: 0;
  padding: 1.6rem 0 0;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total th {
  font-weight: 700;
  padding-top: 0.3rem;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total td {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  text-align: right;
}

/* theme `.woocommerce table.shop_table tr *:last-child { text-align: end }` and the WC smallscreen
   styles override the alignment */
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total td,
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total td * {
  text-align: right !important;
}

/* (0,3,4) beats the theme's `.woocommerce table.shop_table .order-total strong .woocommerce-Price-amount` (0,3,2) */
.woocommerce-checkout
  .woocommerce-checkout-review-order
  table.woocommerce-checkout-review-order-table
  tr.order-total
  td
  strong
  .woocommerce-Price-amount {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.woocommerce-checkout
  .woocommerce-checkout-review-order
  table.woocommerce-checkout-review-order-table
  tr.order-total
  td
  strong
  .woocommerce-Price-amount
  span {
  font-size: inherit;
  font-weight: inherit;
}

.woocommerce-checkout
  .woocommerce-checkout-review-order
  table.woocommerce-checkout-review-order-table
  tr.order-total
  td
  small,
.woocommerce-checkout
  .woocommerce-checkout-review-order
  table.woocommerce-checkout-review-order-table
  tr.order-total
  td
  small
  * {
  color: var(--tr-muted);
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 400;
  white-space: nowrap;
}

/* dostawa — wiersz „Dostawa | gratis” + radio-carty (port z koszyka) */
.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals {
  display: block;
  padding: 1.4rem 0;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals th {
  align-items: center;
  display: flex;
  font-weight: 700;
  gap: 1rem;
  justify-content: space-between;
  width: 100%;
}

/* darmowa dostawa — znacznik przy labelce (debt: przy płatnych metodach usunąć) */
.woocommerce-checkout .woocommerce-shipping-totals th::after {
  color: #2f8a5c;
  content: 'gratis';
  font-size: 1.4rem;
  font-weight: 600;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals td {
  display: block;
  text-align: left;
  width: 100%;
  padding: 0 !important;
}

.woocommerce-checkout ul#shipping_method {
  list-style: none;
  /* margin: 1.6rem 0 0; */
  padding: 0;
  width: 100%;
}

.woocommerce-checkout #shipping_method li {
  align-items: center;
  background: #fff;
  border: 0.1rem solid var(--tr-line);
  border-radius: 1rem;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin: 0 0 1rem;
  padding: 1.4rem 1.8rem;
  text-align: left;
}

.woocommerce-checkout #shipping_method li:has(input:checked) {
  background: #e8ecfb;
  border-color: var(--tr-blue);
}

.woocommerce-checkout #shipping_method li label {
  flex: 1;
  font-weight: 500;
  margin-left: 0;
  text-align: left;
}

.woocommerce-checkout #shipping_method input[type='radio'] {
  accent-color: var(--tr-blue);
  flex: 0 0 auto;
  height: 2.2rem !important;
  margin: 0 !important;
  transform: none !important;
  width: 2.2rem !important;
}

/* tekst koszykowy „Adres dostawy podasz w kolejnym kroku” — na checkoutie zbędny */
.woocommerce-checkout .woocommerce-shipping-destination {
  display: none;
}

/* ── Panel paczkomatu (stany: bez punktu / wybrany) ── */
.tr-paczkomat-panel {
  background: #f3f5f9;
  border-radius: 1.2rem;
  display: flex;
  gap: 1.4rem;
  margin-top: 1rem;
  padding: 1.8rem 2rem;
  width: 100%;
}

.tr-paczkomat-panel__icon {
  align-items: center;
  background: #fff;
  border-radius: 50%;
  color: var(--tr-blue);
  display: inline-flex;
  flex: 0 0 auto;
  height: 4.4rem;
  justify-content: center;
  width: 4.4rem;
}

.tr-paczkomat-panel__icon svg {
  height: 2rem;
  width: 2rem;
}

.tr-paczkomat-panel__body {
  flex: 1;
  min-width: 0;
}

/* atrybut [hidden] przegrywa z display:flex/inline-flex na przyciskach */
.tr-paczkomat-panel [hidden] {
  display: none !important;
}

/* theme `.woocommerce table.shop_table tr *:last-child { text-align: end }`
   rozstraja treść panelu (panel = ostatni element w li) */
.woocommerce-checkout .tr-paczkomat-panel,
.woocommerce-checkout .tr-paczkomat-panel * {
  text-align: left !important;
}

.tr-paczkomat-panel__title {
  color: var(--tr-ink);
  font-weight: 600;
  margin: 0;
}

/* stan bez punktu — bez karty wokół przycisku (CTA nad tekstem, jak w designie) */
.tr-paczkomat-panel--empty {
  background: none;
  display: block;
  padding: 0;
}

.tr-paczkomat-panel--empty .tr-paczkomat-panel__icon {
  display: none;
}

.tr-paczkomat-panel--empty .tr-paczkomat-panel__cta {
  margin-top: 0;
}

.tr-paczkomat-panel--empty .tr-paczkomat-panel__title {
  color: var(--tr-muted);
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 400;
  margin: 0.6rem 0 0;
}

.tr-paczkomat-panel__title strong {
  color: var(--tr-blue) !important;
  font-family: var(--edublink-font-primary);
  font-weight: 600 !important;
}

.tr-paczkomat-panel__addr {
  color: #5b6273;
  font-size: 1.4rem;
  line-height: 1.5;
  margin: 0.4rem 0 0;
}

.tr-paczkomat-panel__change {
  align-items: center;
  background: none;
  border: 0;
  color: var(--tr-blue);
  cursor: pointer;
  display: inline-flex;
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  gap: 0.6rem;
  margin: 1.2rem 0 0;
  padding: 0;
}

.tr-paczkomat-panel__change:hover {
  color: var(--tr-cta-hover);
}

.tr-paczkomat-panel__change svg {
  height: 1.6rem;
  width: 1.6rem;
}

.tr-paczkomat-panel__cta {
  align-items: center;
  background: #fff !important;
  border: 0.15rem solid var(--tr-blue);
  border-radius: var(--tr-radius-btn);
  color: var(--tr-blue) !important;
  cursor: pointer;
  display: flex;
  font-family: var(--tr-font-accent);
  font-size: 1.5rem;
  font-weight: 600;
  gap: 0.8rem;
  justify-content: center;
  margin: 1.2rem 0 0 !important;
  padding: 1.8rem 2.4rem !important;
  transition: background 0.15s ease;
  width: 100%;
}

.tr-paczkomat-panel__cta:hover {
  background: #e8ecfb !important;
}

.tr-paczkomat-panel__cta svg {
  height: 1em;
  width: 1em;
}

/* surowy output pluginu Alsendo ukryty — panel go zastępuje
   (hidden inputs w .alsendo_after_rate_description dalej się POST-ują) */
.woocommerce-checkout #shipping_method .alsendo_after_rate_btn,
.woocommerce-checkout #shipping_method .alsendo_after_rate_description,
.woocommerce-checkout .alsendo-connect-checkout-locker-point {
  display: none !important;
}

/* ── Checkout: blok „Wysłać na inny adres?” jako karta ──
   karta tylko gdy checkbox jest (bez wysyłki div jest pusty) */
.woocommerce-shipping-fields:has(#ship-to-different-address) {
  margin-bottom: 3rem;
}

.woocommerce-shipping-fields #ship-to-different-address {
  float: none;
  margin: 0;
}

.woocommerce-shipping-fields #ship-to-different-address label {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-family: var(--edublink-font-primary);
  font-size: 1.6rem;
  font-weight: 500;
  gap: 1rem;
}

.tr-ship-different-note {
  clear: both;
  display: block;
  font-size: 1.4rem;
  color: var(--edublink-color-body);
  margin: 4.6rem 0 0;
}

.woocommerce-checkout input.woocommerce-form__input.woocommerce-form__input-checkbox.input-checkbox {
  margin: 0;
  transform: none;
}

.woocommerce-shipping-fields .shipping_address {
  background: var(--color-light-blue, #e8f0fe);
  border: 0.1rem solid var(--tr-card-border);
  border-radius: 1rem;
  margin-top: 1.6rem;
  padding: 1.6rem 2rem 2rem;
}

.tr-shipping-address__title {
  color: var(--tr-ink);
  /* font-family: var(--tr-font-accent); */
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 1.4rem;
}

/* pola nie wychodzą poza kartę (w mockupie były overflow — celowo nie kopiujemy) */
.woocommerce-shipping-fields .shipping_address .form-row {
  min-width: 0;
}

#BPWidget .bp-footer .bp-footer-content {
  display: none;
}

@media screen and (min-width: 576px) {
  .woocommerce-shipping-fields .shipping_address #shipping_postcode_field,
  .woocommerce-shipping-fields .shipping_address #shipping_city_field {
    clear: none;
    width: calc(50% - (1.6rem / 2));
  }

  .woocommerce-shipping-fields .shipping_address #shipping_postcode_field {
    float: left;
  }

  .woocommerce-shipping-fields .shipping_address #shipping_city_field {
    float: right;
  }
}

/* ── Checkout: mobile (≤880) — resety jak w koszyku ── */
@media (max-width: 880px) {
  /* (0,4,3): the theme's ≤767 px rule `.woocommerce table.shop_table.woocommerce-checkout-review-order-table>tbody>tr`
     (0,3,3) kept the product rows as table rows, 75% wide, so their amounts ended short of the right edge */
  .woocommerce-checkout table.woocommerce-checkout-review-order-table tr,
  .woocommerce-checkout .woocommerce table.shop_table.woocommerce-checkout-review-order-table > tbody > tr,
  .woocommerce-checkout .woocommerce table.shop_table.woocommerce-checkout-review-order-table > tfoot > tr {
    display: block;
  }

  .woocommerce-checkout table.woocommerce-checkout-review-order-table thead {
    display: none;
  }

  /* WC smallscreen ukrywa th i wymusza text-align right !important */
  .woocommerce-checkout table.woocommerce-checkout-review-order-table tbody th,
  .woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot th {
    display: block !important;
    text-align: left !important;
  }

  .woocommerce-checkout table.woocommerce-checkout-review-order-table tbody td,
  .woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot td {
    display: block;
    text-align: left !important;
    width: auto;
  }

  .woocommerce-checkout table.woocommerce-checkout-review-order-table tr.cart-subtotal td,
  .woocommerce-checkout table.woocommerce-checkout-review-order-table td.product-total {
    text-align: right !important;
  }

  .woocommerce-checkout table.woocommerce-checkout-review-order-table td::before {
    content: none !important;
    display: none !important;
  }

  .woocommerce-checkout table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals th {
    display: flex !important;
  }

  .woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total td,
  .woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total td * {
    text-align: right !important;
  }

  .woocommerce-checkout #shipping_method li {
    min-width: 0;
  }
}
