/* Mana Telugu Foods - final cross-page polish
   Scope: responsive header/search, checkout shipping selector, saved-address card,
   and theme-color consistency for interactive controls. */

:root{
  --mtf-theme:#FFC222;
  --mtf-theme-hover:#E8B31A;
  --mtf-theme-ink:#171717;
  --mtf-green:#00833E;
  --mtf-border:#E7DFD2;
}

/* =========================================================
   HEADER / SEARCH - one predictable header per breakpoint
   ========================================================= */
@media (min-width:1200px){
  .mtf-inner-header #header-sticky{
    display:block!important;
    position:relative!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    width:100%!important;
    transform:none!important;
    visibility:visible!important;
    opacity:1!important;
  }
  .mtf-inner-header .header-middle-sec{display:none!important;}
  .mtf-inner-header #header-sticky .mtf-mobile-header-actions,
  .mtf-inner-header #header-sticky .header__hamburger{display:none!important;}
  .mtf-inner-header #header-sticky .header-right{position:relative!important;}
  .mtf-inner-header #header-sticky .mtf-desktop-header-actions{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
  }
  .mtf-inner-header #header-sticky .mtf-desktop-header-icon{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    position:relative!important;
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    border:1px solid #E5DDD2!important;
    border-radius:50%!important;
    background:#fff!important;
    color:#4A2414!important;
    box-shadow:0 2px 8px rgba(0,0,0,.05)!important;
    cursor:pointer!important;
  }
  .mtf-inner-header #header-sticky .mtf-desktop-header-icon:hover{
    background:var(--mtf-theme)!important;
    border-color:var(--mtf-theme)!important;
    color:var(--mtf-theme-ink)!important;
  }
  .mtf-inner-header #header-sticky .mtf-desktop-search-panel{
    display:none!important;
    position:absolute!important;
    top:calc(100% + 10px)!important;
    right:0!important;
    width:min(420px,calc(100vw - 32px))!important;
    z-index:2147483000!important;
    padding:0!important;
  }
  .mtf-inner-header #header-sticky .mtf-desktop-search-panel.is-open{display:block!important;}
  .mtf-inner-header #header-sticky .mtf-desktop-search-panel .mtf-live-search-wrap{
    background:#fff!important;
    padding:10px!important;
    border:1px solid var(--mtf-border)!important;
    border-radius:12px!important;
    box-shadow:0 14px 35px rgba(0,0,0,.16)!important;
  }
}

@media (max-width:1199px){
  .mtf-inner-header #header-sticky{display:block!important;visibility:visible!important;opacity:1!important;}
  .mtf-inner-header .header-middle-sec{display:none!important;}
  .mtf-inner-header #header-sticky .mtf-desktop-header-actions{display:none!important;}
  /* Never show the desktop fallback search panel inside the mobile header. */
  .mtf-inner-header #header-sticky .mtf-desktop-search-panel{display:none!important;}
  .mtf-inner-header #header-sticky .mtf-mobile-header-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:7px!important;
    margin-right:7px!important;
  }
  .mtf-inner-header #header-sticky .mtf-mobile-header-icon{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    position:relative!important;
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    border:1px solid #E5DDD2!important;
    border-radius:50%!important;
    background:#fff!important;
    color:#4A2414!important;
    box-shadow:0 2px 8px rgba(0,0,0,.05)!important;
    cursor:pointer!important;
    text-decoration:none!important;
  }
  .mtf-inner-header #header-sticky .mtf-mobile-header-icon:hover,
  .mtf-inner-header #header-sticky .mtf-mobile-header-icon:focus{
    background:var(--mtf-theme)!important;
    border-color:var(--mtf-theme)!important;
    color:var(--mtf-theme-ink)!important;
  }
  .mtf-inner-header #header-sticky .seller-text{display:none!important;}
  .mtf-inner-header #header-sticky .mtf-mobile-search-panel{
    display:none!important;
    width:100%!important;
    position:relative!important;
    z-index:10000!important;
    padding:9px 10px 11px!important;
    background:#fff!important;
    border-top:1px solid #EFEAE2!important;
    border-bottom:1px solid #EFEAE2!important;
    box-sizing:border-box!important;
  }
  .mtf-inner-header #header-sticky .mtf-mobile-search-panel:not([hidden]){display:block!important;}
  .mtf-inner-header #header-sticky .mtf-mobile-search-panel .mtf-live-search-wrap{position:relative!important;z-index:10001!important;}
  .mtf-inner-header #header-sticky .mtf-mobile-search-panel .mtf-live-search-form{display:flex!important;align-items:center!important;gap:8px!important;}
  .mtf-inner-header #header-sticky .mtf-mobile-search-panel .mtf-live-search-form input[type="search"]{
    flex:1 1 auto!important;min-width:0!important;height:44px!important;
    border:1px solid #DCD6CB!important;border-radius:9px!important;
    background:#fff!important;color:#222!important;-webkit-text-fill-color:#222!important;
    padding:0 13px!important;
  }
  .mtf-inner-header #header-sticky .mtf-mobile-search-panel .mtf-live-search-form button{
    flex:0 0 44px!important;width:44px!important;height:44px!important;
    border:0!important;border-radius:9px!important;background:var(--mtf-theme)!important;color:var(--mtf-theme-ink)!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
  }
}

/* =========================================================
   CHECKOUT - restore "Ship to a different address?"
   ========================================================= */
body.woocommerce-checkout .mtf-delivery-card .woocommerce-shipping-fields>h3#ship-to-different-address{
  display:block!important;
  width:100%!important;
  margin:5px 0 15px!important;
  padding:11px 13px!important;
  border:1px solid #E7DFD2!important;
  border-radius:10px!important;
  background:#fffDF8!important;
  box-sizing:border-box!important;
}
body.woocommerce-checkout .mtf-delivery-card #ship-to-different-address .woocommerce-form__label-for-checkbox{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  margin:0!important;
  color:#3B332B!important;
  font-size:14px!important;
  font-weight:700!important;
  cursor:pointer!important;
}
body.woocommerce-checkout .mtf-delivery-card #ship-to-different-address-checkbox{
  appearance:auto!important;
  -webkit-appearance:auto!important;
  width:18px!important;height:18px!important;min-width:18px!important;
  margin:0!important;accent-color:var(--mtf-theme)!important;
}
body.woocommerce-checkout .mtf-delivery-card .shipping_address{margin-top:2px!important;}

/* =========================================================
   SAVED ADDRESS - aligned, readable, full address summary
   ========================================================= */
body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-address-wrap{
  display:block!important;width:100%!important;margin:0 0 16px!important;
}
body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-address{
  display:block!important;width:100%!important;box-sizing:border-box!important;
  border:1px solid var(--mtf-border)!important;
  border-radius:12px!important;
  background:#fff!important;
  padding:16px!important;
  box-shadow:0 5px 16px rgba(35,28,17,.05)!important;
}
body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-address-head{
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  gap:14px!important;margin:0 0 12px!important;padding-bottom:12px!important;
  border-bottom:1px solid #EEE8DF!important;
}
body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-address-head>div{min-width:0!important;}
body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-label{
  display:block!important;margin:0 0 3px!important;color:#7B8490!important;
  font-size:10px!important;line-height:1.2!important;letter-spacing:.7px!important;font-weight:800!important;
}
body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-address-head strong{
  display:block!important;color:#171717!important;font-size:16px!important;line-height:1.3!important;font-weight:800!important;
}
body.woocommerce-checkout.mtf-has-saved-address .mtf-edit-address{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
  flex:0 0 auto!important;min-width:82px!important;height:38px!important;padding:0 13px!important;
  border:1px solid var(--mtf-theme)!important;border-radius:8px!important;
  background:var(--mtf-theme)!important;color:var(--mtf-theme-ink)!important;
  font-size:13px!important;font-weight:800!important;cursor:pointer!important;white-space:nowrap!important;
}
body.woocommerce-checkout.mtf-has-saved-address .mtf-edit-address:hover{
  background:var(--mtf-theme-hover)!important;border-color:var(--mtf-theme-hover)!important;color:var(--mtf-theme-ink)!important;
}
body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-address-body{
  display:flex!important;flex-direction:column!important;gap:7px!important;
  padding:0!important;border:0!important;color:#4F5968!important;font-size:14px!important;line-height:1.5!important;
}
body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-address-body>div{
  display:flex!important;align-items:flex-start!important;gap:8px!important;
  margin:0!important;padding:0!important;min-width:0!important;
}
body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-address-body>div>i{
  flex:0 0 18px!important;width:18px!important;margin:3px 0 0!important;text-align:center!important;color:#7A6A55!important;
}
body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-address-body>div>span{min-width:0!important;overflow-wrap:anywhere!important;}
body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-address-body .mtf-saved-address-full{font-weight:600!important;color:#344054!important;}
body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-address-body .mtf-saved-address-place{font-weight:600!important;color:#3D4653!important;}
@media(max-width:767px){
  body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-address{padding:14px!important;border-radius:11px!important;}
  body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-address-head{align-items:flex-start!important;}
  body.woocommerce-checkout.mtf-has-saved-address .mtf-saved-address-body{font-size:13px!important;gap:6px!important;}
}

/* =========================================================
   THEME COLOR CONSISTENCY - primary interactive buttons
   ========================================================= */
.theme-btn,
a.button,
button.button,
input.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #place_order,
.woocommerce-checkout #place_order,
.mtf-address-update,
.mtf-orders-confirm,
.mtf-order-view,
.mtf-checkout-modal .mtf-popup-proceed,
.mtf-checkout-address-popup .mtf-popup-proceed{
  background:var(--mtf-theme)!important;
  border-color:var(--mtf-theme)!important;
  color:var(--mtf-theme-ink)!important;
}
.theme-btn:hover,
a.button:hover,
button.button:hover,
input.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #place_order:hover,
.woocommerce-checkout #place_order:hover,
.mtf-address-update:hover,
.mtf-orders-confirm:hover,
.mtf-order-view:hover,
.mtf-checkout-modal .mtf-popup-proceed:hover,
.mtf-checkout-address-popup .mtf-popup-proceed:hover{
  background:var(--mtf-theme-hover)!important;
  border-color:var(--mtf-theme-hover)!important;
  color:var(--mtf-theme-ink)!important;
}
/* Replace the Bootstrap warning accent on form controls without touching decorative offer banners. */
input[type="checkbox"],input[type="radio"]{accent-color:var(--mtf-theme);}

/* Search submit buttons should use the same primary theme yellow. */
.mtf-live-search-form button,
.mtf-mobile-search-panel .mtf-live-search-form button,
.mtf-desktop-search-panel .mtf-live-search-form button{background:var(--mtf-theme)!important;color:var(--mtf-theme-ink)!important;border-color:var(--mtf-theme)!important;}

/* Account/order filters and small primary actions using old yellow variants. */
.mtf-account-tab.is-active,
.mtf-order-filter.is-active,
.mtf-orders-confirm,
.mtf-order-view,
.mtf-edit-address{background:var(--mtf-theme)!important;border-color:var(--mtf-theme)!important;color:var(--mtf-theme-ink)!important;}

/* Keep disabled states visibly disabled instead of forcing the primary color. */
button:disabled,
input:disabled,
select:disabled{opacity:.65;}


/* =========================================================
   LIVE CHECKOUT HOTFIX - native WooCommerce shipping toggle
   Do not depend on .mtf-delivery-card; the current checkout is
   rendered by the native WooCommerce shortcode.
   ========================================================= */
body.woocommerce-checkout #customer_details .woocommerce-shipping-fields{
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  padding:0!important;
  margin:0 0 14px!important;
  box-shadow:none!important;
}
body.woocommerce-checkout #customer_details #ship-to-different-address{
  display:block!important;
  width:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:14px 14px!important;
  box-sizing:border-box!important;
  border:1px solid #E7DFD2!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:none!important;
}
body.woocommerce-checkout #customer_details #ship-to-different-address .woocommerce-form__label-for-checkbox{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  color:#3B332B!important;
  font-size:14px!important;
  line-height:20px!important;
  font-weight:700!important;
  cursor:pointer!important;
}
body.woocommerce-checkout #customer_details #ship-to-different-address-checkbox{
  display:inline-block!important;
  visibility:visible!important;
  opacity:1!important;
  appearance:auto!important;
  -webkit-appearance:auto!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  margin:0!important;
  padding:0!important;
  accent-color:#FFC222!important;
}
body.woocommerce-checkout #customer_details .woocommerce-shipping-fields .shipping_address{
  margin-top:12px!important;
}
body.woocommerce-checkout #customer_details .woocommerce-shipping-fields .shipping_address p.form-row{
  margin-bottom:13px!important;
}

/* Remove the old empty card effect around the native shipping section. */
body.woocommerce-checkout #customer_details .woocommerce-shipping-fields > .shipping_address:empty{
  display:none!important;
}

@media(max-width:767px){
  body.woocommerce-checkout #customer_details .woocommerce-shipping-fields{
    margin-bottom:12px!important;
  }
  body.woocommerce-checkout #customer_details #ship-to-different-address{
    padding:14px 13px!important;
    border-radius:12px!important;
  }
  body.woocommerce-checkout #customer_details #ship-to-different-address .woocommerce-form__label-for-checkbox{
    font-size:14px!important;
  }
}
