/* YoMarkets_Pay: Buy Now on the product page and the listing, "Confirm your purchase", the order
   outcome and "My points". The look follows the YoMarkets theme (yomarkets.css): Poppins headings,
   navy and green, rounded cards. Variables (--brand-navy, --muted, --tint, ...) come from the theme. */

/* ---------- product page: price and Buy Now ---------- */
.ym-buy { float: left; width: 100%; margin: 6px 0 18px; padding: 18px 20px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; }
.ym-buy-price { font-family: "Poppins", "Inter", sans-serif; font-size: 34px; font-weight: 700; line-height: 1.2; color: var(--brand-navy); }
.ym-buy-price .usd-star { font-size: .5em; }
.ym-buy-facts { list-style: none; margin: 12px 0 16px; padding: 0; }
.ym-buy-facts li { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.ym-buy-facts i { margin-top: 3px; color: var(--brand-green); }
.ym-buy-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ym-buy-actions .btn-bid-now, .ym-buy-actions .btn-green-border { display: inline-flex; align-items: center; justify-content: center; }
.ym-pay-form { display: none; }

/* ---------- listing card of a Buy Now product ---------- */
/* The price never wraps and the button never shrinks, so on a narrow card the button moves under
   the price instead of over it. */
.buy-grid .ym-card-buy .pr-bottom { flex-wrap: wrap; row-gap: 10px; }
.buy-grid .ym-card-buy .pr-overlap { flex: 0 1 auto; }
.buy-grid .ym-card-buy .pr-overlap span:first-child { color: var(--brand-green); font-weight: 600; font-size: 13px; }
/* A touch smaller than the auction cards' amount and button, so "USD* 20.00" and Buy Now share the
   row on a four-column grid; the wrap above is only the fallback for very narrow cards. */
.buy-grid .ym-card-buy .pr-overlap span:nth-of-type(2) { font-size: 17px; }
.buy-grid .ym-card-buy .pr-bottom .btn-bid-now { margin-left: auto; padding: 9px 12px; font-size: 13px; }
/* On a narrow card the button loses its cart icon before it would have to drop under the price. */
.buy-grid .ym-card-buy .pr-bottom { container-type: inline-size; }
@container (max-width: 250px) {
  .buy-grid .ym-card-buy .pr-bottom .btn-bid-now i { display: none; }
}

/* ---------- the shared box: confirmation, outcome, points ---------- */
.ym-page { max-width: 560px; margin: 24px auto 48px; padding: 0 16px; }
.ym-card { padding: 28px 26px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(10, 30, 70, .06); }
.ym-pay-box { text-align: center; }
.ym-pay-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.ym-pay-icon.is-wait { background: var(--tint); color: var(--brand-navy); }
.ym-pay-icon.is-ok { background: var(--tint-green); color: var(--brand-green); }
.ym-pay-icon.is-off { background: #f1f3f6; color: var(--muted); }
.ym-pay-box h2 { margin: 0 0 8px; font-family: "Poppins", "Inter", sans-serif; font-size: 22px; font-weight: 700; color: var(--brand-navy); }
.ym-pay-box p { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.ym-pay-box p.ym-pay-note { margin-top: -4px; font-size: 13px; }
.ym-pay-details { margin: 0 0 18px; text-align: left; border: 1px solid #e5e7eb; border-radius: 12px; }
.ym-pay-details > div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 14px; font-size: 14px; border-bottom: 1px solid #eef1f5; }
.ym-pay-details > div:last-child { border-bottom: none; }
.ym-pay-details span { color: var(--muted); flex-shrink: 0; }
.ym-pay-details strong { color: #222; text-align: right; overflow-wrap: anywhere; }
.ym-pay-details strong small { display: block; margin-top: 2px; font-weight: 500; color: var(--muted); font-size: 12px; }
.ym-pay-details > div.is-total strong { font-family: "Poppins", "Inter", sans-serif; font-size: 16px; color: var(--brand-navy); }
.ym-pay-details.has-icons > div { align-items: center; }
.ym-detail-label { display: inline-flex; align-items: center; gap: 8px; }
.ym-detail-icon { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.ym-detail-icon.is-blue { background: #e6f1fb; color: #185fa5; }
.ym-detail-icon.is-purple { background: #eeedfe; color: #534ab7; }
.ym-detail-icon.is-coral { background: #faece7; color: #993c1d; }
.ym-pay-actions { display: flex; flex-direction: column; gap: 10px; }
.ym-pay-actions .btn-green, .ym-pay-actions .btn-green-border { width: 100%; text-align: center; box-sizing: border-box; }
.ym-pay-product { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 12px; text-align: left; border: 1px solid #e5e7eb; border-radius: 12px; background: var(--section-alt); }
.ym-pay-product img { width: 64px; height: 64px; flex-shrink: 0; object-fit: contain; background: #fff; border-radius: 8px; }
.ym-pay-product strong { display: block; font-family: "Poppins", "Inter", sans-serif; font-size: 15px; line-height: 1.35; color: var(--brand-navy); }
.ym-pay-product span { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.ym-pay-popup .modal-inner-wrap { max-width: 480px; }

/* ---------- "Payment successful": the tick, the Toyota draw banner ---------- */
.ym-paid-tick { position: relative; animation: ym-cup-in .7s ease-out both; }
.ym-paid-tick::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--brand-green); opacity: 0; animation: ym-ripple .9s ease-out .5s both; }
.ym-prize { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 0 16px; padding: 12px 14px; text-align: left; overflow: hidden; border: 1px solid #ef9f27; border-radius: 12px; background: #faeeda; }
.ym-prize-truck { width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: #ef9f27; color: #fff; animation: ym-drive .8s ease-out var(--d, 0s) both; }
.ym-prize-text { flex: 1 1 160px; min-width: 0; }
.ym-prize-text strong { display: block; font-size: 15px; line-height: 1.4; color: #633806; }
.ym-prize-text .ym-points-earned { margin-top: 6px; }
.ym-prize-link { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; margin: 0 0 0 auto; padding: 8px 14px; border: none; border-radius: 999px; background: var(--brand-navy); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.4; animation: ym-nudge 1.4s ease-in-out 1.8s infinite; }
.ym-prize-link:hover, .ym-prize-link:focus { background: var(--brand-green); color: #fff; text-decoration: none; }

/* ---------- "My points" ---------- */
.ym-points-cup { position: relative; animation: ym-cup-in .7s ease-out both, ym-float 3s ease-in-out .9s infinite; }
.ym-points-card { margin: 0 0 14px; padding: 14px 16px; text-align: left; border-radius: 12px; background: var(--brand-navy); color: #fff; }
.ym-points-label { display: block; font-size: 13px; color: #b5d4f4; }
.ym-points-count { display: block; font-family: "Poppins", "Inter", sans-serif; font-size: 34px; font-weight: 700; line-height: 1.25; color: #fff; }
.ym-points-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-top: 6px; }
.ym-points-earned { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--brand-lime); color: #173404; font-size: 13px; font-weight: 600; }
.ym-points-rule { font-size: 12px; color: #b5d4f4; }
.ym-points-next { margin: 0 0 16px; text-align: left; }
.ym-points-next-text { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.ym-points-next-text span:first-child { font-weight: 600; color: var(--brand-navy); }
.ym-bar { height: 6px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: #eef1f5; }
.ym-bar.is-big { height: 10px; margin-top: 0; }
.ym-bar i { display: block; height: 100%; border-radius: 999px; animation: ym-grow 1.1s ease-out calc(var(--d, 0s) + .3s) both; }
.ym-pay-box h3.ym-prizes-title { margin: 0 0 10px; text-align: left; font-family: "Poppins", "Inter", sans-serif; font-size: 16px; font-weight: 700; color: var(--brand-navy); }
.ym-prizes { list-style: none; margin: 0 0 18px; padding: 0; text-align: left; border: 1px solid #e5e7eb; border-radius: 12px; }
.ym-prizes li { display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 14px; border-bottom: 1px solid #eef1f5; }
.ym-prizes li:last-child { border-bottom: none; }
.ym-prize-tile { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.ym-prizes li > div { flex: 1; min-width: 0; }
.ym-prizes li > div strong { display: block; font-size: 14px; color: #222; }
.ym-prizes li > div span { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.ym-prize-status { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #f1efe8; color: #5f5e5a; }
.ym-prize-status.is-in { background: #eaf3de; color: #27500a; }

/* ---------- entrances: --d (set per element) is when each one starts ---------- */
.ym-rise { animation: ym-rise .45s ease-out var(--d, 0s) both; }
.ym-pop { animation: ym-pop .45s cubic-bezier(.34, 1.56, .64, 1) var(--d, 0s) both; }
@keyframes ym-cup-in { 0% { transform: scale(0) rotate(-25deg); } 60% { transform: scale(1.2) rotate(10deg); } 80% { transform: scale(.95) rotate(-5deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes ym-float { 50% { transform: translateY(-4px); } }
@keyframes ym-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes ym-grow { from { width: 0; } }
@keyframes ym-pop { 0% { transform: scale(0); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes ym-ripple { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes ym-drive { 0% { transform: translateX(-70px); } 70% { transform: translateX(6px); } 85% { transform: translateX(-3px); } 100% { transform: translateX(0); } }
@keyframes ym-nudge { 50% { transform: scale(1.07); } }
@media (prefers-reduced-motion: reduce) {
    .ym-points-cup, .ym-paid-tick, .ym-paid-tick::after, .ym-bar i, .ym-rise, .ym-pop, .ym-prize-truck, .ym-prize-link { animation: none; }
}
@media (max-width: 480px) {
    .ym-card { padding: 22px 16px; }
    .ym-buy-price { font-size: 28px; }
}

/* The order outcome and My points inside a pop-up (the purchase pop-up on the product page, the
   points pop-up anywhere): the modal is the card, so the page wrapper and the card's own frame go. */
.ym-pay-popup .ym-page { max-width: none; margin: 0; padding: 0; }
.ym-pay-popup .ym-card { padding: 4px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
