/* --- Color Variables (Inspired by Circle's modern, clean design) --- */
:root {
    --color-lavender-bg: #F8F7FF; /* Very light pale purple for background */
    --color-primary-purple: #5E35B1; /* Deep purple for logo/accents (similar to Circle's main branding) */
    --color-secondary-blue: #0B53BF; /* Blue for the USDC icon and some accents */
    --color-text-dark: #1A1A2E; /* Very dark text for contrast */
    --color-text-light: #9B8DBE; /* Lighter purple/gray for hints/status */
    --color-card-bg: white; /* White cards stand out against the background */
    --color-success: #28a745; /* Green for successful actions/status */
    --color-error: #dc3545; /* Red for errors/reset */
}

/* --- General Reset and Typography --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* Use a clean, modern sans-serif stack */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
}

body {
    background-color: var(--color-lavender-bg);
    color: var(--color-text-dark);
    line-height: 1.5;
    min-height: 100vh;
    padding: 20px;
}

/* --- Header and Navigation --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto 40px;
}

header h1 {
    display: flex;
    align-items: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-dark);
    gap: 10px;
}

/* USDC Icon Styling */
header h1 svg {
    /* Use the intrinsic color from the SVG, but ensure size is appropriate */
    width: 32px;
    height: 32px;
    vertical-align: middle;
}

/* Connect Wallet Button (Primary Action) */
#connectWalletBtn {
    background-color: var(--color-primary-purple);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px; /* Highly rounded */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#connectWalletBtn:hover {
    background-color: #4C2B95;
}

#connectWalletBtn:disabled {
    background-color: var(--color-text-light);
    cursor: not-allowed;
}


/* --- Status Panel (Clean Display) --- */
#status {
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 20px 40px;
    background-color: var(--color-card-bg);
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--color-primary-purple);
}

#status h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--color-primary-purple);
    font-weight: 600;
}

#status p {
    margin: 5px 0;
    font-size: 15px;
}

#walletAddress, #WalletBalance, #Deposited {
    font-weight: 600;
    color: var(--color-text-dark);
}

/* --- Main Container (Two-Column Layout) --- */
.container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Card Styling --- */
.card {
    flex: 1; /* Both cards take up equal space */
    background-color: var(--color-card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.card h2 {
    font-size: 24px;
    color: var(--color-text-dark);
    margin-bottom: 25px;
    font-weight: 700;
    border-bottom: 2px solid var(--color-lavender-bg);
    padding-bottom: 10px;
}

.hint {
    color: var(--color-text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

/* --- Input Groups --- */
.input-group {
    margin-bottom: 20px;
}

.input-group input[type="number"],
.input-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus {
    border-color: var(--color-primary-purple);
    outline: none;
    box-shadow: 0 0 0 3px rgba(94, 53, 177, 0.1);
}

/* --- Button Group Styles (Deposit/Withdraw) --- */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.button-group button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
    white-space: nowrap;
}

/* Deposit Button (Primary Action Color) */
#depositBtn {
    background-color: var(--color-primary-purple);
    color: white;
}

#depositBtn:hover {
    background-color: #4C2B95;
}

/* Withdraw Button (Secondary/Accent Color) */
#withdrawBtn {
    background-color: var(--color-secondary-blue);
    color: white;
}

#withdrawBtn:hover {
    background-color: #084099;
}

/* Add Recipient Button */
#addRecipientBtn {
    background-color: var(--color-success);
    color: white;
    width: 100%;
    margin-top: 10px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

#addRecipientBtn:hover {
    background-color: #1f8b37;
}

/* --- Recipient List --- */
#recipientListContainer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--color-lavender-bg);
}

#recipientListContainer h3 {
    font-size: 18px;
    color: var(--color-text-dark);
    margin-bottom: 15px;
}

#recipientList {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 10px;
}

#recipientList li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
}

#recipientList li:last-child {
    border-bottom: none;
}

.remove-btn {
    background: none;
    color: var(--color-error);
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.8;
}

.remove-btn:hover {
    opacity: 1;
    text-decoration: underline;
}

/* --- Multisend Footer --- */
.multisend-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--color-lavender-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#totalSendingAmount {
    font-weight: 700;
    font-size: 18px;
    color: var(--color-primary-purple);
}

.multisend-footer .button-group {
    margin-top: 0;
    gap: 10px;
}

#resetInputBtn {
    background-color: var(--color-error);
    color: white;
    flex: none;
    width: auto;
}

#resetInputBtn:hover {
    background-color: #b72a39;
}

#sendFundsBtn {
    background-color: var(--color-primary-purple);
    color: white;
    flex: none;
    width: auto;
}

#sendFundsBtn:hover {
    background-color: #4C2B95;
}

/* --- Disabled State for Buttons --- */
button:disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
    box-shadow: none;
}

.toast-container {
    /* Positioning: Standard top-center */
    position: fixed;
    top: 20px; /* Clean offset from the top */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;

    /* Appearance: Modern, clean card look */
    background-color: white; /* Default background for neutrality */
    color: var(--color-text-dark, #1A1A2E); /* Dark text on light toast */
    
    padding: 15px 25px;
    border-radius: 10px; /* Slightly more rounded */
    border: 1px solid rgba(0, 0, 0, 0.1); /* Subtle border for definition */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Modern, lifted shadow */
    
    font-size: 16px;
    font-weight: 500;
    min-width: 250px;
    max-width: 90vw;
    text-align: center;
    transition: opacity 0.3s, transform 0.3s; /* Add transition for animations */
}

/* --- Contextual Styles --- */

/* Success (e.g., Transaction Confirmed) */
.toast-success {
    background-color: #E6F7E9; /* Very light green background */
    border-left: 5px solid var(--color-success, #28a745); /* Strong indicator bar */
    color: #1f7a36; /* Darker green text */
    text-align: left;
}

/* Error (e.g., Transaction Failed) */
.toast-error {
    background-color: #FEEEEE; /* Very light red background */
    border-left: 5px solid var(--color-error, #dc3545); /* Strong indicator bar */
    color: #a72330; /* Darker red text */
    text-align: left;
}

/* Warning (e.g., Low Gas Fee, Non-finalized) */
.toast-warning {
    background-color: #FFFBEA; /* Very light yellow background */
    border-left: 5px solid var(--color-warning, #ffc107);
    color: #8f6b00; /* Dark yellow/brown text */
    text-align: left;
}

/* Info (Default/Processing - e.g., Transaction Broadcasted) */
.toast-info {
    /* Uses the primary DApp purple/blue for a strong brand look */
    background-color: #EFF2FF; /* Very light lavender/blue background */
    border-left: 5px solid var(--color-primary-purple, #5E35B1);
    color: var(--color-primary-purple, #5E35B1); /* Purple text */
    text-align: left;
}

/* --- Media Queries (Responsiveness) --- */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }

    .card {
        flex: none; /* Reset flex to allow full width */
        width: 100%;
        padding: 30px;
    }
    
    header {
        padding: 20px 20px;
    }

    #status {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    header h1 {
        font-size: 22px;
    }
    
    .button-group {
        flex-direction: column;
    }

    .button-group button {
        width: 100%;
    }

    .multisend-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .multisend-footer .button-group {
        width: 100%;
        margin-top: 15px;
    }
}