/* Catchy Court Wallet - My Account page, checkout box, thank-you note */
.ccw, .ccw *, .ccw-checkout, .ccw-checkout *, .ccw-thanks, .ccw-thanks * { box-sizing: border-box; }
.ccw {
    --ccw-red: #ed3237;
    --ccw-red-dark: #c81f2a;
    --ccw-red-soft: #fff3f3;
    --ccw-ink: #1a1a1a;
    --ccw-muted: #6b7280;
    --ccw-line: #ececec;
    --ccw-green: #15803d;
    --ccw-green-soft: #ecfdf3;
    display: grid;
    gap: 18px;
    color: var(--ccw-ink);
    font-family: inherit;
}
.ccw svg { width: 100%; height: 100%; display: block; }
.ccw h3, .ccw p { margin: 0; }

/* ===== Balance card ===== */
.ccw-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 24px;
    color: #fff;
    background:
        radial-gradient(circle at 100% 0%, rgba(237, 50, 55, 0.55) 0%, rgba(237, 50, 55, 0) 55%),
        linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    box-shadow: 0 16px 34px rgba(17, 17, 17, 0.22);
}
.ccw-card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 28px solid rgba(255, 255, 255, 0.05);
}
.ccw-card-top { display: flex; align-items: center; gap: 10px; }
.ccw-card-icon {
    width: 38px;
    height: 38px;
    padding: 8px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.ccw-card-label { font-size: 14px; opacity: .85; letter-spacing: .3px; }
.ccw-card-balance {
    margin-top: 14px;
    font-size: clamp(32px, 6vw, 42px);
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
}
.ccw-card-balance .woocommerce-Price-amount,
.ccw-card-balance bdi { color: #fff; }
.ccw-card-hint { margin-top: 6px; font-size: 13px; opacity: .7; }
.ccw-card-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}
/* One tile per stat: icon · label · amount on one line */
.ccw-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.10);
}
.ccw-stat-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.ccw-stat-icon svg { width: 100%; height: 100%; display: block; }
.ccw-stat-label {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ccw-stat-val {
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
.ccw-stat-val,
.ccw-stat-val * { color: #fff !important; display: inline !important; }

/* ===== White boxes ===== */
.ccw-box {
    background: #fff;
    border: 1px solid var(--ccw-line);
    border-radius: 16px;
    padding: 20px;
}
.ccw-box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px !important;
    font-size: 17px;
    font-weight: 600;
    color: var(--ccw-ink);
    text-transform: none;
}
.ccw-box-title svg { width: 18px; height: 18px; color: var(--ccw-red); }

/* ===== Add money (wallet-app style: big amount, add-on chips, full-width CTA) ===== */
.ccw-recharge {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 18px 28px;
    align-items: stretch;
}
.ccw-recharge-main { display: grid; gap: 14px; min-width: 0; }
.ccw-recharge-side {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding-left: 28px;
    border-left: 1px solid #f0f0f0;
}
.ccw-side-label {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--ccw-muted);
}
.ccw-recharge-side .ccw-chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ccw-recharge-side .ccw-chip { width: 100%; text-align: center; }

/* Amount box + Add button on one row */
.ccw-amount-wrap { display: flex; align-items: stretch; gap: 10px; }
/* Outlined field with notched floating label (same style as the checkout fields):
   empty → "Enter amount" inside; focused / filled → label on the top border, ₹ appears */
.ccw .ccw-amount {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    height: 48px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    cursor: text;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.ccw .ccw-amount:hover { border-color: #9ca3af; }
.ccw .ccw-amount:focus-within { border-color: var(--ccw-red); box-shadow: 0 0 0 1px var(--ccw-red); }
.ccw .has-error .ccw-amount { border-color: var(--ccw-red); box-shadow: 0 0 0 1px var(--ccw-red); }

.ccw-amount-label {
    position: absolute;
    left: 10px;
    top: 0;
    padding: 0 4px;
    font-size: 14px;
    font-weight: 400;
    line-height: 46px;   /* = field inner height, so it sits in the middle */
    letter-spacing: 0;
    text-transform: none;
    color: #9ca3af;
    background: transparent;
    pointer-events: none;
    white-space: nowrap;
    transition: top .18s ease, line-height .18s ease, font-size .18s ease, color .18s ease, background .18s ease;
}
.ccw .ccw-amount:focus-within .ccw-amount-label,
.ccw .ccw-amount.is-filled .ccw-amount-label,
.ccw .ccw-amount:has(input:not(:placeholder-shown)) .ccw-amount-label {
    top: -9px !important;
    font-size: 14px;   /* same size as the resting label */
    font-weight: 600;  /* a little bolder when floated */
    line-height: 16px;
    color: #6b7280;
    background: #fff;   /* cuts the border (must match the box background) */
}
.ccw .ccw-amount:focus-within .ccw-amount-label,
.ccw .has-error .ccw-amount .ccw-amount-label { color: var(--ccw-red); }

.ccw-amount-row { display: flex; align-items: center; gap: 4px; width: 100%; margin: 0; }
.ccw-amount-cur {
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    color: var(--ccw-ink);
    opacity: 0;
    transition: opacity .15s ease;
}
.ccw .ccw-amount:focus-within .ccw-amount-cur,
.ccw .ccw-amount.is-filled .ccw-amount-cur,
.ccw .ccw-amount:has(input:not(:placeholder-shown)) .ccw-amount-cur { opacity: 1; }
.ccw .ccw-amount input[type="text"] {
    flex: 1;
    min-width: 0;
    width: 100% !important;
    height: 46px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 46px !important;
    letter-spacing: .3px;
    color: var(--ccw-ink) !important;
    text-align: left !important;
}
.ccw .ccw-amount input[type="text"]::placeholder { color: transparent !important; }

/* Add-on chips */
.ccw-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ccw .ccw-chip {
    position: relative;
    margin: 0 !important;
    padding: 9px 16px !important;
    min-height: 0 !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: var(--ccw-ink) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: border-color .15s ease, transform .1s ease;
}
.ccw .ccw-chip:hover { border-color: var(--ccw-ink) !important; }
.ccw .ccw-chip:active { transform: scale(.96); }
.ccw-chip em {
    position: absolute;
    top: -9px;
    right: -6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--ccw-red);
    color: #fff;
    font-size: 10px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.5;
}

/* Hint / error line */
.ccw-amount-msg { margin: 0 0 2px !important; font-size: 13px; color: var(--ccw-muted); }
.ccw .has-error .ccw-amount-msg { color: var(--ccw-red); font-weight: 500; }

/* Add button (right of the amount box, same height) */
.ccw .ccw-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: auto;
    min-width: 130px;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 22px !important;
    border: 0 !important;
    border-radius: 8px !important;
    white-space: nowrap;
    background: var(--ccw-red) !important;
    color: #fff !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: 0 8px 18px rgba(237, 50, 55, 0.25) !important;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease;
}
.ccw .ccw-btn:hover { background: var(--ccw-red-dark) !important; }
.ccw .ccw-btn:disabled,
.ccw .ccw-btn[disabled] {
    background: #ececec !important;
    color: #9ca3af !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

/* Secure payment line */
.ccw-secure {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    font-size: 12.5px;
    color: var(--ccw-muted);
}
.ccw-secure svg { width: 14px; height: 14px; display: inline-block; color: var(--ccw-green); }

/* ===== How it works ===== */
.ccw-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ccw-step {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fafafa;
    border: 1px solid var(--ccw-line);
    border-radius: 14px;
    padding: 14px;
}
.ccw-step span {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    padding: 7px;
    border-radius: 10px;
    background: var(--ccw-red-soft);
    color: var(--ccw-red);
}
.ccw-step p { font-size: 13px; line-height: 1.45; color: #374151; }

/* ===== Transactions ===== */
.ccw-txns { list-style: none; margin: 0; padding: 0; }
.ccw-txn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f1f1;
}
.ccw-txn:last-child { border-bottom: 0; padding-bottom: 0; }
.ccw-txn:first-child { padding-top: 0; }
.ccw-txn-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 9px;
    border-radius: 50%;
}
.ccw-txn.is-credit .ccw-txn-icon { background: var(--ccw-green-soft); color: var(--ccw-green); }
.ccw-txn.is-debit .ccw-txn-icon { background: var(--ccw-red-soft); color: var(--ccw-red); }
.ccw-txn-main { flex: 1; min-width: 0; }
.ccw-txn-main b { display: block; font-size: 14.5px; font-weight: 600; color: var(--ccw-ink); }
.ccw-txn-main small { display: block; font-size: 12.5px; color: var(--ccw-muted); line-height: 1.5; }
.ccw-txn-main a { color: var(--ccw-red); }
.ccw-txn-amt { font-size: 15px; font-weight: 600; white-space: nowrap; }
.ccw-txn.is-credit .ccw-txn-amt, .ccw-txn.is-credit .ccw-txn-amt * { color: var(--ccw-green); }
.ccw-txn.is-debit .ccw-txn-amt, .ccw-txn.is-debit .ccw-txn-amt * { color: var(--ccw-ink); }
.ccw-empty { text-align: center; padding: 18px 0 8px; color: var(--ccw-muted); }
.ccw-empty span { display: inline-block; width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: #f5f5f5; color: #9ca3af; margin-bottom: 8px; }
.ccw-empty p { font-size: 14px; }

/* ===== Checkout: Use Wallet Balance ===== */
.ccw-checkout {
    position: relative;
    margin: 0 0 16px !important;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    transition: border-color .15s ease, background .15s ease;
}
.ccw-checkout-head {
    display: flex !important;
    align-items: center;
    gap: 12px;
    margin: 0 !important;
    padding: 14px 16px;
    cursor: pointer;
}

/* Amount to use (editable) */
.ccw-redeem {
    margin: 0 16px 14px;
    padding-top: 12px;
    border-top: 1px dashed #f3c5c6;
}
.ccw-redeem-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: #6b7280;
}
.ccw-redeem-row { display: flex; gap: 8px; align-items: stretch; }
.ccw-redeem-field {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}
.ccw-redeem-field:focus-within { border-color: #1a1a1a; }
.ccw-redeem.has-error .ccw-redeem-field { border-color: #ed3237; }
.ccw-redeem-field span { font-size: 16px; font-weight: 600; color: #1a1a1a; }
.ccw-checkout .ccw-redeem-field input[type="text"] {
    flex: 1;
    min-width: 0;
    width: 100% !important;
    height: 42px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    text-align: left !important;
}
.ccw-checkout .ccw-redeem-max,
.ccw-checkout .ccw-redeem-apply {
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 14px !important;
    min-height: 0 !important;
    border-radius: 10px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
}
.ccw-checkout .ccw-redeem-max {
    border: 1.5px solid #e5e7eb !important;
    background: #fff !important;
    color: #1a1a1a !important;
}
.ccw-checkout .ccw-redeem-max:hover { border-color: #1a1a1a !important; }
.ccw-checkout .ccw-redeem-apply {
    border: 0 !important;
    background: #1a1a1a !important;
    color: #fff !important;
}
.ccw-checkout .ccw-redeem-apply:hover { background: #000 !important; }
.ccw-redeem-msg { display: block; margin-top: 6px; font-size: 12.5px; color: #6b7280; }
.ccw-redeem-msg * { color: inherit; }
.ccw-redeem.has-error .ccw-redeem-msg { color: #ed3237; font-weight: 500; }
.ccw-checkout:hover { border-color: #d1d5db; }
.ccw-checkout.is-on,
.ccw-checkout:has(input[name="ccw_use"]:checked) { border-color: #ed3237 !important; background: #fff7f7 !important; }
.ccw-checkout input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.ccw-checkout-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 9px;
    border-radius: 12px;
    background: #1a1a1a;
    color: #fff;
}
.ccw-checkout-icon svg { width: 100%; height: 100%; display: block; }
.ccw-checkout-text { flex: 1; min-width: 0; }
.ccw-checkout-text b { display: block; font-size: 15px; font-weight: 600; color: #1a1a1a; }
.ccw-checkout-text small { display: block; font-size: 13px; color: #6b7280; }
.ccw-checkout-text em { font-style: normal; color: #15803d; font-weight: 600; }
.ccw-checkout-text em * { color: #15803d; }
.ccw-switch {
    flex-shrink: 0;
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #d1d5db;
    transition: background .2s ease;
}
.ccw-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform .2s ease;
}
.ccw-checkout.is-on .ccw-switch,
.ccw-checkout-head input:checked ~ .ccw-switch { background: #ed3237 !important; }
.ccw-checkout.is-on .ccw-switch::after,
.ccw-checkout-head input:checked ~ .ccw-switch::after { transform: translateX(20px); }

/* ===== Thank-you note ===== */
.ccw-thanks {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 24px;
    padding: 16px 18px;
    border-radius: 14px;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #14532d;
}
.ccw-thanks-icon { flex-shrink: 0; width: 42px; height: 42px; padding: 9px; border-radius: 12px; background: #15803d; color: #fff; }
.ccw-thanks-icon svg { width: 100%; height: 100%; display: block; }
.ccw-thanks b { display: block; font-size: 15px; }
.ccw-thanks a { font-size: 14px; color: #15803d; font-weight: 600; }

/* ===== Mobile ===== */
@media (max-width: 600px) {
    .ccw-card { padding: 20px; border-radius: 18px; }
    .ccw-card-stats { grid-template-columns: 1fr; gap: 8px; }
    .ccw-box { padding: 16px; }
    .ccw-recharge { grid-template-columns: 1fr; gap: 16px; }
    .ccw-recharge-side { padding-left: 0; border-left: 0; padding-top: 14px; border-top: 1px solid #f0f0f0; }
    .ccw .ccw-amount input[type="text"] { font-size: 16px !important; }
    /* Mobile: amount field a bit narrower, button wider (≈ 55% / 45%) */
    .ccw-amount-wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; }
    .ccw .ccw-btn { width: 100%; min-width: 0; padding: 0 10px !important; font-size: 15px !important; }
    .ccw-chips { display: grid; grid-template-columns: repeat(2, 1fr); }
    .ccw-steps { grid-template-columns: 1fr; gap: 8px; }
    .ccw-step { padding: 12px; }
}


/* ===== Cashback: cart / checkout / thank-you note ===== */
.ccw-cb-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
}
.ccw-cb-note.is-ok { background: #ecfdf3; border: 1px solid #bbf7d0; color: #14532d; }
.ccw-cb-note.is-hint { background: #fff8e6; border: 1px dashed #f5c26b; color: #7a4b00; }
.ccw-cb-note b, .ccw-cb-note b * { color: inherit; font-weight: 700; }
.ccw-cb-note small { display: block; opacity: .8; }
.ccw-cb-icon { font-size: 18px; line-height: 1.2; }

/* ===== Cashback: offer banner on My Wallet ===== */
.ccw-offer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(90deg, #fff3f3 0%, #fff8e6 100%);
    border: 1px solid #fbd5d6;
}
.ccw-offer-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 6px rgba(237, 50, 55, 0.12);
}
.ccw-offer b { display: block; font-size: 15px; color: #1a1a1a; }
.ccw-offer small { display: block; font-size: 13px; color: #4b5563; }

/* Amount field hidden until "Change" is clicked */
.ccw-redeem.is-collapsed { display: none; }
.ccw-checkout .ccw-redeem-toggle {
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.ccw-checkout .ccw-redeem-toggle:hover { color: #ed3237; }

/* Add Money: right column fills the same height as the left (compact chips stretch) */
.ccw-recharge-side { display: flex; flex-direction: column; gap: 6px; }
.ccw-recharge-side .ccw-chips {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: 6px;
}
.ccw .ccw-recharge-side .ccw-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 3px 10px !important;
    font-size: 13px !important;
}
.ccw-recharge-side .ccw-chip em { top: -8px; font-size: 9.5px; }

/* Bottom row: secure line (left) + terms link (right), full width under both columns */
.ccw-recharge > .ccw-recharge-foot {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    padding-top: 12px;
    border-top: 1px dashed #ececec;
}
.ccw-recharge-foot .ccw-secure { justify-content: flex-start; }
.ccw .ccw-terms-link {
    margin-left: auto;
    text-align: right;
    font-size: 12.5px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ccw .ccw-terms-link:hover { color: var(--ccw-red); }

@media (max-width: 600px) {
    /* +2px down: Sofia Pro sits high on phones (same optical fix as the fields) */
    .ccw .ccw-recharge-side .ccw-chip { padding: 11px 12px 7px !important; font-size: 14px !important; }
}

/* "₹ Enter amount" at rest; the ₹ in the label hides once the label floats (the box shows its own ₹) */
.ccw-label-cur { font-weight: 600; color: #6b7280; }
.ccw .ccw-amount:focus-within .ccw-label-cur,
.ccw .ccw-amount.is-filled .ccw-label-cur,
.ccw .ccw-amount:has(input:not(:placeholder-shown)) .ccw-label-cur { display: none; }

/* Balance card: stats on the left, balance on the right (mobile: balance on top) */
.ccw-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "stats main";
    gap: 18px 32px;
    align-items: center;
}
.ccw-card-main { grid-area: main; position: relative; z-index: 1; text-align: right; }
.ccw-card-main .ccw-card-top { justify-content: flex-end; }
.ccw-card .ccw-card-stats {
    grid-area: stats;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 0;
}
@media (max-width: 600px) {
    .ccw-card { grid-template-columns: 1fr; grid-template-areas: "main" "stats"; gap: 16px; }
    .ccw-card-main { text-align: left; }
    .ccw-card-main .ccw-card-top { justify-content: flex-start; }
}

/* ===== Recharge payment popup ===== */
html.ccw-noscroll { overflow: hidden; }
.ccw-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.ccw-modal.is-open { display: flex; animation: ccwFade .2s ease; }
.ccw-modal-box {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.25);
    animation: ccwPop .25s cubic-bezier(.34, 1.56, .64, 1);
}
.ccw .ccw-modal-x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    font-size: 20px !important;
    line-height: 1 !important;
    cursor: pointer;
}
.ccw .ccw-modal-x:hover { background: #e5e7eb !important; color: #111827 !important; }
.ccw-modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-right: 30px; }
.ccw-modal-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: 12px;
    background: #1a1a1a;
    color: #fff;
}
.ccw .ccw-modal-title { margin: 0 !important; font-size: 18px; font-weight: 700; line-height: 1.3; color: #1a1a1a; text-transform: none; }
.ccw-modal-amt { color: var(--ccw-red); }
.ccw-modal-sub { margin: 2px 0 0 !important; font-size: 13px; color: var(--ccw-muted); }

/* Payment method options */
.ccw-pay-list { display: grid; gap: 10px; margin-bottom: 14px; }
.ccw .ccw-pay-opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.ccw .ccw-pay-opt:hover { border-color: #9ca3af; }
.ccw-pay-opt input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.ccw-pay-dot {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ccw .ccw-pay-opt:has(input:checked) { border-color: var(--ccw-red); background: #fff7f7; }
.ccw-pay-opt input:checked + .ccw-pay-dot { border-color: var(--ccw-red); box-shadow: inset 0 0 0 4px #fff; background: var(--ccw-red); }
.ccw-pay-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; color: #1a1a1a; }
.ccw-pay-icon { flex-shrink: 0; display: flex; align-items: center; gap: 4px; }
.ccw-pay-icon img { max-height: 24px; width: auto; display: inline-block; margin: 0 !important; }

/* Mobile number (only when missing) */
.ccw .ccw-modal-field { display: block; margin: 0 0 14px; }
.ccw-modal-field span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #374151; }
.ccw .ccw-modal-field input {
    width: 100% !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 16px !important;
    color: #1a1a1a !important;
}
.ccw .ccw-modal-field input:focus { border-color: var(--ccw-red) !important; box-shadow: 0 0 0 1px var(--ccw-red) !important; outline: 0 !important; }

/* Pay button */
.ccw .ccw-pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 0 20px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--ccw-red) !important;
    color: #fff !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: 0 8px 18px rgba(237, 50, 55, 0.25) !important;
    cursor: pointer;
}
.ccw .ccw-pay-btn:hover { background: var(--ccw-red-dark) !important; }
.ccw .ccw-pay-btn:disabled { opacity: .7; cursor: wait; }
.ccw-pay-btn .ccw-modal-amt { color: #fff; }
.ccw-modal-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--ccw-muted);
}
.ccw-modal-secure svg { width: 14px; height: 14px; color: var(--ccw-green); }

@keyframes ccwFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ccwPop  { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
    .ccw-modal { align-items: flex-end; padding: 0; }
    .ccw-modal-box { max-width: none; border-radius: 18px 18px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); }
}

/* Popup: "I agree to the Wallet Terms & Conditions" (ticked by default) */
.ccw .ccw-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 13.5px;
    line-height: 1.45;
    color: #374151;
    cursor: pointer;
}
.ccw-terms input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.ccw-terms-box {
    flex-shrink: 0;
    position: relative;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    background: #fff;
    transition: background .15s ease, border-color .15s ease;
}
.ccw-terms input:checked + .ccw-terms-box { background: var(--ccw-red); border-color: var(--ccw-red); }
.ccw-terms input:checked + .ccw-terms-box::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 0;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.ccw-terms input:focus-visible + .ccw-terms-box { box-shadow: 0 0 0 3px rgba(237, 50, 55, 0.25); }
.ccw .ccw-terms a { color: #1a1a1a; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ccw .ccw-terms a:hover { color: var(--ccw-red); }
.ccw .ccw-pay-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none !important; }

/* Phone only: Sofia Pro sits high, so move the amount + resting label down 2px */
@media (max-width: 600px) {
    .ccw .ccw-amount input[type="text"] { padding-top: 4px !important; line-height: 42px !important; }
    .ccw-amount-label { top: 2px; }
    .ccw-amount-cur { margin-top: 4px; }
}
