/**
 * Checkout Page Styles
 */

/* Layout dwukolumnowy - DANE PŁATNOŚCI po lewej, TWOJE ZAMÓWIENIE po prawej */
/* Wrapper z gridem */
.checkout-layout-grid-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
    align-items: start;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.checkout-left-column {
    grid-column: 1;
    min-width: 0;
}

.checkout-right-column {
    grid-column: 2;
    min-width: 350px; /* Minimalna szerokość, aby nie było obcięcia */
    max-width: 100%;
    box-sizing: border-box;
}

/* Upewnij się, że zawartość prawej kolumny nie jest obcięta */
.checkout-right-column > * {
    box-sizing: border-box;
}

/* Upewnij się, że kontener checkout nie obcina zawartości */
.woocommerce-checkout form.checkout {
    max-width: 100% !important;
    width: 100% !important;
}

/* Ukryj domyślny podział na col-1 i col-2 w customer_details */
body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2 {
    width: 100% !important;
    float: none !important;
}

/* Płatności pozostają w lewej kolumnie */
body.woocommerce-checkout #payment {
    width: 100% !important;
    clear: none !important;
    float: none !important;
}

/* Responsywność */
@media (max-width: 992px) {
    .woocommerce-checkout #customer_details,
    .woocommerce form.checkout #customer_details,
    .woocommerce-checkout-payment,
    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        width: 100% !important;
        float: none !important;
        padding-right: 0;
    }
}

/* Sekcja logowania i kuponu nad kolumnami */
.checkout-top-section {
    width: 100%;
    margin-bottom: 30px;
    clear: both;
}

.checkout-login-section {
    width: 100%;
    margin-bottom: 20px;
}

/* Upewnij się, że pole kuponu jest też w sekcji nad kolumnami */
body.woocommerce-checkout .woocommerce-form-coupon-toggle,
body.woocommerce-checkout form.checkout_coupon {
    margin-bottom: 0 !important;
}

/* Usuń wszystkie odstępy poniżej pola kuponu */
body.woocommerce-checkout .woocommerce-form-coupon-toggle.checkout-coupon-notice {
    margin-bottom: 0 !important;
}

body.woocommerce-checkout .woocommerce-form-coupon-toggle.checkout-coupon-notice + * {
    margin-top: 0 !important;
}

/* Style dla pola kuponu - jak w logowaniu, szary border */
.checkout-coupon-notice {
    margin-bottom: -1px !important;
    padding: 15px 20px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0; /* Szary border jak w logowaniu */
    border-radius: 0 !important; /* Bez zaokrągleń */
}

.checkout-coupon-notice p {
    margin: 0;
    font-size: 14px; /* Tak samo jak w logowaniu */
}

.checkout-coupon-notice .showcoupon {
    color: #078521; /* Zielony kolor linku jak w logowaniu */
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
}

.checkout-coupon-notice .showcoupon:hover {
    color: #000; /* Czarny przy hover jak w logowaniu */
}

/* Usuń zaokrąglenia z formularza kuponu */
form.checkout_coupon.woocommerce-form-coupon,
#woocommerce-checkout-form-coupon,
.checkout_coupon {
    border-radius: 0 !important;
}

form.checkout_coupon .form-row input,
form.checkout_coupon button {
    border-radius: 0 !important;
}

/* Ukryj ikonę z wc_print_notice jeśli jeszcze gdzieś się pojawia */
.checkout-coupon-notice .woocommerce-info::before,
.checkout-coupon-notice .woocommerce-message::before,
.checkout-coupon-notice .woocommerce-error::before,
.checkout-coupon-notice::before,
.checkout-coupon-notice p::before {
    display: none !important;
    content: none !important;
}

/* Usuń wszystkie ikony z pola kuponu */
.checkout-coupon-notice .woocommerce-info,
.checkout-coupon-notice .woocommerce-message {
    padding-left: 0 !important;
}

.checkout-coupon-notice .woocommerce-info::before,
.checkout-coupon-notice .woocommerce-message::before {
    display: none !important;
    content: '' !important;
}

/* Formularz logowania na górze */
.checkout-login-notice {
    margin-bottom: -1px !important;
    padding: 15px 20px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
}

.checkout-login-notice p {
    margin: 0;
    font-size: 14px;
}

.checkout-login-notice .toggle-login {
    color: #078521;
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
}

.checkout-login-notice .toggle-login:hover {
    color: #000;
}

.checkout-login-form-wrapper {
    display: none;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
}

/* Usuń padding, zaokrąglenia i obrys z formularza logowania w checkout - selektywnie tylko dla checkout */
body.woocommerce-checkout .woocommerce form.login,
body.woocommerce-checkout form.woocommerce-form-login,
body.woocommerce-checkout form.woocommerce-form-login.login,
body.woocommerce-checkout #checkout-login-form form.login,
body.woocommerce-checkout #checkout-login-form form.woocommerce-form-login,
body.woocommerce-checkout .checkout-login-form-wrapper form.login,
body.woocommerce-checkout .checkout-login-section form.login {
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    outline: none !important;
    margin: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Dodaj mały margines poniżej labelki "Zapamiętaj mnie" */
body.woocommerce-checkout .woocommerce-form-login__rememberme,
body.woocommerce-checkout label.woocommerce-form-login__rememberme,
body.woocommerce-checkout .woocommerce-form__label-for-checkbox.woocommerce-form-login__rememberme {
    margin-bottom: 15px !important;
}

/* Rozmiar czcionki etykiet w formularzu logowania */
#checkout-login-form label,
.checkout-login-form-wrapper label {
    font-size: 12px !important;
}

/* Rozmiar czcionki etykiet w formularzach checkout */
.woocommerce-checkout .woocommerce-billing-fields label,
.woocommerce-checkout .woocommerce-shipping-fields label,
.woocommerce-checkout .woocommerce-additional-fields label,
.woocommerce-checkout #customer_details label {
    font-size: 12px !important;
}

/* Podsumowanie zamówienia - stylowanie 1:1 jak mini koszyk */
.woocommerce-checkout-review-order {
    background: #f7f7f7;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Upewnij się, że lista produktów nie jest przesunięta */
.woocommerce-checkout-review-order > ul.woocommerce-checkout-review-order-list {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Nagłówek "TWOJE ZAMÓWIENIE" - identyczny jak "Dane rozliczeniowe" */
#order_review_heading,
.checkout-right-column h3#order_review_heading,
.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3 {
    font-size: 24px !important;
    font-family: 'Open Sans', sans-serif !important;
    font-weight: 700 !important;
    color: #000 !important;
    margin: 20px 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
}

.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.woocommerce-checkout-review-order-table thead {
    display: none; /* Ukryj nagłówek tabeli */
}

/* Ukryj domyślną tabelę produktów z WooCommerce (używamy listy) */
.woocommerce-checkout-review-order-table tbody {
    display: none !important;
}

/* Ukryj wszystkie duplikaty produktów - zostaw tylko listę */
.woocommerce-checkout-review-order-table tbody tr.cart_item {
    display: none !important;
}

/* Upewnij się, że tylko pierwsza lista jest widoczna */
.woocommerce-checkout-review-order .woocommerce-checkout-review-order-list {
    display: block !important;
}

/* Ukryj wszystkie kolejne listy (jeśli są duplikaty) */
.woocommerce-checkout-review-order .woocommerce-checkout-review-order-list ~ .woocommerce-checkout-review-order-list {
    display: none !important;
}

/* Ukryj duplikaty produktów w liście - zostaw tylko pierwszy element każdego produktu */
.woocommerce-checkout-review-order-item:not(:first-of-type) {
    /* Pozwól wszystkim elementom być widocznymi - problem może być gdzie indziej */
}

/* Sprawdź czy nie ma duplikacji przez różne selektory */
.woocommerce-checkout-review-order table tbody tr,
.woocommerce-checkout-review-order-table tbody tr {
    display: none !important;
}

/* Lista produktów - jak w mini koszyku */
.woocommerce-checkout-review-order-list {
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
    margin-bottom: 20px !important;
}

/* Ukryj wszystkie listy oprócz pierwszej (jeśli są duplikaty) */
.woocommerce-checkout-review-order > ul.woocommerce-checkout-review-order-list:first-of-type {
    display: block !important;
}

.woocommerce-checkout-review-order > ul.woocommerce-checkout-review-order-list:not(:first-of-type) {
    display: none !important;
}

.woocommerce-checkout-review-order-item {
    display: flex;
    gap: 15px;
    padding: 30px 0;
    border-bottom: 1px solid #e0e0e0;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
}

.woocommerce-checkout-review-order-item:first-child {
    padding-top: 0;
}

.woocommerce-checkout-review-order-item:last-child {
    border-bottom: none;
}

/* Zdjęcie produktu - jak w mini koszyku */
.woocommerce-checkout-review-order-item .mini-cart-item-image {
    flex-shrink: 0;
    width: 100px;
    height: auto;
    min-height: 0;
    border: none !important;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woocommerce-checkout-review-order-item .mini-cart-item-image img {
    width: 100% !important;
    height: auto !important;
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    display: block;
    border: none !important;
    padding: 0;
    margin: 0;
}

.woocommerce-checkout-review-order-item .mini-cart-item-image a {
    display: block;
    width: 100%;
    height: 100%;
    border: none !important;
    padding: 0;
    margin: 0;
}

/* Informacje o produkcie - jak w mini koszyku */
.woocommerce-checkout-review-order-item .mini-cart-item-details {
    flex: 1;
    min-width: 0;
}

.woocommerce-checkout-review-order-item .mini-cart-item-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.4;
    text-transform: uppercase;
}

.woocommerce-checkout-review-order-item .mini-cart-item-name a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.woocommerce-checkout-review-order-item .mini-cart-item-name a:hover {
    color: #078521;
}

/* Kontrolki ilości i cena - jak w mini koszyku */
.woocommerce-checkout-review-order-item .mini-cart-quantity-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.woocommerce-checkout-review-order-item .mini-cart-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Przyciski +/- - identyczne jak w mini koszyku */
.woocommerce-checkout-review-order-item .mini-cart-quantity-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
    padding: 0;
    line-height: 1;
}

.woocommerce-checkout-review-order-item .mini-cart-quantity-btn:hover {
    background: #078521;
    color: #fff;
    border-color: #078521;
}

.woocommerce-checkout-review-order-item .mini-cart-quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.woocommerce-checkout-review-order-item .mini-cart-quantity-display {
    font-size: 14px;
    font-weight: 500;
    min-width: 30px;
    text-align: center;
    color: #333;
}

.woocommerce-checkout-review-order-item .mini-cart-price-separator {
    font-size: 14px;
    color: #666;
    padding-left: 20px;
    padding-right: 5px;
}

.woocommerce-checkout-review-order-item .mini-cart-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Przycisk usuwania - identyczny jak w mini koszyku */
.woocommerce-checkout-review-order-item .checkout-remove-item,
.woocommerce-checkout-review-order-item .remove {
    position: static;
    font-size: 18px;
    color: #999;
    text-decoration: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    margin-left: 10px;
}

.woocommerce-checkout-review-order-item .checkout-remove-item:hover,
.woocommerce-checkout-review-order-item .remove:hover {
    color: #fff;
    background: #d9534f;
    border-color: #d9534f;
}

.woocommerce-checkout-review-order-item .checkout-remove-item.loading,
.woocommerce-checkout-review-order-item .remove.loading {
    opacity: 0.5;
    cursor: wait;
}

/* Ukryj meta dane produktu */
.woocommerce-checkout-review-order-item dl {
    display: none;
}

/* Stopka z kwotami */
.woocommerce-checkout-review-order-table {
    width: 100%;
    table-layout: auto;
    box-sizing: border-box;
    border: none !important;
    border-radius: 0 !important;
}

.woocommerce-checkout-review-order-table tfoot {
    border-top: 2px solid #e0e0e0;
    width: 100%;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
}

.woocommerce-checkout-review-order-table tfoot tr {
    display: table-row;
    width: 100%;
    border: none !important;
}

.woocommerce-checkout-review-order-table tfoot th,
.woocommerce-checkout-review-order-table tfoot td {
    display: table-cell;
    padding: 15px 20px !important;
    font-size: 16px;
    border: none !important;
    white-space: nowrap;
    border-radius: 0 !important;
}

.woocommerce-checkout-review-order-table tfoot th {
    text-align: left;
    font-weight: 600;
    width: auto;
}

.woocommerce-checkout-review-order-table tfoot td {
    text-align: right;
    font-weight: 600;
    width: auto;
}

.woocommerce-checkout-review-order-table tfoot .order-total th,
.woocommerce-checkout-review-order-table tfoot .order-total td {
    font-size: 18px;
    font-weight: 700;
    padding-top: 20px;
}

/* Przyciski checkout - dopasowanie do .w-button */
.woocommerce-checkout #place_order,
.woocommerce-form-coupon button[type="submit"],
.woocommerce-checkout button[type="submit"] {
    float: none;
    display: block;
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    line-height: 30px;
    color: #fff !important;
    background: #078521;
    border: none !important;
    padding: 12px 30px;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    border-radius: 0 !important;
    box-sizing: border-box;
}

.woocommerce-checkout #place_order:hover,
.woocommerce-form-coupon button[type="submit"]:hover,
.woocommerce-checkout button[type="submit"]:hover {
    color: #fff !important;
    background: #000;
}

/* Usuń zaokrąglenia z sekcji płatności */
#payment,
#payment .wc_payment_methods,
#payment .payment_box,
#payment .form-row.place-order,
.woocommerce-checkout #payment,
.woocommerce-checkout #payment .wc_payment_methods,
.woocommerce-checkout #payment .payment_box,
.woocommerce-checkout #payment .form-row.place-order {
    border-radius: 0 !important;
}

/* Rozmiar czcionki dla opisu płatności */
#payment .payment_box p,
.woocommerce-checkout #payment .payment_box p {
    font-size: 14px !important;
    line-height: 1.6 !important;
}

/* Style dla wszystkich pól formularza - kolor obramowania i brak zaokrągleń */
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="number"],
.woocommerce-checkout input[type="password"],
.woocommerce-checkout textarea,
.woocommerce-checkout select,
.woocommerce-checkout .input-text {
    border-color: #E0E0E0 !important;
    border-radius: 0 !important;
    font-size: 16px !important;
}

/* Style placeholderów - jak w polu uwag */
.woocommerce-checkout input::placeholder,
.woocommerce-checkout textarea::placeholder,
.woocommerce-checkout select::placeholder {
    color: #999;
    opacity: 1;
    font-size: 14px;
}

.woocommerce-checkout input::-webkit-input-placeholder,
.woocommerce-checkout textarea::-webkit-input-placeholder,
.woocommerce-checkout select::-webkit-input-placeholder {
    color: #999;
    opacity: 1;
    font-size: 14px;
}

.woocommerce-checkout input::-moz-placeholder,
.woocommerce-checkout textarea::-moz-placeholder,
.woocommerce-checkout select::-moz-placeholder {
    color: #999;
    opacity: 1;
    font-size: 14px;
}

.woocommerce-checkout input:-ms-input-placeholder,
.woocommerce-checkout textarea:-ms-input-placeholder,
.woocommerce-checkout select:-ms-input-placeholder {
    color: #999;
    opacity: 1;
    font-size: 14px;
}

/* Ukryj WSZYSTKIE pola kuponu poza tym w review-order */
/* Ukryj pole kuponu przed formularzem checkout */
body.woocommerce-checkout > .woocommerce-form-coupon-toggle,
body.woocommerce-checkout > form.checkout_coupon,
form.checkout > .woocommerce-form-coupon-toggle:not(.woocommerce-checkout-review-order .woocommerce-form-coupon-toggle),
form.checkout > form.checkout_coupon:not(.woocommerce-checkout-review-order form.checkout_coupon) {
    display: none !important;
}

/* Pokaż TYLKO systemowe pole kuponu w review-order */
body.woocommerce-checkout #order_review .woocommerce-form-coupon-toggle,
body.woocommerce-checkout .woocommerce-checkout-review-order .woocommerce-form-coupon-toggle {
    display: block !important;
    visibility: visible !important;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* UKRYJ formularz kuponu domyślnie - ZAWSZE */
body.woocommerce-checkout #order_review form.checkout_coupon,
body.woocommerce-checkout .woocommerce-checkout-review-order form.checkout_coupon {
    display: none !important;
}

/* Style dla formularza kuponu - usuń zaokrąglenia */
form.checkout_coupon,
.woocommerce-form-coupon,
.checkout_coupon {
    border-radius: 0 !important;
}

/* Style dla formularza kuponu w review-order */
.woocommerce-checkout-review-order .checkout_coupon {
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0 !important;
}

.woocommerce-checkout-review-order .checkout_coupon .form-row {
    margin-bottom: 15px;
}

.woocommerce-checkout-review-order .checkout_coupon input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
}

.woocommerce-checkout-review-order .checkout_coupon button {
    width: 100%;
    margin-top: 10px;
}

/* ============================================
   STYLE DLA STRONY ORDER-RECEIVED (POTWIERDZENIE ZAMÓWIENIA)
   ============================================ */

/* Layout dwukolumnowy dla strony order-received - identyczny jak w checkout */
body.woocommerce-order-received .checkout-layout-grid-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
    align-items: start;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin-top: 30px;
}

body.woocommerce-order-received .checkout-left-column {
    grid-column: 1;
    min-width: 0;
}

body.woocommerce-order-received .checkout-right-column {
    grid-column: 2;
    min-width: 350px;
    max-width: 100%;
    box-sizing: border-box;
}

/* Nagłówek "Twoje zamówienie" w prawej kolumnie */
body.woocommerce-order-received .checkout-right-column h3 {
    font-size: 24px;
    font-weight: 700;
    text-transform: none;
    margin-bottom: 20px;
    margin-top: 0;
}

/* Sekcja szczegółów zamówienia - jak w checkout */
body.woocommerce-order-received .woocommerce-order-details {
    background: #f7f7f7;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

body.woocommerce-order-received .woocommerce-checkout-review-order {
    background: #f7f7f7;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Lista produktów - identyczna jak w checkout */
body.woocommerce-order-received .woocommerce-checkout-review-order-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    width: 100%;
    box-sizing: border-box;
}

body.woocommerce-order-received .woocommerce-checkout-review-order-item {
    display: flex;
    gap: 15px;
    padding: 30px 0;
    border-bottom: 1px solid #e0e0e0;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
}

body.woocommerce-order-received .woocommerce-checkout-review-order-item:first-child {
    padding-top: 0;
}

body.woocommerce-order-received .woocommerce-checkout-review-order-item:last-child {
    border-bottom: none;
}

/* Tabela z kwotami - identyczna jak w checkout */
body.woocommerce-order-received .woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    border: none !important;
    border-radius: 0 !important;
}

body.woocommerce-order-received .woocommerce-checkout-review-order-table tfoot {
    border-top: 2px solid #e0e0e0;
    width: 100%;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
}

body.woocommerce-order-received .woocommerce-checkout-review-order-table tfoot tr {
    display: table-row;
    width: 100%;
    border: none !important;
}

body.woocommerce-order-received .woocommerce-checkout-review-order-table tfoot th,
body.woocommerce-order-received .woocommerce-checkout-review-order-table tfoot td {
    display: table-cell;
    padding: 15px 20px !important;
    font-size: 16px;
    border: none !important;
    white-space: nowrap;
    border-radius: 0 !important;
}

/* Sekcja danych klienta (adres rozliczeniowy) w lewej kolumnie */
body.woocommerce-order-received .checkout-left-column .woocommerce-customer-details {
    width: 100%;
    box-sizing: border-box;
}

body.woocommerce-order-received .checkout-left-column .woocommerce-customer-details h2 {
    font-size: 24px;
    font-weight: 700;
    text-transform: none;
    margin-bottom: 20px;
    margin-top: 0;
}

/* Responsywność - na małych ekranach jedna kolumna */
@media (max-width: 768px) {
    body.woocommerce-order-received .checkout-layout-grid-wrapper {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    body.woocommerce-order-received .checkout-left-column,
    body.woocommerce-order-received .checkout-right-column {
        grid-column: 1;
        min-width: 0;
    }
}

/* ============================================
   STYLE DLA STRONY MOJE KONTO (MY ACCOUNT)
   ============================================ */

/* Tabele zamówień - styl jak w kasie */
body.woocommerce-account .woocommerce table.shop_table,
body.woocommerce-account .woocommerce table.my_account_orders,
body.woocommerce-account .woocommerce table.woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 30px 0;
    border: none !important;
    border-radius: 0 !important;
    background: #fff;
    table-layout: fixed !important;
}

/* Wymuś identyczne szerokości kolumn dla nagłówków i komórek */
/* Ustaw szerokości kolumn procentowo - te same dla nagłówków i komórek */
body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-number,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-number,
body.woocommerce-account .woocommerce table.woocommerce-orders-table th[class*="order-number"],
body.woocommerce-account .woocommerce table.woocommerce-orders-table td[class*="order-number"] {
    width: 15% !important;
}

body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-date,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-date,
body.woocommerce-account .woocommerce table.woocommerce-orders-table th[class*="order-date"],
body.woocommerce-account .woocommerce table.woocommerce-orders-table td[class*="order-date"] {
    width: 15% !important;
}

body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-status,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-status,
body.woocommerce-account .woocommerce table.woocommerce-orders-table th[class*="order-status"],
body.woocommerce-account .woocommerce table.woocommerce-orders-table td[class*="order-status"] {
    width: 25% !important;
}

body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-total,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-total,
body.woocommerce-account .woocommerce table.woocommerce-orders-table th[class*="order-total"],
body.woocommerce-account .woocommerce table.woocommerce-orders-table td[class*="order-total"] {
    width: 20% !important;
}

body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-actions,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions,
body.woocommerce-account .woocommerce table.woocommerce-orders-table th[class*="order-actions"],
body.woocommerce-account .woocommerce table.woocommerce-orders-table td[class*="order-actions"] {
    width: 25% !important;
}

body.woocommerce-account .woocommerce table.shop_table thead,
body.woocommerce-account .woocommerce table.my_account_orders thead,
body.woocommerce-account .woocommerce table.woocommerce-orders-table thead {
    background: #f7f7f7;
    border-bottom: 2px solid #e0e0e0;
}

body.woocommerce-account .woocommerce table.shop_table thead th,
body.woocommerce-account .woocommerce table.my_account_orders thead th,
body.woocommerce-account .woocommerce table.woocommerce-orders-table thead th,
body.woocommerce-account .woocommerce table.woocommerce-orders-table thead .woocommerce-orders-table__header {
    padding: 15px 20px !important;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: left;
    border: none !important;
    border-radius: 0 !important;
    color: #000;
    box-sizing: border-box;
    vertical-align: middle;
    width: auto;
}

body.woocommerce-account .woocommerce table.shop_table tbody tr,
body.woocommerce-account .woocommerce table.my_account_orders tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

body.woocommerce-account .woocommerce table.shop_table tbody tr:last-child,
body.woocommerce-account .woocommerce table.my_account_orders tbody tr:last-child {
    border-bottom: none;
}

body.woocommerce-account .woocommerce table.shop_table tbody td,
body.woocommerce-account .woocommerce table.my_account_orders tbody td,
body.woocommerce-account .woocommerce table.woocommerce-orders-table tbody td,
body.woocommerce-account .woocommerce table.woocommerce-orders-table tbody th,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell {
    padding: 15px 20px !important;
    font-size: 14px;
    border: none !important;
    border-radius: 0 !important;
    vertical-align: middle;
    box-sizing: border-box;
    width: auto;
}

/* Wyrównanie kolumn - upewnij się, że nagłówki i komórki mają te same szerokości */
body.woocommerce-account .woocommerce table.shop_table thead th:first-child,
body.woocommerce-account .woocommerce table.my_account_orders thead th:first-child,
body.woocommerce-account .woocommerce table.shop_table tbody td:first-child,
body.woocommerce-account .woocommerce table.my_account_orders tbody td:first-child {
    padding-left: 20px;
}

body.woocommerce-account .woocommerce table.shop_table thead th:last-child,
body.woocommerce-account .woocommerce table.my_account_orders thead th:last-child,
body.woocommerce-account .woocommerce table.shop_table tbody td:last-child,
body.woocommerce-account .woocommerce table.my_account_orders tbody td:last-child {
    padding-right: 20px;
}

/* Wymuś identyczne szerokości kolumn dla nagłówków i komórek - tylko dla tabel bez fixed layout */
body.woocommerce-account .woocommerce table.shop_table:not(.woocommerce-orders-table) th,
body.woocommerce-account .woocommerce table.my_account_orders:not(.woocommerce-orders-table) th,
body.woocommerce-account .woocommerce table.shop_table:not(.woocommerce-orders-table) td,
body.woocommerce-account .woocommerce table.my_account_orders:not(.woocommerce-orders-table) td {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
}

/* Specyficzne style dla kolumn zamówień - upewnij się, że są wyrównane */
body.woocommerce-account .woocommerce table.my_account_orders th.order-number,
body.woocommerce-account .woocommerce table.my_account_orders td.order-number,
body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-number,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-number {
    width: auto;
    padding: 15px 20px !important;
}

body.woocommerce-account .woocommerce table.my_account_orders th.order-date,
body.woocommerce-account .woocommerce table.my_account_orders td.order-date,
body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-date,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-date {
    width: auto;
    padding: 15px 20px !important;
}

body.woocommerce-account .woocommerce table.my_account_orders th.order-status,
body.woocommerce-account .woocommerce table.my_account_orders td.order-status,
body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-status,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-status {
    width: auto;
    padding: 15px 20px !important;
}

body.woocommerce-account .woocommerce table.my_account_orders th.order-total,
body.woocommerce-account .woocommerce table.my_account_orders td.order-total,
body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-total,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-total {
    width: auto;
    padding: 15px 20px !important;
}

body.woocommerce-account .woocommerce table.my_account_orders th.order-actions,
body.woocommerce-account .woocommerce table.my_account_orders td.order-actions,
body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-actions,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions {
    width: auto;
    padding: 15px 20px !important;
    text-align: right;
}

/* Wymuś identyczne szerokości dla nagłówków i komórek w tej samej kolumnie */
body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-number,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-number,
body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-date,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-date,
body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-status,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-status,
body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-total,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-total,
body.woocommerce-account .woocommerce table.woocommerce-orders-table th.woocommerce-orders-table__header-order-actions,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

body.woocommerce-account .woocommerce table.shop_table tbody td a,
body.woocommerce-account .woocommerce table.my_account_orders tbody td a {
    color: #078521;
    text-decoration: none;
}

body.woocommerce-account .woocommerce table.shop_table tbody td a:hover,
body.woocommerce-account .woocommerce table.my_account_orders tbody td a:hover {
    color: #000;
    text-decoration: underline;
}

/* Przyciski w tabelach - styl jak w kasie */
body.woocommerce-account .woocommerce table.shop_table .button,
body.woocommerce-account .woocommerce table.my_account_orders .button {
    display: inline-block;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    text-align: center;
    color: #fff !important;
    background: #078521;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

body.woocommerce-account .woocommerce table.shop_table .button:hover,
body.woocommerce-account .woocommerce table.my_account_orders .button:hover {
    background: #000;
    color: #fff !important;
}

/* Formularze na stronie konta - styl jak w kasie */
body.woocommerce-account .woocommerce form .form-row input.input-text,
body.woocommerce-account .woocommerce form .form-row textarea,
body.woocommerce-account .woocommerce form .form-row select {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    box-sizing: border-box;
    background: #fff;
}

body.woocommerce-account .woocommerce form .form-row input.input-text:focus,
body.woocommerce-account .woocommerce form .form-row textarea:focus,
body.woocommerce-account .woocommerce form .form-row select:focus {
    outline: none;
    border-color: #078521;
}

body.woocommerce-account .woocommerce form .form-row label {
    font-size: 12px;
    font-weight: 400;
    color: #000;
    margin-bottom: 5px;
    display: block;
}

body.woocommerce-account .woocommerce form .form-row input::placeholder,
body.woocommerce-account .woocommerce form .form-row textarea::placeholder {
    color: #999;
    opacity: 1;
    font-size: 14px;
}

/* Przyciski formularzy - styl jak w kasie */
body.woocommerce-account .woocommerce form .button,
body.woocommerce-account .woocommerce form button[type="submit"] {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
    text-align: center;
    line-height: 30px;
    color: #fff !important;
    background: #078521;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.woocommerce-account .woocommerce form .button:hover,
body.woocommerce-account .woocommerce form button[type="submit"]:hover {
    background: #000;
    color: #fff !important;
}

/* Nagłówki na stronie konta */
body.woocommerce-account .woocommerce h2,
body.woocommerce-account .woocommerce h3 {
    font-size: 24px;
    font-weight: 700;
    text-transform: none;
    margin-bottom: 20px;
    margin-top: 0;
    color: #000;
}

/* Layout dwukolumnowy dla strony Moje konto */
body.woocommerce-account .woocommerce {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

/* Menu konta - lewa kolumna */
body.woocommerce-account .woocommerce-MyAccount-navigation {
    flex: 0 0 250px;
    min-width: 0;
    margin-bottom: 0;
    box-sizing: border-box;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin-bottom: 0;
    border-bottom: 1px solid #e0e0e0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child {
    border-bottom: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 15px 20px;
    font-size: 14px;
    color: #078521;
    text-decoration: none;
    transition: all 0.3s ease;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
body.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    color: #000;
    background: #f7f7f7;
}

/* Treść konta - prawa kolumna */
body.woocommerce-account .woocommerce-MyAccount-content {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
}

/* Szczegóły zamówienia na stronie konta - użyj stylów z order-details */
body.woocommerce-account .woocommerce-order-details {
    background: #f7f7f7;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 30px;
}

body.woocommerce-account .woocommerce-order-details h2 {
    font-size: 24px;
    font-weight: 700;
    text-transform: none;
    margin-bottom: 20px;
    margin-top: 0;
}

/* Rozmiar czcionki dla informacji o podatku */
.woocommerce-checkout small.includes_tax,
.woocommerce small.includes_tax {
    font-size: 12px !important;
}

/* Wyrównanie checkbox i tekstu w pionie */
.woocommerce-checkout .form-row input[type="checkbox"],
.woocommerce-checkout .form-row label[for*="createaccount"],
.woocommerce-checkout .create-account label,
.woocommerce-checkout .form-row label {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.woocommerce-checkout .form-row label {
    display: inline-flex;
    align-items: center;
    line-height: 1.5;
}

/* Custom checkbox styling - kolor jak przycisk "Kupuję i płacę" - kwadratowy */
/* Dla checkout i stron produktów */
.woocommerce-checkout input[type="checkbox"],
.woocommerce.single-product input[type="checkbox"],
body.single-product input[type="checkbox"],
.single-product-custom input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    border: 2px solid #078521 !important;
    background: transparent !important;
    border-radius: 0 !important;
    margin-right: 8px;
    vertical-align: middle;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 1;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-sizing: border-box;
    padding: 0 !important;
}

.woocommerce-checkout input[type="checkbox"]:checked,
.woocommerce.single-product input[type="checkbox"]:checked,
body.single-product input[type="checkbox"]:checked,
.single-product-custom input[type="checkbox"]:checked {
    background: #078521 !important;
    border-color: #078521 !important;
}

/* Biały checkmark dla zaznaczonego checkboxa */
.woocommerce-checkout input[type="checkbox"]:checked::after,
.woocommerce.single-product input[type="checkbox"]:checked::after,
body.single-product input[type="checkbox"]:checked::after,
.single-product-custom input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.woocommerce-checkout input[type="checkbox"]:hover,
.woocommerce.single-product input[type="checkbox"]:hover,
body.single-product input[type="checkbox"]:hover,
.single-product-custom input[type="checkbox"]:hover {
    border-color: #078521 !important;
}

.woocommerce-checkout input[type="checkbox"]:checked:hover,
.woocommerce.single-product input[type="checkbox"]:checked:hover,
body.single-product input[type="checkbox"]:checked:hover,
.single-product-custom input[type="checkbox"]:checked:hover {
    background: #000 !important;
    border-color: #000 !important;
}

/* ==========================
   RADIO BUTTONS - UNIFIED STYLE
   ========================== */

/* Radio buttons dla metod płatności w kasie i partial payments */
.woocommerce-checkout input[type="radio"],
.woocommerce.single-product input[type="radio"],
body.single-product input[type="radio"],
.single-product-custom input[type="radio"],
#payment input[type="radio"],
.wc_payment_methods input[type="radio"],
.payment_method_bacs input[type="radio"],
.payment_method_imoje_blik input[type="radio"],
.payment_method_imoje input[type="radio"],
.wepo-radio-group input[type="radio"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    border: 2px solid #078521 !important;
    background: transparent !important;
    border-radius: 50% !important;
    margin-right: 8px !important;
    vertical-align: middle;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 1;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-sizing: border-box;
    padding: 0 !important;
}

.woocommerce-checkout input[type="radio"]:checked,
.woocommerce.single-product input[type="radio"]:checked,
body.single-product input[type="radio"]:checked,
.single-product-custom input[type="radio"]:checked,
#payment input[type="radio"]:checked,
.wc_payment_methods input[type="radio"]:checked,
.payment_method_bacs input[type="radio"]:checked,
.payment_method_imoje_blik input[type="radio"]:checked,
.payment_method_imoje input[type="radio"]:checked,
.wepo-radio-group input[type="radio"]:checked {
    background: #078521 !important;
    border-color: #078521 !important;
}

/* Białe kółko wewnątrz zaznaczonego radio */
.woocommerce-checkout input[type="radio"]:checked::after,
.woocommerce.single-product input[type="radio"]:checked::after,
body.single-product input[type="radio"]:checked::after,
.single-product-custom input[type="radio"]:checked::after,
#payment input[type="radio"]:checked::after,
.wc_payment_methods input[type="radio"]:checked::after,
.payment_method_bacs input[type="radio"]:checked::after,
.payment_method_imoje_blik input[type="radio"]:checked::after,
.payment_method_imoje input[type="radio"]:checked::after,
.wepo-radio-group input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.woocommerce-checkout input[type="radio"]:hover,
.woocommerce.single-product input[type="radio"]:hover,
body.single-product input[type="radio"]:hover,
.single-product-custom input[type="radio"]:hover,
#payment input[type="radio"]:hover,
.wc_payment_methods input[type="radio"]:hover,
.payment_method_bacs input[type="radio"]:hover,
.payment_method_imoje_blik input[type="radio"]:hover,
.payment_method_imoje input[type="radio"]:hover,
.wepo-radio-group input[type="radio"]:hover {
    border-color: #078521 !important;
}

.woocommerce-checkout input[type="radio"]:checked:hover,
.woocommerce.single-product input[type="radio"]:checked:hover,
body.single-product input[type="radio"]:checked:hover,
.single-product-custom input[type="radio"]:checked:hover,
#payment input[type="radio"]:checked:hover,
.wc_payment_methods input[type="radio"]:checked:hover,
.payment_method_bacs input[type="radio"]:checked:hover,
.payment_method_imoje_blik input[type="radio"]:checked:hover,
.payment_method_imoje input[type="radio"]:checked:hover,
.wepo-radio-group input[type="radio"]:checked:hover {
    background: #000 !important;
    border-color: #000 !important;
}

.woocommerce-checkout input[type="radio"]:checked:hover::after,
.woocommerce.single-product input[type="radio"]:checked:hover::after,
body.single-product input[type="radio"]:checked:hover::after,
.single-product-custom input[type="radio"]:checked:hover::after,
#payment input[type="radio"]:checked:hover::after,
.wc_payment_methods input[type="radio"]:checked:hover::after,
.payment_method_bacs input[type="radio"]:checked:hover::after,
.payment_method_imoje_blik input[type="radio"]:checked:hover::after,
.payment_method_imoje input[type="radio"]:checked:hover::after,
.wepo-radio-group input[type="radio"]:checked:hover::after {
    background: #fff !important;
}

/* Responsywność */
@media (max-width: 768px) {
    body.woocommerce-account .woocommerce {
        flex-direction: column;
        gap: 30px;
    }
    
    body.woocommerce-account .woocommerce-MyAccount-navigation {
        flex: 0 0 auto;
        width: 100%;
    }
    
    body.woocommerce-account .woocommerce-MyAccount-content {
        flex: 0 0 auto;
        width: 100%;
    }
}
