/*!
 * TeachDemy — "My Wallet" UI/UX refinement
 * ---------------------------------------------------------
 * Scope: ONLY the wallet-related WooCommerce My Account tabs:
 *   - account-funds        (main wallet / balance chart tab)
 *   - withdrawal_requests  (submit + list withdrawal requests)
 *   - wallet_addresses     (saved crypto wallet addresses)
 *
 * WooCommerce automatically adds a body class per endpoint:
 *   woocommerce-endpoint-account-funds
 *   woocommerce-endpoint-withdrawal_requests
 *   woocommerce-endpoint-wallet_addresses
 * so this file cannot leak onto Home, other My Account tabs,
 * or any other page — even if the class names below (.tdp-table,
 * status pills, etc.) are reused elsewhere in the future.
 *
 * Item 46: restyled to MATCH THE AFFILIATE DASHBOARD design language —
 * white cards with #dce9e7 borders, 14–16px radii, teal/green/gold/red
 * brand accents, tabular-numerals on amounts, section headings, and a
 * neutralized jQuery-UI datepicker popup with crisp chevron arrows
 * (the old circle-triangle sprite icons + themed header background are
 * overridden below with pure CSS).
 *
 * Several elements are styled with `!important` only because the
 * plugin currently prints inline `style="..."` attributes, which
 * otherwise cannot be overridden from a stylesheet.
 *
 * Round 15 ("Edits 2") additions: (12) native date/week/month inputs
 * in the wallet tabs get the affiliate-dashboard calendar look, and
 * the jQuery-UI datepicker styles of section 11 were widened to all
 * three wallet tabs; (13) the exact-balance headline (.tdp-wallet-
 * balance, rendered by the plugin with number_format(…, 2) precision)
 * replaces the Account Funds plugin's rounded <p> readout.
 * ---------------------------------------------------------
 */

:root{
  --tdw-blue:        #087d72; /* accent — teal (was #45ADD6) */
  --tdw-blue-dark:   #06655c;
  --tdw-blue-tint:   #e9fbf4;
  --tdw-green:       #18b47d;
  --tdw-green-tint:  #e9fbf4;
  --tdw-red:         #d63638;
  --tdw-red-tint:    #fdeaea;
  --tdw-amber:       #f3b82f;
  --tdw-amber-tint:  #fdf3dc;
  --tdw-ink:         #092b36;
  --tdw-ink-dim:     #52696e;
  --tdw-ink-faint:   #93a0ac;
  --tdw-border:      #dce9e7;
  --tdw-bg-soft:     #f4faf8;
  --tdw-radius-lg:   16px;
  --tdw-radius-md:   14px;
  --tdw-radius-sm:   10px;
  --tdw-shadow:      0 8px 24px -12px rgba(9,43,54,.14);
}

body.woocommerce-endpoint-account-funds,
body.woocommerce-endpoint-withdrawal_requests,
body.woocommerce-endpoint-wallet_addresses{
  background:#fff;
}

/* =========================================================
   1. Shared card / section wrapper
   ========================================================= */
body.woocommerce-endpoint-account-funds .woocommerce-MyAccount-content > div,
body.woocommerce-endpoint-withdrawal_requests .woocommerce-MyAccount-content > div,
body.woocommerce-endpoint-wallet_addresses .woocommerce-MyAccount-content > div{
  background:#fff !important;
  border:1px solid var(--tdw-border) !important;
  border-radius:var(--tdw-radius-lg) !important;
  box-shadow:var(--tdw-shadow);
  padding:24px !important;
  margin-top:0 !important;
}

/* section title row ("Withdrawal Requests", "My Wallet Addresses") + every
   heading inside the wallet tabs — styled like the affiliate dashboard's
   section headings (ink color, bold, hairline underline). */
body.woocommerce-endpoint-account-funds h2,
body.woocommerce-endpoint-account-funds h3,
body.woocommerce-endpoint-account-funds h4,
body.woocommerce-endpoint-withdrawal_requests h2,
body.woocommerce-endpoint-withdrawal_requests h3,
body.woocommerce-endpoint-withdrawal_requests h4,
body.woocommerce-endpoint-wallet_addresses h2,
body.woocommerce-endpoint-wallet_addresses h3,
body.woocommerce-endpoint-wallet_addresses h4{
  font-size:17px !important;
  font-weight:700 !important;
  color:var(--tdw-ink) !important;
  border-bottom:1px solid var(--tdw-border);
  padding-bottom:8px;
}

/* Item 3/46: amounts everywhere in the wallet tabs render with
   tabular numerals so columns line up and balances don't wobble. */
body.woocommerce-endpoint-account-funds .woocommerce-MyAccount-content,
body.woocommerce-endpoint-withdrawal_requests .woocommerce-MyAccount-content,
body.woocommerce-endpoint-wallet_addresses .woocommerce-MyAccount-content{
  font-variant-numeric:tabular-nums;
}
body.woocommerce-endpoint-account-funds .woocommerce-Price-amount,
body.woocommerce-endpoint-withdrawal_requests .woocommerce-Price-amount,
body.woocommerce-endpoint-wallet_addresses .woocommerce-Price-amount{
  font-variant-numeric:tabular-nums;
}

/* =========================================================
   2. Buttons — unify every hardcoded inline button
   (Submit request, Add wallet, Submit, Filter, Reset, Save CSV)
   ========================================================= */
body.woocommerce-endpoint-account-funds a[id^="save_"],
body.woocommerce-endpoint-account-funds button[id^="save_"],
body.woocommerce-endpoint-withdrawal_requests a[id^="open_"],
body.woocommerce-endpoint-withdrawal_requests a[id^="submit_"],
body.woocommerce-endpoint-withdrawal_requests button[id^="submit_"],
body.woocommerce-endpoint-wallet_addresses a[id^="add_"],
body.woocommerce-endpoint-wallet_addresses button[id^="add_"],
body.woocommerce-endpoint-wallet_addresses a[id^="submit_"],
body.woocommerce-endpoint-wallet_addresses button[id^="submit_"],
body.woocommerce-endpoint-account-funds .table-filter-container button{
  background:var(--tdw-blue) !important;
  border:none !important;
  color:#fff !important;
  padding:10px 20px !important;
  border-radius:var(--tdw-radius-sm) !important;
  font-weight:600 !important;
  font-size:13.5px !important;
  box-shadow:0 6px 16px -8px rgba(8,125,114,.55);
  transition:background .2s, transform .2s;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
body.woocommerce-endpoint-account-funds a[id^="save_"]:hover,
body.woocommerce-endpoint-account-funds button[id^="save_"]:hover,
body.woocommerce-endpoint-withdrawal_requests a[id^="open_"]:hover,
body.woocommerce-endpoint-withdrawal_requests a[id^="submit_"]:hover,
body.woocommerce-endpoint-withdrawal_requests button[id^="submit_"]:hover,
body.woocommerce-endpoint-wallet_addresses a[id^="add_"]:hover,
body.woocommerce-endpoint-wallet_addresses button[id^="add_"]:hover,
body.woocommerce-endpoint-wallet_addresses a[id^="submit_"]:hover,
body.woocommerce-endpoint-wallet_addresses button[id^="submit_"]:hover,
body.woocommerce-endpoint-account-funds .table-filter-container button:hover{
  background:var(--tdw-blue-dark) !important;
  transform:translateY(-1px);
}
/* "Reset" filter button — keep as a quiet secondary action */
body.woocommerce-endpoint-account-funds #reset_filter{
  background:#fff !important;
  border:1.5px solid var(--tdw-border) !important;
  color:var(--tdw-ink-dim) !important;
  box-shadow:none !important;
}
body.woocommerce-endpoint-account-funds #reset_filter:hover{
  border-color:var(--tdw-blue) !important;
  color:var(--tdw-blue) !important;
}
/* delete / danger action buttons */
body.woocommerce-endpoint-withdrawal_requests .delete-wallet-address,
body.woocommerce-endpoint-wallet_addresses .delete-wallet-address{
  background:#fff !important;
  border:1.5px solid var(--tdw-red) !important;
  color:var(--tdw-red) !important;
  padding:6px 14px !important;
  border-radius:var(--tdw-radius-sm) !important;
  font-weight:600 !important;
  font-size:12.5px !important;
  cursor:pointer;
}
body.woocommerce-endpoint-withdrawal_requests .delete-wallet-address:hover,
body.woocommerce-endpoint-wallet_addresses .delete-wallet-address:hover{
  background:var(--tdw-red) !important;
  color:#fff !important;
}

/* =========================================================
   3. Collapsible "new request / new wallet" panels
   ========================================================= */
body.woocommerce-endpoint-withdrawal_requests #request_withdraw_container,
body.woocommerce-endpoint-wallet_addresses #add_new_wallet_container{
  background:var(--tdw-bg-soft) !important;
  border:1px solid var(--tdw-border) !important;
  border-radius:var(--tdw-radius-md) !important;
  padding:20px !important;
  margin-top:14px !important;
  gap:16px !important;
}
/* the "not responsible for wrong address" warning strip */
body.woocommerce-endpoint-withdrawal_requests #request_withdraw_container > div:first-child{
  background:var(--tdw-amber-tint) !important;
  color:#8a6414 !important;
  border:1px solid rgba(243,184,47,.55) !important;
  border-radius:var(--tdw-radius-sm) !important;
  padding:10px 14px !important;
  font-size:13px !important;
  text-align:start !important;
}

/* =========================================================
   4. Inputs / selects (amount, wallet address, dates)
   ========================================================= */
body.woocommerce-endpoint-account-funds input,
body.woocommerce-endpoint-account-funds select,
body.woocommerce-endpoint-withdrawal_requests input,
body.woocommerce-endpoint-withdrawal_requests select,
body.woocommerce-endpoint-wallet_addresses input,
body.woocommerce-endpoint-wallet_addresses select{
  border:1.5px solid var(--tdw-border) !important;
  border-radius:var(--tdw-radius-sm) !important;
  padding:10px 12px !important;
  font-size:13.5px !important;
  background:#fff !important;
  color:var(--tdw-ink) !important;
  color-scheme:light;
  transition:border-color .2s;
}
body.woocommerce-endpoint-account-funds input:focus,
body.woocommerce-endpoint-account-funds select:focus,
body.woocommerce-endpoint-withdrawal_requests input:focus,
body.woocommerce-endpoint-withdrawal_requests select:focus,
body.woocommerce-endpoint-wallet_addresses input:focus,
body.woocommerce-endpoint-wallet_addresses select:focus{
  border-color:var(--tdw-blue) !important;
  outline:none;
  box-shadow:0 0 0 3px var(--tdw-blue-tint);
}
body.woocommerce-endpoint-withdrawal_requests label strong,
body.woocommerce-endpoint-wallet_addresses label strong{
  font-size:12.5px !important;
  color:var(--tdw-ink-dim) !important;
  font-weight:600 !important;
  display:block;
  margin-bottom:6px;
}

/* =========================================================
   5. Balance chart card (canvas comes from the plugin's JS,
   this just gives it a clean, contained frame + fixed height)
   ========================================================= */
body.woocommerce-endpoint-account-funds #balanceChart{
  max-height:320px !important;
}
body.woocommerce-endpoint-account-funds .table-filter-container{
  display:flex !important;
  align-items:flex-end !important;
  gap:14px !important;
  flex-wrap:wrap;
  background:var(--tdw-bg-soft) !important;
  border:1px solid var(--tdw-border) !important;
  border-radius:var(--tdw-radius-md) !important;
  padding:16px !important;
  margin-bottom:18px !important;
}

/* =========================================================
   6. Tables (withdrawal requests + transactions)
   Item 35.4: centered on wide screens + centered numeric columns
   + tabular numerals, matching the affiliate dashboard tables.
   ========================================================= */
body.woocommerce-endpoint-account-funds table.tdp-table,
body.woocommerce-endpoint-withdrawal_requests table.tdp-table,
body.woocommerce-endpoint-wallet_addresses table.tdp-table{
  width:100%;
  max-width:1080px;
  margin:16px auto !important; /* centered on wide screens */
  border-collapse:separate !important;
  border-spacing:0;
  font-variant-numeric:tabular-nums;
}
body.woocommerce-endpoint-account-funds table.tdp-table thead th,
body.woocommerce-endpoint-withdrawal_requests table.tdp-table thead th,
body.woocommerce-endpoint-wallet_addresses table.tdp-table thead th{
  background:var(--tdw-bg-soft) !important;
  color:var(--tdw-ink-dim) !important;
  font-size:11.5px !important;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:700 !important;
  padding:12px 14px !important;
  border-bottom:2px solid var(--tdw-blue) !important;
  text-align:start;
}
body.woocommerce-endpoint-account-funds table.tdp-table tbody td,
body.woocommerce-endpoint-withdrawal_requests table.tdp-table tbody td,
body.woocommerce-endpoint-wallet_addresses table.tdp-table tbody td{
  padding:12px 14px !important;
  font-size:13px !important;
  border-bottom:1px solid var(--tdw-border) !important;
  color:var(--tdw-ink) !important;
  font-variant-numeric:tabular-nums;
}
/* numeric columns, centered (transactions: # / Amount / Balance) */
body.woocommerce-endpoint-account-funds table.tdp-table tbody td:nth-child(1),
body.woocommerce-endpoint-account-funds table.tdp-table tbody td:nth-child(3),
body.woocommerce-endpoint-account-funds table.tdp-table tbody td:nth-child(4),
body.woocommerce-endpoint-account-funds table.tdp-table thead th:nth-child(1),
body.woocommerce-endpoint-account-funds table.tdp-table thead th:nth-child(3),
body.woocommerce-endpoint-account-funds table.tdp-table thead th:nth-child(4){
  text-align:center !important;
}
/* numeric columns, centered (withdrawal requests: # / Amount) */
body.woocommerce-endpoint-withdrawal_requests table.tdp-table tbody td:nth-child(1),
body.woocommerce-endpoint-withdrawal_requests table.tdp-table tbody td:nth-child(2),
body.woocommerce-endpoint-withdrawal_requests table.tdp-table thead th:nth-child(1),
body.woocommerce-endpoint-withdrawal_requests table.tdp-table thead th:nth-child(2){
  text-align:center !important;
}
/* neutralize the inline row background on transaction rows and
   replace with a subtle left border instead — cleaner, still legible */
body.woocommerce-endpoint-account-funds table.tdp-table tbody tr[style]{
  background:#fff !important;
  border-inline-start:3px solid transparent;
}
body.woocommerce-endpoint-account-funds table.tdp-table tbody tr:hover{
  background:var(--tdw-bg-soft) !important;
}

/* =========================================================
   7. Status pills — catches any "{status}--status" class
   (pending, approved, rejected, completed, cancelled, …)
   ========================================================= */
body.woocommerce-endpoint-withdrawal_requests [class$="--status"]{
  display:inline-block;
  padding:5px 12px;
  border-radius:100px;
  font-size:11.5px;
  font-weight:700;
  background:var(--tdw-bg-soft);
  color:var(--tdw-ink-dim);
}
body.woocommerce-endpoint-withdrawal_requests .pending--status{
  background:var(--tdw-amber-tint);
  color:#8a6414;
}
body.woocommerce-endpoint-withdrawal_requests .completed--status,
body.woocommerce-endpoint-withdrawal_requests .approved--status,
body.woocommerce-endpoint-withdrawal_requests .paid--status{
  background:var(--tdw-green-tint);
  color:#0c7a52;
}
body.woocommerce-endpoint-withdrawal_requests .rejected--status,
body.woocommerce-endpoint-withdrawal_requests .failed--status,
body.woocommerce-endpoint-withdrawal_requests .cancelled--status{
  background:var(--tdw-red-tint);
  color:var(--tdw-red);
}

/* =========================================================
   8. Pagination
   ========================================================= */
body.woocommerce-endpoint-account-funds ul.tdp-pagination,
body.woocommerce-endpoint-withdrawal_requests ul.tdp-pagination{
  display:flex !important;
  justify-content:center;
  gap:6px;
  list-style:none;
  padding:0 !important;
  margin:18px 0 0 !important;
}
body.woocommerce-endpoint-account-funds ul.tdp-pagination a,
body.woocommerce-endpoint-withdrawal_requests ul.tdp-pagination a{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:34px;
  padding:0 8px;
  border:1px solid var(--tdw-border);
  border-radius:var(--tdw-radius-sm);
  color:var(--tdw-ink);
  font-size:12.5px;
  text-decoration:none;
  font-variant-numeric:tabular-nums;
}
body.woocommerce-endpoint-account-funds ul.tdp-pagination a.active,
body.woocommerce-endpoint-withdrawal_requests ul.tdp-pagination a.active,
body.woocommerce-endpoint-account-funds ul.tdp-pagination a:hover,
body.woocommerce-endpoint-withdrawal_requests ul.tdp-pagination a:hover{
  background:var(--tdw-blue);
  border-color:var(--tdw-blue);
  color:#fff;
}

/* =========================================================
   9. Wallet addresses table specific
   ========================================================= */
body.woocommerce-endpoint-wallet_addresses table td:first-child{
  font-family:'IBM Plex Mono', ui-monospace, monospace !important;
  font-size:12.5px !important;
  color:var(--tdw-ink) !important;
  letter-spacing:.02em !important;
}

/* =========================================================
   10. Success / error inline message banner
   ========================================================= */
body.woocommerce-endpoint-withdrawal_requests .withdrawal-request-message{
  background:var(--tdw-green-tint) !important;
  border:1px solid var(--tdw-green) !important;
  color:#0c7a52 !important;
  border-radius:var(--tdw-radius-sm) !important;
  padding:12px 16px !important;
  margin-bottom:16px !important;
  font-size:13.5px !important;
}

/* =========================================================
   11. jQuery-UI datepicker popup (transactions date filters)
   Item 46: remove the calendar-style themed background and make
   the month-navigation arrows crisp chevrons — pure CSS on top of
   the bundled jQuery-UI markup (the popup is appended to <body>,
   but the endpoint body class is still present while it is open).
   Round 15 ("Edits 2" — Item 46): selector widened from the
   account-funds tab ONLY to ALL THREE wallet tabs via :is(), so a
   datepicker opened from the withdrawal-requests or wallet-
   addresses tab gets the exact same clean look.
   ========================================================= */
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div{
  background:#fff !important;
  border:1px solid var(--tdw-border) !important;
  border-radius:var(--tdw-radius-md) !important;
  box-shadow:0 12px 32px -12px rgba(9,43,54,.28) !important;
  padding:14px 16px 16px !important;
  font-family:inherit;
}
/* neutralized (flat, white) header — no decorative background */
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div .ui-datepicker-header{
  background:#fff !important;
  border:none !important;
  padding:4px 2px 10px !important;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div .ui-datepicker-title{
  color:var(--tdw-ink) !important;
  font-weight:700;
  font-size:13px;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div .ui-datepicker-title select{
  font-size:12px !important;
  padding:2px 4px !important;
  border:1px solid var(--tdw-border) !important;
  border-radius:6px !important;
  background:#fff !important;
  color:var(--tdw-ink) !important;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div table{
  font-size:12.5px;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div th{
  color:var(--tdw-ink-dim);
  font-size:10.5px;
  text-transform:uppercase;
  letter-spacing:.05em;
  padding:.5em .3em;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div td span,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div td a{
  text-align:center !important;
  border:1px solid transparent !important;
  border-radius:8px !important;
  background:#fff !important;
  color:var(--tdw-ink) !important;
  font-variant-numeric:tabular-nums;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div td a:hover{
  background:var(--tdw-blue-tint) !important;
  color:var(--tdw-blue) !important;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div td a.ui-state-highlight{
  background:var(--tdw-amber-tint) !important;
  border-color:rgba(243,184,47,.6) !important;
  color:#8a6414 !important;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div td a.ui-state-active{
  background:var(--tdw-blue) !important;
  border-color:var(--tdw-blue) !important;
  color:#fff !important;
}
/* crisp month-navigation arrows: rounded icon buttons with SVG chevrons
   (replaces the gray circle-triangle sprite icons) */
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div .ui-datepicker-prev,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div .ui-datepicker-next{
  top:2px !important;
  width:32px !important;
  height:32px !important;
  border-radius:9px !important;
  background:var(--tdw-blue-tint) !important;
  border:1px solid var(--tdw-border) !important;
  cursor:pointer;
  box-sizing:border-box;
  transition:background .15s, border-color .15s;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div .ui-datepicker-prev:hover,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div .ui-datepicker-next:hover{
  background:#d3f3e9 !important;
  border-color:var(--tdw-blue) !important;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div .ui-datepicker-prev span,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div .ui-datepicker-next span{
  width:10px !important;
  height:16px !important;
  margin-left:-5px !important;
  margin-top:-8px !important;
  text-indent:-99999px;
  background-repeat:no-repeat !important;
  background-position:center center !important;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div .ui-datepicker-prev span{
  background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='16' viewBox='0 0 10 16'%3E%3Cpath fill='%23087d72' fill-rule='evenodd' d='M8.6 0 10 1.4 3.8 8l6.2 6.6L8.6 16 1 8z'/%3E%3C/svg%3E") !important;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) #ui-datepicker-div .ui-datepicker-next span{
  background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='16' viewBox='0 0 10 16'%3E%3Cpath fill='%23087d72' fill-rule='evenodd' d='M1.4 0 0 1.4 6.2 8 0 14.6 1.4 16 9 8z'/%3E%3C/svg%3E") !important;
}

/* =========================================================
   12. Item 46 ("Edits 2" — calendars): NATIVE date/week/month
   inputs inside the wallet tabs get the affiliate-dashboard look
   the client approved ("their arrows aren't blurry"): white
   background, crisp 1px #d6e5e0 border, 12px radius, comfortable
   40px height, green focus ring, and a high-contrast calendar
   picker icon (color-scheme:light keeps the native popup light
   with a dark, sharp glyph). Scoped to the My Account content
   of the three wallet endpoints ONLY — nothing else is touched.
   ========================================================= */
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content input[type="date"],
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content input[type="week"],
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content input[type="month"],
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content .tdp-datefield{
  background:#fff !important;
  border:1px solid #d6e5e0 !important;
  border-radius:12px !important;
  min-height:40px;
  padding:8px 12px !important;
  font-size:14px;
  line-height:1.4;
  color:#062b2b;
  color-scheme:light; /* native picker popup: light UI + dark, crisp arrows */
  font-variant-numeric:tabular-nums;
  transition:border-color .2s, box-shadow .2s;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content input[type="date"]:focus,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content input[type="week"]:focus,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content input[type="month"]:focus,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content .tdp-datefield:focus{
  border-color:#16a673 !important;
  outline:none;
  box-shadow:0 0 0 3px rgba(22,166,115,.18);
}
/* calendar glyph: darker + higher contrast so the arrow never
   looks washed-out/blurry; subtle hover affordance */
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content input[type="date"]::-webkit-calendar-picker-indicator,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content input[type="week"]::-webkit-calendar-picker-indicator,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content input[type="month"]::-webkit-calendar-picker-indicator,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content .tdp-datefield::-webkit-calendar-picker-indicator{
  cursor:pointer;
  opacity:.75;
  filter:contrast(1.35); /* sharpen the glyph against the white field */
  transition:opacity .15s;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content input[type="date"]::-webkit-calendar-picker-indicator:hover,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content input[type="week"]::-webkit-calendar-picker-indicator:hover,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests,body.woocommerce-endpoint-wallet_addresses) .woocommerce-MyAccount-content input[type="month"]::-webkit-calendar-picker-indicator:hover{
  opacity:1;
}

/* =========================================================
   13. Item 3 ("Edits 2" — exact balance): the plugin now renders
   a .tdp-wallet-balance headline ABOVE the transactions table and
   the withdrawal-requests table, formatted with number_format(…, 2)
   so the cents are always exact, "like the table numbers". The
   Account Funds plugin's own <p> balance readout above the same
   table can display a ROUNDED value, so it is hidden here (only on
   the account-funds tab, only a bare first <p> — WooCommerce
   notices live in .woocommerce-notices-wrapper, never a bare <p>)
   and the exact plugin-rendered headline takes its place.
   ========================================================= */
body.woocommerce-endpoint-account-funds .woocommerce-MyAccount-content > p:first-child,
body.woocommerce-endpoint-account-funds .woocommerce-MyAccount-account-funds > p:first-child{
  display:none !important;
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests) .woocommerce-MyAccount-content .tdp-wallet-balance,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests) .woocommerce-MyAccount-account-funds .tdp-wallet-balance,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests) .tdp-wallet-balance{
  /* BUG FIX (client: "the balance box/number at the top of My Wallet is
     white — make it more distinct and different from the header"): the
     box was a near-white gradient, easy to lose against the page
     background and indistinguishable from a plain header. Switched to a
     solid brand-teal tint (same family as the "Free" tag elsewhere) with
     a bolder border, and the number itself now renders in a strong,
     saturated teal instead of the default near-black text. */
  background:#e9fbf4 !important;
  border:1px solid #b9e8d8 !important;
  border-radius:14px !important;
  border-inline-start:5px solid #16a673 !important;
  padding:16px 22px !important;
  margin:0 0 18px !important;
  box-shadow:0 8px 24px -14px rgba(6,43,43,.25);
}
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests) .woocommerce-MyAccount-content .tdp-wallet-balance strong,
:is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests) .tdp-wallet-balance strong{
  font-variant-numeric:tabular-nums;
  color:#087d72 !important;
  font-size:1.15em;
}
html[data-theme="dark"] :is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests) .tdp-wallet-balance{
  background:#0f332c !important;
  border-color:#1c5544 !important;
  border-inline-start-color:#27c58b !important;
}
html[data-theme="dark"] :is(body.woocommerce-endpoint-account-funds,body.woocommerce-endpoint-withdrawal_requests) .tdp-wallet-balance strong{
  color:#5fe6bc !important;
}

/* =========================================================
   Round 17 — MOBILE PASS (phones/tablets)
   The global td-mobile-fix.css already stacks the endpoint
   tables + form rows; these blocks tune the wallet-specific
   widgets (balance chart frame, filter rows, pagination).
   ========================================================= */
@media (max-width:768px){
  body.woocommerce-endpoint-account-funds #balanceChart{
    max-height:220px !important;
  }
  body.woocommerce-endpoint-account-funds .table-filter-container,
  body.woocommerce-endpoint-withdrawal_requests .table-filter-container{
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px !important;
    padding:12px !important;
  }
  body.woocommerce-endpoint-account-funds .table-filter-container > *,
  body.woocommerce-endpoint-withdrawal_requests .table-filter-container > *{
    width:100% !important;
  }
  body.woocommerce-endpoint-account-funds ul.tdp-pagination,
  body.woocommerce-endpoint-withdrawal_requests ul.tdp-pagination{
    flex-wrap:wrap !important;
  }
  body.woocommerce-endpoint-account-funds ul.tdp-pagination a,
  body.woocommerce-endpoint-withdrawal_requests ul.tdp-pagination a{
    min-width:38px;height:38px;
  }
  body.woocommerce-endpoint-wallet_addresses .woocommerce-MyAccount-content > div{
    padding:14px 12px !important;
  }
}
