/* CSxStore Release D 2.4.0: contrast fixes, line icons instead of emoji, calmer legacy pages. Loaded after storefront-v3.css. */

/* ---------- Dark mode tokens the legacy pages read ---------- */
html[data-theme=dark]{--gold-ink:#4eeab1;--brand-soft:rgba(78,234,177,.1)}

/* ---------- Icons ---------- */
.csx-icon{stroke-width:1.9}
.sf-ui .sfd-back,.sf-ui a .csx-icon{vertical-align:-.17em}
.sf-ui .sfd-back{display:inline-flex;align-items:center;gap:6px;font-weight:650;text-decoration:none}

/* ---------- Account menu: the Add funds button sat ink-on-ink ---------- */
.sf-ui .sf-account-menu .sfb-account-balance{background:linear-gradient(140deg,#172c23 0%,#0b1712 100%);border:1px solid rgba(255,255,255,.06);box-shadow:inset 0 1px 0 rgba(255,255,255,.06)}
.sf-ui .sf-account-menu .sfb-account-balance .sf-btn,
.sf-ui .sf-account-menu .sfb-account-balance .sf-btn:not(.sf-btn-line){background:var(--sfc-gold-grad)!important;color:#1b1406!important;border:0!important;box-shadow:0 8px 18px -10px rgba(36,160,115,.9)!important;font-weight:750}
.sf-ui .sf-account-menu .sfb-account-balance .sf-btn:hover{filter:brightness(1.05);transform:translateY(-1px)}
.sf-ui .sf-account-menu a>.csx-icon{width:18px;height:18px;color:var(--sf-soft)}
.sf-ui .sf-account-menu a:hover>.csx-icon{color:var(--sf-gold)}

/* ---------- Wallet balance card: keep both buttons readable in every state ---------- */
.sf-ui .sfc-balance-card .sfc-actions a,.sf-ui .sfc-balance-card a.sf-btn,.sf-ui .sfc-balance-card .store-btn{transition:transform .15s,background .15s,border-color .15s}
.sf-ui .sfc-balance-card a:is(:hover,:focus-visible,:active){transform:translateY(-1px)}
html .sf-ui .sfc-balance-card a:not([href*="add-funds"]),html[data-theme] .sf-ui .sfc-balance-card a:not([href*="add-funds"]),
html[data-theme] .sf-ui .sfc-balance-card a:not([href*="add-funds"]):is(:hover,:focus,:focus-visible,:active,:visited),
html .sf-ui .sfc-balance-card a:not([href*="add-funds"]):is(:hover,:focus,:focus-visible,:active,:visited){color:#fff!important;background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.28)!important;box-shadow:none!important}
html[data-theme] .sf-ui .sfc-balance-card a:not([href*="add-funds"]):is(:hover,:focus-visible),html .sf-ui .sfc-balance-card a:not([href*="add-funds"]):is(:hover,:focus-visible){background:rgba(255,255,255,.16)!important;border-color:rgba(255,255,255,.5)!important}
html[data-theme] .sf-ui .sfc-balance-card a[href*="add-funds"],html .sf-ui .sfc-balance-card a[href*="add-funds"],
html[data-theme] .sf-ui .sfc-balance-card a[href*="add-funds"]:is(:hover,:focus,:focus-visible,:active,:visited),html .sf-ui .sfc-balance-card a[href*="add-funds"]:is(:hover,:focus,:focus-visible,:active,:visited){color:#0b1712!important;background:#fff!important;border:1px solid #fff!important}
html[data-theme] .sf-ui .sfc-balance-card a[href*="add-funds"]:is(:hover,:focus-visible),html .sf-ui .sfc-balance-card a[href*="add-funds"]:is(:hover,:focus-visible){background:var(--sfc-gold-grad)!important;border-color:transparent!important}

/* ---------- Payment methods: no gold disc behind the arrow, real icons ---------- */
body.sf-ui #add-funds .csx-v54-button *{background:none!important;box-shadow:none!important;border:0!important}
body.sf-ui #add-funds .csx-v54-button .csx-icon{width:20px;height:20px;stroke-width:2.2;transition:transform .15s}
body.sf-ui #add-funds .csx-v54-button:hover .csx-icon{transform:translateX(3px)}
body.sf-ui #add-funds .csx-v54-icon.csx-v7-ico{display:grid;place-items:center;background:#f3f5f9;border:1px solid var(--sf-line);color:#0b1712}
body.sf-ui #add-funds .csx-v54-icon.csx-v7-ico .csx-icon{width:22px!important;height:22px!important;max-width:none!important;stroke-width:1.8;font-size:22px}
html[data-theme=dark] body.sf-ui #add-funds .csx-v54-icon.csx-v7-ico{background:#14271f;color:#eef2f8}
body.sf-ui .csx-v54-gift{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:8px;background:rgba(14,138,97,.12);color:#0e8a61;font-size:0}
body.sf-ui .csx-v54-gift .csx-icon{width:16px;height:16px;stroke-width:2}
.sf-ui .csx-v55-tabs .csx-icon,.sf-ui [data-csx-pay-tab] .csx-icon{width:16px;height:16px}
.sf-ui .dashboard-head h1 .csx-icon{width:.8em;height:.8em;vertical-align:-.06em;color:#0bbd7c;stroke-width:2.2}
.sf-ui .pay-choice strong .csx-icon,.sf-ui label strong>.csx-icon{width:17px;height:17px;margin-inline-end:4px;color:var(--gold-ink)}
.sf-ui .store-btn .csx-icon{width:16px;height:16px}

/* Wallet notes in dark mode (were light boxes with light text) */
html[data-theme=dark] .sf-ui .payment-card{background:linear-gradient(160deg,#10201a,#0d1b15)!important;border-color:#1f352c!important;color:#c9d3e3!important}
html[data-theme=dark] .sf-ui .payment-card :is(h2,h3,strong,b){color:#eef2f8!important}
html[data-theme=dark] .sf-ui .payment-card p{color:#a6b2c4!important}
html[data-theme=dark] .sf-ui .notice strong,html[data-theme=dark] .sf-ui .csx-v54-intro strong{color:#eef2f8!important}

/* ---------- Legacy account pages (dashboard, account, orders, support, referrals) ---------- */
.sf-ui .dash-card:not(.dash-grid>.dash-card)::after{display:none!important;content:none!important}
.sf-ui .dash-card{background:var(--panel)!important;border:1px solid var(--line)!important;box-shadow:var(--sfc-shadow-sm)!important;border-radius:20px!important}
html[data-theme=dark] .sf-ui .dash-card{background:linear-gradient(160deg,#10201a,#0d1b15)!important;box-shadow:0 1px 0 rgba(255,255,255,.03) inset,0 20px 40px -28px rgba(0,0,0,.8)!important}
.sf-ui .dash-grid>.dash-card{position:relative;padding:20px 22px 20px 74px!important;min-height:0}
.sf-ui .dash-grid>.dash-card::before{content:"";position:absolute;left:20px;top:50%;width:40px;height:40px;margin-top:-20px;border-radius:12px;background:var(--brand-soft);border:1px solid color-mix(in srgb,var(--brand) 18%,transparent)}
.sf-ui .dash-grid>.dash-card::after{content:""!important;display:block!important;position:absolute!important;left:30px!important;top:50%!important;bottom:auto!important;right:auto!important;inset-inline-end:auto!important;width:20px!important;height:20px!important;margin-top:-10px;border-radius:0!important;background:var(--gold-ink)!important;opacity:1;
  -webkit-mask:var(--sfd-ico) center/contain no-repeat;mask:var(--sfd-ico) center/contain no-repeat}
.sf-ui .dash-grid>.dash-card{--sfd-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4'/%3E%3C/svg%3E")}
.sf-ui .dash-grid>.dash-card:nth-child(2){--sfd-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z'/%3E%3Cpath d='M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8'/%3E%3Cpath d='M12 17.5v-11'/%3E%3C/svg%3E")}
.sf-ui .dash-grid>.dash-card:nth-child(3){--sfd-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z'/%3E%3Cpath d='m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7'/%3E%3Cpath d='M12 22V12'/%3E%3Cpath d='m9 15 2 2 4-4'/%3E%3C/svg%3E")}
.sf-ui .dash-grid>.dash-card:nth-child(4){--sfd-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12l4 6-10 13L2 9Z'/%3E%3Cpath d='M11 3 8 9l4 13 4-13-3-6'/%3E%3Cpath d='M2 9h20'/%3E%3C/svg%3E")}
.sf-ui .dash-grid>.dash-card:nth-child(n+5){--sfd-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/%3E%3C/svg%3E")}
.sf-ui .dash-label{font-size:11.5px!important;letter-spacing:.07em!important;text-transform:uppercase;color:var(--muted)!important;font-weight:650!important}
.sf-ui .dash-value{color:var(--text)!important;font-family:var(--sfc-font)!important;font-size:26px!important;font-weight:800!important;letter-spacing:-.035em!important;font-variant-numeric:proportional-nums lining-nums}
.sf-ui .dash-grid>.dash-card:first-child .dash-value{color:var(--gold-ink)!important}

/* Buttons on legacy pages: gold primary, neutral secondary (no brown text on cream) */
.sf-ui .store-btn{border-radius:12px;font-weight:700;letter-spacing:-.01em}
.sf-ui .store-btn.secondary,.sf-ui .store-btn.ghost{background:var(--panel)!important;color:var(--text)!important;border:1px solid var(--line)!important;box-shadow:0 1px 2px rgba(11,23,18,.05)!important}
.sf-ui .store-btn.secondary:hover,.sf-ui .store-btn.ghost:hover{border-color:color-mix(in srgb,var(--brand) 60%,var(--line))!important;color:var(--text)!important}
html[data-theme=dark] .sf-ui .store-btn.secondary,html[data-theme=dark] .sf-ui .store-btn.ghost{background:rgba(255,255,255,.04)!important;color:#eef2f8!important;border-color:#273f35!important}
html[data-theme=dark] .sf-ui .store-btn.secondary:hover,html[data-theme=dark] .sf-ui .store-btn.ghost:hover{background:rgba(255,255,255,.08)!important;border-color:#1ee69d!important}
html[data-theme=dark] .sf-ui .store-btn:not(.secondary):not(.ghost):not(.danger){color:#1b1406!important}
html[data-theme=dark] .sf-ui :is(.store-input,.dash-card select,.order-tools input,.order-tools select){background:#0b1611!important;border-color:#21392f!important;color:#eef2f8!important}
html[data-theme=dark] .sf-ui .status-pill{border-color:transparent}
.sf-ui .dashboard-head h1{letter-spacing:-.04em}

@media (max-width:640px){
  .sf-ui .dash-grid{grid-template-columns:1fr 1fr!important;gap:10px!important}
  .sf-ui .dash-grid>.dash-card{padding:62px 14px 14px!important;border-radius:16px!important}
  .sf-ui .dash-grid>.dash-card::before{left:14px;top:14px;width:36px;height:36px;margin-top:0}
  .sf-ui .dash-grid>.dash-card::after{left:22px!important;top:22px!important;margin-top:0}
  .sf-ui .dash-value{font-size:20px!important}
  .sf-ui .dash-label{font-size:10.5px!important}
}
