/* مسیر: vira-product-elements/assets/css/vira-checkout.css */

:root{
 --vira-orange:var(--vira-brand-color,#ff5a00);
 --vira-orange-hover:var(--vira-brand-hover,#e04f00);
 --vira-blue:#2563eb;
 --vira-border:#e5e7eb;
 --vira-muted:#6b7280;
 --vira-text:#1f2937;
 --vira-radius:14px
}

body.woocommerce-cart .woocommerce,
body.woocommerce-checkout .woocommerce,
body.woocommerce-page .woocommerce{
 width:100%!important;
 max-width:100%!important;
 margin-inline:auto!important;
 padding:0!important
}

.woocommerce-checkout form.checkout{
 align-items:start!important
}

@media(min-width:992px){
 .woocommerce-checkout form.checkout{
  display:grid!important;
  grid-template-columns:minmax(0,1.35fr) minmax(320px,1fr)!important;
  gap:0 28px!important
 }

 .woocommerce-notices-wrapper{grid-column:1/-1!important}

 .woocommerce-checkout form.checkout #customer_details{
  grid-column:1!important;
  grid-row:1!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important
 }

 .woocommerce-checkout form.checkout #order_review{
  grid-column:2!important;
  grid-row:1!important;
  width:100%!important;
  margin:0!important
 }
}

#order_review_heading,
.woocommerce-privacy-policy-text,
#billing_country_field,
#shipping_country_field,
#billing_address_2_field,
#shipping_address_2_field,
#billing_phone_field label .optional,
.woocommerce-additional-fields,
.woocommerce-checkout form.checkout #customer_details .col-2:empty{
 display:none!important
}

.woocommerce-checkout form.checkout #customer_details .col-1,
.woocommerce-checkout form.checkout #customer_details .col-2,
.woocommerce-checkout form.checkout #order_review{
 width:100%!important;
 float:none!important;
 box-sizing:border-box!important;
 margin:0 0 24px!important;
 padding:24px!important;
 overflow:hidden!important;
 background:#fff!important;
 border:1px solid #f0f1f3!important;
 border-radius:var(--vira-radius)!important;
 box-shadow:0 8px 28px rgba(17,24,39,.045)!important
}

.woocommerce-checkout form.checkout #order_review{height:max-content!important}

/* -------------------------------
   بهینه‌سازی عرض ستون‌های جدول سفارش
   فقط برای جدول خلاصه سفارش در checkout
-------------------------------- */
.woocommerce-checkout form.checkout #order_review .woocommerce-checkout-review-order-table{
 width:100%!important
}

.woocommerce-checkout form.checkout #order_review .woocommerce-checkout-review-order-table th.product-name,
.woocommerce-checkout form.checkout #order_review .woocommerce-checkout-review-order-table td.product-name{
 width:50%!important
}

.woocommerce-checkout form.checkout #order_review .woocommerce-checkout-review-order-table th.product-total,
.woocommerce-checkout form.checkout #order_review .woocommerce-checkout-review-order-table td.product-total{
 width:50%!important
}

.woocommerce form .form-row{
 width:100%!important;
 float:none!important;
 display:block!important;
 margin:0 0 16px!important;
 padding:0!important
}

.woocommerce form .form-row label{
 display:block!important;
 margin:0 0 7px!important;
 color:#374151!important;
 font-size:13px!important;
 font-weight:600!important
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container--default .select2-selection--single{
 width:100%!important;
 height:46px!important;
 box-sizing:border-box!important;
 margin:0!important;
 padding:0 13px!important;
 border:1px solid #e2e5e9!important;
 border-radius:9px!important;
 background:#fafbfc!important;
 color:var(--vira-text)!important;
 line-height:46px!important;
 transition:border-color .2s,box-shadow .2s,background .2s!important
}

.woocommerce form .form-row textarea{
 min-height:100px!important;
 line-height:1.8!important;
 padding-block:10px!important
}

.select2-container--default .select2-selection--single{
 height:46px!important
}

.select2-container--default .select2-selection--single .select2-selection__rendered{
 padding:0!important;
 line-height:46px!important
}

.select2-container--default .select2-selection--single .select2-selection__arrow{
 height:44px!important
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus{
 outline:0!important;
 border-color:#a8c7ff!important;
 background:#fff!important;
 box-shadow:0 0 0 3px rgba(37,99,235,.1)!important
}

@media(min-width:768px){
 .woocommerce-billing-fields__field-wrapper,
 .woocommerce-shipping-fields__field-wrapper{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:0 18px!important
 }

 .woocommerce-billing-fields__field-wrapper .form-row,
 .woocommerce-shipping-fields__field-wrapper .form-row{
  grid-column:1/-1!important
 }

 #billing_first_name_field,
 #shipping_first_name_field,
 #billing_state_field,
 #shipping_state_field,
 #billing_phone_field{
  grid-column:1!important
 }

 #billing_last_name_field,
 #shipping_last_name_field,
 #billing_city_field,
 #shipping_city_field,
 #billing_email_field{
  grid-column:2!important
 }
}

#payment{
 margin:18px 0 0!important;
 padding-top:0!important;
 background:transparent!important
}

#payment .payment_methods li,
.woocommerce-shipping-totals ul#shipping_method li{
 margin:0 0 9px!important;
 padding:0!important;
 list-style:none!important
}

.woocommerce-checkout #payment .place-order{
 width:100%!important;
 margin:0!important;
 padding:16px 0 0!important
}

.woocommerce-checkout #payment #place_order{
 width:100%!important;
 min-height:56px!important;
 height:auto!important;
 padding:15px 20px!important;
 border:0!important;
 border-radius:11px!important;
 background:linear-gradient(135deg,var(--vira-orange),var(--vira-orange-hover))!important;
 color:#fff!important;
 font-size:16px!important;
 font-weight:800!important;
 box-shadow:0 8px 20px rgba(255,90,0,.2)!important;
 transition:transform .2s,box-shadow .2s!important
}

.woocommerce-checkout #payment #place_order:hover{
 transform:translateY(-2px)!important;
 box-shadow:0 11px 25px rgba(255,90,0,.28)!important
}

.woocommerce-form-coupon-toggle{display:none!important}

.woocommerce-checkout form.checkout #order_review .vira-vpn-warning{
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
 width:100%!important;
 min-height:44px!important;
 box-sizing:border-box!important;
 margin:0 0 12px!important;
 padding:9px 13px!important;
 border:1px solid #cfe0ff!important;
 border-right:3px solid #6b9cff!important;
 border-radius:9px!important;
 background:#f3f7ff!important;
 color:#2854a6!important;
 font-size:12px!important;
 font-weight:600!important;
 line-height:1.8!important;
 text-align:center!important
}

.woocommerce-checkout form.checkout #order_review .vira-vpn-warning:before{
 content:"⚠"!important;
 margin-left:8px!important;
 color:#3975e8!important;
 font-size:15px!important;
 line-height:1!important
}

.woocommerce-checkout form.checkout #order_review form.checkout_coupon{
 display:flex!important;
 flex-wrap:wrap!important;
 align-items:center!important;
 gap:9px!important;
 width:100%!important;
 box-sizing:border-box!important;
 margin:14px 0 0!important;
 padding:14px!important;
 border:1px solid #edf0f3!important;
 border-radius:11px!important;
 background:#fff!important;
 box-shadow:0 4px 14px rgba(17,24,39,.035)!important
}

.woocommerce-checkout form.checkout #order_review form.checkout_coupon:before{
 content:"کد تخفیف دارید؟"!important;
 flex:0 0 100%!important;
 margin:0 0 2px!important;
 color:#374151!important;
 font-size:13px!important;
 font-weight:700!important;
 line-height:1.8!important
}

.woocommerce-checkout form.checkout #order_review form.checkout_coupon:after{
 display:none!important;
 content:none!important
}

.woocommerce-checkout form.checkout #order_review form.checkout_coupon p.form-row-first,
.woocommerce-checkout form.checkout #order_review form.checkout_coupon p.form-row-last{
 float:none!important;
 width:auto!important;
 margin:0!important;
 padding:0!important
}

.woocommerce-checkout form.checkout #order_review form.checkout_coupon p.form-row-first{
 flex:1 1 auto!important;
 min-width:0!important
}

.woocommerce-checkout form.checkout #order_review form.checkout_coupon p.form-row-last{
 flex:0 0 116px!important
}

.woocommerce-checkout form.checkout #order_review form.checkout_coupon input.input-text{
 width:100%!important;
 height:43px!important;
 box-sizing:border-box!important;
 margin:0!important;
 padding:0 12px!important;
 border:1px solid #dfe4ea!important;
 border-radius:8px!important;
 background:#fafbfc!important;
 line-height:43px!important
}

.woocommerce-checkout form.checkout #order_review form.checkout_coupon input.input-text:focus{
 outline:0!important;
 border-color:#8db2ff!important;
 background:#fff!important;
 box-shadow:0 0 0 3px rgba(37,99,235,.1)!important
}

.woocommerce-checkout form.checkout #order_review form.checkout_coupon button.button{
 width:100%!important;
 min-width:0!important;
 height:43px!important;
 margin:0!important;
 padding:0 12px!important;
 border:0!important;
 border-radius:8px!important;
 background:var(--vira-blue)!important;
 color:#fff!important;
 font-size:12px!important;
 font-weight:700!important;
 line-height:43px!important;
 box-shadow:none!important
}

.woocommerce-checkout form.checkout #order_review form.checkout_coupon button.button:hover{
 background:#1d4ed8!important;
 color:#fff!important
}

@media(max-width:767px){
 .woocommerce-checkout form.checkout{
  display:block!important
 }

 .woocommerce-checkout form.checkout #customer_details .col-1,
 .woocommerce-checkout form.checkout #customer_details .col-2,
 .woocommerce-checkout form.checkout #order_review{
  margin-bottom:16px!important;
  padding:17px!important;
  border-radius:12px!important
 }
}

@media(max-width:480px){
 .woocommerce-checkout form.checkout #order_review form.checkout_coupon{
  display:block!important
 }

 .woocommerce-checkout form.checkout #order_review form.checkout_coupon p.form-row-first,
 .woocommerce-checkout form.checkout #order_review form.checkout_coupon p.form-row-last{
  display:block!important;
  width:100%!important;
  margin:0 0 9px!important
 }

 .woocommerce-checkout form.checkout #order_review form.checkout_coupon p.form-row-last{
  margin-bottom:0!important
 }
}

.woocommerce-order{
 width:100%!important;
 max-width:100%!important;
 margin:0!important
}

.woocommerce-order .woocommerce-notice--success{
 margin-bottom:25px!important;
 padding:18px!important;
 border:1px solid #bbf7d0!important;
 border-radius:11px!important;
 background:#f0fdf4!important;
 color:#166534!important;
 text-align:center!important;
 font-weight:700!important
}

.woocommerce-order>ul.woocommerce-order-overview,
.woocommerce-order .woocommerce-order-details,
.woocommerce-order .woocommerce-customer-details{
 margin-bottom:22px!important;
 padding:24px!important;
 border:1px solid #f0f1f3!important;
 border-radius:var(--vira-radius)!important;
 background:#fff!important;
 box-shadow:0 8px 28px rgba(17,24,39,.045)!important
}

.woocommerce-order ul.woocommerce-order-overview{
 display:flex!important;
 flex-wrap:wrap!important;
 justify-content:space-between!important;
 gap:12px!important;
 list-style:none!important
}

.woocommerce-order ul.woocommerce-order-overview li{
 flex:1 1 auto!important;
 margin:0!important;
 padding-right:14px!important;
 border-right:1px solid #eef0f2!important;
 text-align:right!important
}

.woocommerce-order ul.woocommerce-order-overview li:first-child{
 padding-right:0!important;
 border-right:0!important
}

.woocommerce-order ul.woocommerce-order-overview li strong{
 display:block!important;
 margin-top:6px!important;
 color:#1f2937!important
}

.woocommerce-order h2{
 margin:0 0 17px!important;
 padding-bottom:10px!important;
 border-bottom:1px solid #eef0f2!important;
 color:#1f2937!important;
 font-size:19px!important;
 font-weight:800!important
}


/* بج معافیت مالیاتی درگاه کارت‌به‌کارت */
.woocommerce-checkout .vira-tax-free-badge{
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 box-sizing:border-box!important;
 margin-right:8px!important;
 padding:4px 10px!important;
 border:1px solid #86efac!important;
 border-radius:999px!important;
 background:#dcfce7!important;
 color:#166534!important;
 font-size:12px!important;
 font-weight:700!important;
 line-height:1.6!important;
 white-space:nowrap!important;
 vertical-align:middle!important;
 box-shadow:0 2px 6px rgba(22,101,52,.08)!important
}

@media(max-width:480px){
 .woocommerce-checkout .vira-tax-free-badge{
  margin-top:5px!important;
  margin-right:0!important;
  font-size:12px!important
 }
}
