/*
 * KingSoft / Osapa 2.2.4 migration — Phase 14
 * Shipping selection visibility, cart/checkout summary polish, and consistent
 * top spacing for standard page titles below the main navigation.
 */

/* --------------------------------------------------------------------------
 * Shipping methods: one clear radio per method, with a red selected state.
 * Applies consistently in both Cart and Checkout.
 * ----------------------------------------------------------------------- */
.woocommerce-cart #shipping_method li,
.woocommerce-checkout #shipping_method li {
    position: relative !important;
}

.woocommerce-cart #shipping_method li > input.shipping_method[type="radio"],
.woocommerce-checkout #shipping_method li > input.shipping_method[type="radio"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-shadow: none !important;
}

.woocommerce-cart #shipping_method li > input.shipping_method[type="radio"] + label,
.woocommerce-checkout #shipping_method li > input.shipping_method[type="radio"] + label {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 34px 0 0 !important;
    color: #333 !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    box-sizing: border-box !important;
}

/* Checkout places the control at the right edge of the full-width shipping row. */
.woocommerce-checkout #shipping_method li > input.shipping_method[type="radio"] + label::before,
.woocommerce-checkout #shipping_method li > input.shipping_method[type="radio"] + label::after,
/* Cart summary keeps the same right-edge convention. */
.woocommerce-cart #shipping_method li > input.shipping_method[type="radio"] + label::before,
.woocommerce-cart #shipping_method li > input.shipping_method[type="radio"] + label::after {
    content: '' !important;
    position: absolute !important;
    right: 0 !important;
    left: auto !important;
    top: 50% !important;
    border-radius: 50% !important;
    transform: translateY(-50%) !important;
    box-sizing: border-box !important;
}

.woocommerce-checkout #shipping_method li > input.shipping_method[type="radio"] + label::before,
.woocommerce-cart #shipping_method li > input.shipping_method[type="radio"] + label::before {
    width: 17px !important;
    height: 17px !important;
    border: 2px solid #b9b9b9 !important;
    background: #fff !important;
}

.woocommerce-checkout #shipping_method li > input.shipping_method[type="radio"] + label::after,
.woocommerce-cart #shipping_method li > input.shipping_method[type="radio"] + label::after {
    right: 4px !important;
    width: 9px !important;
    height: 9px !important;
    border: 0 !important;
    background: #ea0028 !important;
    opacity: 0 !important;
}

.woocommerce-checkout #shipping_method li > input.shipping_method[type="radio"]:checked + label::before,
.woocommerce-cart #shipping_method li > input.shipping_method[type="radio"]:checked + label::before {
    border-color: #ea0028 !important;
}

.woocommerce-checkout #shipping_method li > input.shipping_method[type="radio"]:checked + label::after,
.woocommerce-cart #shipping_method li > input.shipping_method[type="radio"]:checked + label::after {
    opacity: 1 !important;
}

.woocommerce-checkout #shipping_method li > input.shipping_method[type="radio"]:checked + label,
.woocommerce-cart #shipping_method li > input.shipping_method[type="radio"]:checked + label {
    font-weight: 700 !important;
}

.woocommerce-checkout #shipping_method li > input.shipping_method[type="radio"]:focus-visible + label,
.woocommerce-cart #shipping_method li > input.shipping_method[type="radio"]:focus-visible + label {
    outline: 2px solid #ea0028 !important;
    outline-offset: 4px !important;
}

/* --------------------------------------------------------------------------
 * Standard no-background page titles need breathing room below navigation.
 * This applies consistently to account, cart, checkout, shop, contact and
 * other regular pages without changing large photographic hero breadcrumbs.
 * ----------------------------------------------------------------------- */
body:not(.home):not(.front-page) .site-content > .no-ftc-breadcrumb {
    padding-top: 20px !important;
    box-sizing: border-box !important;
}

body:not(.home):not(.front-page) .site-content > .no-ftc-breadcrumb .ftc-breadcrumb-title-noback {
    margin-top: 0 !important;
}

@media (max-width: 767px) {
    body:not(.home):not(.front-page) .site-content > .no-ftc-breadcrumb {
        padding-top: 14px !important;
    }
}
