/* ===== کیف پول ووکامرس - استایل‌های فرانت‌اند ===== */

/* اطلاع‌رسانی موجودی */
.wc-wallet-notice {
    background: linear-gradient(135deg, #f0fff4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 20px;
    color: #166534;
    font-size: 15px;
    direction: rtl;
    text-align: right;
}

/* ===== صفحه کیف پول ===== */
.wc-wallet-page {
    direction: rtl;
    text-align: right;
    font-family: 'IRANSans', 'Tahoma', Arial, sans-serif;
    max-width: 700px;
}

/* کارت موجودی */
.wallet-balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 30px 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.wallet-balance-icon {
    font-size: 48px;
    line-height: 1;
}

.wallet-balance-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wallet-label {
    font-size: 14px;
    opacity: 0.85;
}

.wallet-amount {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* خلاصه آمار */
.wallet-summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.wallet-summary-item {
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wallet-summary-item.green {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.wallet-summary-item.red {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #9f1239;
}

.wallet-summary-item span {
    font-size: 13px;
    opacity: 0.8;
}

.wallet-summary-item strong {
    font-size: 18px;
}

/* بخش تراکنش‌ها */
.wallet-transactions-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #374151;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 10px;
}

/* آیتم‌های تراکنش */
.wallet-tx-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wallet-tx-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 14px 16px;
    transition: box-shadow 0.2s;
}

.wallet-tx-item:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.wallet-tx-item.tx-in {
    border-right: 4px solid #22c55e;
}

.wallet-tx-item.tx-out {
    border-right: 4px solid #ef4444;
}

.tx-icon {
    font-size: 22px;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.tx-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tx-desc {
    font-size: 14px;
    color: #374151;
}

.tx-date {
    font-size: 12px;
    color: #9ca3af;
}

.tx-amount {
    font-weight: bold;
    font-size: 15px;
    white-space: nowrap;
}

.amount-green { color: #16a34a; }
.amount-red   { color: #dc2626; }

/* صفحه‌بندی */
.wallet-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.wallet-pagination .page-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.wallet-pagination .page-btn.active,
.wallet-pagination .page-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* حالت خالی */
.wallet-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.wallet-empty p {
    font-size: 16px;
    margin-bottom: 15px;
}

/* ===== باکس کیف پول در چک‌اوت ===== */
.wc-wallet-checkout-box {
    background: #f8faff;
    border: 2px solid #c7d7fd;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    direction: rtl;
    text-align: right;
}

.wc-wallet-checkout-box h3 {
    margin-top: 0;
    color: #3730a3;
    font-size: 16px;
}

.wallet-apply-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.wallet-apply-form input[type="number"] {
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    direction: ltr;
    text-align: right;
    width: 150px;
}

.btn-wallet-apply {
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 9px 18px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-wallet-apply:hover { background: #3730a3; }

.wallet-applied-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 10px 14px;
    color: #166534;
    margin-top: 10px;
}

.btn-wallet-remove {
    background: transparent;
    border: 1px solid #dc2626;
    color: #dc2626;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    margin-right: auto;
}

.btn-wallet-remove:hover {
    background: #dc2626;
    color: white;
}

@media (max-width: 600px) {
    .wallet-summary-row { grid-template-columns: 1fr; }
    .wallet-balance-card { flex-direction: column; text-align: center; }
    .wallet-apply-form { flex-direction: column; }
    .wallet-apply-form input[type="number"] { width: 100%; }
}
