.wahaj-sds-box{
    margin:24px 0;
    padding:18px;
    border:1px solid #e7e2dc;
    border-radius:16px;
    background:#fff;
}
.wahaj-sds-box[hidden]{
    display:none !important;
}
.wahaj-sds-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-bottom:14px;
}
.wahaj-sds-head h3{
    margin:0 0 5px;
    font-size:18px;
    line-height:1.4;
}
.wahaj-sds-head p{
    margin:0;
    color:#6f6a64;
    font-size:13px;
    line-height:1.7;
}
.wahaj-sds-geolocate{
    flex:0 0 auto;
    min-height:42px;
    border-radius:11px !important;
    white-space:nowrap;
}
.wahaj-sds-search{
    width:100%;
    margin:0 0 12px;
    position:relative;
    z-index:1001;
}
.wahaj-sds-search-row{
    display:flex;
    align-items:stretch;
    gap:8px;
}
.wahaj-sds-search-input{
    flex:1 1 auto;
    min-width:0;
    height:48px !important;
    margin:0 !important;
    padding:0 14px !important;
    border:1px solid #ded9d3 !important;
    border-radius:12px !important;
    background:#fff !important;
    color:#222 !important;
    font-family:inherit !important;
    font-size:14px !important;
    direction:rtl;
    outline:none !important;
    box-shadow:0 3px 12px rgba(0,0,0,.04) !important;
}
.wahaj-sds-search-input:focus{
    border-color:#b9966d !important;
    box-shadow:0 0 0 3px rgba(185,150,109,.12) !important;
}
.wahaj-sds-search-button{
    flex:0 0 auto;
    min-width:74px;
    min-height:48px !important;
    margin:0 !important;
    border-radius:12px !important;
    white-space:nowrap;
}
.wahaj-sds-search-results{
    position:absolute;
    top:calc(100% + 6px);
    left:0;
    right:0;
    max-height:260px;
    overflow:auto;
    padding:6px;
    border:1px solid #e4dfd9;
    border-radius:12px;
    background:#fff;
    box-shadow:0 10px 30px rgba(0,0,0,.12);
    z-index:2000;
    direction:rtl;
}
.wahaj-sds-search-results[hidden]{
    display:none !important;
}
.wahaj-sds-search-result{
    display:block;
    width:100%;
    padding:11px 12px;
    margin:0;
    border:0;
    border-radius:9px;
    background:#fff;
    color:#2f2b27;
    font:inherit;
    font-size:13px;
    line-height:1.6;
    text-align:right;
    cursor:pointer;
}
.wahaj-sds-search-result:hover,
.wahaj-sds-search-result:focus{
    background:#f6f1eb;
    outline:none;
}
.wahaj-sds-search-empty{
    padding:12px;
    color:#77706a;
    font-size:13px;
    text-align:center;
}
.wahaj-sds-map-wrap{
    position:relative;
    z-index:1;
}
.wahaj-sds-map{
    width:100%;
    height:320px;
    border-radius:14px;
    overflow:hidden;
    background:#f3f1ee;
    position:relative;
    z-index:1;
}
.wahaj-sds-map .leaflet-control-zoom a{
    font-size:20px;
}
.wahaj-sds-map-hint{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    max-width:82%;
    padding:9px 13px;
    border-radius:10px;
    background:rgba(30,30,30,.82);
    color:#fff;
    font-size:12px;
    line-height:1.5;
    text-align:center;
    pointer-events:none;
    opacity:0;
    transition:opacity .18s ease;
    z-index:1000;
}
.wahaj-sds-map-hint.is-visible{
    opacity:1;
}
.wahaj-sds-status{
    margin-top:10px;
    padding:10px 12px;
    border-radius:10px;
    background:#f7f5f2;
    color:#615c56;
    font-size:13px;
    line-height:1.6;
}
.wahaj-sds-status[data-state="success"]{
    background:#f0f8f2;
    color:#28603a;
}
.wahaj-sds-status[data-state="error"]{
    background:#fff3f3;
    color:#9b2e2e;
}
.wahaj-sds-status[data-state="loading"]{
    opacity:.8;
}
@media (max-width:767px){
    .wahaj-sds-box{
        padding:14px;
        border-radius:14px;
    }
    .wahaj-sds-head{
        align-items:stretch;
        flex-direction:column;
    }
    .wahaj-sds-geolocate{
        width:100%;
    }
    .wahaj-sds-search-row{
        gap:6px;
    }
    .wahaj-sds-search-input{
        height:46px !important;
        font-size:16px !important;
    }
    .wahaj-sds-search-button{
        min-width:66px;
        min-height:46px !important;
    }
    .wahaj-sds-map{
        height:290px;
    }
    .wahaj-sds-map-hint{
        font-size:11px;
    }
}

/* Wahaj 1.3: Syria-only checkout and delivery summary */
.wahaj-sds-hidden-country,
#billing_country_field,
#shipping_country_field{
    display:none !important;
}
.wahaj-sds-shipping-summary{
    margin-top:12px;
    padding:12px 14px;
    border:1px solid #eadfd2;
    border-radius:12px;
    background:#fffaf5;
    direction:rtl;
}
.wahaj-sds-shipping-price-row,
.wahaj-sds-distance-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    line-height:1.6;
}
.wahaj-sds-shipping-price-row span,
.wahaj-sds-distance-row span{
    color:#655d55;
    font-size:13px;
}
.wahaj-sds-shipping-price-row strong{
    font-size:16px;
    color:#9f1d2d;
    text-align:left;
}
.wahaj-sds-distance-row{
    margin-top:7px;
    padding-top:7px;
    border-top:1px solid rgba(0,0,0,.06);
}
.wahaj-sds-distance-row strong{
    font-size:13px;
    color:#3f3a35;
}
.wahaj-sds-shipping-price-row .woocommerce-Price-amount{
    font-weight:700;
}
@media (max-width:767px){
    .wahaj-sds-shipping-summary{
        padding:11px 12px;
    }
    .wahaj-sds-shipping-price-row strong{
        font-size:15px;
    }
}

/* Wahaj 1.4: delivery / personal pickup switch */
.wahaj-sds-mode-switch{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin:0 0 16px;
    padding:5px;
    border:1px solid #e5ded6;
    border-radius:14px;
    background:#f7f4f1;
}
.wahaj-sds-mode-button{
    appearance:none;
    -webkit-appearance:none;
    min-height:48px;
    padding:10px 12px;
    border:0;
    border-radius:10px;
    background:transparent;
    color:#3f3934;
    font:inherit;
    font-weight:700;
    cursor:pointer;
    transition:background-color .2s ease,color .2s ease,box-shadow .2s ease,transform .15s ease;
}
.wahaj-sds-mode-button.is-active{
    background:#fff;
    color:#9f1d2d;
    box-shadow:0 2px 10px rgba(0,0,0,.07);
}
.wahaj-sds-mode-button:active{
    transform:scale(.985);
}
.wahaj-sds-pickup-panel{
    display:flex;
    align-items:flex-start;
    gap:12px;
    margin:0;
    padding:16px;
    border:1px solid #eadfd2;
    border-radius:14px;
    background:#fffaf5;
    direction:rtl;
}
.wahaj-sds-pickup-panel[hidden],
.wahaj-sds-delivery-panel[hidden]{
    display:none !important;
}
.wahaj-sds-pickup-icon{
    flex:0 0 auto;
    width:42px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#f0e4d8;
    font-size:20px;
}
.wahaj-sds-pickup-content{
    min-width:0;
    flex:1 1 auto;
}
.wahaj-sds-pickup-content strong{
    display:block;
    margin:0 0 7px;
    font-size:16px;
    color:#332e2a;
}
.wahaj-sds-pickup-content p{
    margin:5px 0;
    color:#655d55;
    font-size:13px;
    line-height:1.7;
}
.wahaj-sds-pickup-map-link{
    margin-top:9px !important;
    min-height:40px !important;
    border-radius:10px !important;
    text-decoration:none !important;
}
.wahaj-sds-pickup-hidden-field{
    display:none !important;
}
@media (max-width:767px){
    .wahaj-sds-mode-switch{
        gap:6px;
        padding:4px;
    }
    .wahaj-sds-mode-button{
        min-height:46px;
        padding:9px 8px;
        font-size:13px;
    }
    .wahaj-sds-pickup-panel{
        padding:14px;
    }
}


/* Wahaj 1.4.1: prevent the pickup/delivery switch from widening mobile checkout */
.wahaj-sds-box,
.wahaj-sds-delivery-panel,
.wahaj-sds-pickup-panel,
.wahaj-sds-mode-switch,
.wahaj-sds-search,
.wahaj-sds-search-row,
.wahaj-sds-map-wrap,
.wahaj-sds-map,
.wahaj-sds-shipping-summary{
    box-sizing:border-box !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
}
.wahaj-sds-mode-switch{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
}
.wahaj-sds-mode-button{
    box-sizing:border-box !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    white-space:normal !important;
    overflow-wrap:anywhere;
    line-height:1.4;
}
.wahaj-sds-search-input{
    max-width:100% !important;
    min-width:0 !important;
}

/* Compact delivery summary under the map */
.wahaj-sds-shipping-summary{
    display:block;
}
.wahaj-sds-summary-title{
    font-weight:700;
    color:#4b433c;
    font-size:14px;
    line-height:1.6;
    margin-bottom:7px;
}
.wahaj-sds-summary-meta{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px 16px;
    flex-wrap:wrap;
    padding-top:7px;
    border-top:1px solid rgba(0,0,0,.06);
}
.wahaj-sds-shipping-price-row,
.wahaj-sds-distance-row{
    display:inline-flex;
    align-items:center;
    justify-content:flex-start;
    gap:5px;
    margin:0;
    padding:0;
    border:0;
    min-width:0;
}
.wahaj-sds-shipping-price-row span,
.wahaj-sds-distance-row span{
    color:#655d55;
    font-size:13px;
}
.wahaj-sds-shipping-price-row strong,
.wahaj-sds-distance-row strong{
    font-size:13px;
    color:#3f3a35;
    white-space:nowrap;
}
.wahaj-sds-shipping-price-row strong{
    color:#9f1d2d;
    font-size:14px;
}

/* Two-line distance shipping label inside WooCommerce order review */
#shipping_method label .wahaj-sds-rate-display,
.woocommerce-shipping-methods label .wahaj-sds-rate-display{
    display:inline-flex;
    flex-direction:column;
    align-items:flex-start;
    gap:2px;
    max-width:100%;
    vertical-align:top;
    line-height:1.45;
    text-align:right;
}
.wahaj-sds-rate-title{
    display:block;
    font-weight:700;
    color:inherit;
}
.wahaj-sds-rate-meta{
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
    font-size:12.5px;
    font-weight:400;
    color:#b58a61;
}
.wahaj-sds-rate-distance,
.wahaj-sds-rate-price{
    display:inline-flex;
    align-items:center;
    gap:3px;
}
.wahaj-sds-rate-meta b{
    font-weight:700;
}
.wahaj-sds-rate-dot{
    opacity:.6;
}
.wahaj-sds-rate-price .woocommerce-Price-amount{
    color:inherit;
    font-weight:700;
}

@media (max-width:767px){
    .wahaj-sds-box{
        overflow-x:clip;
    }
    .wahaj-sds-mode-switch{
        gap:5px;
        padding:4px;
    }
    .wahaj-sds-mode-button{
        padding:8px 5px !important;
        font-size:12.5px !important;
        min-height:44px !important;
    }
    .wahaj-sds-summary-meta{
        gap:7px 12px;
    }
    .wahaj-sds-rate-meta{
        font-size:12px;
        gap:5px;
    }
}


/* =========================================================
   Wahaj 1.5.0 — single fulfillment selector + clean review
   ========================================================= */

/* The only interactive delivery/pickup selector is above the map.
 * Keep WooCommerce's native shipping inputs in the form, but do not show
 * duplicate radio buttons inside the order total. */
.woocommerce-checkout .woocommerce-checkout-review-order-table
tr.woocommerce-shipping-totals.shipping{
    display:none !important;
}

.woocommerce-checkout .wahaj-sds-mode-button.is-loading{
    opacity:.72;
    cursor:wait !important;
}

/* Read-only fulfillment summary in the checkout total */
.woocommerce-checkout .wahaj-sds-review-fulfillment-row{
    display:table-row;
}

.woocommerce-checkout .wahaj-sds-review-fulfillment-row > th,
.woocommerce-checkout .wahaj-sds-review-fulfillment-row > td{
    vertical-align:top !important;
    padding-top:14px !important;
    padding-bottom:14px !important;
}

.woocommerce-checkout .wahaj-sds-review-fulfillment-row > th{
    font-weight:700 !important;
    white-space:nowrap;
}

.woocommerce-checkout .wahaj-sds-review-card{
    width:100%;
    padding:13px 14px;
    border:1px solid #eadfd6;
    border-radius:14px;
    background:#fffaf6;
    direction:rtl;
    text-align:right;
    box-sizing:border-box;
}

.woocommerce-checkout .wahaj-sds-review-main{
    color:#9f1d2d;
    font-size:14px;
    font-weight:800;
    line-height:1.6;
}

.woocommerce-checkout .wahaj-sds-review-zone{
    margin-top:3px;
    color:#4a433d;
    font-size:12.5px;
    font-weight:700;
    line-height:1.6;
}

.woocommerce-checkout .wahaj-sds-review-meta{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:7px 16px;
    flex-wrap:wrap;
    margin-top:7px;
    color:#6d6259;
    font-size:12.5px;
    line-height:1.6;
}

.woocommerce-checkout .wahaj-sds-review-meta b{
    color:#4b433d;
}

.woocommerce-checkout .wahaj-sds-review-meta .woocommerce-Price-amount{
    color:#9f1d2d;
    font-weight:800;
}

.woocommerce-checkout .wahaj-sds-review-address{
    margin-top:8px;
    padding-top:8px;
    border-top:1px solid rgba(0,0,0,.06);
    color:#6b625a;
    font-size:12.5px;
    line-height:1.7;
}

.woocommerce-checkout .wahaj-sds-review-map-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    margin-top:9px;
    padding:7px 12px;
    border:1px solid #decfc2;
    border-radius:10px;
    background:#fff;
    color:#9f1d2d !important;
    font-size:12px;
    font-weight:700;
    line-height:1.4;
    text-decoration:none !important;
}

.woocommerce-checkout .wahaj-sds-review-map-button:hover{
    border-color:#9f1d2d;
    background:#fff7f7;
}

@media (max-width:767px){
    .woocommerce-checkout .wahaj-sds-review-fulfillment-row{
        display:block !important;
        width:100% !important;
    }

    .woocommerce-checkout .wahaj-sds-review-fulfillment-row > th,
    .woocommerce-checkout .wahaj-sds-review-fulfillment-row > td{
        display:block !important;
        width:100% !important;
        box-sizing:border-box !important;
        text-align:right !important;
    }

    .woocommerce-checkout .wahaj-sds-review-fulfillment-row > th{
        padding:12px 0 7px !important;
    }

    .woocommerce-checkout .wahaj-sds-review-fulfillment-row > td{
        padding:0 0 12px !important;
    }

    .woocommerce-checkout .wahaj-sds-review-card{
        padding:11px 12px;
        border-radius:12px;
    }

    .woocommerce-checkout .wahaj-sds-review-meta{
        gap:5px 12px;
        font-size:12px;
    }

    .woocommerce-checkout .wahaj-sds-review-address{
        font-size:12px;
    }
}
