/* Wallet Dashboard Styles */
.wallet-dashboard {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.wallet-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .wallet-overview {
        grid-template-columns: 1fr;
    }
}

/* Wallet Balance Display */
.wallet-balance-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.2em;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.wallet-balance-display strong {
    font-size: 1.5em;
    display: block;
    margin-top: 10px;
}

/* Add Funds Form */
.wallet-add-funds {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.wallet-add-funds h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #495057;
    font-weight: 600;
}

.wallet-add-funds .form-group {
    margin-bottom: 15px;
}

.wallet-add-funds label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.wallet-add-funds input,
.wallet-add-funds select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.wallet-add-funds input:focus,
.wallet-add-funds select:focus {
    outline: 0;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.wallet-add-funds button {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.15s ease-in-out;
}

.wallet-add-funds button:hover {
    background: #218838;
}

.wallet-add-funds button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Wallet Transactions */
.wallet-transactions {
    margin-top: 30px;
}

.wallet-transactions h4 {
    margin-bottom: 20px;
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.wallet-transactions-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wallet-transactions-table th,
.wallet-transactions-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.wallet-transactions-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.wallet-transactions-table tbody tr:hover {
    background: #f8f9fa;
}

.wallet-transactions-table tbody tr:last-child td {
    border-bottom: none;
}

/* Transaction Type Styling */
.transaction-type-credit {
    color: #28a745;
    font-weight: 600;
}

.transaction-type-debit {
    color: #dc3545;
    font-weight: 600;
}

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

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

/* Checkout Wallet Info */
.wallet-checkout-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.wallet-checkout-info h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
}

.wallet-balance {
    font-size: 1.1em;
    font-weight: 600;
    color: #28a745;
    margin-bottom: 15px;
}

.wallet-payment-option {
    margin-top: 15px;
}

.wallet-payment-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.wallet-payment-option input[type="checkbox"] {
    margin-right: 8px;
}

.wallet-amount-selector {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.wallet-amount-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.wallet-amount-selector input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.wallet-amount-selector .description {
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

/* Payment Gateway Wallet Fields */
.wallet-payment-fields {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.wallet-payment-fields p {
    margin-bottom: 10px;
}

.wallet-partial-payment {
    margin-top: 15px;
}

.wallet-partial-payment label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.wallet-partial-payment input[type="checkbox"] {
    margin-right: 8px;
}

/* Loading States */
.wallet-loading {
    opacity: 0.6;
    pointer-events: none;
}

.wallet-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: wallet-spin 1s linear infinite;
}

@keyframes wallet-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.wallet-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.wallet-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wallet-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.wallet-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wallet-dashboard {
        padding: 15px;
    }
    
    .wallet-transactions-table {
        font-size: 14px;
    }
    
    .wallet-transactions-table th,
    .wallet-transactions-table td {
        padding: 8px 10px;
    }
    
    .wallet-balance-display {
        font-size: 1em;
    }
    
    .wallet-balance-display strong {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .wallet-transactions-table {
        font-size: 12px;
    }
    
    .wallet-transactions-table th:nth-child(4),
    .wallet-transactions-table td:nth-child(4) {
        display: none;
    }
}

/* Admin Profile Wallet Fields */
.form-table .wallet-admin-section {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.form-table .wallet-admin-section h3 {
    margin-top: 0;
    color: #23282d;
}

/* Dashboard Integration */
.kavehboard-content .wallet-dashboard {
    margin: 0;
    box-shadow: none;
    border: 1px solid #e1e5e9;
}

/* Quick Stats Cards */
.wallet-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.wallet-stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
    transition: transform 0.2s ease;
}

.wallet-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.wallet-stat-card .stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #495057;
    margin-bottom: 5px;
}

.wallet-stat-card .stat-label {
    color: #6c757d;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallet-stat-card.balance .stat-value {
    color: #28a745;
}

.wallet-stat-card.spent .stat-value {
    color: #dc3545;
}

.wallet-stat-card.transactions .stat-value {
    color: #007bff;
}