/* ==========================================================================
   HostForge — بازطراحی صفحه‌ی سفارش / سبد خرید (سبک ModulesGarden)
   روی قالب سفارش استاندارد WHMCS اعمال می‌شود؛ فقط ظاهر را عوض می‌کند و
   منطق سفارش/پرداخت/جمع‌کل کاملاً دست‌نخورده باقی می‌ماند.
   فقط در صفحات cart.php بارگذاری می‌شود (توسط هوک ClientAreaHeadOutput).
   متغیرهای --hf-* از custom.css در دسترس‌اند.
   ========================================================================== */

#order-standard_cart{
  font-family:'Vazirmatn',sans-serif;direction:rtl;text-align:right;color:var(--hf-ink);
}
#order-standard_cart *{letter-spacing:normal!important}

/* سرصفحه‌ی صفحه */
#order-standard_cart .header-lined{border:0;margin-bottom:6px}
#order-standard_cart .header-lined h1{font-size:30px;font-weight:800;color:var(--hf-ink);margin:8px 0 20px;border:0;padding:0}

/* ---------- حذف کامل دامنه از نوار کناری و انتخاب گروه ---------- */
#Secondary_Sidebar-Actions-Domain_Registration,
#Secondary_Sidebar-Actions-Domain_Transfer,
#order-standard_cart option[value*="domain=register"],
#order-standard_cart option[value*="domain=transfer"]{display:none!important}

/* ---------- کارت‌ها / پنل‌ها ---------- */
#order-standard_cart .panel,
#order-standard_cart .card,
#order-standard_cart .card-sidebar{
  border:1px solid var(--hf-line)!important;border-radius:var(--hf-radius)!important;
  box-shadow:0 12px 34px -26px rgba(18,24,42,.45);background:#fff;overflow:hidden;margin-bottom:18px;
}
#order-standard_cart .panel-heading,
#order-standard_cart .card-header{
  background:var(--hf-paper-2)!important;border-bottom:1px solid var(--hf-line)!important;padding:14px 18px;
}
#order-standard_cart .panel-title{font-size:15px;font-weight:700;color:var(--hf-ink);margin:0}
#order-standard_cart .panel-title i{color:var(--hf-accent)}
#order-standard_cart .panel-body,
#order-standard_cart .card-body{padding:18px}

/* ---------- نوار کناری (عملیات) ---------- */
#order-standard_cart .cart-sidebar .list-group{border:0}
#order-standard_cart .cart-sidebar .list-group-item{
  border:0!important;border-radius:10px;color:var(--hf-ink-soft);font-weight:500;padding:11px 12px;
  margin-bottom:2px;transition:.15s;background:transparent;
}
#order-standard_cart .cart-sidebar .list-group-item:hover{background:#eef2ff;color:var(--hf-accent)}
#order-standard_cart .cart-sidebar .list-group-item i{color:var(--hf-accent)}

/* ---------- گرید محصولات ---------- */
#order-standard_cart .products .product,
#order-standard_cart .product{
  background:#fff;border:1px solid var(--hf-line);border-radius:var(--hf-radius);
  padding:22px;transition:.18s ease;height:100%;position:relative;
}
#order-standard_cart .products .product:hover{
  border-color:var(--hf-accent);transform:translateY(-3px);
  box-shadow:0 18px 44px -26px rgba(45,91,255,.5);
}
#order-standard_cart .product h3,
#order-standard_cart .product .product-name{font-size:18px;font-weight:700;color:var(--hf-ink);margin-bottom:8px}
#order-standard_cart .product .price,
#order-standard_cart .product .product-price{color:var(--hf-accent);font-weight:800;font-size:20px}

/* ---------- آیتم‌های سبد خرید ---------- */
.view-cart-items-header{
  background:var(--hf-ink);color:#fff;border-radius:12px 12px 0 0;padding:14px 18px;font-weight:700;font-size:13.5px;
}
.view-cart-items{border:1px solid var(--hf-line);border-top:0;border-radius:0 0 12px 12px;background:#fff}
.view-cart-items .item{border-bottom:1px solid var(--hf-line);padding:16px 18px}
.view-cart-items .item:last-child{border-bottom:0}
.view-cart-items .item-title,.view-cart-items .cart-item-name{font-weight:700;color:var(--hf-ink)}
.view-cart-empty{padding:56px 20px;text-align:center;color:var(--hf-muted);font-size:15px;background:#fff;border:1px dashed var(--hf-line);border-radius:0 0 12px 12px}

/* ---------- تب‌های کوپن تخفیف ---------- */
.view-cart-tabs{margin-top:20px}
.view-cart-tabs .nav-tabs{border-bottom:1px solid var(--hf-line)}
.view-cart-tabs .nav-tabs .nav-link{border:0;color:var(--hf-muted);font-weight:600;border-bottom:2px solid transparent}
.view-cart-tabs .nav-tabs .nav-link.active{color:var(--hf-accent);background:transparent;border-bottom-color:var(--hf-accent)}
.view-cart-tabs .tab-content{padding:18px 0}

/* ---------- خلاصه‌ی سفارش ---------- */
.order-summary{
  position:sticky;top:88px;background:#fff;border:1px solid var(--hf-line);
  border-radius:var(--hf-radius);padding:22px;box-shadow:0 12px 34px -26px rgba(18,24,42,.45);
}
.order-summary .summary-container{font-size:14px;color:var(--hf-ink-soft)}
.order-summary .subtotal,
.order-summary .recurring-totals,
.order-summary .promo-discount{padding:9px 0;border-bottom:1px dashed var(--hf-line)}
.order-summary .total-due-today{
  margin-top:14px;padding-top:16px;border-top:2px solid var(--hf-line);
  display:flex;align-items:center;justify-content:space-between;
}
.order-summary .total-due-today .amt,
.order-summary #totalDueToday{color:var(--hf-accent);font-weight:800;font-size:24px}

/* دکمه‌ی تسویه */
#checkout,.btn-checkout{
  display:block;width:100%;text-align:center;background:var(--hf-accent)!important;border:0!important;
  color:#fff!important;font-weight:700;font-size:16px;padding:15px!important;border-radius:12px!important;
  margin-top:16px;transition:background .16s;
}
#checkout:hover,.btn-checkout:hover{background:var(--hf-accent-ink)!important}
#checkout.disabled,.btn-checkout.disabled{opacity:.55}
.express-checkout-buttons{margin-top:12px}

/* ---------- دکمه‌های عمومی ---------- */
#order-standard_cart .btn-primary{background:var(--hf-accent);border-color:var(--hf-accent);border-radius:10px;font-weight:600}
#order-standard_cart .btn-primary:hover{background:var(--hf-accent-ink);border-color:var(--hf-accent-ink)}
#order-standard_cart .btn-success{background:var(--hf-teal);border-color:var(--hf-teal);border-radius:10px;font-weight:700}
#order-standard_cart .btn-default,#order-standard_cart .btn-secondary{border-radius:10px;border:1px solid var(--hf-line);background:#fff;color:var(--hf-ink-soft)}
#order-standard_cart .form-control,#order-standard_cart .custom-select{
  border:1px solid var(--hf-line);border-radius:10px;padding:10px 12px;font-family:inherit;
}
#order-standard_cart .form-control:focus,#order-standard_cart .custom-select:focus{
  border-color:var(--hf-accent);box-shadow:0 0 0 3px rgba(45,91,255,.12);outline:none;
}

/* ==========================================================================
   بازطراحی صفحه‌ی تسویه v2 — دو ستون مجزا (ورود | ثبت‌نام) + پرداخت دوستونه
   منطق فرم دست‌نخورده است؛ فقط چیدمان و ظاهر.
   ========================================================================== */

/* عنوان صفحه — وسط‌چین */
#order-standard_cart .header-lined h1.hf-co-title{text-align:center;font-size:26px;font-weight:800;color:var(--hf-ink);border:0;margin:8px 0 24px}
#order-standard_cart .header-lined{border:0}

/* دکمه‌های سوییچ پیش‌فرض حذف — هر دو فرم همزمان دیده می‌شوند */
#order-standard_cart .already-registered{display:none!important}

/* ---------- دو ستون مجزا: ورود (راست) | ثبت‌نام (چپ) ---------- */
#order-standard_cart .hf-co-cols{display:grid;grid-template-columns:1fr 1.75fr;gap:26px;align-items:start;margin-bottom:6px}
@media(max-width:900px){#order-standard_cart .hf-co-cols{grid-template-columns:1fr}}

#order-standard_cart #containerExistingUserSignin,
#order-standard_cart #containerNewUserSignup{
  background:#fff;border:1px solid var(--hf-line);border-radius:16px;padding:24px 26px;margin:0;
  box-shadow:0 14px 40px -30px rgba(15,23,41,.5);
}
#order-standard_cart #containerExistingUserSignin{border-top:3px solid var(--hf-teal)}
#order-standard_cart #containerNewUserSignup{border-top:3px solid var(--hf-accent)}
/* نکته: کلاس w-hidden را با !important بازتعریف نکنید — تم خودش .w-hidden دارد و
   جاوااسکریپت WHMCS (نمایش خطای ورود، «لطفاً صبر کنید» و…) با استایل اینلاین بازش می‌کند. */

/* هم‌ترازی سرتیترها: اولین سرتیتر هر کارت بدون فاصله‌ی بالا */
#order-standard_cart .sub-heading{margin:20px 0 14px;border:0}
#order-standard_cart .sub-heading .primary-bg-color{
  display:block;font-size:15px;font-weight:800;color:var(--hf-ink);background:none!important;
  padding:0 0 10px;border-bottom:2px solid var(--hf-line);
}
#order-standard_cart #containerExistingUserSignin > .sub-heading:first-child,
#order-standard_cart #containerNewUserSignup .sub-heading:first-of-type{margin-top:0}
#order-standard_cart #containerNewUserSignup > div:first-child{margin:0}

/* لیبل بالای فیلدها */
#order-standard_cart .hf-lbl{display:block;font-size:13px;font-weight:700;color:var(--hf-ink);margin-bottom:6px}
#order-standard_cart .hf-login-hint{font-size:12.5px;color:var(--hf-muted);margin:0 0 14px;line-height:1.9}

/* فیلدهای ستون ورود تمام‌عرض و زیر هم */
#order-standard_cart #containerExistingUserSignin .hf-login-field{flex:0 0 100%;max-width:100%}

/* فیلدها */
#order-standard_cart .field.form-control,#order-standard_cart select.form-control{
  height:auto;padding:11px 13px;border:1px solid var(--hf-line);border-radius:11px;font-size:14px;
}
#order-standard_cart .field.form-control:focus,#order-standard_cart select.form-control:focus{
  border-color:var(--hf-accent);box-shadow:0 0 0 3px rgba(45,91,255,.12);
}
#order-standard_cart .field-icon{display:none}

/* دکمه‌ی ورود */
#order-standard_cart #btnExistingLogin{background:var(--hf-teal);border:0;border-radius:11px;padding:12px 22px;font-weight:700;width:100%;color:#fff}
#order-standard_cart #btnExistingLogin:hover{background:#0e9d72}

/* ---------- رفع بیرون‌زدگی کد کشور موبایل (intl-tel-input) ---------- */
#order-standard_cart .iti,#order-standard_cart .intl-tel-input{width:100%!important;direction:ltr}
#order-standard_cart .iti input,#order-standard_cart .intl-tel-input input{width:100%!important;text-align:left}
#order-standard_cart .iti__country-list,#order-standard_cart .country-list{max-width:280px;max-height:220px;overflow:auto;z-index:1060;direction:ltr;text-align:left}
#order-standard_cart .iti--container{z-index:1060}

/* ---------- کارت اطلاعات کاربر واردشده ---------- */
#order-standard_cart .hf-userinfo{
  background:#fff;border:1px solid var(--hf-line);border-top:3px solid var(--hf-accent);border-radius:16px;
  padding:22px 26px;margin-bottom:24px;box-shadow:0 14px 40px -30px rgba(15,23,41,.5);
  direction:rtl;text-align:right;
}
#order-standard_cart .hf-ui-head{display:flex;align-items:center;gap:14px;padding-bottom:16px;border-bottom:1px solid var(--hf-line);flex-wrap:wrap}
#order-standard_cart .hf-ui-av{width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#eaf0ff,#dfe7ff);color:var(--hf-accent);display:grid;place-items:center;font-size:20px;flex-shrink:0}
#order-standard_cart .hf-ui-id b{display:block;font-size:16px;color:var(--hf-ink)}
#order-standard_cart .hf-ui-id small{color:var(--hf-muted);font-size:12.5px}
#order-standard_cart .hf-ui-badge{margin-inline-start:auto;background:#e6f7ef;border:1px solid #9fe0c4;color:#0a6b45;border-radius:20px;padding:6px 14px;font-size:12.5px;font-weight:700}
#order-standard_cart .hf-ui-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;padding-top:16px}
@media(max-width:760px){#order-standard_cart .hf-ui-grid{grid-template-columns:1fr 1fr}}
@media(max-width:480px){#order-standard_cart .hf-ui-grid{grid-template-columns:1fr}}
#order-standard_cart .hf-ui-item{background:var(--hf-paper-2);border:1px solid var(--hf-line);border-radius:12px;padding:12px 14px}
#order-standard_cart .hf-ui-item .k{display:block;font-size:12px;color:var(--hf-muted);margin-bottom:4px}
#order-standard_cart .hf-ui-item .v{font-weight:800;font-size:14px;color:var(--hf-ink)}

/* ---------- جداکننده‌ی بین فرم‌ها و پرداخت ---------- */
#order-standard_cart .hf-co-sep{display:flex;align-items:center;gap:16px;margin:32px 0 26px}
#order-standard_cart .hf-co-sep::before,#order-standard_cart .hf-co-sep::after{content:"";flex:1;height:2px;background:var(--hf-line);border-radius:2px}
#order-standard_cart .hf-co-sep span{font-weight:800;color:var(--hf-ink);font-size:17px;display:inline-flex;align-items:center;gap:9px}
#order-standard_cart .hf-co-sep i{color:var(--hf-accent)}

/* ---------- پرداخت دوستونه: راست خلاصه | چپ درگاه‌ها ---------- */
#order-standard_cart .hf-pay-grid{display:grid;grid-template-columns:1.05fr 1fr;gap:26px;align-items:start}
@media(max-width:900px){#order-standard_cart .hf-pay-grid{grid-template-columns:1fr}}
#order-standard_cart .hf-pay-summary,#order-standard_cart .hf-pay-methods{
  background:#fff;border:1px solid var(--hf-line);border-radius:16px;padding:22px 24px;
  box-shadow:0 14px 40px -30px rgba(15,23,41,.5);
}
#order-standard_cart .hf-ps-title{display:flex;align-items:center;gap:10px;font-size:16px;font-weight:800;color:var(--hf-ink);margin:0 0 16px;padding-bottom:12px;border-bottom:2px solid var(--hf-line)}
#order-standard_cart .hf-ps-title i{color:var(--hf-accent)}

/* آیتم‌های سفارش */
#order-standard_cart .hf-ps-items{margin-bottom:8px}
#order-standard_cart .hf-ps-item{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px dashed var(--hf-line);font-size:14px}
#order-standard_cart .hf-ps-item .t{color:var(--hf-ink);font-weight:600}
#order-standard_cart .hf-ps-item .t .q{color:var(--hf-accent)}
#order-standard_cart .hf-ps-item .p{color:var(--hf-ink-soft);font-weight:700;white-space:nowrap}
#order-standard_cart .hf-ps-row{display:flex;align-items:center;justify-content:space-between;padding:9px 0;border-bottom:1px dashed var(--hf-line);font-size:13.5px;color:var(--hf-ink-soft)}
#order-standard_cart .hf-ps-row .v{font-weight:700}

/* جمع کل */
#order-standard_cart #totalDueToday.hf-ps-total{
  background:#eef2ff;border:1px solid #dbe4ff;color:var(--hf-ink);border-radius:12px;
  font-weight:800;font-size:16px;margin-top:16px;
}
#order-standard_cart #totalDueToday #totalCartPrice{color:var(--hf-accent);font-size:20px}

/* اعمال اعتبار */
#order-standard_cart .apply-credit-container{background:var(--hf-paper-2);border:1px solid var(--hf-line);border-radius:12px;padding:14px 16px;margin-top:14px;font-size:13px}

/* ---------- درگاه‌های پرداخت: تایل‌ها ---------- */
#order-standard_cart #paymentGatewaysContainer > p{font-size:12.5px;color:var(--hf-muted)}
#order-standard_cart #paymentGatewaysContainer .text-center{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-start;text-align:right}
#order-standard_cart #paymentGatewaysContainer .radio-inline{
  display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  border:1.5px solid var(--hf-line);border-radius:13px;padding:14px 18px;min-width:110px;min-height:74px;
  cursor:pointer;transition:.16s;margin:0;position:relative;background:#fff;
}
#order-standard_cart #paymentGatewaysContainer .radio-inline:hover{border-color:var(--hf-accent)}
#order-standard_cart #paymentGatewaysContainer .radio-inline.hf-on{border-color:var(--hf-accent);background:#f6f9ff;box-shadow:0 0 0 3px rgba(45,91,255,.12)}
#order-standard_cart #paymentGatewaysContainer input.payment-methods{accent-color:var(--hf-accent);margin:0}

/* دکمه‌ی نهایی پرداخت */
#order-standard_cart #btnCompleteOrder{
  background:var(--hf-accent)!important;border:0!important;border-radius:13px!important;
  padding:15px 28px!important;font-weight:800;font-size:16px;width:100%;
}
#order-standard_cart #btnCompleteOrder:hover{background:var(--hf-accent-ink)!important}
#order-standard_cart #accepttos{accent-color:var(--hf-accent);width:17px;height:17px}

/* هشدارها */
#order-standard_cart .alert{border-radius:12px;border:1px solid var(--hf-line)}
#order-standard_cart .alert-danger{background:#fdecec;border-color:#f3b7b7;color:#a11}

/* واکنش‌گرا: خلاصه زیر محتوا */
@media(max-width:991px){
  .order-summary{position:static;top:auto;margin-top:18px}
}
