/**
 * استایل‌های فرانت‌اند کیف پول
 *
 * @package Bakala
 * @subpackage Wallet
 */

/* === ویجت موجودی === */
.bakala-wallet-balance-widget {
    margin-bottom: 25px;
}

.bakala-wallet-balance-shortcode {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 15px;
}

.bakala-wallet-balance-shortcode .wallet-icon {
    font-size: 20px;
}

.bakala-wallet-balance-shortcode .wallet-label {
    color: #666;
}

.bakala-wallet-balance-shortcode .wallet-amount {
    font-weight: bold;
    color: #667eea;
}

/* دکمه مشاهده همه */
.wallet-view-all-btn {
    transition: all 0.3s ease;
    position: relative;
}

.wallet-view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.wallet-view-all-btn:active {
    transform: translateY(0);
}

/* تاریخچه کامل */
.wallet-full-history {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === داشبورد === */
.bakala-wallet-dashboard {
    max-width: 1200px;
}

/* === تاریخچه === */
.bakala-wallet-history {
    margin: 20px 0;
}

.wallet-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.filter-group select {
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* === تراکنش‌ها === */
.transactions-list {
    margin: 15px 0;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.transaction-item:hover {
    background: #f8f9fa;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.transaction-credit .transaction-icon {
    background: #d4edda;
    color: #155724;
}

.transaction-debit .transaction-icon {
    background: #f8d7da;
    color: #721c24;
}

.transaction-details {
    flex: 1;
}

.transaction-type {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.transaction-date {
    font-size: 12px;
    color: #999;
}

.transaction-description {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.transaction-amount {
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.transaction-amount-credit {
    color: #28a745;
}

.transaction-amount-debit {
    color: #dc3545;
}

/* === جدول تراکنش‌ها === */
.wallet_transactions_table {
    width: 100%;
    border-collapse: collapse;
}

.wallet_transactions_table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: right;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.wallet_transactions_table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.transaction-badge {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.transaction-badge-credit {
    background: #d4edda;
    color: #155724;
}

.transaction-badge-debit {
    background: #f8d7da;
    color: #721c24;
}

/* === ریسپانسیو === */
@media (max-width: 768px) {
    .wallet-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group select {
        width: 100%;
    }
    
    .transaction-item {
        flex-wrap: wrap;
    }
    
    .transaction-amount {
        width: 100%;
        text-align: right;
        margin-top: 10px;
    }
    
    .wallet_transactions_table {
        border: 0;
    }
    
    .wallet_transactions_table thead {
        display: none;
    }
    
    .wallet_transactions_table tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .wallet_transactions_table td {
        display: block;
        text-align: right;
        padding: 10px 15px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .wallet_transactions_table td:last-child {
        border-bottom: none;
    }
    
    .wallet_transactions_table td:before {
        content: attr(data-title);
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
        color: #666;
    }
}

/* === انیمیشن‌ها === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.transaction-item {
    animation: fadeIn 0.3s ease;
}

/* === دکمه‌ها === */
.wallet-actions {
    text-align: center;
    padding: 15px 0;
}

.wallet-view-all-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.wallet-view-all-btn:hover {
    background: #5568d3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
