/**
 * OrdersTT – Classic Checkout Layout & Field Hiding
 * v2.7.0 – Native shipping method cards for delivery, custom fee cards for pickup
 */

/* Hide original State, Country, Shipping address, and Shipping table row */
#billing_state_field,
#shipping_state_field,
#billing_country_field,
#shipping_country_field,
.woocommerce-shipping-fields,
.woocommerce-shipping-fields__field-wrapper,
#ship-to-different-address,
#ship-to-different-address-checkbox,
.woocommerce-form-shipping,
.woocommerce-checkout-review-order-table .shipping {
    display: none !important;
}

/* Town/City dropdown */
.woocommerce-checkout #billing_city,
.woocommerce-checkout #shipping_city {
    display: block;
    width: 100%;
    padding: 0.6em 0.8em;
    font-size: 1em;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23333" d="M6 8L0 2h12z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.8em center;
    background-size: 12px;
    padding-right: 2.5em;
}

/* Delivery Method (Step 1) */
#delivery_method_field {
    margin-bottom: 2em;
}

/* Numbered steps */
#delivery_method_field > h3::before,
.woocommerce-billing-fields > h3::before,
#shipping_method_cards > h3::before,
#pickup_location_field > h3::before,
#order_review_heading::before {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: #333;
    color: #fff;
    border-radius: 50%;
    margin-right: 0.6em;
    font-size: 0.9em;
    font-weight: bold;
}
#delivery_method_field > h3::before { content: "1"; }
.woocommerce-billing-fields > h3::before { content: "2"; }
#shipping_method_cards > h3::before,
#pickup_location_field > h3::before { content: "3"; }
#order_review_heading::before { content: "4"; }

.woocommerce-billing-fields > h3,
#delivery_method_field > h3,
#shipping_method_cards > h3,
#pickup_location_field > h3,
#order_review_heading {
    font-size: 1.25em;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5em;
    margin-bottom: 1em;
    display: flex;
    align-items: center;
}

/* Block‑style option cards */
.checkout-option-group {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5em;
}
.checkout-option {
    flex: 1;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}
.checkout-option:hover {
    border-color: #b0b0b0;
}
.checkout-option input[type="radio"] {
    display: none;
}
.checkout-option:has(input:checked),
.checkout-option.checked {
    border-color: #7f54b3;
    box-shadow: 0 0 0 1px #7f54b3;
}
.checkout-option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.checkout-option-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5em;
}
.checkout-option-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}
.checkout-option-title {
    font-weight: 600;
}
.checkout-option-price {
    font-weight: bold;
    color: #77a464;
    white-space: nowrap;
}

/* Product thumbnails */
.order-review-thumb {
    width: 50px;
    height: auto;
    vertical-align: middle;
    margin-right: 0.5em;
    border-radius: 4px;
}