/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/


/*
مرتب کردن فیلدها در صفحه کارت لینک
https://www.nafistarinha.com/checkout/
در هر دو حالت عرض کمتر از 768 و بیشتر از 768 
@media (min-width: 768px)  --------   @media (max-width: 767px) {
1405/02/31
*/

@media (min-width: 768px) {
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
  }

  /* نام و نام خانوادگی */
  .woocommerce-checkout #billing_first_name_field,
  .woocommerce-checkout #billing_last_name_field {
    width: 48% !important;
    flex: 0 0 48% !important;
    max-width: 48% !important;
    float: none !important;
    clear: none !important;
    order: 10;
  }

  /* نام شرکت */
  .woocommerce-checkout #billing_company_field {
    width: 48% !important;
    flex: 0 0 48% !important;
    max-width: 48% !important;
    float: none !important;
    clear: none !important;
    order: 20;
  }

  /* کشور */
  .woocommerce-checkout #billing_country_field {
    width: 48% !important;
    flex: 0 0 48% !important;
    max-width: 48% !important;
    float: none !important;
    clear: none !important;
    order: 21;
  }

  /* استان و شهر */
  .woocommerce-checkout #billing_state_field,
  .woocommerce-checkout #billing_city_field {
    width: 48% !important;
    flex: 0 0 48% !important;
    max-width: 48% !important;
    float: none !important;
    clear: none !important;
  }

  .woocommerce-checkout #billing_state_field {
    order: 30;
  }

  .woocommerce-checkout #billing_city_field {
    order: 31;
  }

  /* خیابان و آدرس */
  .woocommerce-checkout #billing_address_1_field {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
    order: 40;
  }

  /* شماره واحد، بلوک، پلاک */
  .woocommerce-checkout #billing_address_2_field {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
    order: 41;
  }

  /* کدپستی */
  .woocommerce-checkout #billing_postcode_field {
    width: 48% !important;
    flex: 0 0 48% !important;
    max-width: 48% !important;
    float: none !important;
    clear: none !important;
    order: 50;
  }

  /* تلفن */
  .woocommerce-checkout #billing_phone_field {
    width: 48% !important;
    flex: 0 0 48% !important;
    max-width: 48% !important;
    float: none !important;
    clear: none !important;
    order: 60;
  }

  /* ایمیل */
  .woocommerce-checkout #billing_email_field {
    width: 48% !important;
    flex: 0 0 48% !important;
    max-width: 48% !important;
    float: none !important;
    clear: none !important;
    order: 61;
  }
}

@media (max-width: 767px) {
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
  }

  .woocommerce-checkout #billing_first_name_field {
    order: 10 !important;
  }

  .woocommerce-checkout #billing_last_name_field {
    order: 11 !important;
  }

  .woocommerce-checkout #billing_company_field {
    order: 20 !important;
  }

  .woocommerce-checkout #billing_country_field {
    order: 21 !important;
  }

  .woocommerce-checkout #billing_state_field {
    order: 30 !important;
  }

  .woocommerce-checkout #billing_city_field {
    order: 31 !important;
  }

  .woocommerce-checkout #billing_address_1_field {
    order: 40 !important;
  }

  .woocommerce-checkout #billing_address_2_field {
    order: 41 !important;
  }

  .woocommerce-checkout #billing_postcode_field {
    order: 50 !important;
  }

  .woocommerce-checkout #billing_phone_field {
    order: 60 !important;
  }

  .woocommerce-checkout #billing_email_field {
    order: 61 !important;
  }

  .woocommerce-checkout #billing_first_name_field,
  .woocommerce-checkout #billing_last_name_field,
  .woocommerce-checkout #billing_company_field,
  .woocommerce-checkout #billing_country_field,
  .woocommerce-checkout #billing_state_field,
  .woocommerce-checkout #billing_city_field,
  .woocommerce-checkout #billing_address_1_field,
  .woocommerce-checkout #billing_address_2_field,
  .woocommerce-checkout #billing_postcode_field,
  .woocommerce-checkout #billing_phone_field,
  .woocommerce-checkout #billing_email_field {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
  }
}

