/**
 * OrdersTT – Classic Checkout Layout & Field Hiding
 * v5.4.2 – all shipping hidden, custom fees only
 */
/* Hide State, Country, Shipping address, Postcode, 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,
#billing_postcode_field,
#shipping_postcode_field {
    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_field { margin-bottom: 2em; }

#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;
}

/* Option card groups */
.checkout-option-group { display: flex; gap: 10px; margin-bottom: 1.5em; }

/* Standard card (delivery method, delivery zone) */
.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) {
    border-color: var(--orders-tt-highlight, #7f54b3);
    box-shadow: 0 0 0 1px var(--orders-tt-highlight, #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; }

/* Disabled (greyed out) card */
.checkout-option--disabled {
    opacity: 0.45;
    pointer-events: none;
    border-color: #e0e0e0 !important;
    background: #f9f9f9;
}
.checkout-option--disabled:hover {
    border-color: #e0e0e0 !important;
    box-shadow: none !important;
}

/* Pickup location cards – centered stacked layout, tighter spacing */
.pickup-option {
    min-height: 120px;
    align-items: stretch;
}
.pickup-option .pickup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    gap: 0.15em;
}
.pickup-label {
    font-size: 0.8em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
    margin-bottom: 0;
}
.pickup-location-name {
    font-weight: 700;
    font-size: 1.05em;
    line-height: 1.2;
    margin-bottom: 0;
}
.pickup-option .checkout-option-price {
    font-size: 1.1em;
    margin-top: 0;
    width: 100%;
    text-align: center;
}

/* Hide address fields when Local Pickup is active (reinforced by JS class) */
body.orders-tt-pickup #billing_address_1_field,
body.orders-tt-pickup #billing_address_2_field,
body.orders-tt-pickup #billing_city_field,
body.orders-tt-pickup #billing_postcode_field {
    display: none !important;
}

/* Product thumbnails */
.order-review-thumb { width: 50px; height: auto; vertical-align: middle; margin-right: 0.5em; border-radius: 4px; }