/*
 * TAF ShipCore: the shipping list and calculator's fallback layout (1.11.0).
 *
 * Enqueued on the cart and checkout (taf-shipcore.php §6). Every selector is wrapped in
 * :where(), so it has zero specificity: a theme with no shipping styles of its own gets a
 * usable layout, and any rule a theme writes wins over it. Until 1.10.0 these rules were an
 * inline <style> in wp_head, printed after the theme's stylesheets, so they won ties
 * against the theme; their !important flags are gone for the same reason.
 */

/* The shipping row stacks: the "Shipping" label above the rate list, not beside it. */
:where(.cart_totals .shipping th, .cart_totals .shipping td) {
    display: block;
    width: 100%;
    text-align: left;
}

:where(.cart_totals .shipping th) {
    padding-bottom: 4px;
}

/* The rate list: each radio beside its label. */
:where(.woocommerce-shipping-methods) {
    margin: 0;
    padding: 0;
    text-align: left;
}

:where(.woocommerce-shipping-methods li) {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    list-style: none;
}

:where(.woocommerce-shipping-methods li input[type="radio"]) {
    flex-shrink: 0;
    margin: 0;
}

:where(.woocommerce-shipping-methods li label) {
    display: inline;
    cursor: pointer;
}

/* The calculator ("Change address"): a form that does not stretch across the totals. */
:where(.shipping-calculator-form) {
    max-width: 300px;
}

:where(.shipping-calculator-form p) {
    margin-bottom: 12px;
}

:where(.shipping-calculator-form label) {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

:where(.shipping-calculator-form select, .shipping-calculator-form input[type="text"]) {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    text-align: left;
}

:where(.shipping-calculator-form .select2-container) {
    width: 100%;
}

:where(.shipping-calculator-form .button) {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 24px;
    border: 0;
    border-radius: 4px;
    background: #0073aa;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

:where(.shipping-calculator-form .button:hover) {
    background: #005a87;
}
