/* TrendX Courier Checkout */
.txc-wrap{margin:22px 0 26px;padding:0;clear:both}.txc-title{font-size:18px!important;font-weight:700!important;margin:0 0 12px!important}.txc-delivery-tabs{display:flex;border:1.5px solid #ddd;border-radius:9px;overflow:hidden;margin:0 0 12px}.txc-tab{flex:1;min-height:46px;border:0;border-right:1.5px solid #ddd;background:#fff;color:#555;font-size:13px;font-weight:700;cursor:pointer;padding:8px 12px}.txc-tab:last-child{border-right:0}.txc-tab.txc-active{background:var(--txc-accent,#111);color:var(--txc-accent-text,#fff)}.txc-tab-price{display:block;font-size:11px;font-weight:600;opacity:.8;margin-top:2px}.txc-courier-options{display:flex;flex-direction:column;gap:10px}.txc-courier-card{border:1.5px solid #e0e0e0;border-radius:10px;padding:14px 16px;cursor:pointer;background:#fff;transition:border-color .15s,background .15s;outline:none}.txc-courier-card:hover,.txc-courier-card:focus{border-color:#aaa}.txc-courier-card.txc-selected{border-color:var(--txc-accent,#111);background:#fafafa}.txc-courier-header{display:flex;align-items:center;gap:12px}.txc-courier-badge{display:flex;width:36px;height:36px;border-radius:8px;align-items:center;justify-content:center;border:1px solid #e8e8e8;background:#fff;font-size:16px;font-weight:800;flex:none}.txc-courier-logo-wrap{display:flex;width:44px;height:36px;border-radius:8px;align-items:center;justify-content:center;border:1px solid #e8e8e8;background:#fff;padding:4px 6px;box-sizing:border-box;flex:none}.txc-courier-logo{display:block!important;max-width:100%!important;max-height:100%!important;width:auto!important;height:auto!important;object-fit:contain!important;margin:0!important}.txc-courier-info{display:flex;flex:1;min-width:0;flex-direction:column}.txc-courier-info strong{font-size:14px;color:#111}.txc-courier-info small{font-size:12px;color:#888;margin-top:1px}.txc-courier-price{font-size:14px;font-weight:700;color:#111;white-space:nowrap}.txc-office-search-wrap{display:none;margin-top:12px}.txc-office-search-wrap.txc-visible{display:block}.txc-office-search{width:100%!important;height:44px!important;padding:0 14px 0 38px!important;border:1.5px solid #ddd!important;border-radius:7px!important;font-size:13px!important;box-sizing:border-box!important;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 12px center!important}.txc-office-search:focus{border-color:var(--txc-accent,#111)!important;outline:none!important}.txc-office-results{display:none;margin-top:6px;max-height:230px;overflow-y:auto;border:1.5px solid #e0e0e0;border-radius:7px;background:#fff;box-shadow:0 4px 16px rgba(0,0,0,.08);position:relative;z-index:20}.txc-office-results.txc-visible{display:block}.txc-office-item{display:block;width:100%;padding:10px 14px;border:0;border-bottom:1px solid #f0f0f0;background:#fff;text-align:left;cursor:pointer;font-size:13px;line-height:1.4}.txc-office-item:last-child{border-bottom:0}.txc-office-item:hover{background:#f5f5f5}.txc-office-item strong{display:block;color:#111;font-weight:600}.txc-office-item span{display:block;color:#888;font-size:11px;margin-top:2px}.txc-office-item.txc-loading{color:#777}.txc-error-item strong{color:#b42318}.txc-selected-office{display:none;margin-top:8px;padding:10px 14px;background:#f0f9f0;border:1.5px solid #2d9e4f;border-radius:7px;font-size:13px;color:#1a7a3a;font-weight:600;line-height:1.5}.txc-selected-office.txc-visible{display:block}.txc-selected-office small{font-weight:400}.txc-address-mode{display:none}.txc-address-note{font-size:13px;color:#666;margin:8px 0 12px}.txc-address-grid .form-row{float:none!important;width:100%!important;margin:0 0 12px!important}.txc-address-grid input{width:100%!important;min-height:48px!important;border:1.5px solid #ddd!important;border-radius:8px!important;padding:10px 12px!important}.txc-address-grid input:focus{border-color:var(--txc-accent,#111)!important;outline:none!important}.txc-error{display:none;margin-top:12px;padding:11px 14px;border:1.5px solid #feb2b2;background:#fff5f5;color:#c53030;border-radius:7px;font-size:13px}.txc-error.txc-visible{display:block}.txc-native-hidden{display:none!important}#ship-to-different-address,.shipping_address{display:none!important}
@media(max-width:720px){.txc-wrap{margin-top:18px}.txc-delivery-tabs{display:grid;grid-template-columns:1fr 1fr}.txc-tab{min-height:50px;padding:8px}.txc-courier-card{padding:13px}.txc-courier-info small{white-space:normal}.txc-office-results{max-height:260px}}

/* v0.2.8 — Address layout inspired by the Teniska Bace checkout */
.txc-address-mode{display:none}
.txc-address-card{border:1.5px solid #e0e0e0;border-radius:10px;padding:14px 16px;background:#fff;margin:0 0 12px;cursor:default}
.txc-address-grid{display:flex;flex-direction:column;gap:12px}
.txc-address-row-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.txc-floating-field{position:relative;margin:0!important;float:none!important;width:100%!important}
.txc-floating-field label{position:absolute!important;left:14px!important;top:8px!important;z-index:2!important;margin:0!important;padding:0!important;font-size:11px!important;line-height:1.1!important;font-weight:700!important;color:#777!important;pointer-events:none!important;background:transparent!important;transform:none!important}
.txc-floating-field input{display:block!important;width:100%!important;min-height:54px!important;height:54px!important;box-sizing:border-box!important;margin:0!important;padding:20px 14px 7px!important;border:1.5px solid #ddd!important;border-radius:8px!important;background:#fff!important;color:#111!important;font-size:15px!important;line-height:1.25!important;box-shadow:none!important;outline:none!important}
.txc-floating-field input:focus{border-color:var(--txc-accent,#111)!important;box-shadow:none!important;outline:none!important}
.txc-address-full{width:100%!important}
@media (max-width:720px){.txc-address-row-2{grid-template-columns:1fr}.txc-address-card{padding:13px 14px}}


/* === v0.2.16: FunnelKit / CartFlows compatibility === */
/* Native Woo address fields are populated by TrendX and must never be shown. */
.txc-native-hidden,
#billing_country_field,
#billing_address_1_field,
#billing_address_2_field,
#billing_city_field,
#billing_state_field,
#billing_postcode_field,
#wfacp-e-form #billing_country_field,
#wfacp-e-form #billing_address_1_field,
#wfacp-e-form #billing_address_2_field,
#wfacp-e-form #billing_city_field,
#wfacp-e-form #billing_state_field,
#wfacp-e-form #billing_postcode_field,
.txc-force-hide-native {
    display:none !important;
    visibility:hidden !important;
    height:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
}

/* Some checkout builders apply their button background to every button.
   Keep only the active TrendX tab in the chosen accent colour. */
#txc-courier-checkout .txc-delivery-tabs {
    background:#fff !important;
    border-color:#ddd !important;
}
#txc-courier-checkout .txc-delivery-tabs .txc-tab {
    background:#fff !important;
    color:#555 !important;
    box-shadow:none !important;
    text-shadow:none !important;
}
#txc-courier-checkout .txc-delivery-tabs .txc-tab.txc-active {
    background:var(--txc-accent,#111) !important;
    color:var(--txc-accent-text,#fff) !important;
}
#txc-courier-checkout .txc-courier-card.txc-selected {
    border-color:var(--txc-accent,#111) !important;
}

/* Let the TrendX section use the whole checkout column in FunnelKit/CartFlows. */
#txc-courier-checkout,
#wfacp-e-form #txc-courier-checkout,
.wfacp_main_form #txc-courier-checkout,
.wfacp_form #txc-courier-checkout {
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    clear:both !important;
}
#txc-courier-checkout .txc-delivery-tabs,
#txc-courier-checkout .txc-courier-options,
#txc-courier-checkout .txc-courier-card,
#txc-courier-checkout .txc-address-mode,
#txc-courier-checkout .txc-address-card,
#txc-courier-checkout .txc-address-grid {
    width:100% !important;
    max-width:100% !important;
    box-sizing:border-box !important;
}


/* === v0.2.17: hide duplicate native shipping selector ===
   TrendX Courier is the visible selector; Woo/FunnelKit still keeps the
   shipping rate underneath for totals/session/payment compatibility. */
#shipping_method_field,
#wfacp-e-form #shipping_method_field,
.wfacp_shipping_table,
#wfacp-e-form .wfacp_shipping_table,
.wfacp_shipping_method,
#wfacp-e-form .wfacp_shipping_method {
    display:none !important;
    visibility:hidden !important;
    height:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
}


/* === v0.2.18: isolate office search results from theme/FunnelKit button styles ===
   Office results are buttons for accessibility. Some checkout builders apply the
   store accent background to every button, which made the whole dropdown blue. */
#txc-courier-checkout .txc-office-results {
    background:#fff !important;
    color:#111 !important;
    border-color:#e0e0e0 !important;
}
#txc-courier-checkout .txc-office-results button.txc-office-item,
#txc-courier-checkout .txc-office-results .txc-office-item {
    -webkit-appearance:none !important;
    appearance:none !important;
    display:block !important;
    width:100% !important;
    min-height:0 !important;
    height:auto !important;
    margin:0 !important;
    padding:10px 14px !important;
    border:0 !important;
    border-bottom:1px solid #f0f0f0 !important;
    border-radius:0 !important;
    background:#fff !important;
    background-image:none !important;
    color:#111 !important;
    box-shadow:none !important;
    text-shadow:none !important;
    text-align:left !important;
    text-transform:none !important;
    letter-spacing:normal !important;
    font-size:13px !important;
    font-weight:400 !important;
    line-height:1.4 !important;
}
#txc-courier-checkout .txc-office-results button.txc-office-item:last-child,
#txc-courier-checkout .txc-office-results .txc-office-item:last-child {
    border-bottom:0 !important;
}
#txc-courier-checkout .txc-office-results button.txc-office-item:hover,
#txc-courier-checkout .txc-office-results button.txc-office-item:focus {
    background:#f5f5f5 !important;
    color:#111 !important;
    outline:none !important;
}
#txc-courier-checkout .txc-office-results .txc-office-item strong {
    display:block !important;
    color:#111 !important;
    font-weight:600 !important;
}
#txc-courier-checkout .txc-office-results .txc-office-item span {
    display:block !important;
    color:#888 !important;
    font-size:11px !important;
    font-weight:400 !important;
    margin-top:2px !important;
}

/* CartFlows can render billing_email independently of WooCommerce checkout_fields. */
body.txc-hide-checkout-email #billing_email_field,
body.txc-hide-checkout-email .wcf-billing-email-field,
body.txc-hide-checkout-email .wcf-field-container:has(> #billing_email),
body.txc-hide-checkout-email .wcf-field-container:has(input[name="billing_email"]),
body.txc-hide-checkout-email .woocommerce-billing-fields__field-wrapper > p:has(input[name="billing_email"]),
body.txc-hide-checkout-email .woocommerce-billing-fields__field-wrapper > div:has(input[name="billing_email"]) {
    display:none !important;
}
