/**
 * Optional card-style presentation for the shipping method selector.
 * Enabled by the "Add styles to shipping options table" setting.
 */
.woocommerce-shipping-totals.shipping {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 15px;
}

.woocommerce-shipping-totals.shipping th {
    display: block;
    text-align: left;
    font-weight: bold;
    margin-bottom: 10px;
}

.woocommerce-shipping-totals.shipping td {
    display: block;
    padding: 0;
}

@media (max-width: 532px) {
    label[for=econt_shipping_to_buttons_OFFICE]:first-child {
        display: none !important;
    }
}

.woocommerce-econt-shipping td {
    text-align: left;
}

#box_now_delivery_button {
    height: 40px;
}

.woocommerce ul#shipping_method li input[type="radio"] + label {
    position: relative;
    display: flex !important;
    line-height: 1.25 !important;
    padding: 8px 12px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    margin: 0px;
    cursor: pointer;
    min-height: 0 !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.woocommerce ul#shipping_method li input[type="radio"]:checked + label {
    border: 2px solid #97d3c2;
    /* Unobtrusive tint so the chosen card reads as selected at a glance. */
    background-color: #f1f9f6;
    /* Keep total box height stable when the 1px border becomes 2px. */
    padding: 7px 11px;
}

/* Checkmark badge in the corner of the selected card. */
.woocommerce ul#shipping_method li input[type="radio"]:checked + label::after {
    content: "\2713"; /* ✓ */
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background-color: #3f9e7f;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #fff;
}

.woocommerce ul#shipping_method li {
    /* Positioned so the visually-hidden absolute radio below is anchored to its
     * own row, not the top of the page. Without this, WooCommerce's
     * update_checkout success handler calls radio.focus() after every shipping
     * change, and the browser scrolls up to the radio's page-top position. */
    position: relative;
    border-radius: 8px;
    text-align: center;
    line-height: 1.25;
    margin-bottom: 8px;
}

/*
 * Visually hide the radio inputs but keep them in the accessibility tree and the
 * keyboard tab order (the previous `display:none` removed them entirely, so the
 * shipping method could not be chosen with a keyboard or screen reader).
 */
#shipping_method input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
#shipping_method input[type="radio"]:focus-visible + label {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.woocommerce-shipping-methods li label {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
    margin: 5px 0;
    display: block;
}

.woocommerce-shipping-methods li label > div {
    display: block;
    max-width: 100%;
    box-sizing: border-box;
}
