/**
 * Payment Gateway Selector & Form Styles
 * Dedicated stylesheet for gateway cards, responsive grid, and submit buttons across all forms.
 */

.payment-gateway-wrapper {
    margin-top: 12px;
    margin-bottom: 18px;
    width: 100%;
    max-width: 100%;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}

.payment-gateway-label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    color: #333333;
    font-size: 14px;
}

.payment-gateway-desc {
    display: block;
    font-size: 13px;
    color: #666666;
    margin-bottom: 10px;
    line-height: 1.5;
    font-weight: normal;
}

.payment-gateway-required {
    color: #d9534f;
    margin-left: 3px;
    font-weight: bold;
}

.payment-gateway-grid {
    display: grid;
    grid-template-columns: repeat(var(--gateway-desktop-cols, 5), 1fr);
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.payment-gateway-grid .gateway-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 0 !important;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    user-select: none;
    box-sizing: border-box;
    text-align: center;
    outline: none;
    overflow: hidden;
}

.payment-gateway-grid .gateway-card:hover {
    border-color: #94a3b8;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.payment-gateway-grid .gateway-card.active {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

.payment-gateway-grid .gateway-card:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.payment-gateway-grid .gateway-card:active {
    transform: scale(0.98);
}

.payment-gateway-grid .gateway-radio-hidden {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
    pointer-events: none;
}

.payment-gateway-grid .gateway-check-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50% !important;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-shadow: none;
    z-index: 2;
    box-sizing: border-box;
}

.payment-gateway-grid .gateway-check-badge svg {
    display: none !important;
}

.payment-gateway-grid .gateway-check-badge::after {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50% !important;
    background: #ffffff;
    opacity: 0;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.payment-gateway-grid .gateway-card:hover:not(.active) .gateway-check-badge {
    border-color: #94a3b8;
    background: #ffffff;
}

.payment-gateway-grid .gateway-card.active .gateway-check-badge {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.payment-gateway-grid .gateway-card.active .gateway-check-badge::after {
    opacity: 1;
    transform: scale(1);
}

.payment-gateway-grid .gateway-logo-wrap {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    pointer-events: none;
    border-radius: 0 !important;
    background: #ffffff;
    overflow: hidden;
}

.payment-gateway-grid .gateway-logo-img {
    width: 100%;
    height: 100%;
    max-height: 80px;
    object-fit: contain;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    filter: none !important;
    outline: none !important;
    background: transparent !important;
    mix-blend-mode: multiply;
    transition: transform 0.2s ease;
    display: block;
}

.payment-gateway-grid .gateway-card:hover .gateway-logo-img {
    transform: scale(1.04);
    box-shadow: none !important;
    filter: none !important;
}

.payment-gateway-grid .gateway-fallback-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: #f1f5f9;
    border: none !important;
    box-shadow: none !important;
}

.payment-gateway-grid .gateway-title {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 6px 8px 6px !important;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    text-align: center;
    line-height: 1.25;
    margin: 0;
    word-break: break-word;
    transition: color 0.2s ease;
    pointer-events: none;
    border-radius: 0 !important;
}

.payment-gateway-grid .gateway-card.active .gateway-title {
    color: #1d4ed8;
    font-weight: 700;
}

/* Responsive Grid - Tablet & Mobile (3 columns) */
@media (max-width: 1024px) {
    .payment-gateway-grid {
        grid-template-columns: repeat(var(--gateway-tablet-cols, 3), 1fr) !important;
        gap: 6px;
    }
    .payment-gateway-grid .gateway-card {
        padding: 0 !important;
        border-radius: 0 !important;
    }
    .payment-gateway-grid .gateway-logo-wrap {
        height: 62px;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box;
    }
    .payment-gateway-grid .gateway-logo-img {
        width: 100%;
        height: 100%;
        max-height: 62px;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        filter: none !important;
        border: none !important;
    }
    .payment-gateway-grid .gateway-fallback-icon {
        width: 55px;
        height: 55px;
    }
    .payment-gateway-grid .gateway-title {
        font-size: 11px;
        line-height: 1.2;
        padding: 4px 4px 6px 4px !important;
    }
    .payment-gateway-grid .gateway-check-badge {
        width: 14px;
        height: 14px;
        top: 2px;
        left: 2px;
    }
    .payment-gateway-grid .gateway-check-badge svg {
        width: 9px;
        height: 9px;
    }
    .payment-gateway-desc {
        font-size: 12px;
        margin-bottom: 8px;
    }
}

@media (max-width: 380px) {
    .payment-gateway-grid {
        gap: 4px;
    }
    .payment-gateway-grid .gateway-logo-wrap {
        height: 50px;
        padding: 0 !important;
        box-sizing: border-box;
    }
    .payment-gateway-grid .gateway-logo-img {
        max-height: 50px;
    }
    .payment-gateway-grid .gateway-title {
        font-size: 9px;
        padding: 3px 2px 5px 2px !important;
    }
}

/* ==========================================================================
   Submit Button & Form Container Styles (All Order Forms)
   ========================================================================== */

/* Standard Gateway Submit Button (User Panel) */
.btn-gateway-pay {
    min-width: 150px;
    font-weight: bold;
    margin-bottom: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
}

.btn-gateway-pay:disabled,
.btn-gateway-pay.disabled {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
    transform: none !important;
    filter: grayscale(35%);
}

.btn-gateway-pay .btn-gateway-icon {
    margin: 0 !important;
    font-size: 13px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

/* File Order Form Submit Button (Standard Default Style) */
.btn.btn-gateway-pay-file,
.btn-gateway-pay-file {
    margin-top: 20px !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 9px 16px !important;
    font-size: 15px !important;
    line-height: 22px !important;
    font-weight: bold;
    border-radius: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
    box-sizing: border-box !important;
}

.btn-gateway-pay-file .btn-gateway-icon {
    font-size: 13px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
}

/* Form Container Layout Helpers */
.gateway-container-file {
    padding: 0;
    margin-top: 13px;
    margin-bottom: 13px;
    width: 100% !important;
    float: none !important;
    clear: both;
}

.download:has(.fileBuyForm),
.download:has(.gateway-container-file),
.download.download-showform {
    padding-bottom: 35px !important;
}

.gateway-container-panel {
    margin-top: 16px !important;
}

.gateway-container-panel .payment-gateway-label {
    margin-top: 20px !important;
}

/* In panel order forms (SMS & Subscriptions), tablet sizes (up to 1199px) display 3 items per row */
@media (min-width: 769px) and (max-width: 1199.98px) {
    .gateway-container-panel .payment-gateway-grid {
        grid-template-columns: repeat(var(--gateway-tablet-cols, 3), 1fr) !important;
        gap: 6px;
    }
}

/* In panel order forms (SMS & Subscriptions), mobile button layout */
@media (max-width: 767.98px) {
    .gateway-container-panel .btn-gateway-pay {
        width: 100% !important;
        height: 2.5rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-weight: bold !important;
        margin-top: 10px !important;
        margin-bottom: 0 !important;
    }
    .gateway-container-panel .btn-gateway-back {
        display: none !important;
    }
}

/* Order Forms (SMS & Subscriptions) Summary Box & Buttons */
.order-summary-col {
    margin-bottom: 15px;
}

.order-summary-card,
.payment-box {
    position: relative;
    padding: 0 !important;
    background: linear-gradient(145deg, #f7fee7 0%, #ecfdf5 45%, #f0fdf4 100%);
    border: 1px solid rgba(16, 185, 129, 0.26);
    border-right: 4px solid #10b981;
    border-radius: 0;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.order-summary-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 30px 15px;
    text-align: center;
}

.order-summary-loading i.fa {
    font-size: 1.8rem;
    color: #10b981;
    margin-bottom: 12px;
}

.order-summary-loading span {
    font-size: 1rem;
    font-weight: 500;
    color: #065f46;
}

.order-summary-card .form-group,
.payment-box .form-group {
    margin-bottom: 0 !important;
}

.order-summary-card .form-group:not(.row),
.payment-box .form-group:not(.row) {
    display: none !important;
}

.order-summary-card .form-group.row,
.payment-box .form-group.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    align-items: center;
    border-bottom: none !important;
    position: relative;
}

/* خطوط مابین با موقعیت مطلق جهت جلوگیری از باگ ساب‌پیکسل و ضخیم‌شدن در فایرفاکس */
.order-summary-card .form-group.row:not(:last-child):not(.order-final-price)::after,
.payment-box .form-group.row:not(:last-child):not(.order-final-price)::after,
.order-summary-card #expiryPreviewArea .form-group.row::after,
.payment-box #expiryPreviewArea .form-group.row::after,
.order-summary-card .order-expiry-row::after,
.payment-box .order-expiry-row::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 1px;
    min-height: 1px;
    max-height: 1px;
    line-height: 0 !important;
    font-size: 0 !important;
    overflow: hidden !important;
    pointer-events: none;
    box-sizing: border-box !important;
    background-image: linear-gradient(
        to right,
        rgba(0, 0, 0, 0),
        rgba(0, 0, 0, 0.25),
        rgba(0, 0, 0, 0)
    );
    margin: 0 !important;
    padding: 0 !important;
    transform: translateZ(0);
}

/* ==========================================================================
   Order Forms (SMS & Subscriptions): یکسان‌سازی سایز فونت همه لیبل‌ها
   (فرم خرید اشتراک #submitForm و فرم خرید بسته پیامک #buyForm)
   ========================================================================== */
#submitForm label,
#buyForm label,
#submitForm .product-form-webapp-label,
#buyForm .product-form-webapp-label {
    font-size: 1rem !important;
}

/* توضیحات کمکی فرم خرید اشتراک: راهنمای شناسه سخت‌افزاری و توضیحات نسخه وب/اندروید */
#submitForm #hardwareArea .form-help-text,
#submitForm .product-form-webapp-desc {
    font-size: 0.85rem !important;
}

/* در حالت موبایل ورودی کد تخفیف ۱۰۰٪ و دکمه بررسی هم ۱۰۰٪ زیر آن قرار می‌گیرد */
@media (max-width: 767.98px) {
    #submitForm #discountArea .row > div {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    #submitForm #discountArea .discount-input-group,
    #submitForm #discountArea input#discountcode {
        width: 100% !important;
        margin-bottom: 8px !important;
    }

    #submitForm #discountArea .discount-btn-group,
    #submitForm #discountArea button#discountCheckBtn,
    #submitForm #discountArea button#discountCancelBtn {
        width: 100% !important;
        margin-bottom: 0 !important;
    }
}

.order-summary-card label,
.payment-box label {
    color: #065f46;
    font-size: 1rem !important;
    font-weight: bold !important;
    margin-bottom: 0 !important;
    line-height: 24px !important;
    padding: 14px 24px 14px 14px !important;
}

.order-summary-card [class*="col-8"],
.payment-box [class*="col-8"],
.order-summary-card .form-group.row > div,
.payment-box .form-group.row > div {
    color: #0f172a;
    font-size: 1rem !important;
    line-height: 24px !important;
    padding: 14px 14px 14px 38px !important;
    margin-bottom: 0 !important;
}

.order-summary-card span,
.payment-box span {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
}

.order-summary-card .sms-gift-badge,
.order-summary-card .sms-gift-badge span,
.order-summary-card #smsGiftWrap,
.order-summary-card #smsGiftWrap span,
.payment-box .sms-gift-badge,
.payment-box .sms-gift-badge span,
.payment-box #smsGiftWrap,
.payment-box #smsGiftWrap span {
    color: #065f46 !important;
    font-weight: 700 !important;
}

#smsGiftWrap.hidden,
.order-summary-card #smsGiftWrap.hidden,
.payment-box #smsGiftWrap.hidden {
    display: none !important;
}

#hardwareIdText {
    direction: ltr !important;
    display: inline-block;
    unicode-bidi: embed;
}

.order-summary-card hr,
.payment-box hr {
    display: none !important;
}

.order-summary-card .order-final-price,
.payment-box .order-final-price {
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(16, 185, 129, 0.09) !important;
    border-top: none !important;
    border-bottom: none !important;
    border-radius: 0;
    align-items: center !important;
}

.order-summary-card .order-final-price label,
.payment-box .order-final-price label {
    color: #047857 !important;
    font-size: 1rem !important;
    font-weight: bold !important;
    margin-bottom: 0 !important;
    padding: 14px 24px 14px 14px !important;
}

.order-summary-card .order-final-price span,
.payment-box .order-final-price span {
    color: #065f46 !important;
    font-size: 1.3rem !important;
    font-weight: 800 !important;
}

@media (max-width: 767.98px) {
    .order-summary-card,
    .payment-box {
        padding: 0 !important;
    }

    .order-summary-card .form-group.row,
    .payment-box .form-group.row,
    .order-summary-card .order-final-price,
    .payment-box .order-final-price {
        display: flex;
        flex-direction: column !important;
        align-items: flex-start !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .order-summary-card .form-group.row[style*="display: none"],
    .order-summary-card .form-group.row[style*="display:none"],
    .payment-box .form-group.row[style*="display: none"],
    .payment-box .form-group.row[style*="display:none"],
    .order-summary-card .form-group.row.d-none,
    .payment-box .form-group.row.d-none {
        display: none !important;
    }

    .order-summary-card .form-group.row > label,
    .payment-box .form-group.row > label,
    .order-summary-card .form-group.row > [class*="col-"],
    .payment-box .form-group.row > [class*="col-"],
    .order-summary-card .order-final-price > [class*="col-"],
    .payment-box .order-final-price > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* عناوین در موبایل: فاصله ۱۴ پیکسل از بالا و ۱۴ پیکسل از مقدار، پدینگ چپ و راست ۱۷ پیکسل دقیقاً مانند صفحه وریفای */
    .order-summary-card .form-group.row > label,
    .payment-box .form-group.row > label {
        padding: 14px 17px 14px 17px !important;
        margin: 0 !important;
        font-size: 1rem !important;
        font-weight: bold !important;
        line-height: 24px !important;
        text-align: right !important;
    }

    .order-summary-card .order-final-price label,
    .payment-box .order-final-price label {
        padding: 14px 17px 14px 17px !important;
        margin: 0 !important;
        font-size: 1rem !important;
        font-weight: bold !important;
        line-height: 24px !important;
        text-align: right !important;
    }

    /* مقادیر در موبایل: فاصله ۰ از عنوان بالا و ۱۴ پیکسل تا خط جداکننده زیرین، پدینگ چپ و راست ۱۷ پیکسل دقیقاً مانند صفحه وریفای */
    .order-summary-card .form-group.row > div,
    .payment-box .form-group.row > div,
    .order-summary-card .order-final-price > div,
    .payment-box .order-final-price > div {
        padding: 0 17px 14px 17px !important;
        margin: 0 !important;
        font-size: 1rem !important;
        line-height: 24px !important;
        text-align: right !important;
    }

    /* موارد تاریخ انقضا و کد سخت‌افزاری در موبایل در سطر مقدار از چپ به راست نوشته شوند */
    .order-summary-card .form-group.row.order-expiry-row > div,
    .payment-box .form-group.row.order-expiry-row > div,
    .order-summary-card .order-expiry-row > div,
    .payment-box .order-expiry-row > div,
    .order-summary-card #expiryPreviewArea .order-expiry-row > div,
    .payment-box #expiryPreviewArea .order-expiry-row > div,
    .order-summary-card #expiryPreviewArea .form-group.row:nth-child(2) > div,
    .payment-box #expiryPreviewArea .form-group.row:nth-child(2) > div,
    .order-summary-card .form-group.row.order-hardware-row > div,
    .payment-box .form-group.row.order-hardware-row > div,
    .order-summary-card .order-hardware-row > div,
    .payment-box .order-hardware-row > div,
    .order-summary-card #hardwareIdPreview > div,
    .payment-box #hardwareIdPreview > div,
    .order-summary-card .order-hardware-row [class*="col-8"],
    .payment-box .order-hardware-row [class*="col-8"],
    .order-summary-card #hardwareIdPreview [class*="col-8"],
    .payment-box #hardwareIdPreview [class*="col-8"] {
        text-align: left !important;
        direction: ltr !important;
        display: block !important;
        width: 100% !important;
    }

    .order-summary-card .form-group.row.order-expiry-row > div > span,
    .payment-box .form-group.row.order-expiry-row > div > span,
    .order-summary-card .order-expiry-row > div > span,
    .payment-box .order-expiry-row > div > span,
    .order-summary-card #expiryPreviewArea .order-expiry-row > div > span,
    .payment-box #expiryPreviewArea .order-expiry-row > div > span,
    .order-summary-card #expiryPreviewArea .form-group.row:nth-child(2) > div > span,
    .payment-box #expiryPreviewArea .form-group.row:nth-child(2) > div > span,
    .order-summary-card .form-group.row.order-hardware-row > div > span,
    .payment-box .form-group.row.order-hardware-row > div > span,
    .order-summary-card .order-hardware-row > div > span,
    .payment-box .order-hardware-row > div > span,
    .order-summary-card #hardwareIdPreview > div > span,
    .payment-box #hardwareIdPreview > div > span,
    .order-summary-card #hardwareIdText,
    .payment-box #hardwareIdText {
        text-align: left !important;
        direction: ltr !important;
    }

    /* هزینه نهایی قابل پرداخت در موبایل وسط‌چین باشد */
    .order-summary-card .form-group.row.order-final-price > div,
    .payment-box .form-group.row.order-final-price > div,
    .order-summary-card .order-final-price > div,
    .payment-box .order-final-price > div,
    .order-summary-card .order-final-price [class*="col-8"],
    .payment-box .order-final-price [class*="col-8"] {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        padding: 0 17px 14px 17px !important;
    }

    .order-summary-card .form-group.row.order-final-price > div > span,
    .payment-box .form-group.row.order-final-price > div > span,
    .order-summary-card .order-final-price > div > span,
    .payment-box .order-final-price > div > span,
    .order-summary-card .order-final-price #payableAmount,
    .payment-box .order-final-price #payableAmount,
    .order-summary-card .order-final-price #price,
    .payment-box .order-final-price #price {
        text-align: center !important;
    }

    /* هزینه اشتراک در موبایل از سمت چپ، با RTL تا جای تومان برعکس نشود */
    .order-summary-card .form-group.row.order-price-row > div,
    .payment-box .form-group.row.order-price-row > div,
    .order-summary-card .order-price-row > div,
    .payment-box .order-price-row > div,
    .order-summary-card .order-price-row [class*="col-8"],
    .payment-box .order-price-row [class*="col-8"] {
        direction: rtl !important;
        text-align: left !important;
    }
}

.btn-gateway-back {
    margin-right: 5px;
}

/* ==========================================================================
   Visual Subscription Plan Selector Cards (User Panel)
   ========================================================================== */
.subscription-plans-group {
    margin-bottom: 16px;
}

.subscription-plans-label {
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
    color: #1e293b;
    font-size: 1rem;
}

.subscription-plans-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 11px;
    margin-top: 6px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    box-sizing: border-box;
}

.subscription-plans-grid:hover {
    box-shadow: none;
}

.subscription-plans-grid::-webkit-scrollbar,
.product-select-grid::-webkit-scrollbar {
    width: 6px;
}

.subscription-plans-grid::-webkit-scrollbar-track,
.product-select-grid::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 0;
}

.subscription-plans-grid::-webkit-scrollbar-thumb,
.product-select-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 0;
}

.subscription-plans-grid::-webkit-scrollbar-thumb:hover,
.product-select-grid::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.subscription-plans-loading {
    grid-column: 1 / -1;
    width: 100%;
    padding: 14px 12px;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 1rem;
    color: #64748b;
    text-align: center;
}

.subscription-plans-loading .fa {
    margin-left: 6px;
    font-size: 1rem;
    vertical-align: middle;
}

.subscription-plan-card {
    position: relative;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 0;
    padding: 12px 10px 10px 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 70px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    outline: none;
}

.subscription-plan-card > * {
    pointer-events: none;
}

.subscription-plan-card:hover {
    border-color: #6ee7b7;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.10);
}

.subscription-plan-card:focus-visible {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.subscription-plan-card.active {
    background: linear-gradient(145deg, #f0fdf4 0%, #ecfdf5 100%);
    border-color: #10b981;
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.16);
    padding: 11px 9px 9px 9px;
}

.subscription-plan-card .plan-card-tag {
    position: absolute;
    top: -8px;
    right: 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 0.70rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 0;
    box-shadow: 0 2px 5px rgba(217, 119, 6, 0.35);
    z-index: 2;
}

.subscription-plan-card .plan-card-check {
    position: absolute;
    top: 7px;
    left: 7px;
    width: 18px;
    height: 18px;
    border-radius: 50% !important;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-sizing: border-box;
    margin-right: 0;
}

.subscription-plan-card .plan-card-check svg {
    display: none !important;
}

.subscription-plan-card .plan-card-check::after {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50% !important;
    background: #ffffff;
    opacity: 0;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.subscription-plan-card:hover:not(.active) .plan-card-check {
    border-color: #94a3b8;
    background: #ffffff;
}

.subscription-plan-card.active .plan-card-check {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.subscription-plan-card.active .plan-card-check::after {
    opacity: 1;
    transform: scale(1);
}

.subscription-plan-card .plan-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    padding-left: 25px;
    line-height: 1.4;
}

.subscription-plan-card.active .plan-card-title {
    color: #065f46;
}

.subscription-plan-card .plan-card-desc {
    display: none !important;
}

.subscription-plan-card .plan-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 7px;
    margin-bottom: 6px;
    padding-left: 25px;
}

.subscription-plan-card .plan-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.73rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 0;
    border: none;
    line-height: 1.4;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.subscription-plan-card .plan-chip i.fa {
    font-size: 0.76rem;
}

/* پلن فقط وب اپ - بنفش شیک و استاندارد با سایه نرم ۱.۵ برابر */
.subscription-plan-card .plan-chip-webonly {
    background: #faf5ff;
    color: #6d28d9;
    border: none;
    box-shadow: 0 1.5px 4.5px rgba(109, 40, 217, 0.22);
}

.subscription-plan-card.active .plan-chip-webonly {
    background: #ede9fe;
    color: #5b21b6;
    border: none;
    box-shadow: 0 2px 6px rgba(91, 33, 182, 0.32);
}

/* پلن ویندوز + وب اپ - استایل روز با زمینه سفید خنثی و متن بولد */
.subscription-plan-card .plan-chip-winweb {
    background: #ffffff;
    color: #334155;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1.5px 4.5px rgba(0, 0, 0, 0.08);
}

.subscription-plan-card.active .plan-chip-winweb {
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* پلن فقط ویندوز - آبی پررنگ متناسب با هویت ویندوز با سایه ۱.۵ برابر */
.subscription-plan-card .plan-chip-win {
    background: #eff6ff;
    color: #1e40af;
    border: none;
    box-shadow: 0 1.5px 4.5px rgba(30, 64, 175, 0.22);
}

.subscription-plan-card.active .plan-chip-win {
    background: #dbeafe;
    color: #1e3a8a;
    border: none;
    box-shadow: 0 2px 6px rgba(30, 64, 175, 0.32);
}

/* چیپ هدیه پیامک رایگان - سبز ملایم و چشم‌نواز بدون گوشه گرد */
.subscription-plan-card .plan-chip-gift {
    background: #ecfdf5;
    color: #047857;
    border: none;
    margin-right: 4px;
    box-shadow: 0 1.5px 4.5px rgba(4, 120, 87, 0.2);
    border-radius: 0 !important;
}

.subscription-plan-card.active .plan-chip-gift {
    background: #d1fae5;
    color: #065f46;
    border: none;
    box-shadow: 0 2px 6px rgba(4, 120, 87, 0.28);
    border-radius: 0 !important;
}

/* مدت زمان اعتبار / روز - خاکستری روشن با سایه ۱.۵ برابر و فاصله کم از کادر قبلی */
.subscription-plan-card .plan-chip-days {
    background: #f8fafc;
    color: #475569;
    border: none;
    margin-right: 4px;
    box-shadow: 0 1.5px 4.5px rgba(0, 0, 0, 0.11);
}

.subscription-plan-card .plan-chip-days .chip-num {
    font-weight: 700;
    color: #1e293b;
}

.subscription-plan-card.active .plan-chip-days {
    background: rgba(255, 255, 255, 0.85);
    border: none;
    color: #334155;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}

.subscription-plan-card.active .plan-chip-days .chip-num {
    color: #0f172a;
}

.subscription-plan-card .plan-card-price {
    margin-top: auto;
    padding-top: 4px;
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 5px;
    text-align: left;
}

.subscription-plan-card .plan-card-price-num {
    font-size: 1rem;
    font-weight: 800;
    color: #334155;
}

.subscription-plan-card.active .plan-card-price-num {
    color: #0f172a;
}

.subscription-plan-card .plan-card-price-currency {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.subscription-plan-card.active .plan-card-price-currency {
    color: #475569;
}

.subscription-plan-card .plan-card-price-free {
    font-size: 1rem;
    font-weight: 800;
    color: #334155;
}

@media (max-width: 767.98px) {
    .subscription-plans-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }
    .subscription-plan-card {
        padding: 11px 10px;
        min-height: auto;
    }
}

/* ==========================================================================
   Visual Subscription Type Selector Cards (New vs Renewal)
   ========================================================================== */
.subscription-type-group {
    margin-bottom: 1.1rem;
}

.subscription-type-label {
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
    color: #1e293b;
    font-size: 1rem;
}

.subscription-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    background: transparent;
    border: none;
    padding: 0;
}

.subscription-type-card {
    position: relative;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 0;
    padding: 13px 14px 11px 14px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    outline: none;
}

.subscription-type-card > * {
    pointer-events: none;
}

.subscription-type-card:hover {
    border-color: #6ee7b7;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.10);
}

.subscription-type-card:focus-visible {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.subscription-type-card.active {
    background: linear-gradient(145deg, #f0fdf4 0%, #ecfdf5 100%);
    border-color: #10b981;
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.16);
    padding: 12.5px 13.5px 10.5px 13.5px;
}

.subscription-type-card .type-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 0;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.subscription-type-card:hover .type-card-icon {
    background: #e2e8f0;
    color: #1e293b;
}

.subscription-type-card.active .type-card-icon {
    background: #d1fae5;
    color: #059669;
}

.subscription-type-card .type-card-icon svg {
    width: 21px;
    height: 21px;
    display: block;
}

.subscription-type-card .type-card-content {
    flex-grow: 1;
    min-width: 0;
}

.subscription-type-card .type-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.subscription-type-card.active .type-card-title {
    color: #065f46;
}

.subscription-type-card .type-card-desc {
    font-size: 0.77rem;
    color: #64748b;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subscription-type-card.active .type-card-desc {
    color: #047857;
    opacity: 0.9;
}

.subscription-type-card .type-card-check {
    position: absolute;
    top: 7px;
    left: 7px;
    width: 18px;
    height: 18px;
    border-radius: 50% !important;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-sizing: border-box;
}

.subscription-type-card .type-card-check svg {
    display: none !important;
}

.subscription-type-card .type-card-check::after {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50% !important;
    background: #ffffff;
    opacity: 0;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.subscription-type-card:hover:not(.active) .type-card-check {
    border-color: #94a3b8;
    background: #ffffff;
}

.subscription-type-card.active .type-card-check {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.subscription-type-card.active .type-card-check::after {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 580px) {
    .subscription-type-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }
    .subscription-type-card {
        padding: 11px 10px;
    }
    .subscription-type-card .type-card-icon {
        width: 38px;
        height: 38px;
    }
    .subscription-type-card .type-card-icon svg {
        width: 19px;
        height: 19px;
    }
}

/* ==========================================================================
   Visual Product Selector Cards (User Panel)
   ========================================================================== */
.product-select-group,
.form-group {
    margin-bottom: 1.1rem;
}

.discount-toggle-group label {
    font-weight: normal;
}

.product-select-label {
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
    color: #1e293b;
    font-size: 1rem;
}

.product-select-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 6px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    box-sizing: border-box;
}

.product-select-grid:hover {
    box-shadow: none;
}

.product-card {
    position: relative;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 0;
    padding: 11px 10px 10px 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    outline: none;
    min-height: 56px;
}

.product-card > * {
    pointer-events: none;
}

.product-card:hover {
    border-color: #6ee7b7;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.10);
}

.product-card:focus-visible {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.product-card.active {
    background: linear-gradient(145deg, #f0fdf4 0%, #ecfdf5 100%);
    border-color: #10b981;
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.16);
    padding: 10px 9px 9px 9px;
}

.product-card .product-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 0;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    border: none !important;
}

.product-card:hover .product-card-icon {
    background: #e2e8f0;
    color: #1e293b;
}

.product-card.active .product-card-icon {
    background: #d1fae5;
    color: #059669;
}

.product-card .product-card-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.product-card .product-card-body {
    flex-grow: 1;
    min-width: 0;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 3px;
}

.product-card .product-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    word-break: break-word;
    transition: color 0.2s ease;
    padding-left: 0;
    width: 100%;
    text-align: right;
}

.product-card.active .product-card-title {
    color: #065f46;
}

.product-card .product-card-code {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    margin-top: 4px;
    gap: 5px;
    background: transparent;
    border: none;
    line-height: 1.35;
    pointer-events: none;
}

.product-card .product-card-code span:first-child {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-align: right;
    transition: color 0.2s ease;
}

.product-card .product-card-code .code-num {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    text-align: left;
    display: inline-flex;
    justify-content: flex-end;
    transition: color 0.2s ease;
}

.product-card.active .product-card-code span:first-child {
    color: #065f46;
}

.product-card.active .product-card-code .code-num {
    color: #0f172a;
}

.pointer-events-none {
    pointer-events: none !important;
}

.product-card .product-card-check {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50% !important;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-sizing: border-box;
    margin-right: 0;
}

.product-card .product-card-check svg {
    display: none !important;
}

.product-card .product-card-check::after {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50% !important;
    background: #ffffff;
    opacity: 0;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.product-card:hover:not(.active) .product-card-check {
    border-color: #94a3b8;
    background: #ffffff;
}

.product-card.active .product-card-check {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.product-card.active .product-card-check::after {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 767.98px) {
    .product-select-grid {
        max-height: none;
    }
}

@media (max-width: 580px) {
    .product-select-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        max-height: none;
    }
    .product-card {
        padding: 9px 8px;
        min-height: 52px;
    }
}

/* ==========================================================================
   Dashboard Quick Actions (Mobile Full-Width)
   ========================================================================== */
.dashboard-quick-actions {
    margin-top: 10px;
}

@media (max-width: 767.98px) {
    .dashboard-quick-actions .btn,
    .dashboard-quick-actions a.btn,
    .dashboard-quick-actions b.btn,
    .dashboard-quick-actions button.btn {
        display: block !important;
        width: 100% !important;
        margin-top: 10px !important;
        text-align: center !important;
    }
}

/* ==========================================================================
   Subscription Order Form Busy / Disabled State
   Unified container opacity (0.5) and pointer-events disabling
   ========================================================================== */
.subscription-form-busy,
.subscription-type-busy {
    opacity: 0.5 !important;
    pointer-events: none !important;
    user-select: none !important;
    transition: opacity 0.2s ease-in-out;
}

.subscription-form-busy *,
.subscription-type-busy * {
    cursor: wait !important;
}

/* جلوگیری از دابل-دیم شدن المان‌های disabled برای حفظ شفافیت یکدست ۰.۷ در کل فرم */
.subscription-form-busy .btn:disabled,
.subscription-form-busy input:disabled,
.subscription-form-busy select:disabled,
.subscription-form-busy textarea:disabled {
    opacity: 1 !important;
}

/* ==========================================================================
   Subscription Order Accordion Stepper Styles
   ========================================================================== */
.sub-accordion-stepper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-bottom: 24px;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}

.sub-accordion-step {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.sub-accordion-step:hover {
    border-color: #cbd5e1;
}

.sub-accordion-step.is-active {
    border-color: #2563eb;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.08);
}

.sub-accordion-step.is-completed:not(.is-active) {
    border-color: #e2e8f0;
    background: #ffffff;
}

.sub-accordion-step.is-locked {
    opacity: 0.72;
}

.sub-step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    border-right: 4px solid transparent;
}

.sub-accordion-step.is-active .sub-step-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-right-color: #2563eb;
}

.sub-accordion-step.is-completed:not(.is-active) .sub-step-header {
    border-right-color: #10b981;
}

.sub-accordion-step.is-completed:not(.is-active) .sub-step-header:hover {
    background: #f8fafc;
}

.sub-accordion-step.is-locked .sub-step-header {
    cursor: not-allowed;
    background: #fafafa;
}

.sub-step-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
    min-width: 0;
}

.sub-step-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.sub-accordion-step.is-active .sub-step-badge {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.sub-accordion-step.is-completed .sub-step-badge {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.sub-step-badge .step-check {
    display: none;
}

.sub-accordion-step.is-completed:not(.is-active) .sub-step-badge .step-num {
    display: none;
}

.sub-accordion-step.is-completed:not(.is-active) .sub-step-badge .step-check {
    display: inline-block;
    font-size: 13px;
}

.sub-step-titles {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.sub-step-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
}

.sub-accordion-step.is-active .sub-step-title {
    color: #1d4ed8;
}

.sub-accordion-step.is-completed:not(.is-active) .sub-step-title {
    color: #334155;
}

.sub-step-summary {
    font-size: 0.78rem;
    font-weight: 600;
    color: #0369a1;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    padding: 2px 10px;
    border-radius: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 240px;
    overflow: hidden;
    display: none;
}

.sub-accordion-step.is-completed:not(.is-active) .sub-step-summary:not(:empty) {
    display: inline-block;
}

.sub-step-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sub-step-edit-btn {
    font-size: 0.78rem;
    color: #2563eb;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(37, 99, 235, 0.08);
    display: none;
    transition: all 0.15s ease;
}

.sub-accordion-step.is-completed:not(.is-active):hover .sub-step-edit-btn {
    display: inline-block;
}

.sub-step-chevron {
    color: #94a3b8;
    font-size: 12px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-accordion-step.is-active .sub-step-chevron {
    transform: rotate(180deg);
    color: #2563eb;
}

.sub-step-body {
    padding: 16px 18px 18px 18px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}

.sub-step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
}

.sub-step-actions .sub-btn-next {
    margin-right: auto;
}

.sub-step-actions.sub-final-actions {
    flex-wrap: wrap;
}

.sub-pay-btn-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
    flex-wrap: wrap;
}

.sub-step-info-notice {
    margin-bottom: 12px;
    font-size: 0.88rem;
    padding: 10px 14px;
    border-radius: 4px;
}

.sub-discount-hint {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 8px;
}

.subscription-form-busy .sub-accordion-step,
.subscription-form-busy .sub-step-header {
    pointer-events: none !important;
}

/* ==========================================================================
   Scenario B: Clean Step-by-Step Wizard with Tabs on Desktop & Modal on Mobile
   ========================================================================== */
.wizard-stepper-container {
    position: relative;
    width: 100%;
    min-height: 260px;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    margin-bottom: 24px;
}

/* Desktop Tabs (nav-pills style matching profile section with modern stepper aesthetic) */
.wizard-desktop-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    border-bottom: none;
    margin-bottom: 20px;
    padding: 0;
    list-style: none;
    width: 100%;
}

.wizard-desktop-tabs li {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    margin: 0;
}

.wizard-desktop-tabs li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 9px 4px 7px;
    font-size: 14px;
    font-weight: 700;
    color: #495057;
    background-color: #f8fafc;
    border: 1px solid #e0e0e0;
    border-radius: 0 !important;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-height: 64px;
    box-sizing: border-box;
}

.wizard-desktop-tabs li a .tab-icon {
    font-size: 24px;
    line-height: 1;
    margin-bottom: 8px;
    margin-left: 0;
    margin-right: 0;
    opacity: 0.88;
    transition: all 0.2s ease;
}

.wizard-desktop-tabs li a .tab-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
}

.wizard-desktop-tabs li a:hover:not(.disabled):not(.active):not(.is-completed) {
    color: #007bff;
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.wizard-desktop-tabs li a:hover:not(.disabled):not(.active):not(.is-completed) .tab-icon {
    color: #007bff;
    opacity: 1;
}

/* تب مرحله جاری - رنگ آبی استاندارد پنل */
.wizard-desktop-tabs li.active a,
.wizard-desktop-tabs li a.active,
.wizard-desktop-tabs li.active a:hover,
.wizard-desktop-tabs li.active a:focus {
    color: #ffffff !important;
    background-color: #007bff !important;
    border-color: #007bff !important;
    font-weight: 700;
    cursor: default;
    box-shadow: 0 3px 8px rgba(0, 123, 255, 0.28);
}

.wizard-desktop-tabs li.active a .tab-icon,
.wizard-desktop-tabs li a.active .tab-icon {
    color: #ffffff !important;
    opacity: 1;
    transform: scale(1.05);
}

/* تب بعد از تایید: استایل دیفالت با سایه ملایم (بدون رنگ سبز) */
.wizard-desktop-tabs li.is-completed:not(.active) a,
.wizard-desktop-tabs li a.is-completed:not(.active) {
    color: #495057 !important;
    background-color: #f8fafc !important;
    border-color: #e0e0e0 !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    cursor: pointer;
}

.wizard-desktop-tabs li.is-completed:not(.active) a:hover,
.wizard-desktop-tabs li a.is-completed:not(.active):hover {
    color: #007bff !important;
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px);
}

.wizard-desktop-tabs li.is-completed:not(.active) a .tab-icon,
.wizard-desktop-tabs li a.is-completed:not(.active) .tab-icon {
    color: #495057;
    opacity: 0.88;
}

.wizard-desktop-tabs li a:hover:not(.disabled):not(.active) .tab-icon,
.wizard-desktop-tabs li.is-completed:not(.active) a:hover .tab-icon,
.wizard-desktop-tabs li a.is-completed:not(.active):hover .tab-icon {
    color: #007bff !important;
    opacity: 1;
}

/* نشانگر تیک داخل مربع در گوشه تب - دقیقاً همرنگ متن و آیکون دکمه تب (#495057) */
.wizard-desktop-tabs li .tab-check {
    display: none;
    position: absolute;
    top: 5px;
    left: 6px;
    font-size: 13.5px;
    line-height: 1;
    color: #495057;
    opacity: 0.88;
    transition: all 0.2s ease;
}

.wizard-desktop-tabs li.is-completed .tab-check,
.wizard-desktop-tabs li a.is-completed .tab-check {
    display: block !important;
    color: #495057 !important;
    opacity: 0.88;
}

.wizard-desktop-tabs li a:hover .tab-check,
.wizard-desktop-tabs li.is-completed:not(.active) a:hover .tab-check,
.wizard-desktop-tabs li a.is-completed:not(.active):hover .tab-check {
    color: #007bff !important;
    opacity: 1;
}

.wizard-desktop-tabs li.active .tab-check,
.wizard-desktop-tabs li a.active .tab-check,
.wizard-desktop-tabs li.is-completed.active a .tab-check,
.wizard-desktop-tabs li.active a.is-completed .tab-check {
    color: #ffffff !important;
    opacity: 1;
}

.wizard-desktop-tabs li.is-completed.active a,
.wizard-desktop-tabs li.active a.is-completed {
    color: #ffffff !important;
    background-color: #007bff !important;
    border-color: #007bff !important;
    box-shadow: 0 3px 8px rgba(0, 123, 255, 0.28) !important;
}

.wizard-desktop-tabs li.is-locked a,
.wizard-desktop-tabs .nav-link.is-locked {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    color: #94a3b8;
    background-color: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: none !important;
}

/* Mobile top counter - hidden per user request */
.wizard-top-header,
.wizard-step-counter {
    display: none !important;
}

/* Mobile global nav button with blue style matching active tab */
.btn-wizard-global-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 12px;
    min-height: 42px;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.35;
    padding: 9px 12px;
    background-color: #007bff !important;
    border: 1px solid #007bff !important;
    color: #ffffff !important;
    border-radius: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.28);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.btn-wizard-global-nav:hover,
.btn-wizard-global-nav:focus {
    background-color: #0069d9 !important;
    border-color: #0062cc !important;
    color: #ffffff !important;
}

.btn-wizard-global-nav .nav-step-title {
    flex-grow: 1;
    text-align: right;
    padding: 0 8px;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.35;
}

.btn-wizard-global-nav i.fa-list {
    color: #ffffff !important;
    font-size: 15px;
    line-height: 1;
}

.btn-wizard-global-nav i.fa-chevron-left {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 13px;
    line-height: 1;
}

/* Top & Bottom Navigation Rows */
.wizard-nav-row {
    margin-left: -3px;
    margin-right: -3px;
    margin-bottom: 12px;
}

.wizard-nav-row > [class*="col-"] {
    padding-left: 3px;
    padding-right: 3px;
}

/* Small nav buttons */
.btn-wizard-nav.btn-sm,
.wizard-nav-top .btn-wizard-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    font-size: 13.5px;
    font-weight: 700;
    padding: 7px 10px;
    min-height: 38px;
    line-height: 1.35;
}

/* Desktop vs Mobile display logic */
@media (min-width: 768px) {
    .wizard-desktop-tabs {
        display: flex !important;
    }
    .wizard-top-header {
        display: none !important;
    }
    .btn-wizard-global-nav {
        display: none !important;
    }
    .wizard-nav-top {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .wizard-desktop-tabs {
        display: none !important;
    }
    .wizard-top-header {
        display: block !important;
    }
    .btn-wizard-global-nav {
        display: flex !important;
    }
    .wizard-nav-top {
        display: flex !important;
    }
}

/* Step pane */
.wizard-step-pane {
    display: none;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0 !important;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    margin-bottom: 12px;
}

.wizard-step-pane.active {
    display: block;
}

.wizard-step-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid #e0e0e0;
}

.wizard-step-heading-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.wizard-step-heading-title i,
.wizard-step-heading > i {
    font-size: 15px;
    color: #333;
}

.wizard-step-select-hint {
    margin: 3px 0 0 0;
    padding: 0;
    font-size: 12.5px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.5;
}

/* Bottom actions */
.wizard-bottom-actions {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    width: 100%;
    box-sizing: border-box;
}

#submitForm hr,
.wizard-stepper-container hr {
    border: 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 12px;
    margin-bottom: 12px;
}

.wizard-bottom-actions .wizard-action-col {
    box-sizing: border-box;
}

.wizard-bottom-actions .btn {
    margin: 0 !important;
    min-height: 42px;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px !important;
    box-sizing: border-box;
    border-radius: 0 !important;
}

.wizard-bottom-actions .btn i.fa,
.wizard-bottom-actions .btn .btn-gateway-icon,
.wizard-nav-top .btn-wizard-nav i.fa {
    margin: 0 !important;
    font-size: 13px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wizard-nav-top .btn-wizard-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.wizard-bottom-actions .btn-wizard-prev {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.wizard-bottom-actions .btn-wizard-prev:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}

.wizard-bottom-actions .btn-wizard-prev:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
}

.wizard-bottom-actions .btn-wizard-confirm {
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

/* در موبایل اول دکمه تایید ادامه باشه با طول 12 از 12 و دکمه مرحله قبل هم 12 از 12 زیرش */
@media (max-width: 767.98px) {
    .wizard-bottom-actions {
        flex-direction: column;
        gap: 8px;
    }
    .wizard-bottom-actions .wizard-action-next {
        order: 1;
        width: 100%;
    }
    .wizard-bottom-actions .wizard-action-prev {
        order: 2;
        width: 100%;
    }
    .wizard-bottom-actions .wizard-action-col .btn {
        width: 100%;
    }
}

/* در دسکتاپ اول دکمه مرحله قبل باشه (4 از 12) و بعدش دکمه تایید و ادامه (8 از 12) */
@media (min-width: 768px) {
    .wizard-bottom-actions {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    .wizard-bottom-actions .wizard-action-prev {
        order: 1;
        flex: 4 4 0%;
        min-width: 0;
    }
    .wizard-bottom-actions .wizard-action-next {
        order: 2;
        flex: 8 8 0%;
        min-width: 0;
    }
}

.btn-wizard-cancel-link {
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}
.btn-wizard-cancel-link:hover {
    color: #ef4444;
    text-decoration: none;
}

/* Modal steps list */
.wizard-modal-steps-list {
    display: flex;
    flex-direction: column;
}

.wizard-modal-step-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.15s ease;
}

.wizard-modal-step-item:last-child {
    border-bottom: none;
}

.wizard-modal-step-item:hover:not(.is-locked) {
    background: #f8fafc;
}

.modal-step-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-step-badge {
    width: 26px;
    height: 26px;
    border-radius: 0 !important;
    background: #eee;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.modal-step-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
}

.modal-step-icon {
    font-size: 13px;
    margin-left: 5px;
    color: #64748b;
    vertical-align: middle;
}

.wizard-modal-step-item.is-active .modal-step-icon {
    color: #007bff;
}

.wizard-modal-step-item.is-completed .modal-step-icon {
    color: #28a745;
}

.wizard-modal-step-item.is-locked .modal-step-icon {
    color: #94a3b8;
    opacity: 0.7;
}

.modal-step-summary {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 2px;
}

.modal-step-left i.fa {
    color: #94a3b8;
    transition: color 0.15s ease;
}

/* Active Step */
.wizard-modal-step-item.is-active {
    background: #ebf5ff;
    border-right: 3px solid #007bff;
}

.wizard-modal-step-item.is-active .modal-step-badge {
    background: #007bff;
    color: #fff;
}

.wizard-modal-step-item.is-active .modal-step-title {
    color: #0056b3;
    font-weight: 700;
}

.wizard-modal-step-item.is-active .modal-step-summary {
    color: #495057;
}

.wizard-modal-step-item.is-active .modal-step-left i.fa {
    color: #007bff;
}

/* Completed Step */
.wizard-modal-step-item.is-completed {
    background: #ffffff;
}

.wizard-modal-step-item.is-completed .modal-step-badge {
    background: #28a745;
    color: #fff;
}

.wizard-modal-step-item.is-completed .modal-step-title {
    color: #1e293b;
    font-weight: 700;
}

.wizard-modal-step-item.is-completed .modal-step-summary {
    color: #495057;
}

.wizard-modal-step-item.is-completed .modal-step-left i.fa {
    color: #28a745;
}

/* Locked / Inactive Step (شدت رنگ کمتر و ملایم، کاملاً خوانا و غیرقابل کلیک) */
.wizard-modal-step-item.is-locked {
    background: #fafafa;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.wizard-modal-step-item.is-locked .modal-step-badge {
    background: #f1f3f5;
    color: #868e96;
    border: 1px solid #e2e8f0;
}

.wizard-modal-step-item.is-locked .modal-step-title {
    color: #868e96;
    font-weight: 600;
}

.wizard-modal-step-item.is-locked .modal-step-summary {
    color: #a0aec0;
}

.wizard-modal-step-item.is-locked .modal-step-left i.fa {
    color: #ced4da;
    font-size: 12px;
}

.wizard-modal-step-item.is-locked .modal-step-left i.fa::before {
    content: "\f023"; /* fa-lock */
}

.subscription-form-busy .wizard-stepper-container,
.subscription-form-busy .btn-wizard-global-nav,
.subscription-form-busy .btn-wizard-nav,
.subscription-form-busy .btn-wizard-confirm,
.subscription-form-busy .wizard-desktop-tabs {
    pointer-events: none !important;
}

/* ==========================================================================
   Web App Addon Toggle Card (گزینه افزودن پنل تحت وب با کارت مدرن و برجسته)
   ========================================================================== */
/* ==========================================================================
   Web App Addon Card (افزونه اختیاری در مرحله ۴ با استفاده از کلاس‌های کارت محصول)
   ========================================================================== */
.wizard-addons-heading {
    margin-top: 18px;
    margin-bottom: 12px;
}

.product-card.webapp-addon-card,
.webapp-addon-card {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

/* برای کارت افزونه وب‌اپ: آیکون‌ها و بج به کلیک پاسخ نمی‌دهند تا کلیک روی کارت کار کند، اما بدنه و لینک‌ها کاملاً تعاملی هستند */
.product-card.webapp-addon-card .product-card-icon,
.product-card.webapp-addon-card .product-card-check,
.product-card.webapp-addon-card .webapp-badge-tag {
    pointer-events: none;
}

.product-card.webapp-addon-card .product-card-body,
.product-card.webapp-addon-card .product-card-desc,
.product-card.webapp-addon-card .webapp-card-desc,
.product-card.webapp-addon-card .product-form-webapp-desc {
    pointer-events: auto !important;
}

.product-card.webapp-addon-card a,
.product-card.webapp-addon-card a *,
.webapp-card-desc a,
.webapp-card-desc a *,
.product-form-webapp-desc a,
.product-form-webapp-desc a * {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative;
    z-index: 10;
}

.product-card.webapp-addon-card.is-disabled {
    opacity: 0.55;
    cursor: not-allowed !important;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.product-card.webapp-addon-card.is-disabled * {
    cursor: not-allowed !important;
}

/* در حالت فعال، هاور هرگز خاکستری نمی‌شود و استایل زنده و سبز باقی می‌ماند */
.product-card.webapp-addon-card.active:hover:not(.is-disabled),
.product-card.webapp-addon-card.is-selected:hover:not(.is-disabled),
.product-card.active:hover:not(.is-disabled),
.product-card.is-selected:hover:not(.is-disabled) {
    border-color: #059669;
    background: linear-gradient(145deg, #ecfdf5 0%, #e6fcf0 100%);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.22);
    transform: translateY(-2px);
}

/* اندیکاتور چک‌باکس بالا سمت چپ (دقیقاً در موقعیت، ابعاد و فاصله مشابه product-card-check) */
.product-card.webapp-addon-card .product-card-check,
.product-card.webapp-addon-card .webapp-card-check,
.webapp-addon-card .webapp-card-check {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 18px;
    height: 18px;
    border-radius: 0 !important;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-sizing: border-box;
    margin-right: 0;
}

.product-card.webapp-addon-card .product-card-check::after,
.product-card.webapp-addon-card .webapp-card-check::after {
    display: none !important;
}

.product-card.webapp-addon-card:hover:not(.active):not(.is-selected):not(.is-disabled) .product-card-check,
.product-card.webapp-addon-card:hover:not(.active):not(.is-selected):not(.is-disabled) .webapp-card-check {
    border-color: #94a3b8;
    background: #ffffff;
}

.product-card.webapp-addon-card.active .product-card-check,
.product-card.webapp-addon-card.is-selected .product-card-check,
.product-card.webapp-addon-card.active .webapp-card-check,
.product-card.webapp-addon-card.is-selected .webapp-card-check {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.product-card.webapp-addon-card .product-card-check svg,
.product-card.webapp-addon-card .webapp-card-check svg {
    display: block !important;
    opacity: 0;
    width: 11px;
    height: 11px;
    color: #ffffff;
    transition: opacity 0.2s ease;
}

.product-card.webapp-addon-card.active .product-card-check svg,
.product-card.webapp-addon-card.is-selected .product-card-check svg,
.product-card.webapp-addon-card.active .webapp-card-check svg,
.product-card.webapp-addon-card.is-selected .webapp-card-check svg {
    opacity: 1;
}

/* آیکون سمت راست: بدون هیچ بوردر و کاملا منطبق بر ایکون محصول */
.product-card.webapp-addon-card .product-card-icon,
.product-card .product-card-icon,
.webapp-card-icon {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.product-card .product-card-icon img,
.product-card.webapp-addon-card .product-card-icon img,
.webapp-card-icon img,
.product-card .product-card-icon svg,
.product-card.webapp-addon-card .product-card-icon svg {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* استایل متون و برچسب افزونه */
.product-card .product-form-webapp-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: inherit;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.webapp-badge-tag {
    display: inline-block;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 600;
    background: #e2e8f0;
    color: #475569;
    border: none !important;
    border-radius: 0 !important;
    transition: all 0.2s ease;
    line-height: 1.5;
    vertical-align: middle;
}

.product-card.active .webapp-badge-tag,
.product-card.is-selected .webapp-badge-tag {
    background: #d1fae5;
    color: #065f46;
    border: none !important;
}

.product-card .product-card-desc,
.webapp-card-desc {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
    margin-top: 2px;
    text-align: right;
    transition: color 0.2s ease;
}

.product-card.active .product-card-desc,
.product-card.is-selected .product-card-desc,
.product-card.active .webapp-card-desc,
.product-card.is-selected .webapp-card-desc {
    color: #047857;
}

.product-card .product-card-desc a,
.webapp-card-desc a,
.product-form-webapp-desc a {
    color: #2563eb;
    text-decoration: underline;
    pointer-events: auto !important;
    cursor: pointer !important;
    display: inline-block;
    position: relative;
    z-index: 10;
    font-weight: 600;
}

.product-card.active .product-card-desc a,
.product-card.is-selected .product-card-desc a,
.product-card.active .webapp-card-desc a,
.product-card.is-selected .webapp-card-desc a {
    color: #047857;
    text-decoration: underline;
    font-weight: 600;
}

.product-card .product-card-desc a:hover,
.webapp-card-desc a:hover,
.product-form-webapp-desc a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

.product-card.active .product-card-desc a:hover,
.product-card.is-selected .product-card-desc a:hover,
.product-card.active .webapp-card-desc a:hover,
.product-card.is-selected .webapp-card-desc a:hover {
    color: #065f46 !important;
    text-decoration: underline !important;
}

/* Discount Box Section inside Step 5 */
.wizard-discount-box-section {
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e0e0e0;
    border-radius: 0 !important;
}

/* ==========================================================================
   Zero Border-Radius: کلا لبه‌ها در کل طراحی بدون هیچ گردی
   ========================================================================== */
.wizard-stepper-container,
.wizard-stepper-container *,
.wizard-stepper-container .btn,
.wizard-stepper-container .form-control,
.wizard-stepper-container .alert,
.wizard-stepper-container .product-card,
.wizard-stepper-container .product-card-icon,
.wizard-stepper-container .subscription-plan-card,
.wizard-stepper-container .plan-card-tag,
.wizard-stepper-container .plan-chip,
.wizard-stepper-container .subscription-type-card,
.wizard-stepper-container .type-card-icon,
.wizard-stepper-container .gateway-card,
.wizard-stepper-container .wizard-step-pane,
.wizard-stepper-container .wizard-desktop-tabs li a,
.wizard-stepper-container .sub-step-info-notice,
.wizard-stepper-container .webapp-addon-card,
.wizard-stepper-container .webapp-card-icon,
.wizard-stepper-container .webapp-card-check,
.wizard-stepper-container .webapp-badge-tag,
.wizard-stepper-container .wizard-discount-box-section,
#wizardStepsModal,
#wizardStepsModal *,
#wizardStepsModal .modal-content,
#wizardStepsModal .modal-step-badge,
#wizardStepsModal .btn {
    border-radius: 0 !important;
}

/* استثنای دایره‌های رادیویی برای گزینه‌های انتخابی تکی (ماهیت رادیوباتن) */
.wizard-stepper-container .type-card-check,
.wizard-stepper-container .type-card-check::after,
.wizard-stepper-container .product-card-check,
.wizard-stepper-container .product-card-check::after,
.wizard-stepper-container .plan-card-check,
.wizard-stepper-container .plan-card-check::after,
.wizard-stepper-container .gateway-check-badge,
.wizard-stepper-container .gateway-check-badge::after,
.type-card-check,
.type-card-check::after,
.product-card-check,
.product-card-check::after,
.plan-card-check,
.plan-card-check::after,
.gateway-check-badge,
.gateway-check-badge::after {
    border-radius: 50% !important;
}

/* مربع چک‌باکس برای افزونه وب‌اپ در مرحله ۴ (ماهیت چک‌باکس بدون گردی) */
.wizard-stepper-container .webapp-addon-card .product-card-check,
.wizard-stepper-container .webapp-addon-card .webapp-card-check,
.webapp-addon-card .product-card-check,
.webapp-addon-card .webapp-card-check {
    border-radius: 0 !important;
}

/* ==========================================================================
   Border & spacing for product and subscription list containers
   ========================================================================== */
.product-grid-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.subscription-type-grid,
.product-select-grid,
.subscription-plans-grid {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
    box-shadow: none !important;
}

.subscription-type-grid .subscription-type-card,
.product-select-grid .product-card,
.subscription-plans-grid .subscription-plan-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 767.98px) {
    .subscription-type-grid,
    .product-select-grid,
    .subscription-plans-grid {
        padding: 0 !important;
        max-height: none !important;
        overflow: visible !important;
    }
}

/* ==========================================================================
   ردیف قیمت افزونه‌های اختیاری (وب‌اپ + افزونه‌های پویا) — مرحله افزونه‌های ویزارد خرید
   هم‌سبک plan-card-price کارت‌های «نوع اشتراک»: برچسب «مازاد هزینه» سمت راست، مبلغ سمت چپ
   ========================================================================== */
.addon-card-price-row {
    margin-top: 6px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 5px;
    width: 100%;
    pointer-events: none;
}

.addon-card-price-row .addon-card-price-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-align: right;
}

.addon-card-price-row .addon-card-price {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 5px;
    text-align: left;
}

.addon-card-price-row .addon-card-price-num {
    font-size: 1rem;
    font-weight: 800;
    color: #334155;
}

.addon-card-price-row .addon-card-price-currency {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.addon-card-price-row .addon-card-price-free {
    font-size: 1rem;
    font-weight: 800;
    color: #334155;
}

/* کارت انتخاب‌شده — مبلغ تیره‌تر، مثل plan-card.active */
.webapp-addon-card.active .addon-card-price-num,
.webapp-addon-card.is-selected .addon-card-price-num,
.webapp-addon-card.active .addon-card-price-free,
.webapp-addon-card.is-selected .addon-card-price-free {
    color: #0f172a;
}

.dynamic-addon-card .product-card-desc.dynamic-addon-desc {
    margin-top: 4px;
    font-size: 0.83rem;
}

/* ==========================================================================
   استایل یکپارچه کارت‌های پلن اشتراک مشابه نوع محصول
   ========================================================================== */
.product-card.subscription-plan-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 11px 10px 10px 10px !important;
    min-height: 64px;
    box-sizing: border-box !important;
    width: 100% !important;
    margin-bottom: 0;
}

.product-card.subscription-plan-card .product-card-icon,
.product-card.subscription-plan-card .plan-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 0;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    border: none !important;
    align-self: center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.product-card.subscription-plan-card:hover .product-card-icon,
.product-card.subscription-plan-card:hover .plan-card-icon {
    background: #e2e8f0;
    color: #1e293b;
}

.product-card.subscription-plan-card.active .product-card-icon,
.product-card.subscription-plan-card.active .plan-card-icon {
    background: #d1fae5;
    color: #059669;
}

.product-card.subscription-plan-card .product-card-icon svg,
.product-card.subscription-plan-card .plan-card-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.product-card.subscription-plan-card .product-card-body {
    flex-grow: 1;
    min-width: 0;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 2px;
}

.product-card.subscription-plan-card .plan-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    word-break: break-word;
    transition: color 0.2s ease;
    padding-left: 0 !important;
    margin-bottom: 2px;
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.product-card.subscription-plan-card.active .plan-card-title {
    color: #065f46;
}

.product-card.subscription-plan-card .plan-card-tag {
    position: static !important;
    display: inline-block;
    vertical-align: middle;
    padding: 1px 7px;
    font-size: 0.70rem;
    font-weight: 700;
    line-height: 1.4;
    border-radius: 0;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 1.5px 4px rgba(217, 119, 6, 0.35);
    margin-right: 4px;
}

.product-card.subscription-plan-card .plan-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    margin-bottom: 3px;
    padding-left: 0 !important;
}

.product-card.subscription-plan-card .plan-card-price-row {
    margin-top: 5px !important;
    padding-top: 0 !important;
    border: none !important;
}

.product-card.subscription-plan-card .addon-card-price-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-align: right;
    transition: color 0.2s ease;
}

.product-card.subscription-plan-card.active .addon-card-price-label {
    color: #065f46;
}

.product-card.subscription-plan-card .plan-card-price {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border: none !important;
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 5px;
    text-align: left;
}

.product-card.subscription-plan-card .plan-card-price-num {
    font-size: 1rem;
    font-weight: 800;
    color: #334155;
    transition: color 0.2s ease;
}

.product-card.subscription-plan-card.active .plan-card-price-num {
    color: #0f172a;
}

.product-card.subscription-plan-card .plan-card-price-currency {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    transition: color 0.2s ease;
}

.product-card.subscription-plan-card.active .plan-card-price-currency {
    color: #475569;
}

.product-card.subscription-plan-card .plan-card-price-free {
    font-size: 1rem;
    font-weight: 800;
    color: #334155;
    transition: color 0.2s ease;
}

.product-card.subscription-plan-card.active .plan-card-price-free {
    color: #0f172a;
}

@media (max-width: 767.98px) {
    .product-card.subscription-plan-card {
        padding: 10px 8px !important;
        align-items: center !important;
    }

    .product-card.subscription-plan-card .product-card-icon,
    .product-card.subscription-plan-card .plan-card-icon {
        align-self: center !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .subscription-plan-card .plan-card-meta {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
        width: 100% !important;
        margin-top: 5px !important;
        margin-bottom: 5px !important;
        padding-left: 0 !important;
    }

    .subscription-plan-card .plan-card-meta .plan-chip {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 6px 3px !important;
        min-height: 42px;
        white-space: normal !important;
        border-radius: 4px !important;
    }

    .subscription-plan-card .plan-card-meta .plan-chip i.fa {
        font-size: 0.95rem !important;
        margin: 0 0 3px 0 !important;
        display: inline-block !important;
    }

    .subscription-plan-card .plan-card-meta .plan-chip .plan-chip-text {
        display: block !important;
        text-align: center !important;
        font-size: 0.70rem !important;
        line-height: 1.25 !important;
        font-weight: 700 !important;
    }
}

