/* WooCommerce integration - intentionally forceful in dark mode. */
html[data-kh-theme="dark"] body.khdl-force-global :is(
    .woocommerce,
    .woocommerce-page,
    .woocommerce div.product,
    .woocommerce ul.products li.product,
    .woocommerce-cart-form,
    .cart_totals,
    .woocommerce-checkout,
    .woocommerce-checkout-review-order,
    .woocommerce form.checkout,
    .woocommerce form.login,
    .woocommerce form.register,
    .woocommerce-MyAccount-navigation,
    .woocommerce-MyAccount-content,
    .widget_shopping_cart_content,
    .woocommerce-mini-cart,
    .woocommerce table.shop_table,
    .wc-block-components-sidebar-layout,
    .wc-block-components-main,
    .wc-block-components-sidebar,
    .wc-block-components-totals-wrapper,
    .wc-block-cart-items,
    .wc-block-components-order-summary,
    .wc-block-checkout__main,
    .wc-block-checkout__sidebar
) {
    color: var(--kh-text) !important;
    border-color: var(--kh-border) !important;
}

html[data-kh-theme="dark"] body.khdl-force-global :is(
    .woocommerce-cart-form,
    .cart_totals,
    .woocommerce-checkout-review-order,
    .woocommerce form.login,
    .woocommerce form.register,
    .woocommerce-MyAccount-navigation,
    .woocommerce-MyAccount-content,
    .widget_shopping_cart_content,
    .woocommerce-mini-cart,
    .woocommerce table.shop_table,
    .wc-block-components-order-summary,
    .wc-block-checkout__sidebar,
    .wc-block-components-totals-wrapper
) {
    background-color: var(--kh-surface) !important;
}

html[data-kh-theme="dark"] body.khdl-force-global :is(
    .woocommerce table.shop_table th,
    .woocommerce table.shop_table td,
    .woocommerce-cart-form__cart-item,
    .woocommerce-checkout-review-order-table th,
    .woocommerce-checkout-review-order-table td,
    .wc-block-cart-items__row,
    .wc-block-components-totals-item
) {
    color: var(--kh-text) !important;
    border-color: var(--kh-border) !important;
}

html[data-kh-theme="dark"] body.khdl-force-global :is(
    .woocommerce .quantity .qty,
    .woocommerce form .form-row input.input-text,
    .woocommerce form .form-row textarea,
    .woocommerce form .form-row select,
    .woocommerce .select2-container--default .select2-selection--single,
    .woocommerce .select2-container--default .select2-selection--multiple,
    .wc-block-components-text-input input,
    .wc-block-components-combobox .wc-block-components-combobox-control input,
    .wc-block-components-address-form select
) {
    color: var(--kh-text) !important;
    background-color: var(--kh-input-bg) !important;
    border-color: var(--kh-border) !important;
}

html[data-kh-theme="dark"] body.khdl-force-global :is(
    .select2-dropdown,
    .select2-search__field,
    .select2-results__option
) {
    color: var(--kh-text) !important;
    background-color: var(--kh-surface) !important;
    border-color: var(--kh-border) !important;
}

html[data-kh-theme="dark"] body.khdl-force-global .select2-container--default :is(
    .select2-results__option--highlighted[aria-selected],
    .select2-results__option--highlighted[data-selected]
) {
    color: #fff !important;
    background-color: var(--kh-primary) !important;
}

html[data-kh-theme="dark"] body.khdl-force-global :is(
    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error
) {
    color: var(--kh-text) !important;
    background-color: var(--kh-surface) !important;
    border-color: var(--kh-border) !important;
}

html[data-kh-theme="dark"] body.khdl-force-global :is(
    .woocommerce a,
    .woocommerce div.product p.price,
    .woocommerce div.product span.price,
    .woocommerce ul.products li.product .price,
    .wc-block-components-product-price
) {
    color: var(--kh-primary) !important;
}

html[data-kh-theme="dark"] body.khdl-force-global :is(
    .woocommerce button.button,
    .woocommerce a.button,
    .woocommerce input.button,
    .woocommerce #respond input#submit,
    .wc-block-components-button
) {
    border-color: var(--kh-primary) !important;
}

html[data-kh-theme="dark"] body.khdl-force-global :is(
    .woocommerce-tabs ul.tabs,
    .woocommerce-tabs ul.tabs li,
    .woocommerce div.product .woocommerce-tabs .panel
) {
    color: var(--kh-text) !important;
    background-color: transparent !important;
    border-color: var(--kh-border) !important;
}
