/* General Page Layout */

.wallet-page {
  background-color: #f4f7f8;
  min-height: 100vh;
  padding: 40px 20px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}


.wallet-main-content {
    background-color: #f8faf9;
    padding: 2rem;
    max-width: 1000px;
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wallet-header h2 {
    font-size:25px;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.wallet-header p {
    color: #6c757d;
    margin-bottom: 2rem;
}

/* Balance Card Styling */
.wallet-balance-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #eef0ef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.wallet-balance-card h2{
    font-size: 22px;
    font-weight: 600;
}

.balance-info small {
    color: #888;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.balance-info h2 {
    font-size: 2.5rem;
    margin: 0.5rem 0;
}

.currency {
    font-size: 1.25rem;
    color: #adb5bd;
}

.update-text {
    color: #adb5bd !important;
    display: block;
    margin-top: 0.5rem;
}

.add-money-btn {
    background-color: #fec107;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

/* Transactions Table */
.transactions-container {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #eef0ef;
}

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.transactions-header h3{
    font-size: 20px;
    font-weight: 700;
}

.download-link {
    font-size: 0.85rem;
    color: #495057;
    text-decoration: none;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
}

.transactions-table th {
    text-align: left;
    font-size: 0.7rem;
    color: #999;
    padding: 1rem;
    border-bottom: 1px solid #eef0ef;
}

.transactions-table td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #eef0ef;
}

/* Icon and Typography */
.desc-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-wrapper {
    width: 40px;
    height: 40px;
    background: #f0f7f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007bff;
}

.title {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.subtitle {
    color: #999;
    font-size: 0.85rem;
}

.date{
    font-size: 10px;
}

.date-text { margin: 0; }
.time-text { color: #999; }

.amount.credit {
    color: #28a745; /* Green */
    font-weight: 700;
}

/* Red for money spent/removed (Debit) */
.amount.debit {
    color: #dc3545; /* Red */
    font-weight: 700;
}


.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    
    /* Using Grid for foolproof centering */
    display: grid;
    place-items: center; 
    
    z-index: 9999; /* Ensure it stays on top */
    overflow-y: auto; /* Handles small screens */
}

/* Modal Content Box */
.modal-content {
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box; /* Ensures padding doesn't break layout */
    font-size: 1rem;
}

.modal-content button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

#submitAddMoney {
    background: #ffc107;
    color: #000;
}

.modal-content button[onclick*="none"] {
    background: #f8f9fa;
    color: #666;
}

@media (max-width: 767px) {
    .transactions-table, 
    .transactions-table tbody, 
    .transactions-table tr, 
    .transactions-table td {
        display: block;
        width: 100%;
    }

    .transactions-table thead { display: none; }

    .transactions-table tr {
        background: #fff;
        border: 1px solid #eef0ef;
        border-radius: 12px;
        margin-bottom: 12px;
        padding: 10px 12px;
    }

    .transactions-table td {
        border: none;
        padding: 6px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        font-size: 10px;
    }

    .transactions-table td::before {
        font-weight: 600;
        color: #999;
        font-size: 10px;
        text-transform: uppercase;
    }

    .transactions-table td:nth-child(1)::before { content: "Description"; }
    .transactions-table td:nth-child(2)::before { content: "Date"; }
    .transactions-table td:nth-child(3)::before { content: "Amount"; }

    .desc-cell, .amount { justify-content: flex-end; text-align: right; }

    .add-money-btn {font-size: 10px;}
    .wallet-header h2 {font-size: 16px;}

}