:root {
    --assure-wallet-blue: #1e40af;
    --assure-wallet-dark: #1e3a8a;
    --assure-wallet-light: #dbeafe;
    --assure-wallet-bg: #f8fafc;
    --assure-wallet-radius: 14px;
    --assure-wallet-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    --assure-wallet-text: #0f172a;
    --assure-wallet-muted: #6b7280;
}

/* Wrapper base */
.assure-wallet-wrapper {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Card */
.assure-wallet-card {
    background: #ffffff;
    border-radius: var(--assure-wallet-radius);
    box-shadow: var(--assure-wallet-shadow);
    padding: 18px 18px 18px 18px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

/* Headers */
.assure-wallet-header {
    background: linear-gradient(135deg, var(--assure-wallet-dark), var(--assure-wallet-blue));
    border-radius: calc(var(--assure-wallet-radius) - 2px);
    padding: 16px 16px;
    color: #ffffff;
    margin: -18px -18px 16px -18px;
}

.assure-wallet-header.small {
    padding: 12px 16px;
}

.assure-wallet-header h2,
.assure-wallet-header h3 {
    margin: 0;
    font-weight: 700;
}

.assure-wallet-header p {
    margin: 4px 0 0;
    font-size: 13px;
    opacity: 0.9;
}

/* Body & Footer */
.assure-wallet-body {
    padding: 4px 0 12px 0;
}

.assure-wallet-footer {
    margin-top: 8px;
}

/* Form elements */
.assure-wallet-form-group {
    margin-bottom: 16px;
}

.assure-wallet-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--assure-wallet-muted);
    margin-bottom: 6px;
}

.assure-wallet-input,
.assure-wallet-body input[type="number"],
.assure-wallet-body input[type="text"],
.assure-wallet-body input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    color: var(--assure-wallet-text);
    background: #ffffff;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.assure-wallet-input:focus,
.assure-wallet-body input[type="number"]:focus,
.assure-wallet-body input[type="text"]:focus,
.assure-wallet-body input[type="email"]:focus {
    border-color: var(--assure-wallet-blue);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

/* Amount input with prefix */
.assure-wallet-amount-input {
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--assure-wallet-blue);
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.assure-wallet-currency {
    font-size: 22px;
    font-weight: 700;
    color: var(--assure-wallet-dark);
    margin-right: 8px;
}

.assure-wallet-amount-input input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 26px;
    font-weight: 700;
    width: 100%;
    color: var(--assure-wallet-dark);
}

.assure-wallet-amount-input input::placeholder {
    color: #9ca3af;
}

/* Quick chips */
.assure-wallet-quick-chips {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.assure-wallet-chip {
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #ffffff;
    color: var(--assure-wallet-blue);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.assure-wallet-chip:hover {
    background: var(--assure-wallet-blue);
    color: #ffffff;
    border-color: var(--assure-wallet-blue);
    transform: translateY(-1px);
}

/* Info text */
.assure-wallet-info {
    background: var(--assure-wallet-light);
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    font-size: 13px;
    color: var(--assure-wallet-text);
}

/* Buttons */
.assure-wallet-btn {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--assure-wallet-blue), var(--assure-wallet-dark));
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(30, 64, 175, 0.3);
    transition: all 0.2s ease;
}

.assure-wallet-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(30, 64, 175, 0.4);
}

.assure-wallet-btn:disabled,
.assure-wallet-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.assure-wallet-arrow {
    font-size: 18px;
}

/* Balance / Rewards */
.assure-wallet-balance-amount,
.assure-wallet-rewards-amount {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 6px;
}

.assure-wallet-balance-label,
.assure-wallet-rewards-label {
    font-size: 13px;
    color: var(--assure-wallet-muted);
}

.assure-wallet-balance-value,
.assure-wallet-rewards-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--assure-wallet-blue);
}

/* Credit grid */
.assure-wallet-credit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.assure-wallet-credit-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
}

.assure-wallet-credit-label {
    display: block;
    font-size: 12px;
    color: var(--assure-wallet-muted);
    margin-bottom: 4px;
}

.assure-wallet-credit-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--assure-wallet-blue);
}

/* Transactions table */
.assure-wallet-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.assure-wallet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.assure-wallet-table thead {
    background: #eff6ff;
}

.assure-wallet-table th,
.assure-wallet-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.assure-wallet-table th {
    font-weight: 600;
    color: var(--assure-wallet-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.07em;
}

.assure-wallet-table tbody tr:hover {
    background: #f9fafb;
}

.assure-wallet-amount-credit {
    color: #15803d;
    font-weight: 600;
}

.assure-wallet-amount-debit {
    color: #b91c1c;
    font-weight: 600;
}

/* Pagination */
.assure-wallet-pagination {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.assure-wallet-page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    font-size: 12px;
    color: var(--assure-wallet-muted);
    cursor: default;
}

.assure-wallet-page-number.current {
    background: var(--assure-wallet-blue);
    border-color: var(--assure-wallet-blue);
    color: #ffffff;
}

/* Dashboard layout */
.assure-wallet-dashboard {
    background: var(--assure-wallet-bg);
    padding: 10px;
    border-radius: 16px;
}

.assure-wallet-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    grid-auto-rows: auto;
    gap: 16px;
}

.assure-wallet-dashboard-item {
    width: 100%;
}

.assure-wallet-dashboard-wide {
    grid-column: 1 / -1;
}

/* Small description text */
.assure-wallet-description {
    font-size: 13px;
    color: var(--assure-wallet-muted);
    margin-top: 8px;
}

/* Scrollbar tweaks for chips */
.assure-wallet-quick-chips::-webkit-scrollbar {
    height: 4px;
}
.assure-wallet-quick-chips::-webkit-scrollbar-track {
    background: transparent;
}
.assure-wallet-quick-chips::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* Responsive tweaks */
@media (max-width: 640px) {
    .assure-wallet-card {
        padding: 14px;
    }

    .assure-wallet-header {
        margin: -14px -14px 12px -14px;
    }

    .assure-wallet-credit-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}
/* ONLY convert black heading text to white */

/* Section headers text */
.assure-wallet-header h2,
.assure-wallet-header h3 {
    color: #ffffff !important;
}

/* Card titles inside body (if any) */
.assure-wallet-card h2,
.assure-wallet-card h3 {
    color: #ffffff !important;
}

/* Fallback for plain text titles */
.assure-wallet-card > h2,
.assure-wallet-card > h3 {
    color: #ffffff !important;
}
/* Make grey background transparent (ONLY wallet sections) */
.assure-wallet-dashboard,
.assure-wallet-dashboard-item {
    background: transparent !important;
}

/* =====================================================
   CHECKOUT – PARTIAL WALLET PAYMENT UI
   ===================================================== */

.assure-wallet-checkout-box {
    margin: 16px 0;
    padding: 16px;
    border-radius: var(--assure-wallet-radius);
    background: linear-gradient(
        135deg,
        rgba(30, 64, 175, 0.08),
        rgba(30, 58, 138, 0.06)
    );
    border: 1px solid rgba(30, 64, 175, 0.25);
}

.assure-wallet-checkout-box > label {
    font-weight: 700;
    font-size: 14px;
    color: var(--assure-wallet-text);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.assure-wallet-checkout-box input[type="checkbox"] {
    transform: scale(1.15);
    accent-color: var(--assure-wallet-blue);
}

/* Wallet options */
.assure-wallet-options {
    margin-top: 12px;
    padding-left: 4px;
}

.assure-wallet-options p {
    margin: 6px 0 10px;
    font-weight: 700;
    font-size: 14px;
    color: var(--assure-wallet-blue);
}

.assure-wallet-options label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--assure-wallet-text);
    cursor: pointer;
}

.assure-wallet-options input[type="radio"] {
    margin-right: 6px;
    accent-color: var(--assure-wallet-blue);
}

/* Custom amount input */
#assure_wallet_custom_amount {
    margin-top: 8px;
    width: 100%;
    max-width: 240px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #c7d2fe;
    font-size: 14px;
    color: var(--assure-wallet-text);
    background: #ffffff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#assure_wallet_custom_amount:focus {
    outline: none;
    border-color: var(--assure-wallet-blue);
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.2);
}

/* Highlight wallet deduction line in order summary */
.woocommerce-checkout-review-order-table .fee td {
    font-weight: 700;
    color: var(--assure-wallet-blue);
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .assure-wallet-checkout-box {
        padding: 14px;
    }

    #assure_wallet_custom_amount {
        max-width: 100%;
    }
}
