/* File: css/simple-wallet.css */
:root {
    --primary-color: #4F46E5;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --border-color: #E5E7EB;
    --header-bg: #F9FAFB;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --transition: all 0.2s ease;
}

/* Card Container */
.simple-wallet-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin: 24px auto;
    max-width: 1200px;
    overflow: hidden;
}

.simple-wallet-card-header {
    background: var(--header-bg);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.simple-wallet-card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.4;
}

/* Modern Filter Section */
.simple-wallet-filters {
    padding: 20px 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.simple-wallet-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.filter-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4B5563;
    margin-bottom: 8px;
}

.filter-group input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: var(--transition);
    background: #F9FAFB;
}

.filter-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: #ffffff;
}

.simple-wallet-button {
    height: 42px;
    padding: 0 24px;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.simple-wallet-button:hover {
    background: #4338CA;
    transform: translateY(-1px);
}

.simple-wallet-button.delete {
    background: transparent;
    color: var(--danger-color);
    border: 1px solid currentColor;
    padding: 6px 12px;
    height: auto;
    font-size: 0.813rem;
}

.simple-wallet-button.delete:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

/* Table Styles */
.simple-wallet-table-wrapper {
    overflow-x: auto;
    margin: 0;
    padding: 0 24px;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 #F1F5F9;
}

/* Custom scrollbar */
.simple-wallet-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.simple-wallet-table-wrapper::-webkit-scrollbar-track {
    background: #F1F5F9;
    border-radius: 4px;
}

.simple-wallet-table-wrapper::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

.simple-wallet-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.simple-wallet-transactions {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
    min-width: 800px;
}

.simple-wallet-transactions th {
    background: var(--header-bg);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #4B5563;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.simple-wallet-transactions td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: #1F2937;
    vertical-align: middle;
}

.simple-wallet-transactions tr:hover {
    background-color: #F9FAFB;
}

/* Transaction ID column */
.simple-wallet-transactions td:first-child {
    font-family: monospace;
    color: #6B7280;
    font-size: 0.813rem;
}

/* Status Badges */
.transaction-status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-credit {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-debit {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Amount Styling */
.amount-cell {
    font-weight: 600;
    font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
}

.amount-credit {
    color: var(--success-color);
}

.amount-debit {
    color: var(--danger-color);
}

/* Pagination */
.simple-wallet-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 20px 24px;
    background: var(--header-bg);
    border-top: 1px solid var(--border-color);
}

.simple-wallet-pagination .page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #4B5563;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.simple-wallet-pagination .page-number:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
    color: #111827;
}

.simple-wallet-pagination .current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .simple-wallet-filter-form {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .filter-group {
        flex: 1 1 calc(33.333% - 16px);
        max-width: none;
    }
}

@media (max-width: 768px) {
    .simple-wallet-card {
        margin: 16px;
        border-radius: 8px;
    }

    .simple-wallet-filters {
        padding: 16px;
    }

    .filter-group {
        flex: 1 1 calc(50% - 16px);
    }

    .simple-wallet-table-wrapper {
        padding: 0;
    }

    .simple-wallet-transactions {
        display: block;
        min-width: 100%;
    }

    .simple-wallet-transactions thead {
        display: none;
    }

    .simple-wallet-transactions tbody tr {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .simple-wallet-transactions td {
        display: flex;
        flex-direction: column;
        padding: 8px;
        border: none;
    }

    .simple-wallet-transactions td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        color: #6B7280;
        margin-bottom: 4px;
    }

    .simple-wallet-transactions td:nth-child(1),
    .simple-wallet-transactions td:nth-child(7),
    .simple-wallet-transactions td:nth-child(8) {
        grid-column: 1 / -1;
    }

    /* Enhanced mobile scrolling */
    .simple-wallet-table-wrapper {
        -webkit-overflow-scrolling: touch;
        position: relative;
    }
}

@media (max-width: 480px) {
    .simple-wallet-filter-form {
        flex-direction: column;
    }

    .filter-group {
        flex: 1 1 100%;
        max-width: none;
    }

    .simple-wallet-transactions tbody tr {
        grid-template-columns: 1fr;
    }

    .simple-wallet-pagination {
        flex-wrap: wrap;
        gap: 8px;
    }

    .simple-wallet-pagination .page-number {
        min-width: 28px;
        height: 28px;
        font-size: 0.813rem;
    }
}

/* Loading State */
.simple-wallet-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
}

/* Empty State */
.simple-wallet-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6B7280;
}

/* Error State */
.simple-wallet-error {
    background: #FEF2F2;
    border: 1px solid #FEE2E2;
    padding: 1rem;
    margin: 1rem;
    border-radius: 0.5rem;
    color: #991B1B;
}



/* Add this to your existing CSS file, before the responsive styles section */

/* Form Styles */
.simple-wallet-form {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    margin: 24px auto;
    box-shadow: var(--card-shadow);
}

.simple-wallet-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4B5563;
    margin-bottom: 8px;
    text-align: left;
}

.simple-wallet-form select,
.simple-wallet-form input[type="number"] {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 16px;
    background: #F9FAFB;
    transition: var(--transition);
}

.simple-wallet-form select:focus,
.simple-wallet-form input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: #ffffff;
}

.simple-wallet-form input[type="submit"] {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.simple-wallet-form input[type="submit"]:hover {
    background: #4338CA;
    transform: translateY(-1px);
}

.simple-wallet-form select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Add these media queries to the existing responsive styles section */
@media (max-width: 480px) {
    .simple-wallet-form {
        margin: 16px;
        padding: 16px;
    }

    .simple-wallet-form input[type="submit"] {
        padding: 10px 20px;
    }
}

/* Success/Error messages for the form */
.simple-wallet-form .message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    text-align: left;
}

.simple-wallet-form .message.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.simple-wallet-form .message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

