/* WOOCOMMERCE CHECKOUT - STYLIZACJA */

.woocommerce-checkout-review-order,
#order_review,
.wc-block-components-order-summary {
    background: #fff !important;
    padding: 25px 30px !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid #e8e8e8 !important;
}

.woocommerce-additional-fields #fv_checkbox_field,
.woocommerce-additional-fields .form-row.fv_checkbox_field,
.woocommerce-additional-fields [id*="fv_checkbox"],
.woocommerce-additional-fields .form-row:has(input[type="checkbox"]),
#fv_checkbox_field {
    margin-top: 25px !important;
    padding-top: 20px !important;
    border-top: 1px solid #eee !important;
}

#order_comments_field,
.woocommerce-additional-fields #order_comments_field {
    margin-bottom: 15px !important;
}

.woocommerce-checkout-payment,
#payment,
.wc-block-components-payment-method-icons {
    background: #f9fafb !important;
    padding: 20px 25px !important;
    border-radius: 8px !important;
    margin-top: 20px !important;
}

.wc_payment_method,
.woocommerce-checkout-payment .wc_payment_method,
#payment .wc_payment_methods li {
    display: block !important;
    background: #fff !important;
    padding: 15px 20px !important;
    margin-bottom: 10px !important;
    border-radius: 6px !important;
    border: 1px solid #e0e0e0 !important;
    transition: all 0.2s ease !important;
}

.wc_payment_method:hover {
    border-color: #002347 !important;
    box-shadow: 0 2px 8px rgba(0, 35, 71, 0.1) !important;
}

.wc_payment_method:has(input[type="radio"]:checked),
#payment .wc_payment_methods li:has(input:checked) {
    background: #e8f4fd !important;
    border-color: #002347 !important;
    border-width: 2px !important;
}

.wc_payment_method:last-child {
    margin-bottom: 0 !important;
}

.wc_payment_method > label,
.wc_payment_method label[for^="payment_method"],
#payment .wc_payment_methods li > label {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #333 !important;
    margin: 0 !important;
    padding: 0 !important;
}

html body .wc_payment_method input[type="radio"],
html body #payment .wc_payment_methods input[type="radio"],
html body #payment .wc_payment_methods li input[type="radio"],
html body .woocommerce-checkout #payment input[type="radio"],
body.woocommerce-checkout .wc_payment_method input[type="radio"] {
    -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;
    margin: 0 !important;
    margin-right: 12px !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    background: #fff !important;
    background-color: #fff !important;
    border: 2px solid #c5ccd6 !important;
    border-radius: 50% !important;
    -webkit-border-radius: 50% !important;
    -moz-border-radius: 50% !important;
    position: relative !important;
    vertical-align: middle !important;
    transition: all 0.2s ease !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05) !important;
    outline: none !important;
}

html body .wc_payment_method input[type="radio"]:hover,
html body #payment .wc_payment_methods input[type="radio"]:hover {
    border-color: #002347 !important;
    box-shadow: 0 0 0 3px rgba(0,35,71,0.1) !important;
}

html body .wc_payment_method input[type="radio"]:checked,
html body #payment .wc_payment_methods input[type="radio"]:checked,
html body #payment .wc_payment_methods li input[type="radio"]:checked,
body.woocommerce-checkout .wc_payment_method input[type="radio"]:checked {
    border-color: #002347 !important;
    background: #002347 !important;
    background-color: #002347 !important;
    box-shadow: 0 0 0 3px rgba(0,35,71,0.15) !important;
}

html body .wc_payment_method input[type="radio"]:checked::after,
html body #payment .wc_payment_methods input[type="radio"]:checked::after,
html body #payment .wc_payment_methods li input[type="radio"]:checked::after,
body.woocommerce-checkout .wc_payment_method input[type="radio"]:checked::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 10px !important;
    height: 10px !important;
    background: #fff !important;
    background-color: #fff !important;
    border-radius: 50% !important;
    -webkit-border-radius: 50% !important;
}

html body .wc_payment_method input[type="checkbox"],
html body #payment input[type="checkbox"],
html body .payment_box input[type="checkbox"],
body.woocommerce-checkout #payment input[type="checkbox"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    margin: 0 !important;
    margin-right: 10px !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    background: #fff !important;
    background-color: #fff !important;
    border: 2px solid #c5ccd6 !important;
    border-radius: 5px !important;
    position: relative !important;
    vertical-align: middle !important;
    transition: all 0.2s ease !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05) !important;
    outline: none !important;
}

html body .wc_payment_method input[type="checkbox"]:checked,
html body #payment input[type="checkbox"]:checked,
html body .payment_box input[type="checkbox"]:checked,
body.woocommerce-checkout #payment input[type="checkbox"]:checked {
    border-color: #002347 !important;
    background: #002347 !important;
    background-color: #002347 !important;
    box-shadow: 0 0 0 3px rgba(0,35,71,0.15) !important;
}

html body .wc_payment_method input[type="checkbox"]:checked::after,
html body #payment input[type="checkbox"]:checked::after,
html body .payment_box input[type="checkbox"]:checked::after,
body.woocommerce-checkout #payment input[type="checkbox"]:checked::after {
    content: "\2713" !important;
    display: block !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

.wc_payment_method label img,
.wc_payment_method .payment_method_icon {
    max-height: 28px !important;
    width: auto !important;
    margin-left: auto !important;
}

.wc_payment_method .payment_box,
.wc_payment_method > div:not(:first-child) {
    background: #f8f9fa !important;
    padding: 15px !important;
    margin-top: 12px !important;
    border-radius: 4px !important;
    font-size: 0.9rem !important;
    color: #666 !important;
    border-left: 3px solid #002347 !important;
}

.wc-block-components-checkbox,
.p24-save-data-checkbox,
.woocommerce-SavePaymentMethod {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 15px !important;
    background: #fff !important;
    border-radius: 6px !important;
    margin: 15px 0 !important;
}

.woocommerce-terms-and-conditions-wrapper,
.wc-block-checkout__terms,
#terms_field {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 15px 20px !important;
    background: #fff8e6 !important;
    border-radius: 6px !important;
    border: 1px solid #f0e0b0 !important;
    margin: 20px 0 !important;
}

.woocommerce-terms-and-conditions-wrapper label,
.wc-block-checkout__terms label,
#terms_field label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    cursor: pointer !important;
    margin: 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
}

.woocommerce-terms-and-conditions-wrapper input[type="checkbox"],
.wc-block-checkout__terms input[type="checkbox"],
#terms {
    width: 18px !important;
    height: 18px !important;
    margin: 2px 0 0 0 !important;
    flex-shrink: 0 !important;
    accent-color: #002347 !important;
}

.woocommerce-terms-and-conditions-wrapper a,
.wc-block-checkout__terms a {
    color: #002347 !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
}

.woocommerce-checkout-payment .place-order,
#payment .place-order,
.wc-block-components-checkout-place-order-button,
.form-row.place-order {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 25px 0 10px 0 !important;
    margin-top: 20px !important;
    text-align: center !important;
}

#place_order,
.woocommerce-checkout-payment button[type="submit"],
.wc-block-components-checkout-place-order-button button,
button.wc-block-components-button,
.woocommerce #payment #place_order {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background: linear-gradient(135deg, #002347 0%, #003d7a 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 16px 50px !important;
    min-width: 280px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin: 0 auto !important;
}

#place_order:hover,
.woocommerce-checkout-payment button[type="submit"]:hover,
.wc-block-components-checkout-place-order-button button:hover {
    background: linear-gradient(135deg, #003d7a 0%, #004d99 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 35, 71, 0.35) !important;
}

/* KOSZYK - ODSTĘP MIĘDZY RABATEM A WYSYŁKĄ */
.woocommerce-cart .cart_totals tr.woocommerce-shipping-totals td,
.woocommerce-cart .cart_totals tr.shipping td[data-title="Wysyłka"],
.woocommerce-cart #my_cart_totals tr.woocommerce-shipping-totals td {
    padding-top: 12px !important;
}

.woocommerce-cart ul.woocommerce-shipping-methods,
.woocommerce-cart #shipping_method {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.woocommerce-cart ul.woocommerce-shipping-methods li,
.woocommerce-cart #shipping_method li {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 15px 20px !important;
    margin-bottom: 10px !important;
    background: #f8f9fa !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.woocommerce-cart ul.woocommerce-shipping-methods li:last-child,
.woocommerce-cart #shipping_method li:last-child {
    margin-bottom: 0 !important;
}

.woocommerce-cart ul.woocommerce-shipping-methods li:hover,
.woocommerce-cart #shipping_method li:hover {
    border-color: #002347 !important;
    background: #fff !important;
}

.woocommerce-cart ul.woocommerce-shipping-methods li:has(input:checked),
.woocommerce-cart #shipping_method li:has(input:checked) {
    background: #e8f4fd !important;
    border-color: #002347 !important;
    border-width: 2px !important;
}

.woocommerce-cart ul.woocommerce-shipping-methods li input[type="radio"],
.woocommerce-cart #shipping_method li input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    margin-right: 12px !important;
    accent-color: #002347 !important;
    flex-shrink: 0 !important;
}

.woocommerce-cart ul.woocommerce-shipping-methods li label,
.woocommerce-cart #shipping_method li label {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    color: #333 !important;
}

.woocommerce-cart ul.woocommerce-shipping-methods li label .woocommerce-Price-amount,
.woocommerce-cart #shipping_method li label .amount {
    font-weight: 600 !important;
    color: #002347 !important;
    margin-left: auto !important;
}

@media screen and (max-width: 768px) {
    .woocommerce-checkout,
    .woocommerce-cart {
        padding: 15px !important;
    }

    .woocommerce-checkout-review-order,
    #order_review {
        padding: 15px !important;
    }

    .woocommerce-checkout-payment,
    #payment {
        padding: 15px !important;
    }

    .wc_payment_method {
        padding: 12px 15px !important;
    }

    #place_order {
        width: 100% !important;
        min-width: unset !important;
        padding: 14px 30px !important;
    }
}

/* TABLE DECONSTRUCTION - CHECKOUT ORDER REVIEW */
.woocommerce-checkout-review-order-table,
.woocommerce-checkout-review-order-table thead,
.woocommerce-checkout-review-order-table tbody,
.woocommerce-checkout-review-order-table tfoot,
.woocommerce-checkout-review-order-table tr,
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border: none !important;
    float: none !important;
}

.woocommerce-checkout-review-order-table thead {
    background: #1a2a4a !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-checkout-review-order-table thead tr {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 14px 20px !important;
    background: #1a2a4a !important;
}

.woocommerce-checkout-review-order-table thead tr th {
    display: inline-block !important;
    width: auto !important;
    flex: 0 0 auto !important;
    background: transparent !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 0 !important;
    border: none !important;
}

.woocommerce-checkout-review-order-table tbody tr,
.woocommerce-checkout-review-order-table tbody tr.cart_item {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    width: 100% !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #fff !important;
}

.woocommerce-checkout-review-order-table tbody tr td {
    display: inline-block !important;
    width: auto !important;
    padding: 0 !important;
    background: transparent !important;
}

.woocommerce-checkout-review-order-table tbody tr td.product-name {
    flex: 1 1 0% !important;
    padding-right: 15px !important;
    text-align: left !important;
}

.woocommerce-checkout-review-order-table tbody tr td.product-total {
    flex: 0 0 auto !important;
    text-align: right !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.woocommerce-checkout-review-order-table tfoot tr.cart-subtotal {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #f8f9fa !important;
}

.woocommerce-checkout-review-order-table tfoot tr.cart-subtotal th,
.woocommerce-checkout-review-order-table tfoot tr.cart-subtotal td {
    display: inline-block !important;
    width: auto !important;
    flex: 0 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
}

.woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals,
.woocommerce-checkout-review-order-table tfoot tr.shipping {
    display: block !important;
    width: 100% !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #fff !important;
}

.woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals th,
.woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals td,
.woocommerce-checkout-review-order-table tfoot tr.shipping th,
.woocommerce-checkout-review-order-table tfoot tr.shipping td {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
}

.woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals th,
.woocommerce-checkout-review-order-table tfoot tr.shipping th {
    font-weight: 600 !important;
    color: #1a2a4a !important;
    margin-bottom: 12px !important;
}

.woocommerce-checkout-review-order-table ul#shipping_method {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.woocommerce-checkout-review-order-table ul#shipping_method li {
    display: block !important;
    width: 100% !important;
    padding: 14px 16px !important;
    margin-bottom: 10px !important;
    background: #f5f7fa !important;
    border: 1px solid #e0e5eb !important;
    border-radius: 8px !important;
}

.woocommerce-checkout-review-order-table ul#shipping_method li:last-child {
    margin-bottom: 0 !important;
}

.woocommerce-checkout-review-order-table tfoot tr.order-total {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 20px !important;
    margin-top: 10px !important;
    background: #f0f4f8 !important;
    border-top: 3px solid #1a2a4a !important;
}

.woocommerce-checkout-review-order-table tfoot tr.order-total th,
.woocommerce-checkout-review-order-table tfoot tr.order-total td {
    display: inline-block !important;
    width: auto !important;
    flex: 0 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
}

.woocommerce-checkout-review-order-table tfoot tr.order-total th {
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #1a2a4a !important;
}

.woocommerce-checkout-review-order-table tfoot tr.order-total td {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1a2a4a !important;
}

.woocommerce-checkout-review-order-table tfoot tr.order-total td .woocommerce-Price-amount,
.woocommerce-checkout-review-order-table tfoot tr.order-total td .amount {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1a2a4a !important;
}
