/* =================================
   WALLET STYLES - IMPROVED VERSION
   ================================= */

/* My Wallet Section */
.my-wallet {
    margin-bottom: 30px;
    text-align: center;
    padding: 20px;
    background: var(--white, #ffffff);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.my-wallet p {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text, #666666);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.my-wallet h3 {
    font-size: clamp(24px, 5vw, 35px);
    font-weight: 700;
    color: var(--primary, #007bff);
    margin: 0;
    line-height: 1.2;
}

/* Wallet Card Group */
.wallet-card-group {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 20px;
}

/* Individual Wallet Cards */
.wallet-card {
    padding: 20px;
    border-radius: 12px;
    background: var(--chalk, #f8f9fa);
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.wallet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.wallet-card:hover::before {
    left: 100%;
}

.wallet-card:hover {
    background: var(--primary, #007bff);
    border-color: var(--primary, #007bff);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.3);
}

.wallet-card:hover p,
.wallet-card:hover h3 {
    color: var(--white, #ffffff);
}

.wallet-card p {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text, #666666);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.wallet-card h3 {
    font-size: clamp(16px, 3vw, 20px);
    font-weight: 600;
    color: var(--heading, #333333);
    margin: 0;
    transition: all 0.3s ease;
}

/* Add Wallet Section */
.add-wallet {
    margin-top: 30px;
}

.add-wallet p {
    margin-bottom: 15px;
    font-weight: 500;
    color: var(--heading, #333333);
}

/* Wallet Form */
.wallet-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wallet-form input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    background: var(--chalk, #f8f9fa);
    border: 2px solid var(--border, #e9ecef);
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.wallet-form input:focus {
    border-color: var(--primary, #007bff);
    background: var(--white, #ffffff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.wallet-form input::placeholder {
    color: var(--text, #666666);
    opacity: 0.7;
}

.wallet-form button {
    font-size: 14px;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--white, #ffffff);
    background: var(--primary, #007bff);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.wallet-form button:hover {
    background: var(--primary-dark, #0056b3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.wallet-form button:active {
    transform: translateY(0);
}

/* Wallet Suggest */
.wallet-suggest {
    margin-top: 20px;
    padding: 20px;
    background: var(--chalk, #f8f9fa);
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.wallet-suggest h6 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--heading, #333333);
    margin: 0;
    white-space: nowrap;
}

.wallet-suggest ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wallet-suggest ul li a {
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--text, #666666);
    background: var(--white, #ffffff);
    border: 1px solid var(--border, #e9ecef);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.wallet-suggest ul li a:hover {
    color: var(--white, #ffffff);
    background: var(--primary, #007bff);
    border-color: var(--primary, #007bff);
    transform: translateY(-2px);
}

/* Table Improvements */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table > :not(:last-child) > :last-child > * {
    border-bottom-color: var(--border, #e9ecef);
}

.table thead tr {
    background: var(--primary, #007bff);
}

.table thead th {
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: var(--white, #ffffff);
    border: none;
    padding: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.3s ease;
}

.table tbody tr:hover {
    background: var(--chalk, #f8f9fa);
}

.table tbody tr th,
.table tbody tr td {
    font-size: 14px;
    font-weight: 400;
    color: var(--text, #666666);
    padding: 12px 15px;
    vertical-align: middle;
}

.table tbody tr th {
    border-right: 1px solid var(--border, #e9ecef);
    font-weight: 500;
    color: var(--heading, #333333);
}

.table .fw-bold {
    font-weight: 600 !important;
    color: var(--heading, #333333) !important;
}

/* Pagination */
.bottom-paginate {
    border-top: none;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.page-info {
    font-size: 14px;
    color: var(--text, #666666);
    margin: 0;
}

.pagination {
    display: flex;
    gap: 5px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .wallet-card-group {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 991px) {
    .table {
        font-size: 12px;
    }
    
    .table-responsive {
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .wallet-card {
        padding: 15px;
    }
    
    .my-wallet {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .wallet-card-group {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .wallet-card {
        padding: 12px;
    }
    
    .wallet-card h3 {
        font-size: 16px;
    }
    
    .wallet-form {
        gap: 12px;
    }
    
    .bottom-paginate {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 575px) {
    .wallet-suggest {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .wallet-suggest h6 {
        margin: 0;
    }
    
    .wallet-card-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .my-wallet h3 {
        font-size: 24px;
    }
    
    .wallet-form input {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .wallet-form button {
        width: 100%;
        padding: 12px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 8px;
        font-size: 12px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .my-wallet {
        background: var(--dark-bg, #2d3748);
        color: var(--dark-text, #ffffff);
    }
    
    .wallet-card {
        background: var(--dark-card, #4a5568);
    }
    
    .wallet-form input {
        background: var(--dark-input, #4a5568);
        color: var(--dark-text, #ffffff);
        border-color: var(--dark-border, #718096);
    }
}

/* Loading states */
.wallet-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.wallet-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary, #007bff);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error states */
.wallet-card.success {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.wallet-card.error {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}