/*
 * My account > wallet (frontend/templates/wallet-dashboard.php + transaction-history.php).
 * Same card language as the modern view-order / thank-you pages. Desktop and mobile.
 */

.bk-wl {
    --wl-accent: var(--m_accent_color2, var(--accent_color2, #ef3743));
    --wl-ink: #03174d;
    --wl-text: #42507a;
    --wl-muted: #7986a9;
    --wl-line: #e8ebf2;
    --wl-soft: #f3f4f7;
    --wl-shadow: 0 8px 24px hsl(210 8% 62% / .2);
    --wl-credit: #079455;
    --wl-credit-soft: #ecfdf3;
    --wl-debit: #d92d20;
    --wl-debit-soft: #fef3f2;
    container: bk-wl / inline-size;
    display: grid;
    gap: 20px;
    margin: 0 0 40px;
    color: var(--wl-ink);
    direction: rtl;
    text-align: right;
    line-height: 1.8;
}

.bk-wl *,
.bk-wl *::before,
.bk-wl *::after {
    box-sizing: border-box;
}

.bk-wl h3,
.bk-wl p,
.bk-wl dl,
.bk-wl dd,
.bk-wl ul {
    margin: 0;
}

/* ---------- Hero: balance + top-up ---------- */

.bk-wl .bk-wl-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}

.bk-wl .bk-wl-hero--single {
    grid-template-columns: minmax(0, 1fr);
}

.bk-wl .bk-wl-balance {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 26px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--wl-accent), color-mix(in srgb, var(--wl-accent) 70%, #000));
    box-shadow: none;
    color: #fff;
}

.bk-wl .bk-wl-balance::before,
.bk-wl .bk-wl-balance::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    background: rgb(255 255 255 / .08);
}

.bk-wl .bk-wl-balance::before {
    top: -70px;
    left: -50px;
    width: 220px;
    height: 220px;
}

.bk-wl .bk-wl-balance::after {
    bottom: -90px;
    left: 90px;
    width: 180px;
    height: 180px;
}

.bk-wl .bk-wl-balance-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bk-wl .bk-wl-balance-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgb(255 255 255 / .16);
}

.bk-wl .bk-wl-balance-label {
    font-size: 14px;
    font-weight: 600;
    opacity: .9;
}

.bk-wl .bk-wl-balance-amount {
    margin-top: 18px;
    color: #fff;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.4;
}

.bk-wl .bk-wl-balance-amount .woocommerce-Price-amount,
.bk-wl .bk-wl-balance-amount bdi {
    color: #fff;
}

.bk-wl .bk-wl-balance-amount .woocommerce-Price-currencySymbol {
    margin-right: 4px;
    font-size: 14px;
    font-weight: 600;
    opacity: .85;
}

.bk-wl .bk-wl-balance-note {
    margin-top: 4px;
    font-size: 13px;
    opacity: .82;
}

.bk-wl .bk-wl-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: auto;
    padding-top: 22px;
}

.bk-wl .bk-wl-stats > div {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgb(255 255 255 / .13);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.bk-wl .bk-wl-stats dt {
    font-size: 12px;
    font-weight: 500;
    opacity: .8;
}

.bk-wl .bk-wl-stats dd {
    font-size: 15px;
    font-weight: 800;
}

.bk-wl .bk-wl-stats dd,
.bk-wl .bk-wl-stats dd .woocommerce-Price-amount {
    color: #fff;
}

.bk-wl .bk-wl-stats dd .woocommerce-Price-amount,
.bk-wl .bk-wl-stats dd bdi {
    font-size: inherit;
    font-weight: inherit;
}

.bk-wl .bk-wl-stats dd .woocommerce-Price-currencySymbol {
    margin-right: 3px;
    font-size: 11px;
    font-weight: 600;
    opacity: .85;
}
.bk-wl-balance .woocommerce-Price-currencySymbol:after {
color:#fff;
font-size: 11px !important;
}
.bk-wl .bk-wl-stats span {
    font-size: 11px;
    opacity: .75;
}

/* ---------- Cards ---------- */

.bk-wl .bk-wl-card {
    min-width: 0;
    padding: 24px;
    border-radius: 20px;
    background: #fff;
    width: 100%;
    border: 1px solid #dadce0;
}
.bk-wl .bk-wl-card-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.bk-wl .bk-wl-card-heading h3 {
    padding: 0;
    border: 0;
    color: var(--wl-ink);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.6;
}

.bk-wl .bk-wl-section-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--wl-accent) 9%, white);
    color: var(--wl-accent);
}

.bk-wl .bk-wl-count {
    margin-right: auto;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--wl-soft);
    color: var(--wl-text);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* ---------- Top-up ---------- */

.bk-wl .bk-wl-topup {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bk-wl .bk-wl-topup .bk-wl-card-heading {
    margin-bottom: 0;
}

.bk-wl .bk-wl-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.bk-wl .bk-wl-chip {
    height: 42px;
    margin: 0;
    padding: 0 8px;
    border: 1.5px solid var(--wl-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
    color: var(--wl-ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s, background-color .2s, color .2s;
}

.bk-wl .bk-wl-chip:hover {
    border-color: color-mix(in srgb, var(--wl-accent) 40%, var(--wl-line));
    background: #fff !important;
    color: var(--wl-ink) !important;
}

.bk-wl .bk-wl-chip.active {
    border-color: var(--wl-accent);
    background: color-mix(in srgb, var(--wl-accent) 7%, white) !important;
    color: var(--wl-accent) !important;
}

.bk-wl .bk-wl-amount {
    display: grid;
    gap: 6px;
    margin: 0;
}

.bk-wl .bk-wl-amount-label {
    color: var(--wl-ink);
    font-size: 13px;
    font-weight: 700;
}

.bk-wl .bk-wl-amount-field {
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 14px 0 6px;
    border: 1.5px solid var(--wl-line);
    border-radius: 12px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.bk-wl .bk-wl-amount-field:focus-within {
    border-color: var(--wl-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--wl-accent) 14%, transparent);
}

.bk-wl .bk-wl-amount-field input {
    flex: 1;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
    color: var(--wl-ink);
    font-family: inherit;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .5px;
    direction: ltr;
    text-align: right;
}

.bk-wl .bk-wl-amount-unit {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--wl-soft);
    color: var(--wl-text);
    font-size: 12px;
    font-weight: 700;
}

.bk-wl .bk-wl-amount-hint {
    color: var(--wl-muted);
    font-size: 11px;
}

.bk-wl .bk-wl-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    margin: auto 0 0;
    padding: 0 16px;
    border: none;
    border-radius: 14px;
    background: var(--wl-accent);
    box-shadow: 0 10px 20px -10px color-mix(in srgb, var(--wl-accent) 80%, transparent);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s, opacity .2s;
}

.bk-wl .bk-wl-submit:hover {
    opacity: .94;
    color: #fff;
}

.bk-wl .bk-wl-submit svg {
    transition: transform .25s;
}

.bk-wl .bk-wl-submit:hover svg {
    transform: translateX(-4px);
}

/* ---------- History ---------- */

.bk-wl .bk-wl-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.bk-wl .bk-wl-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--wl-soft);
}

.bk-wl .bk-wl-tab {
    padding: 6px 16px;
    border-radius: 9px;
    color: var(--wl-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.8;
    text-decoration: none;
    transition: background-color .2s, color .2s;
}

.bk-wl .bk-wl-tab:hover {
    color: var(--wl-ink);
}

.bk-wl .bk-wl-tab.is-active {
    background: #fff;
    box-shadow: 0 1px 3px rgb(16 24 40 / .1);
    color: var(--wl-ink);
}

.bk-wl .bk-wl-category {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.bk-wl .bk-wl-category select {
    min-width: 190px;
    height: 40px;
    margin: 0;
    padding: 0 12px;
    border: 1.5px solid var(--wl-line);
    border-radius: 10px;
    background-color: #fff;
    color: var(--wl-ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
}

.bk-wl .bk-wl-apply {
    height: 40px;
    margin: 0;
    padding: 0 16px;
    border: 1.5px solid var(--wl-line);
    border-radius: 10px;
    background: #fff;
    color: var(--wl-ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.bk-wl.is-js .bk-wl-apply {
    display: none;
}

.bk-wl .bk-wl-history .bk-wl-list,
.bk-wl .bk-wl-history .bk-wl-empty,
.bk-wl .bk-wl-history .bk-wl-pagination {
    transition: opacity .2s;
}

.bk-wl .bk-wl-history.is-loading .bk-wl-list,
.bk-wl .bk-wl-history.is-loading .bk-wl-empty,
.bk-wl .bk-wl-history.is-loading .bk-wl-pagination {
    opacity: .4;
    pointer-events: none;
}

.bk-wl .bk-wl-history.is-loading .bk-wl-count {
    position: relative;
    color: transparent;
}

.bk-wl .bk-wl-history.is-loading .bk-wl-count::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid var(--wl-line);
    border-top-color: var(--wl-accent);
    border-radius: 50%;
    animation: bkWlSpin .7s linear infinite;
}

@keyframes bkWlSpin {
    to { transform: rotate(360deg); }
}

.bk-wl .bk-wl-clear {
    color: var(--wl-accent);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.bk-wl .bk-wl-list {
    padding: 0;
    list-style: none;
}

.bk-wl-balance span.woocommerce-Price-currencySymbol::before{
    color:#fff
}

.bk-wl .bk-wl-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px dashed var(--wl-line);
    list-style: none !important;
}

.bk-wl .bk-wl-item:last-child {
    border-bottom: 0;
}

.bk-wl .bk-wl-item-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.bk-wl .bk-wl-item--credit .bk-wl-item-icon {
    background: var(--wl-credit-soft);
    color: var(--wl-credit);
}

.bk-wl .bk-wl-item--debit .bk-wl-item-icon {
    background: var(--wl-debit-soft);
    color: var(--wl-debit);
}

.bk-wl .bk-wl-item-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bk-wl .bk-wl-item-title {
    color: var(--wl-ink);
    font-size: 14px;
    font-weight: 700;
}

.bk-wl .bk-wl-item-desc {
    overflow: hidden;
    color: var(--wl-text);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bk-wl .bk-wl-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    color: var(--wl-muted);
    font-size: 11px;
}

.bk-wl .bk-wl-item-meta a {
    color: var(--wl-accent);
    font-weight: 600;
}

.bk-wl .bk-wl-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: left;
    white-space: nowrap;
}

.bk-wl .bk-wl-item-amount {
    font-size: 15px;
    font-weight: 800;
    direction: rtl;
}

.bk-wl .bk-wl-item--credit .bk-wl-item-amount,
.bk-wl .bk-wl-item--credit .bk-wl-item-amount .woocommerce-Price-amount {
    color: var(--wl-credit);
}

.bk-wl .bk-wl-item--debit .bk-wl-item-amount,
.bk-wl .bk-wl-item--debit .bk-wl-item-amount .woocommerce-Price-amount {
    color: var(--wl-debit);
}

.bk-wl .bk-wl-item-balance {
    color: var(--wl-muted);
    font-size: 11px;
}

.bk-wl .bk-wl-item-amount .woocommerce-Price-currencySymbol,
.bk-wl .bk-wl-item-balance .woocommerce-Price-currencySymbol {
    font-size: 10px;
}

.bk-wl .bk-wl-pagination {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.bk-wl .bk-wl-pagination .page-numbers {
    display: inline-grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    margin: 0 3px;
    padding: 0 8px;
    border: 1px solid var(--wl-line);
    border-radius: 10px;
    background: #fff;
    color: var(--wl-text);
    font-size: 13px;
    font-weight: 700;
}

.bk-wl .bk-wl-pagination .page-numbers::before,
.bk-wl .bk-wl-pagination .page-numbers::after {
    content: none !important;
}

.bk-wl .bk-wl-pagination .page-numbers.current {
    border-color: var(--wl-accent);
    background: var(--wl-accent);
    color: #fff;
}

.bk-wl .bk-wl-pagination .page-numbers.dots {
    border-color: transparent;
}

.bk-wl .bk-wl-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 36px 16px 20px;
    color: var(--wl-muted);
    font-size: 13px;
    text-align: center;
}

.bk-wl .bk-wl-empty-icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--wl-soft);
    color: var(--wl-muted);
}

.bk-wl a:focus-visible,
.bk-wl button:focus-visible,
.bk-wl select:focus-visible {
    outline: 2px solid var(--wl-accent);
    outline-offset: 2px;
}

/* ---------- Narrow account column / phones ---------- */

@container bk-wl (max-width: 760px) {
    .bk-wl .bk-wl-hero {
        grid-template-columns: minmax(0, 1fr);
    }
}
.bk-wl .bk-wl-card-heading h3{
    font-size: 14px
}
.bk-wl {
  margin-bottom: 0;
}
@container bk-wl (max-width: 520px) {
    .bk-wl .bk-wl-balance,
    .bk-wl .bk-wl-card {
        padding: 20px 18px;
    }

    .bk-wl .bk-wl-balance-amount {
        font-size: 26px;
    }

    .bk-wl .bk-wl-filters,
    .bk-wl .bk-wl-tabs,
    .bk-wl .bk-wl-category {
        width: 100%;
    }

    .bk-wl .bk-wl-tab {
        flex: 1;
        text-align: center;
    }

    .bk-wl .bk-wl-category select {
        flex: 1;
        min-width: 0;
    }

    .bk-wl .bk-wl-item {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 6px 12px;
    }

    .bk-wl .bk-wl-item-icon {
        grid-row: span 2;
        align-self: start;
    }

    .bk-wl .bk-wl-item-side {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bk-wl * {
        transition: none !important;
    }
}