/* =============================================================================
   TUS – Cart Totals: Shipping Method Cards
   v5.0.0 — CART PAGE ONLY
   =============================================================================
   ALL rules are scoped under .cart_totals so nothing can affect the checkout
   order review table or any other page element.
   ============================================================================= */

/* ─────────────────────────────────────────────────────────────────────────────
   1. Convert .cart_totals table + tbody to block so rows can be restructured.
   ───────────────────────────────────────────────────────────────────────────── */

.cart_totals .shop_table,
.cart_totals .shop_table tbody {
    display: block;
    width: 100%;
}

/* Every row = a flex container with the th label on the left */
.cart_totals .shop_table tr {
    display: flex;
    align-items: baseline;
    width: 100%;
}

.cart_totals .shop_table th {
    flex: 0 0 auto;
    white-space: nowrap;
    padding-right: 16px;
}

.cart_totals .shop_table td {
    flex: 1 1 auto;
    min-width: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   2. Shipping row: switch to column direction so th sits above td.
      Both th and td get full width.
   ───────────────────────────────────────────────────────────────────────────── */

.cart_totals tr.woocommerce-shipping-totals {
    flex-direction: column;
    align-items: stretch;
}

.cart_totals tr.woocommerce-shipping-totals th,
.cart_totals tr.woocommerce-shipping-totals td {
    width: 100%;
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
}

/* th: small uppercase section label */
.cart_totals tr.woocommerce-shipping-totals th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.55;
    padding-top: 16px;
    padding-bottom: 6px;
    border-top: none;
}

/* td: no extra top padding or border above the card list */
.cart_totals tr.woocommerce-shipping-totals td {
    padding-top: 0;
    border-top: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   3. Mobile: suppress Astra's responsive ::before pseudo-element.
      At ≤921px Astra injects:  td::before { content: attr(data-title)": "; float:left }
      which creates the old "Szállítás: " label that conflicts with our layout.
   ───────────────────────────────────────────────────────────────────────────── */

.woocommerce .cart_totals table.shop_table_responsive tr.woocommerce-shipping-totals td::before,
.woocommerce-page .cart_totals table.shop_table_responsive tr.woocommerce-shipping-totals td::before {
    content: none;
    display: none;
    float: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   4. Shipping method list — card-style.
      COMMENTED OUT — radio/label layout needs rethinking.
   ───────────────────────────────────────────────────────────────────────────── */

/*
.cart_totals ul#shipping_method {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart_totals ul#shipping_method li {
    position: relative;
    display: block;
    padding: 2px 12px 2px 34px;
    background-color: rgba(255,255,255,0.05);
    border-left: 3px solid transparent;
    border-radius: 4px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    list-style: none;
}

.cart_totals ul#shipping_method li:hover {
    background-color: rgba(255,255,255,0.09);
}

.cart_totals ul#shipping_method li:has(input[type="radio"]:checked) {
    border-left-color: var(--ast-global-color-0, #29cba8);
    background-color: rgba(255,255,255,0.09);
}

.cart_totals ul#shipping_method input[type="radio"] {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    cursor: pointer;
}

.cart_totals ul#shipping_method label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 10px 0;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.cart_totals ul#shipping_method label::before {
    display: none !important;
    content: none !important;
}

.cart_totals ul#shipping_method label .woocommerce-Price-amount {
    font-weight: 700;
    margin-left: auto;
    white-space: nowrap;
}

.cart_totals ul#shipping_method label .vp-woo-pont-shipping-method-label {
    flex: 1;
}

.cart_totals .vp-woo-pont-shipping-method-icons {
    display: flex;
    gap: 8px;
    width: 100%;
    padding-left: 0;
    margin-top: 2px;
    opacity: 0.75;
}
*/
