/* ==========================================================================
   کیف پول
   ========================================================================== */

:root {
    --wallet-accent: #1a7f4b;
    --wallet-accent-bg: #eaf7f0;
    --wallet-accent-border: #bfe5d1;
}

/* --------------------------------------------------------------------------
   جعبه کیف پول در تسویه حساب
   -------------------------------------------------------------------------- */

/* توضیح کسر خودکار موجودی در جدول تسویه حساب */
.mahabadoffroad-wallet-checkout {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: var(--wallet-accent-bg);
    border: 1px solid var(--wallet-accent-border);
    color: var(--wallet-accent);
    border-radius: var(--br-1, 8px);
    padding: 11px 13px;
    margin: 12px 0;
    font-size: 12px;
    line-height: 1.9;
}

.mahabadoffroad-wallet-checkout .icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin-top: 4px;
    fill: currentColor;
}

.mahabadoffroad-wallet-checkout .wallet-note {
    display: block;
    font-style: normal;
    font-size: 11px;
    opacity: .85;
}

.mahabadoffroad-wallet-checkout .woocommerce-Price-amount {
    font-weight: bold;
    color: inherit;
}

.wallet-used {
    color: var(--wallet-accent);
}

/* --------------------------------------------------------------------------
   نوتیس کیف پول در صفحه تشکر
   -------------------------------------------------------------------------- */

.mahabadoffroad-wallet-thankyou {
    max-width: 620px;
    margin: 20px auto;
    background: var(--wallet-accent-bg);
    border: 1px solid var(--wallet-accent-border);
    border-radius: var(--br-1, 8px);
    padding: 16px 18px;
    text-align: center;
}

.mahabadoffroad-wallet-thankyou .wallet-thankyou-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--wallet-accent);
    font-size: 14px;
    line-height: 1.9;
}

.mahabadoffroad-wallet-thankyou .icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    fill: currentColor;
}

.mahabadoffroad-wallet-thankyou .wallet-thankyou-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--c-1, #639cde);
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   صفحه کیف پول در حساب کاربری
   -------------------------------------------------------------------------- */

.wallet-balance-card {
    background: linear-gradient(135deg, var(--c-2, #10223d), var(--c-1, #639cde));
    color: #fff;
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 18px;
}

.wallet-balance-card .wallet-balance-label {
    display: block;
    font-size: 13px;
    opacity: .85;
}

.wallet-balance-card .wallet-balance-value {
    display: block;
    font-size: 28px;
    margin: 6px 0 8px;
}

.wallet-balance-card .wallet-balance-value .woocommerce-Price-amount {
    color: #fff;
}

.wallet-balance-card .wallet-balance-hint {
    font-size: 12px !important;
    opacity: .8;
    margin: 0 !important;
    color: white !important;
}

.mahabadoffroad-wallet-stats {
    gap: 12px;
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.mahabadoffroad-wallet-stats .wallet-stat {
    flex: 1 1 180px;
    background: var(--c-5, #f0f0f1);
    border-radius: var(--br-1, 8px);
    padding: 14px 16px;
}

.mahabadoffroad-wallet-stats .wallet-stat span {
    display: block;
    font-size: 12px;
    color: var(--c-7, #81858b);
    margin-bottom: 6px;
}

.mahabadoffroad-wallet-stats .wallet-stat strong {
    font-size: 16px;
}

.wallet-transactions .heading-box {
    margin-bottom: 12px;
}

.wallet-table {
    border: 1px solid var(--c-3, #ced4da);
    border-radius: var(--br-1, 8px);
    overflow: hidden;
}

.wallet-table-head,
.wallet-table-row {
    align-items: center;
}

.wallet-table-head > div,
.wallet-table-row > div {
    padding: 12px 14px;
    font-size: 13px;
}

.wallet-table-head > div:nth-child(1),
.wallet-table-row > div:nth-child(1) {
    flex: 1 1 40%;
}

.wallet-table-head > div:nth-child(2),
.wallet-table-row > div:nth-child(2) {
    flex: 1 1 24%;
}

.wallet-table-head > div:nth-child(3),
.wallet-table-row > div:nth-child(3),
.wallet-table-head > div:nth-child(4),
.wallet-table-row > div:nth-child(4) {
    flex: 1 1 18%;
}

.wallet-table-head {
    background: var(--c-5, #f0f0f1);
    font-weight: bold;
    color: var(--c-9, #62666d);
}

.wallet-table-row {
    border-top: 1px solid var(--c-8, #e0e0e2);
}

.wallet-table-row .wallet-desc strong {
    display: block;
    font-weight: normal;
}

.wallet-table-row .wallet-source {
    display: block;
    font-size: 11px;
    color: var(--c-7, #81858b);
    margin-top: 3px;
}

.wallet-table-row.is-credit .wallet-amount {
    color: var(--wallet-accent);
    font-weight: bold;
}

.wallet-table-row.is-debit .wallet-amount {
    color: #c0392b;
    font-weight: bold;
}

.wallet-empty {
    background: var(--c-5, #f0f0f1);
    border-radius: var(--br-1, 8px);
    padding: 22px;
    text-align: center;
    color: var(--c-7, #81858b);
}

.wallet-pagination {
    gap: 6px;
    margin-top: 16px;
    justify-content: center;
}

.wallet-pagination a {
    min-width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    border: 1px solid var(--c-3, #ced4da);
    border-radius: var(--br-1, 8px);
    font-size: 13px;
}

.wallet-pagination a.is-current {
    background: var(--c-2, #10223d);
    border-color: var(--c-2, #10223d);
    color: #fff;
}

@media (max-width: 767px) {
    .wallet-table-head {
        display: none;
    }

    .wallet-table-row {
        flex-wrap: wrap;
    }

    .wallet-table-row > div {
        flex: 1 1 50% !important;
        padding: 8px 14px;
    }

    .wallet-table-row .wallet-desc {
        flex: 1 1 100% !important;
        padding-bottom: 0;
    }

    .wallet-balance-card .wallet-balance-value {
        font-size: 22px;
    }
}
