/* =================================
   ULTIMATE & PROFESSIONAL WALLET PAGE STYLES
   ================================= */
:root {
    --primary-color: #A3C86C;
    --primary-dark: #7D9A4D;
    --primary-light: #B8D88A;
    --primary-extra-light: #F3F7E1;
    --accent-color: #F9D34E;
    --accent-dark: #E1B93F;
    --background-white: #FFFFFF;
    --background-light: #F1F8E4;
    --text-color: #4F4A35;
    --text-light: #7D7B55;
    --text-lighter: #A4A38F;
    --text-on-primary: #FFFFFF;
    --divider-color: rgba(163, 200, 108, 0.2);
    --error-red: #B71C1C;
    --radius: 16px;
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* ★★★ এখানে পরিবর্তন করা হয়েছে ★★★ */
html, body {
    overflow-x: hidden;
    width: 100%;
}

.wallet-page-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    overflow-x: hidden;
}

/* --- Hero Card --- */
.wallet-hero-card {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--text-on-primary);
    padding: 2rem 2.5rem;
    border-radius: var(--radius);
    margin-bottom: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(125, 154, 77, 0.3);
    position: relative;
    overflow: hidden;
}

.wallet-hero-card::before {
    content: '\f51e'; /* FontAwesome coins icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: -30px;
    right: -40px;
    font-size: 150px;
    color: rgba(255, 255, 255, 0.08);
    transform: rotate(-15deg);
}

.wallet-balance-label {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}
.wallet-balance-amount {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.75rem;
}
.wallet-balance-value {
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    display: inline-block;
}

/* --- COMPACT TABS --- */
.wallet-tabs {
    display: flex;
    gap: 0.25rem; /* Reduced gap for tighter layout */
    margin-bottom: 2rem;
    background: var(--primary-extra-light);
    padding: 0.5rem;
    border-radius: 12px;
    justify-content: center; /* Center the tabs */
}
.tab-link {
    flex: 1;
    padding: 0.7rem 0.8rem; /* Slightly reduced padding */
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.85rem; /* Slightly smaller font */
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem; /* Reduced gap between icon and text */
    min-width: 0; /* Allow buttons to shrink if needed */
    white-space: nowrap; /* Prevent text wrapping */
}
.tab-link:hover {
    background: var(--divider-color);
    color: var(--primary-dark);
}
.tab-link.active {
    background: var(--background-white);
    color: var(--primary-dark);
    box-shadow: 0 3px 10px rgba(0,0,0,0.07);
}
.badge {
    background-color: var(--error-red);
    color: white;
    font-size: 0.65rem; /* Slightly smaller badge */
    padding: 2px 5px;
    border-radius: 10px;
    margin-left: 3px;
}

/* --- Tab Content --- */
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: tabFadeIn 0.5s ease; }
@keyframes tabFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Transaction History & Expiring List */
.transactions-list, .expiry-list {
    background: var(--background-white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    overflow: hidden;
}
.transaction-item, .expiring-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--divider-color);
}
.transaction-item:last-child, .expiring-item:last-child { border-bottom: none; }

/* ★★★ এখানে পরিবর্তন করা হয়েছে ★★★ */
.transaction-icon {
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    display: flex;
    align-items: center; 
    justify-content: center; 
    color: white;
    flex-shrink: 0; /* Prevents the icon from shrinking */
}
.transaction-icon.earned { background: var(--primary-color); }
.transaction-icon.spent { background: var(--error-red); }
.transaction-details h4, .expiring-info h4 { margin: 0 0 0.2rem; font-size: 1rem; color: var(--text-color); }
.transaction-details p, .expiring-info p { margin: 0; font-size: 0.85rem; color: var(--text-lighter); }
.transaction-amount, .expiring-date { 
    margin-left: auto; 
    text-align: right; 
    flex-shrink: 0;
}
.transaction-amount { font-weight: 600; font-size: 1.1rem; }
.transaction-amount.positive { color: var(--primary-dark); }
.transaction-amount.negative { color: var(--error-red); }
.expiring-date strong { color: var(--accent-dark); }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-lighter);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

/* How It Works Tab */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.info-card { 
    text-align: center; 
    padding: 1.5rem;
    background: var(--background-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-light);
}
.info-card i { font-size: 2rem; color: var(--primary-dark); margin-bottom: 1rem; }
.info-card h4 { margin: 0 0 0.5rem 0; color: var(--text-color); }
.info-card p { margin: 0; color: var(--text-light); font-size: 0.9rem; }


/* --- SKELETON LOADER --- */
.skeleton {
    background: linear-gradient(90deg, #e9e9e9 25%, #f5f5f5 50%, #e9e9e9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-content { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; width: 100%; }
.skeleton-line { height: 20px; border-radius: 4px; }
.skeleton-line.large { width: 60%; height: 40px; margin-bottom: 0.5rem; }
.skeleton-line.medium { width: 50%; height: 20px; }
.skeleton-line.small { width: 30%; height: 16px; }
.skeleton-icon { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.skeleton-icon.small { width: 30px; height: 30px; }
.skeleton-text-group { flex-grow: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.skeleton-line.short { width: 50%; }
.transaction-item.skeleton .skeleton-text-group { gap: 0.75rem; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .wallet-page-container {
        padding: 0 0.5rem;
        margin: 1rem auto;
    }
    
    .wallet-hero-card {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .wallet-balance-amount {
        font-size: 2.5rem;
    }
    
    .wallet-tabs {
        flex-direction: row; /* Keep tabs in a row on mobile */
        padding: 0.4rem;
        gap: 0.2rem;
    }
    
    .tab-link {
        padding: 0.6rem 0.5rem;
        font-size: 0.8rem;
        gap: 0.3rem;
    }
    
    .tab-link i {
        font-size: 0.9rem; /* Slightly smaller icons on mobile */
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .transactions-list, .expiry-list {
        padding: 1rem;
    }
    
    .transaction-item, .expiring-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .transaction-amount, .expiring-date {
        margin-left: 0;
        text-align: left;
        width: 100%;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .wallet-tabs {
        flex-wrap: nowrap; /* Prevent wrapping */
        overflow-x: auto; /* Allow horizontal scrolling if needed */
        justify-content: flex-start; /* Align to start on very small screens */
        padding-bottom: 0.7rem; /* Add space for scroll if needed */
    }
    
    .tab-link {
        min-width: 100px; /* Minimum width for tabs */
        flex: none; /* Don't allow flex growing */
    }
    
    .tab-link span:not(.badge) {
        display: none; /* Hide text on very small screens, show only icons */
    }
    
    .tab-link.active span:not(.badge) {
        display: inline; /* Show text for active tab */
    }
}