/**
 * Modern Checkout Page Styles
 * Nowoczesna strona płatności - układ dwukolumnowy
 */

/* ===============================================
   TABELA ZAMÓWIEŃ - RESET TABLE-LAYOUT
   =============================================== */

body.woocommerce-checkout .shop_table,
body.woocommerce-checkout .woocommerce-checkout-review-order-table,
body.woocommerce-checkout #order_review .shop_table,
form.woocommerce-checkout .woocommerce-checkout-review-order-table {
  table-layout: auto !important;
  width: 100% !important;
}

body.woocommerce-checkout .shop_table tfoot,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot,
body.woocommerce-checkout #order_review .shop_table tfoot {
  display: table-footer-group !important;
}

/* ===============================================
   SEKCJA POWRACAJĄCY KLIENT - LOGOWANIE
   =============================================== */

body.woocommerce-checkout .woocommerce-form-login-toggle {
  text-align: center !important;
  padding: 1rem 0 !important;
  margin-bottom: 1rem !important;
}

body.woocommerce-checkout .woocommerce-form-login-toggle .woocommerce-info {
  background: #f8f9fa !important;
  border: none !important;
  border-left: 4px solid #1C5EA8 !important;
  padding: 1rem 1.5rem !important;
  margin: 0 auto !important;
  max-width: 600px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.95rem !important;
  color: #012241 !important;
}

body.woocommerce-checkout .woocommerce-form-login-toggle .woocommerce-info::before {
  display: none !important;
}

body.woocommerce-checkout .woocommerce-form-login-toggle .woocommerce-info a.showlogin {
  color: #1C5EA8 !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
}

body.woocommerce-checkout .woocommerce-form-login-toggle .woocommerce-info a.showlogin:hover {
  color: #012241 !important;
}

/* ===============================================
   FORMULARZ LOGOWANIA - KONTENER
   =============================================== */

body.woocommerce-checkout .woocommerce-form-login {
  background: linear-gradient(135deg, rgba(1, 34, 65, 0.95) 0%, rgba(28, 94, 168, 0.9) 100%) !important;
  border-radius: 16px !important;
  padding: 2.5rem 2rem !important;
  margin: 1.5rem auto 2.5rem !important;
  max-width: 480px !important;
  width: 100% !important;
  box-shadow: 0 10px 40px rgba(1, 34, 65, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Efekt dekoracyjny w tle */
body.woocommerce-checkout .woocommerce-form-login::before {
  content: '' !important;
  position: absolute !important;
  top: -50% !important;
  right: -50% !important;
  width: 100% !important;
  height: 100% !important;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%) !important;
  pointer-events: none !important;
}

/* Tekst wprowadzający */
body.woocommerce-checkout .woocommerce-form-login > p:first-of-type {
  color: rgba(255, 255, 255, 0.9) !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  text-align: center !important;
  margin-bottom: 1.5rem !important;
  max-width: 380px !important;
}

/* Pola formularza logowania */
body.woocommerce-checkout .woocommerce-form-login .form-row {
  width: 100% !important;
  max-width: 340px !important;
  margin-bottom: 1.25rem !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

body.woocommerce-checkout .woocommerce-form-login .form-row-first,
body.woocommerce-checkout .woocommerce-form-login .form-row-last {
  width: 100% !important;
  max-width: 340px !important;
  float: none !important;
}

/* Label */
body.woocommerce-checkout .woocommerce-form-login label,
body.woocommerce-checkout .woocommerce-form-login .form-row label,
body.woocommerce-checkout .woocommerce-form-login .form-row-first label,
body.woocommerce-checkout .woocommerce-form-login .form-row-last label,
body.woocommerce-checkout form.woocommerce-form-login label {
  color: #fff !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  margin-bottom: 8px !important;
  text-align: left !important;
  display: block !important;
}

body.woocommerce-checkout .woocommerce-form-login label .required,
body.woocommerce-checkout .woocommerce-form-login .form-row label .required {
  color: #ff6b6b !important;
}

/* Ikona pokaż/ukryj hasło - bez niebieskiego tła */
body.woocommerce-checkout .woocommerce-form-login .password-input,
body.woocommerce-checkout .woocommerce-form-login .woocommerce-input-wrapper {
  position: relative !important;
}

body.woocommerce-checkout .woocommerce-form-login .show-password-input,
body.woocommerce-checkout .woocommerce-form-login .wp-hide-pw,
body.woocommerce-checkout .woocommerce-form-login button.wp-hide-pw,
body.woocommerce-checkout .woocommerce-form-login .password-input .show-password-input {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  border: none !important;
  padding: 5px !important;
  cursor: pointer !important;
  color: #666 !important;
  width: auto !important;
  height: auto !important;
  box-shadow: none !important;
  outline: none !important;
}

body.woocommerce-checkout .woocommerce-form-login .show-password-input:hover,
body.woocommerce-checkout .woocommerce-form-login .wp-hide-pw:hover,
body.woocommerce-checkout .woocommerce-form-login button.wp-hide-pw:hover {
  background: transparent !important;
  color: #333 !important;
}

body.woocommerce-checkout .woocommerce-form-login .show-password-input::before,
body.woocommerce-checkout .woocommerce-form-login .wp-hide-pw::before {
  background: transparent !important;
}

/* Inputy */
body.woocommerce-checkout .woocommerce-form-login .input-text,
body.woocommerce-checkout .woocommerce-form-login input[type="text"],
body.woocommerce-checkout .woocommerce-form-login input[type="email"],
body.woocommerce-checkout .woocommerce-form-login input[type="password"] {
  width: 100% !important;
  height: 52px !important;
  padding: 0 16px !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.95rem !important;
  color: #333 !important;
  background: #fff !important;
  border: 2px solid transparent !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

body.woocommerce-checkout .woocommerce-form-login .input-text:focus,
body.woocommerce-checkout .woocommerce-form-login input[type="text"]:focus,
body.woocommerce-checkout .woocommerce-form-login input[type="email"]:focus,
body.woocommerce-checkout .woocommerce-form-login input[type="password"]:focus {
  outline: none !important;
  border-color: #1C5EA8 !important;
  box-shadow: 0 2px 12px rgba(28, 94, 168, 0.3), 0 0 0 4px rgba(28, 94, 168, 0.1) !important;
}

body.woocommerce-checkout .woocommerce-form-login .input-text::placeholder,
body.woocommerce-checkout .woocommerce-form-login input::placeholder {
  color: #999 !important;
}

/* Checkbox "Zapamiętaj mnie" */
body.woocommerce-checkout .woocommerce-form-login .form-row.woocommerce-form-login__rememberme {
  flex-direction: row !important;
  align-items: center !important;
  gap: 0 !important;
  margin-top: 0.5rem !important;
  margin-bottom: 1.5rem !important;
}

body.woocommerce-checkout .woocommerce-form-login .woocommerce-form-login__rememberme label,
body.woocommerce-checkout .woocommerce-form-login label[for="rememberme"] {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 0 !important;
  cursor: pointer !important;
  font-size: 0.9rem !important;
  color: #fff !important;
  line-height: 1 !important;
}

body.woocommerce-checkout .woocommerce-form-login .woocommerce-form-login__rememberme input[type="checkbox"],
body.woocommerce-checkout .woocommerce-form-login input#rememberme {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  position: relative !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  vertical-align: middle !important;
  padding: 0 !important;
}

body.woocommerce-checkout .woocommerce-form-login .woocommerce-form-login__rememberme input[type="checkbox"]:checked,
body.woocommerce-checkout .woocommerce-form-login input#rememberme:checked {
  background: #1C5EA8 !important;
  border-color: #1C5EA8 !important;
}

body.woocommerce-checkout .woocommerce-form-login .woocommerce-form-login__rememberme input[type="checkbox"]:checked::after,
body.woocommerce-checkout .woocommerce-form-login input#rememberme:checked::after {
  content: '' !important;
  position: absolute !important;
  left: 3px !important;
  top: 0px !important;
  width: 3px !important;
  height: 7px !important;
  border: solid #fff !important;
  border-width: 0 1.5px 1.5px 0 !important;
  transform: rotate(45deg) !important;
}

/* Przycisk Logowania */
body.woocommerce-checkout .woocommerce-form-login button[type="submit"],
body.woocommerce-checkout .woocommerce-form-login .woocommerce-button,
body.woocommerce-checkout .woocommerce-form-login .button {
  width: 100% !important;
  max-width: 340px !important;
  height: 52px !important;
  padding: 0 24px !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: linear-gradient(135deg, #1C5EA8 0%, #2874c8 100%) !important;
  border: none !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 15px rgba(28, 94, 168, 0.4) !important;
  text-transform: none !important;
  letter-spacing: 0.3px !important;
}

body.woocommerce-checkout .woocommerce-form-login button[type="submit"]:hover,
body.woocommerce-checkout .woocommerce-form-login .woocommerce-button:hover,
body.woocommerce-checkout .woocommerce-form-login .button:hover {
  background: linear-gradient(135deg, #164B87 0%, #1C5EA8 100%) !important;
  box-shadow: 0 6px 20px rgba(28, 94, 168, 0.5) !important;
  transform: translateY(-2px) !important;
}

body.woocommerce-checkout .woocommerce-form-login button[type="submit"]:active,
body.woocommerce-checkout .woocommerce-form-login .woocommerce-button:active,
body.woocommerce-checkout .woocommerce-form-login .button:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 10px rgba(28, 94, 168, 0.3) !important;
}

/* Link "Nie pamiętasz hasła?" */
body.woocommerce-checkout .woocommerce-form-login .woocommerce-LostPassword,
body.woocommerce-checkout .woocommerce-form-login .lost_password {
  margin-top: 1.25rem !important;
  text-align: center !important;
}

body.woocommerce-checkout .woocommerce-form-login .woocommerce-LostPassword a,
body.woocommerce-checkout .woocommerce-form-login .lost_password a {
  color: rgba(255, 255, 255, 0.85) !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
  border-bottom: 1px solid transparent !important;
}

body.woocommerce-checkout .woocommerce-form-login .woocommerce-LostPassword a:hover,
body.woocommerce-checkout .woocommerce-form-login .lost_password a:hover {
  color: #fff !important;
  border-bottom-color: rgba(255, 255, 255, 0.5) !important;
}

/* Responsywność formularza logowania */
@media screen and (max-width: 576px) {
  body.woocommerce-checkout .woocommerce-form-login {
    padding: 2rem 1.5rem !important;
    margin: 1rem auto 2rem !important;
    border-radius: 12px !important;
    max-width: calc(100% - 2rem) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    left: 0 !important;
    right: 0 !important;
  }
  
  body.woocommerce-checkout .woocommerce-form-login .form-row,
  body.woocommerce-checkout .woocommerce-form-login .form-row-first,
  body.woocommerce-checkout .woocommerce-form-login .form-row-last,
  body.woocommerce-checkout .woocommerce-form-login button[type="submit"],
  body.woocommerce-checkout .woocommerce-form-login .button {
    max-width: 100% !important;
    width: 100% !important;
  }
  
  body.woocommerce-checkout .woocommerce-form-login .input-text,
  body.woocommerce-checkout .woocommerce-form-login input[type="text"],
  body.woocommerce-checkout .woocommerce-form-login input[type="email"],
  body.woocommerce-checkout .woocommerce-form-login input[type="password"],
  body.woocommerce-checkout .woocommerce-form-login button[type="submit"] {
    height: 50px !important;
    font-size: 16px !important; /* Zapobiega zoomowi na iOS */
    width: 100% !important;
  }
}

/* ===============================================
   GŁÓWNY KONTENER FORMULARZA CHECKOUT
   =============================================== */

/* Wyrównanie wszystkich sekcji */
body.woocommerce-checkout .woocommerce,
body.woocommerce-checkout form.checkout {
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.woocommerce-checkout #customer_details {
  /* Zachowaj oryginalną szerokość kontenera */
  margin: 0 auto !important;
  padding: 0 !important;
}

body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2 {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  float: none !important;
}

/* ===============================================
   SEKCJA BILLING - UKŁAD DWUKOLUMNOWY
   =============================================== */

body.woocommerce-checkout #customer_details .woocommerce-billing-fields__field-wrapper,
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px 20px !important;
  width: 100% !important;
}

/* Reset domyślnych szerokości z style.css */
body.woocommerce-checkout #customer_details p,
body.woocommerce-checkout #customer_details .form-row {
  width: 100% !important;
  margin-bottom: 0 !important;
}

/* Wszystkie pola - domyślnie połowa szerokości (1 kolumna w gridzie) */
body.woocommerce-checkout #customer_details .form-row {
  grid-column: span 1 !important;
  width: 100% !important;
}

/* Pola pełnej szerokości - tylko uwagi do zamówienia */
body.woocommerce-checkout #customer_details #order_comments_field {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

/* Shipping: Nazwa firmy - pełna szerokość (cały wiersz) */
body.woocommerce-checkout #customer_details #shipping_company_field {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

/* 
   UKŁAD PÓL W 2 KOLUMNACH:
   Wiersz 1: Imię | Nazwisko
   Wiersz 2: Email | Numer telefonu
   Wiersz 3: Nazwa firmy | NIP
   Wiersz 4: Ulica | Numer domu
   Wiersz 5: Miasto | Kod pocztowy
*/

/* Kolejność pól za pomocą CSS order */
body.woocommerce-checkout #billing_first_name_field { order: 1 !important; }
body.woocommerce-checkout #billing_last_name_field { order: 2 !important; }
body.woocommerce-checkout #billing_email_field { order: 3 !important; }
body.woocommerce-checkout #billing_phone_field { order: 4 !important; }
body.woocommerce-checkout #billing_company_field { order: 5 !important; }
body.woocommerce-checkout #billing_vat_field { order: 6 !important; }
body.woocommerce-checkout #billing_address_1_field { order: 7 !important; }
body.woocommerce-checkout #billing_address_2_field { order: 8 !important; }
body.woocommerce-checkout #billing_city_field { order: 9 !important; }
body.woocommerce-checkout #billing_postcode_field { order: 10 !important; }
body.woocommerce-checkout #billing_country_field { order: 11 !important; }
body.woocommerce-checkout #billing_state_field { order: 12 !important; }



/* ===============================================
   STYLE POLA FORMULARZA
   =============================================== */

body.woocommerce-checkout .form-row {
  margin-bottom: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

body.woocommerce-checkout .form-row label {
  display: block !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: #012241 !important;
  margin-bottom: 6px !important;
  text-align: left !important;
}

body.woocommerce-checkout .form-row label .optional {
  font-weight: 400 !important;
  color: #888 !important;
  font-size: 0.8rem !important;
}

body.woocommerce-checkout .form-row label .required {
  color: #e31837 !important;
}

body.woocommerce-checkout .form-row .woocommerce-input-wrapper {
  width: 100% !important;
}

/* Inputy i selecty - jednolity styl */
body.woocommerce-checkout .form-row input.input-text,
body.woocommerce-checkout .form-row input[type="text"],
body.woocommerce-checkout .form-row input[type="email"],
body.woocommerce-checkout .form-row input[type="tel"],
body.woocommerce-checkout .form-row input[type="number"],
body.woocommerce-checkout .form-row select,
body.woocommerce-checkout .form-row textarea,
body.woocommerce-checkout #customer_details .input-text,
body.woocommerce-checkout #customer_details input[type="text"],
body.woocommerce-checkout #customer_details select {
  width: 100% !important;
  height: 50px !important;
  padding: 0 16px !important;
  font-size: 0.95rem !important;
  font-family: 'Poppins', sans-serif !important;
  color: #333 !important;
  background: #fff !important;
  border: 1px solid #d0d5dd !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

body.woocommerce-checkout .form-row textarea,
body.woocommerce-checkout #customer_details textarea,
body.woocommerce-checkout #order_comments,
body.woocommerce-checkout textarea#order_comments,
body.woocommerce-checkout .woocommerce-input-wrapper textarea,
body.woocommerce-checkout .form-row.notes textarea,
body.woocommerce-checkout #customer_details textarea#order_comments,
body.woocommerce-checkout #customer_details textarea.input-text,
body.woocommerce-checkout #customer_details #order_comments.input-text {
  height: auto !important;
  min-height: 100px !important;
  padding: 16px 16px 16px 16px !important;
  resize: vertical !important;
  line-height: 1.5 !important;
  vertical-align: top !important;
}

body.woocommerce-checkout .form-row input:focus,
body.woocommerce-checkout .form-row select:focus,
body.woocommerce-checkout .form-row textarea:focus {
  border-color: #1C5EA8 !important;
  box-shadow: 0 0 0 3px rgba(28, 94, 168, 0.12) !important;
  outline: none !important;
}

body.woocommerce-checkout .form-row input::placeholder,
body.woocommerce-checkout .form-row textarea::placeholder,
body.woocommerce-checkout #order_comments::placeholder {
  color: #999 !important;
  padding-top: 0 !important;
  line-height: 1.5 !important;
}

/* Select2 - dropdown */
body.woocommerce-checkout .select2-container {
  width: 100% !important;
}

body.woocommerce-checkout .select2-container--default .select2-selection--single {
  height: 50px !important;
  border: 1px solid #d0d5dd !important;
  border-radius: 8px !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
}

body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 50px !important;
  padding: 0 !important;
  color: #333 !important;
}

body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 48px !important;
  right: 12px !important;
}



/* ===============================================
   UKRYCIE DUPLIKATU POLA NIP (Tax identification number)
   =============================================== */

/* Ukryj pole Tax identification number (NIP) z różnych wtyczek */
body.woocommerce-checkout #eu_vat_number_field,
body.woocommerce-checkout #billing_eu_vat_number_field,
body.woocommerce-checkout p[id*="tax_identification"],
body.woocommerce-checkout p[id*="eu_vat"],
body.woocommerce-checkout .wc-block-components-text-input[id*="vat"],
body.woocommerce-checkout #wc_tax_identification_field,
body.woocommerce-checkout #billing_tax_id_field,
body.woocommerce-checkout #tax_identification_number_field,
body.woocommerce-checkout [id*="tax_identification"],
body.woocommerce-checkout [id*="tax-identification"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Ukryj po klasie form-row z nazwą zawierającą tax */
body.woocommerce-checkout .form-row-tax-identification,
body.woocommerce-checkout .form-row-eu-vat,
body.woocommerce-checkout .form-row.tax-identification {
  display: none !important;
}



/* ===============================================
   SEKCJA CHECKBOXÓW - JEDNOLITY STYL
   =============================================== */

/* Kontener główny dla wszystkich checkboxów */
body.woocommerce-checkout .checkboxes-wrapper {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 60px !important;
  padding: 1.5rem 0 !important;
  margin: 1rem 0 !important;
  border-top: 1px solid #eee !important;
  border-bottom: 1px solid #eee !important;
  width: 100% !important;
}

/* Każdy checkbox w wrapperze - równa szerokość */
body.woocommerce-checkout .checkboxes-wrapper > *,
body.woocommerce-checkout .checkboxes-wrapper #ship-to-different-address,
body.woocommerce-checkout .checkboxes-wrapper .vat-checkbox-inline,
body.woocommerce-checkout .checkboxes-wrapper .create-account-checkbox {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
}

/* Wszystkie labele checkboxów - identyczny styl */
body.woocommerce-checkout .checkboxes-wrapper label,
body.woocommerce-checkout .checkboxes-wrapper .woocommerce-form__label,
body.woocommerce-checkout .checkboxes-wrapper .woocommerce-form__label-for-checkbox,
body.woocommerce-checkout .checkboxes-wrapper label.checkbox {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: #012241 !important;
  cursor: pointer !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 24px !important;
  white-space: nowrap !important;
}

/* Ukryj "(opcjonalne)" */
body.woocommerce-checkout .checkboxes-wrapper .optional {
  display: none !important;
}

/* ===== WSZYSTKIE CHECKBOXY - CUSTOM DESIGN ===== */
body.woocommerce-checkout .checkboxes-wrapper input[type="checkbox"],
body.woocommerce-checkout .checkboxes-wrapper .woocommerce-form__label-for-checkbox input[type="checkbox"],
body.woocommerce-checkout .checkboxes-wrapper label input[type="checkbox"],
body.woocommerce-checkout .checkboxes-wrapper label.checkbox input[type="checkbox"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  border: 2px solid #1C5EA8 !important;
  border-radius: 4px !important;
  background: #fff !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer !important;
  position: relative !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Usunięcie domyślnych pseudo-elementów */
body.woocommerce-checkout .checkboxes-wrapper input[type="checkbox"]::before,
body.woocommerce-checkout .checkboxes-wrapper .woocommerce-form__label-for-checkbox input[type="checkbox"]::before {
  display: none !important;
  content: none !important;
}

/* Hover na niezaznaczonym */
body.woocommerce-checkout .checkboxes-wrapper input[type="checkbox"]:hover {
  border-color: #164B87 !important;
  background: #f0f7ff !important;
}

/* Checkbox zaznaczony - niebieski */
body.woocommerce-checkout .checkboxes-wrapper input[type="checkbox"]:checked,
body.woocommerce-checkout .checkboxes-wrapper .woocommerce-form__label-for-checkbox input[type="checkbox"]:checked,
body.woocommerce-checkout .checkboxes-wrapper label input[type="checkbox"]:checked {
  background: #1C5EA8 !important;
  border-color: #1C5EA8 !important;
}

/* Ptaszek w zaznaczonym checkboxie */
body.woocommerce-checkout .checkboxes-wrapper input[type="checkbox"]:checked::after,
body.woocommerce-checkout .checkboxes-wrapper .woocommerce-form__label-for-checkbox input[type="checkbox"]:checked::after,
body.woocommerce-checkout .checkboxes-wrapper label input[type="checkbox"]:checked::after {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  left: 7px !important;
  top: 3px !important;
  width: 6px !important;
  height: 12px !important;
  border: solid #fff !important;
  border-width: 0 2.5px 2.5px 0 !important;
  transform: rotate(45deg) !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Focus state */
body.woocommerce-checkout .checkboxes-wrapper input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px rgba(28, 94, 168, 0.2) !important;
}

/* VAT checkbox - specjalne style dla wyrównania */
body.woocommerce-checkout .checkboxes-wrapper .vat-checkbox-inline,
body.woocommerce-checkout .checkboxes-wrapper p#gees_invoice_add_field {
  padding: 0 !important;
  margin: 0 !important;
}

body.woocommerce-checkout .checkboxes-wrapper .vat-checkbox-inline .woocommerce-input-wrapper,
body.woocommerce-checkout .checkboxes-wrapper p#gees_invoice_add_field .woocommerce-input-wrapper {
  display: flex !important;
  align-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.woocommerce-checkout .checkboxes-wrapper .vat-checkbox-inline label.checkbox,
body.woocommerce-checkout .checkboxes-wrapper p#gees_invoice_add_field label.checkbox {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Checkbox "Stworzyć konto?" - ukryj jeśli poza wrapperem */
body.woocommerce-checkout .woocommerce-account-fields {
  display: none !important;
}

/* Sekcja shipping - usuń domyślne style */
body.woocommerce-checkout .woocommerce-shipping-fields {
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

/* ===============================================
   SEKCJA SHIPPING FIELDS - UKŁAD DWUKOLUMNOWY
   =============================================== */

body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper,
body.woocommerce-checkout #customer_details .woocommerce-shipping-fields__field-wrapper {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px 20px !important;
  width: 100% !important;
}

/* Wszystkie pola shipping - domyślnie połowa szerokości */
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row {
  grid-column: span 1 !important;
  width: 100% !important;
}

/* Kolejność pól shipping:
   Wiersz 1: Imię | Nazwisko
   Wiersz 2: Nazwa firmy (pełna szerokość)
   Wiersz 3: Ulica | Numer domu
   Wiersz 4: Miasto | Kod pocztowy
*/
body.woocommerce-checkout #shipping_first_name_field { order: 1 !important; }
body.woocommerce-checkout #shipping_last_name_field { order: 2 !important; }
body.woocommerce-checkout #shipping_company_field { 
  order: 3 !important; 
  grid-column: 1 / -1 !important; 
  width: 100% !important;
}
body.woocommerce-checkout #shipping_address_1_field { order: 4 !important; }
body.woocommerce-checkout #shipping_address_2_field { order: 5 !important; }
body.woocommerce-checkout #shipping_city_field { order: 6 !important; }
body.woocommerce-checkout #shipping_postcode_field { order: 7 !important; }
body.woocommerce-checkout #shipping_country_field { order: 20 !important; display: none !important; }
body.woocommerce-checkout #shipping_state_field { order: 21 !important; display: none !important; }

/* Checkbox Wystaw Fakturę VAT - style gdy przeniesiony */
body.woocommerce-checkout .checkout-checkboxes-row .form-row {
  margin: 0 !important;
  padding: 0 !important;
}

body.woocommerce-checkout .checkout-checkboxes-row label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: #012241 !important;
  cursor: pointer !important;
}

/* ===============================================
   SEKCJA UWAG DO ZAMÓWIENIA
   =============================================== */

body.woocommerce-checkout .woocommerce-additional-fields {
  margin-top: 1.5rem !important;
  padding: 0 !important;
  width: 100% !important;
}

body.woocommerce-checkout .woocommerce-additional-fields h3 {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: #012241 !important;
  margin-bottom: 1rem !important;
  padding: 0 !important;
}

body.woocommerce-checkout .woocommerce-additional-fields__field-wrapper {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* ===============================================
   CHECKBOX FAKTURY VAT
   =============================================== */

body.woocommerce-checkout .form-row.woocommerce-validated input[type="checkbox"],
body.woocommerce-checkout .form-row input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  accent-color: #1C5EA8 !important;
  margin-right: 8px !important;
}

/* ===============================================
   RESPONSIVE - TABLET I MOBILE
   =============================================== */

@media screen and (max-width: 768px) {
  body.woocommerce-checkout #customer_details {
    padding: 0 0.75rem !important;
  }
  
  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
  body.woocommerce-checkout #customer_details .woocommerce-billing-fields__field-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }
  
  /* Wszystkie pola na pełną szerokość na mobile */
  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper > p,
  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row {
    width: 100% !important;
  }
  
  /* 
     KOLEJNOŚĆ PÓL NA MOBILE (jedna kolumna):
     1. Imię
     2. Nazwisko
     3. Email
     4. Numer telefonu
     5. Nazwa firmy
     6. NIP
     7. Ulica
     8. Numer domu
     9. Miasto
     10. Kod pocztowy
  */
  body.woocommerce-checkout #billing_first_name_field { order: 1 !important; }
  body.woocommerce-checkout #billing_last_name_field { order: 2 !important; }
  body.woocommerce-checkout #billing_email_field { order: 3 !important; }
  body.woocommerce-checkout #billing_phone_field { order: 4 !important; }
  body.woocommerce-checkout #billing_company_field { order: 5 !important; }
  body.woocommerce-checkout #billing_vat_field { order: 6 !important; }
  body.woocommerce-checkout #billing_address_1_field { order: 7 !important; }
  body.woocommerce-checkout #billing_address_2_field { order: 8 !important; }
  body.woocommerce-checkout #billing_city_field { order: 9 !important; }
  body.woocommerce-checkout #billing_postcode_field { order: 10 !important; }
  body.woocommerce-checkout #billing_country_field { order: 11 !important; }
  body.woocommerce-checkout #billing_state_field { order: 12 !important; }
  
  /* Shipping fields na mobile - jedna kolumna */
  body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper,
  body.woocommerce-checkout #customer_details .woocommerce-shipping-fields__field-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }
  
  body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper .form-row {
    width: 100% !important;
  }
  
  /* Kolejność pól shipping na mobile */
  body.woocommerce-checkout #shipping_first_name_field { order: 1 !important; }
  body.woocommerce-checkout #shipping_last_name_field { order: 2 !important; }
  body.woocommerce-checkout #shipping_company_field { order: 3 !important; }
  body.woocommerce-checkout #shipping_address_1_field { order: 4 !important; }
  body.woocommerce-checkout #shipping_address_2_field { order: 5 !important; }
  body.woocommerce-checkout #shipping_city_field { order: 6 !important; }
  body.woocommerce-checkout #shipping_postcode_field { order: 7 !important; }
  body.woocommerce-checkout #shipping_country_field { order: 8 !important; }
  body.woocommerce-checkout #shipping_state_field { order: 9 !important; }
  
  body.woocommerce-checkout .form-row input.input-text,
  body.woocommerce-checkout .form-row input[type="text"],
  body.woocommerce-checkout .form-row input[type="email"],
  body.woocommerce-checkout .form-row input[type="tel"],
  body.woocommerce-checkout .form-row select {
    height: 48px !important;
    font-size: 16px !important; /* Zapobiega zoomowi na iOS */
  }
  
  body.woocommerce-checkout .select2-container--default .select2-selection--single {
    height: 48px !important;
  }
  
  body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 48px !important;
  }
  
  body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
  }
  
  /* Checkboxy na mobile - układ pionowy */
  body.woocommerce-checkout .checkboxes-wrapper {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 1rem 0 !important;
    margin: 1rem 0 !important;
  }
  
  body.woocommerce-checkout .checkboxes-wrapper > *,
  body.woocommerce-checkout .checkboxes-wrapper #ship-to-different-address,
  body.woocommerce-checkout .checkboxes-wrapper .vat-checkbox-inline,
  body.woocommerce-checkout .checkboxes-wrapper .create-account-checkbox {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  body.woocommerce-checkout .checkboxes-wrapper .vat-checkbox-inline,
  body.woocommerce-checkout .checkboxes-wrapper .vat-checkbox-inline label,
  body.woocommerce-checkout .checkboxes-wrapper .vat-checkbox-inline .woocommerce-input-wrapper,
  body.woocommerce-checkout .checkboxes-wrapper .vat-checkbox-inline span,
  body.woocommerce-checkout .checkboxes-wrapper p.vat-checkbox-inline {
    padding-left: 0 !important;
    margin-left: 0 !important;
    display: flex !important;
    align-items: center !important;
  }
}

/* ===============================================
   TABLET - 2 KOLUMNY ALE MNIEJSZE
   =============================================== */

@media screen and (min-width: 769px) and (max-width: 991px) {
  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
  body.woocommerce-checkout #customer_details .woocommerce-billing-fields__field-wrapper {
    gap: 14px 16px !important;
  }
}

/* ===============================================
   DESKTOP - PEŁNY UKŁAD
   =============================================== */

@media screen and (min-width: 992px) {
  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
  body.woocommerce-checkout #customer_details .woocommerce-billing-fields__field-wrapper {
    gap: 18px 24px !important;
  }
}

/* ===============================================
   WALIDACJA - STYLE BŁĘDÓW
   =============================================== */

body.woocommerce-checkout .form-row.woocommerce-invalid input,
body.woocommerce-checkout .form-row.woocommerce-invalid select {
  border-color: #e31837 !important;
}

body.woocommerce-checkout .form-row.woocommerce-invalid label {
  color: #e31837 !important;
}

body.woocommerce-checkout .form-row.woocommerce-validated input,
body.woocommerce-checkout .form-row.woocommerce-validated select {
  border-color: #28a745 !important;
}

/* ===============================================
   NAGŁÓWKI SEKCJI
   =============================================== */

body.woocommerce-checkout .woocommerce-billing-fields h3,
body.woocommerce-checkout .woocommerce-shipping-fields h3 {
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  color: #012241 !important;
  margin-bottom: 1.5rem !important;
  padding: 0 0 0.75rem 0 !important;
  border-bottom: 2px solid #1C5EA8 !important;
}

/* Wrapper billing i shipping - wyrównanie */
body.woocommerce-checkout .woocommerce-billing-fields,
body.woocommerce-checkout .woocommerce-shipping-fields {
  padding: 0 !important;
  margin: 0 !important;
}

/* ===============================================
   SEKCJA "TWOJE ZAMÓWIENIE" - ORDER REVIEW
   =============================================== */

/* Nagłówek sekcji */
body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout h3#order_review_heading {
  padding: 0 !important;
  margin: 2rem 0 1rem 0 !important;
}

/* Tabela zamówienia - podstawowe style */
body.woocommerce-checkout #order_review,
body.woocommerce-checkout .woocommerce-checkout-review-order {
  width: 100% !important;
  overflow-x: visible !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.woocommerce-checkout #order_review .shop_table,
body.woocommerce-checkout .woocommerce-checkout-review-order-table {
  width: 100% !important;
  table-layout: auto !important;
  border-collapse: collapse !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Tfoot - pełna szerokość */
body.woocommerce-checkout #order_review .shop_table tfoot,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot {
  display: table-footer-group !important;
  width: 100% !important;
}

body.woocommerce-checkout #order_review .shop_table tfoot tr,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot tr {
  display: table-row !important;
  width: 100% !important;
}

/* Komórki tabeli - wyrównanie */
body.woocommerce-checkout #order_review .shop_table th,
body.woocommerce-checkout #order_review .shop_table td,
body.woocommerce-checkout .woocommerce-checkout-review-order-table th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table td {
  padding: 0.75rem 0 !important;
}

body.woocommerce-checkout #order_review .shop_table thead th:first-child,
body.woocommerce-checkout #order_review .shop_table tbody td:first-child,
body.woocommerce-checkout #order_review .shop_table tfoot th:first-child,
body.woocommerce-checkout .woocommerce-checkout-review-order-table thead th:first-child,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tbody td:first-child,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot th:first-child {
  padding-left: 20px !important;
  text-align: left !important;
}

body.woocommerce-checkout #order_review .shop_table thead th:last-child,
body.woocommerce-checkout #order_review .shop_table tbody td:last-child,
body.woocommerce-checkout #order_review .shop_table tfoot td:last-child,
body.woocommerce-checkout .woocommerce-checkout-review-order-table thead th:last-child,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tbody td:last-child,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot td:last-child {
  padding-right: 20px !important;
  text-align: right !important;
}

/* Kolumny tabeli */
body.woocommerce-checkout #order_review .shop_table td.product-name,
body.woocommerce-checkout .woocommerce-checkout-review-order-table td.product-name {
  width: 70% !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  padding-right: 10px !important;
  padding-left: 20px !important;
}

/* Tabela zamówienia - kwoty wyrównane do prawej */
body.woocommerce-checkout #order_review .shop_table td.product-total,
body.woocommerce-checkout #order_review .shop_table .product-total,
body.woocommerce-checkout .woocommerce-checkout-review-order-table td.product-total,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .product-total {
  text-align: right !important;
  width: 30% !important;
  white-space: nowrap !important;
  padding-right: 0 !important;
}

body.woocommerce-checkout #order_review .shop_table .woocommerce-Price-amount,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .woocommerce-Price-amount {
  display: inline-block !important;
  text-align: right !important;
}

/* Wiersz Kwota - wartość do prawej */
body.woocommerce-checkout #order_review .cart-subtotal td,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .cart-subtotal td {
  text-align: right !important;
}

/* Wiersz Łącznie - wartość do prawej */
body.woocommerce-checkout #order_review .order-total td,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total td {
  text-align: right !important;
}

body.woocommerce-checkout #order_review .order-total td strong,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total td strong {
  display: block !important;
  text-align: right !important;
}

/* ===============================================
   METODY WYSYŁKI - CHECKOUT - KOMPLEKSOWA NAPRAWA
   =============================================== */

/* Resetuj grid i flex z style.css dla checkout */
body.woocommerce-checkout .woocommerce-shipping-methods,
body.woocommerce-checkout ul.woocommerce-shipping-methods,
body.woocommerce-checkout ul#shipping_method {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  text-align: left !important;
  width: 100% !important;
  max-width: 100% !important;
}

body.woocommerce-checkout .woocommerce-shipping-methods li,
body.woocommerce-checkout ul.woocommerce-shipping-methods li,
body.woocommerce-checkout ul#shipping_method li {
  display: flex !important;
  grid-template-columns: unset !important;
  justify-content: flex-start !important;
  text-align: left !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body.woocommerce-checkout .woocommerce-shipping-methods li label,
body.woocommerce-checkout ul.woocommerce-shipping-methods li label,
body.woocommerce-checkout ul#shipping_method li label {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  min-width: unset !important;
  width: auto !important;
  flex: 1 !important;
}

/* Wiersz wysyłki - wyciągnij z tabeli i zrób block */
body.woocommerce-checkout .woocommerce-shipping-totals,
body.woocommerce-checkout #order_review .woocommerce-shipping-totals,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .woocommerce-shipping-totals,
body.woocommerce-checkout .shop_table .woocommerce-shipping-totals,
body.woocommerce-checkout tfoot .woocommerce-shipping-totals,
body.woocommerce-checkout .shop_table tfoot .woocommerce-shipping-totals,
body.woocommerce-checkout tr.woocommerce-shipping-totals,
body.woocommerce-checkout tfoot tr.woocommerce-shipping-totals,
body.woocommerce-checkout .shop_table tfoot tr.woocommerce-shipping-totals {
  display: block !important;
  width: 100% !important;
  padding: 0 0 1.5rem 0 !important;
  margin: 0 0 1.5rem 0 !important;
  float: none !important;
  clear: both !important;
  border-bottom: 1px solid #e9ecef !important;
  padding-bottom: 2rem !important;
}

/* TH - nagłówek "Wysyłka" */
body.woocommerce-checkout .woocommerce-shipping-totals th,
body.woocommerce-checkout .shop_table .woocommerce-shipping-totals th,
body.woocommerce-checkout tfoot .woocommerce-shipping-totals th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .woocommerce-shipping-totals th,
body.woocommerce-checkout #order_review .shop_table .woocommerce-shipping-totals th,
body.woocommerce-checkout .shop_table tfoot .woocommerce-shipping-totals th,
body.woocommerce-checkout tr.woocommerce-shipping-totals th,
body.woocommerce-checkout tfoot tr.woocommerce-shipping-totals th {
  display: block !important;
  float: none !important;
  text-align: left !important;
  padding: 0.75rem 0 0.5rem 0 !important;
  font-weight: 600 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
}

/* TD - kontener z opcjami wysyłki */
body.woocommerce-checkout .woocommerce-shipping-totals td,
body.woocommerce-checkout .shop_table .woocommerce-shipping-totals td,
body.woocommerce-checkout tfoot .woocommerce-shipping-totals td,
body.woocommerce-checkout .woocommerce-checkout-review-order-table .woocommerce-shipping-totals td,
body.woocommerce-checkout #order_review .shop_table .woocommerce-shipping-totals td,
body.woocommerce-checkout .shop_table tfoot .woocommerce-shipping-totals td,
body.woocommerce-checkout tr.woocommerce-shipping-totals td,
body.woocommerce-checkout tfoot tr.woocommerce-shipping-totals td,
body.woocommerce-checkout .woocommerce-shipping-totals td[data-title],
body.woocommerce-checkout .woocommerce-shipping-totals td[data-title="Wysyłka"] {
  display: block !important;
  float: none !important;
  padding: 0 !important;
  text-align: left !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
}

/* UL - lista metod wysyłki */
body.woocommerce-checkout #shipping_method,
body.woocommerce-checkout .woocommerce-shipping-methods,
body.woocommerce-checkout .woocommerce-shipping-totals ul,
body.woocommerce-checkout .woocommerce-shipping-totals td ul,
body.woocommerce-checkout .woocommerce-shipping-totals td ul#shipping_method,
body.woocommerce-checkout ul#shipping_method,
body.woocommerce-checkout ul.woocommerce-shipping-methods {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  text-align: left !important;
  display: block !important;
  float: none !important;
}

/* LI - pojedyncza opcja wysyłki */
body.woocommerce-checkout #shipping_method li,
body.woocommerce-checkout .woocommerce-shipping-methods li,
body.woocommerce-checkout .woocommerce-shipping-totals ul li,
body.woocommerce-checkout .woocommerce-shipping-totals td ul li,
body.woocommerce-checkout ul#shipping_method li,
body.woocommerce-checkout ul.woocommerce-shipping-methods li {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 1rem !important;
  margin: 0 0 0.75rem 0 !important;
  padding: 1.25rem 1.5rem !important;
  background: #f8f9fa !important;
  border-radius: 10px !important;
  border: 2px solid #e9ecef !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-size: 0.95rem !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-height: 70px !important;
  float: none !important;
  position: relative !important;
}

/* Label jako klikalny obszar na cały kafelek */
body.woocommerce-checkout #shipping_method li label,
body.woocommerce-checkout .woocommerce-shipping-methods li label,
body.woocommerce-checkout .woocommerce-shipping-totals ul li label {
  position: static !important;
}

body.woocommerce-checkout #shipping_method li label::before,
body.woocommerce-checkout .woocommerce-shipping-methods li label::before,
body.woocommerce-checkout .woocommerce-shipping-totals ul li label::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 1 !important;
  cursor: pointer !important;
}

/* Input radio nad pseudo-elementem */
body.woocommerce-checkout #shipping_method li input[type="radio"],
body.woocommerce-checkout .woocommerce-shipping-methods li input[type="radio"],
body.woocommerce-checkout .woocommerce-shipping-totals ul li input[type="radio"] {
  position: relative !important;
  z-index: 2 !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  margin: 0 !important;
  accent-color: #1C5EA8 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

body.woocommerce-checkout #shipping_method li:last-child,
body.woocommerce-checkout .woocommerce-shipping-methods li:last-child {
  margin-bottom: 0 !important;
}

body.woocommerce-checkout #shipping_method li:hover,
body.woocommerce-checkout #shipping_method li:active,
body.woocommerce-checkout .woocommerce-shipping-methods li:hover,
body.woocommerce-checkout .woocommerce-shipping-methods li:active,
body.woocommerce-checkout .woocommerce-shipping-totals ul li:hover,
body.woocommerce-checkout .woocommerce-shipping-totals ul li:active {
  background: #e8f4fc !important;
  border-color: #1C5EA8 !important;
}

body.woocommerce-checkout #shipping_method li label,
body.woocommerce-checkout .woocommerce-shipping-methods li label,
body.woocommerce-checkout .woocommerce-shipping-totals ul li label {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.75rem !important;
  cursor: pointer !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  color: #333 !important;
  line-height: 1.4 !important;
  flex: 1 !important;
  text-align: left !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: auto !important;
  width: auto !important;
  max-width: none !important;
}

/* Cena wysyłki */
body.woocommerce-checkout #shipping_method li label .woocommerce-Price-amount,
body.woocommerce-checkout .woocommerce-shipping-methods li label .woocommerce-Price-amount,
body.woocommerce-checkout .woocommerce-shipping-totals ul li label .woocommerce-Price-amount {
  font-weight: 600 !important;
  color: #1C5EA8 !important;
  margin-left: auto !important;
}

/* Obrazki w wysyłce (np. logo kuriera) */
body.woocommerce-checkout #shipping_method li label img,
body.woocommerce-checkout .woocommerce-shipping-methods li label img,
body.woocommerce-checkout .woocommerce-shipping-totals ul li label img {
  max-width: 80px !important;
  height: auto !important;
  object-fit: contain !important;
  margin: 0 !important;
}

/* Opis metody wysyłki (np. adres odbioru) */
body.woocommerce-checkout #shipping_method li .shipping-method-description,
body.woocommerce-checkout .woocommerce-shipping-methods li .shipping-method-description,
body.woocommerce-checkout .woocommerce-shipping-totals ul li .shipping-method-description,
body.woocommerce-checkout #shipping_method li label small,
body.woocommerce-checkout .woocommerce-shipping-methods li label small,
body.woocommerce-checkout .woocommerce-shipping-totals ul li label small {
  display: block !important;
  width: 100% !important;
  font-size: 0.85rem !important;
  font-weight: 400 !important;
  color: #666 !important;
  margin-top: 0.25rem !important;
}

/* ===============================================
   MOBILE - SEKCJA TWOJE ZAMÓWIENIE
   =============================================== */

@media screen and (max-width: 768px) {
  /* Kontener Order Review */
  body.woocommerce-checkout #order_review,
  body.woocommerce-checkout .woocommerce-checkout-review-order {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden !important;
  }
  
  /* Tabela zamówienia */
  body.woocommerce-checkout #order_review .shop_table,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }
  
  /* Nagłówek tabeli */
  body.woocommerce-checkout #order_review .shop_table thead,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table thead {
    display: table-header-group !important;
  }
  
  body.woocommerce-checkout #order_review .shop_table thead th,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table thead th {
    padding: 0.75rem 0.5rem !important;
    font-size: 0.9rem !important;
  }
  
  /* Wiersze produktów */
  body.woocommerce-checkout #order_review .shop_table tbody tr,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table tbody tr {
    display: table-row !important;
  }
  
  body.woocommerce-checkout #order_review .shop_table tbody td,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table tbody td {
    display: table-cell !important;
    padding: 0.75rem 0.5rem !important;
    vertical-align: top !important;
  }
  
  /* Kolumna nazwy produktu - szersza */
  body.woocommerce-checkout #order_review .shop_table td.product-name,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table td.product-name {
    width: 65% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    padding-right: 8px !important;
  }
  
  /* Kolumna ceny - węższa, wyrównana do prawej */
  body.woocommerce-checkout #order_review .shop_table td.product-total,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table td.product-total {
    width: 35% !important;
    text-align: right !important;
    white-space: nowrap !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
  }
  
  /* Ceny */
  body.woocommerce-checkout #order_review .shop_table .woocommerce-Price-amount,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table .woocommerce-Price-amount {
    font-size: 0.85rem !important;
  }
  
  /* Stopka tabeli - Kwota, Wysyłka, Łącznie */
  body.woocommerce-checkout #order_review .shop_table tfoot,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot {
    display: table-footer-group !important;
  }
  
  body.woocommerce-checkout #order_review .shop_table tfoot tr,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot tr {
    display: table-row !important;
  }
  
  body.woocommerce-checkout #order_review .shop_table tfoot th,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot th {
    width: 50% !important;
    text-align: left !important;
    padding: 0.75rem 0.5rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
  }
  
  body.woocommerce-checkout #order_review .shop_table tfoot td,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot td {
    width: 50% !important;
    text-align: right !important;
    padding: 0.75rem 0.5rem !important;
    font-size: 0.9rem !important;
  }
  
  /* Wiersz sumy całkowitej */
  body.woocommerce-checkout #order_review .shop_table tfoot .order-total th,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot .order-total th,
  body.woocommerce-checkout #order_review .shop_table tfoot .order-total td,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot .order-total td {
    font-size: 1rem !important;
    font-weight: 700 !important;
    padding-top: 1rem !important;
  }
  
  /* Ilość przy produkcie */
  body.woocommerce-checkout #order_review .shop_table .product-name .product-quantity,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table .product-name .product-quantity {
    display: inline !important;
  }
  
  /* ===============================================
     MOBILE - SEKCJA WYSYŁKI
     =============================================== */
  
  /* Wiersz wysyłki - układanie pod sobą */
  body.woocommerce-checkout .woocommerce-shipping-totals,
  body.woocommerce-checkout .shop_table .woocommerce-shipping-totals,
  body.woocommerce-checkout tfoot .woocommerce-shipping-totals {
    display: block !important;
    width: 100% !important;
  }
  
  body.woocommerce-checkout .woocommerce-shipping-totals th,
  body.woocommerce-checkout .shop_table .woocommerce-shipping-totals th,
  body.woocommerce-checkout tfoot .woocommerce-shipping-totals th {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    text-align: left !important;
    vertical-align: top !important;
    padding: 0.75rem 0 0.5rem 0 !important;
  }
  
  body.woocommerce-checkout .woocommerce-shipping-totals td,
  body.woocommerce-checkout .shop_table .woocommerce-shipping-totals td,
  body.woocommerce-checkout tfoot .woocommerce-shipping-totals td {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    vertical-align: top !important;
    padding: 0 !important;
  }
  
  /* Lista wysyłki - mobile */
  body.woocommerce-checkout #shipping_method,
  body.woocommerce-checkout .woocommerce-shipping-methods {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  body.woocommerce-checkout #shipping_method li,
  body.woocommerce-checkout .woocommerce-shipping-methods li {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 0.5rem !important;
    padding: 0.75rem !important;
    margin: 0.4rem 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  body.woocommerce-checkout #shipping_method li input[type="radio"],
  body.woocommerce-checkout .woocommerce-shipping-methods li input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important;
  }
  
  body.woocommerce-checkout #shipping_method li label,
  body.woocommerce-checkout .woocommerce-shipping-methods li label {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left !important;
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    flex: 1 !important;
    min-width: 0 !important;
    width: auto !important;
    gap: 0.25rem !important;
  }
  
  body.woocommerce-checkout #shipping_method li label .woocommerce-Price-amount,
  body.woocommerce-checkout .woocommerce-shipping-methods li label .woocommerce-Price-amount {
    margin-left: 0 !important;
    font-weight: 600 !important;
  }
  
  body.woocommerce-checkout #shipping_method li label img,
  body.woocommerce-checkout .woocommerce-shipping-methods li label img {
    max-width: 60px !important;
    height: auto !important;
    margin: 0.25rem 0 !important;
  }
  
  body.woocommerce-checkout #shipping_method li label small,
  body.woocommerce-checkout .woocommerce-shipping-methods li label small,
  body.woocommerce-checkout #shipping_method li .shipping-method-description,
  body.woocommerce-checkout .woocommerce-shipping-methods li .shipping-method-description {
    font-size: 0.75rem !important;
    color: #666 !important;
    word-wrap: break-word !important;
  }
}

/* ===============================================
   TABLET - PRZYSTOSOWANIE DO ŚREDNICH EKRANÓW
   =============================================== */

@media screen and (min-width: 768px) and (max-width: 992px) {
  body.woocommerce-checkout #customer_details {
    padding: 0 1rem !important;
  }
  
  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
  body.woocommerce-checkout #customer_details .woocommerce-billing-fields__field-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px 16px !important;
  }
  
  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper > p,
  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row {
    width: 100% !important;
  }
  
  body.woocommerce-checkout #order_review .shop_table,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table {
    width: 100% !important;
    table-layout: fixed !important;
  }
  
  body.woocommerce-checkout #order_review .shop_table thead th,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table thead th {
    padding: 0.75rem 0.5rem !important;
    font-size: 0.9rem !important;
  }
  
  body.woocommerce-checkout #order_review .shop_table tbody td,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table tbody td {
    padding: 0.75rem 0.5rem !important;
    vertical-align: top !important;
  }
  
  body.woocommerce-checkout #order_review .shop_table td.product-name,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table td.product-name {
    width: 60% !important;
  }
  
  body.woocommerce-checkout #order_review .shop_table td.product-total,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table td.product-total {
    width: 40% !important;
    text-align: right !important;
  }
  
  body.woocommerce-checkout #order_review .shop_table .woocommerce-Price-amount,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table .woocommerce-Price-amount {
    font-size: 0.9rem !important;
  }
  
  body.woocommerce-checkout #order_review .shop_table tfoot th,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot th {
    width: 50% !important;
    text-align: left !important;
  }
  
  body.woocommerce-checkout #order_review .shop_table tfoot td,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot td {
    width: 50% !important;
    text-align: right !important;
  }
  
  body.woocommerce-checkout #order_review .order-total td,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total td {
    text-align: right !important;
  }
}

/* ===============================================
   UKRYCIE NIEDZIAŁAJĄCEGO SHORTCODE THEMIFY
   Ograniczone TYLKO do stron archiwum/sklepu - NIE do stron produktów
   =============================================== */

/* Ukryj surowy tekst shortcode [tf_product_filter] na stronach archiwum */
/* WAŻNE: Nie używamy zbyt ogólnych selektorów które ukrywają treść na stronach produktów */
.woocommerce-page.woocommerce-shop .woocommerce > p:not([class]):not([id]),
.archive.woocommerce:not(.single-product) .woocommerce > p:not([class]):not([id]),
body.archive.woocommerce:not(.single-product) > .site > main > p:not([class]):not([id]),
body.woocommerce-shop .site-main > p:not([class]):not([id]),
body.tax-product_cat .site-main > p:not([class]):not([id]),
body.post-type-archive-product .site-main > p:not([class]):not([id]),
.woocommerce-products-header + p:not([class]),
.woocommerce-notices-wrapper + p:not([class]),
.woocommerce-result-count + p:not([class]) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

/* ===============================================
   WYJĄTEK: Nie ukrywaj paragrafów wewnątrz list i opisów produktów
   =============================================== */
body.single-product .woocommerce-Tabs-panel li p,
body.single-product .woocommerce-Tabs-panel li p:not([class]):not([id]),
body.single-product #tab-description li p,
body.single-product #tab-description li p:not([class]):not([id]),
body.single-product #tab-description p,
body.single-product #tab-description p:not([class]):not([id]),
body.single-product .woocommerce-Tabs-panel p,
body.single-product .woocommerce-Tabs-panel p:not([class]):not([id]),
body.single-product .woocommerce-product-details__short-description p,
body.single-product .woocommerce-product-details__short-description p:not([class]):not([id]),
body.single-product main li p,
body.single-product main li p:not([class]):not([id]),
body.single-product main [data-path-to-node],
body.single-product li [data-path-to-node],
body.single-product .woocommerce-Tabs-panel [data-path-to-node] {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  margin: 0 0 0.5em 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
  opacity: 1 !important;
  color: inherit !important;
}

/* Inline elements wewnątrz opisów produktów */
body.single-product .woocommerce-Tabs-panel li b,
body.single-product .woocommerce-Tabs-panel li strong,
body.single-product .woocommerce-Tabs-panel li span,
body.single-product .woocommerce-Tabs-panel [data-index-in-node],
body.single-product #tab-description li b,
body.single-product #tab-description li strong,
body.single-product #tab-description li span,
body.single-product #tab-description [data-index-in-node] {
  display: inline !important;
  visibility: visible !important;
  height: auto !important;
  opacity: 1 !important;
}

/* Upewnij się, że wszystkie dzieci li są widoczne */
body.single-product .woocommerce-Tabs-panel li *,
body.single-product #tab-description li *,
body.single-product .woocommerce-product-details__short-description li * {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Dodatkowe ukrycie dla kontenerów z shortcodem */
.woocommerce-page .content-area p:empty,
.woocommerce-page .site-main p:empty,
.archive p:empty {
  display: none !important;
}
