/* Shared checkout presentation; provider selection and payment requests remain in app.js. */
#buy-modal.modal { padding: 24px 16px; background: #05050bc7; backdrop-filter: blur(14px); }
#buy-modal.modal:not([hidden]) { animation: checkout-backdrop-in .2s ease; }
#buy-modal > .sheet {
  position: relative; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
  padding: 32px; border: 1px solid #ffffff22; border-radius: 24px;
  background: radial-gradient(ellipse at 12% 0, #702d4240, transparent 50%), linear-gradient(135deg, #1a1620, #111017);
  box-shadow: 0 28px 100px #000b, inset 0 1px 0 #ffffff08;
  scrollbar-width: thin; scrollbar-color: #5b3b50 transparent;
}
#buy-modal:not([hidden]) > .sheet { animation: checkout-sheet-in .32s cubic-bezier(.22, 1, .36, 1); }
#buy-modal #buy-term { display: inline-block; max-width: 100%; margin: 0 0 22px; padding: 7px 11px; color: #f0a5b5; background: #e639460c; border: 1px solid #e6394630; border-radius: 8px; font-size: 10px; font-weight: 650; letter-spacing: .08em; line-height: 1.6; overflow-wrap: anywhere; }
#buy-modal #pick { margin: 0; color: #f7edf4; font-size: clamp(28px, 5vw, 36px); line-height: 1.1; font-weight: 750; letter-spacing: -.04em; }
#buy-modal #pick-note { margin: 12px 0 0; max-width: 430px; color: #a99caf; font-size: 13px; line-height: 1.65; }
#buy-modal .promo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 8px; margin-top: 24px; }
#buy-modal .promo-row input { min-width: 0; min-height: 46px; padding: 0 15px; border: 1px solid #ffffff16; border-radius: 10px; background: #090a10a0; color: #eaddea; font: inherit; font-size: 13px; transition: border-color .2s ease, background .2s ease; }
#buy-modal .promo-row input::placeholder { color: #85758b; }
#buy-modal .promo-row input:focus { border-color: #ed708880; background: #0c0b13; }
#buy-modal .promo-row .btn { width: auto; min-height: 46px; min-width: 60px; padding: 0 16px; border: 1px solid #e6394645; border-radius: 10px; color: #f4b7c6; background: #e6394610; font-size: 12px; }
#buy-modal .pay-ok, #buy-modal .pay-err { margin: 9px 0 0; min-height: 0; font-size: 12px; line-height: 1.5; }
#buy-modal .pay-ok:empty, #buy-modal .pay-err:empty { display: none; }
#buy-modal .pay-err { color: #ff8b9c; }
#buy-modal .pay-ok { color: #7fd6a2; }
#buy-modal .pay-gates { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 24px; }
#buy-modal .pay-gate {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 7px 14px;
  align-items: center; padding: 17px 42px 17px 17px; min-height: 104px;
  border: 1px solid #ffffff15; border-radius: 14px; background: linear-gradient(120deg, #211b28, #15121c);
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
  animation: checkout-choice-in .3s ease backwards;
}
#buy-modal .pay-gate:nth-child(2) { animation-delay: .04s; }
#buy-modal .pay-gate:nth-child(3) { animation-delay: .08s; }
#buy-modal .pay-gate::after { content: "↗"; position: absolute; top: 20px; right: 18px; color: #a27b93; font-size: 18px; transition: transform .2s ease, color .2s ease; }
#buy-modal .pay-gate:hover { transform: translateY(-2px); border-color: #e6394670; background: linear-gradient(120deg, #2a1c2d, #1b1520); box-shadow: 0 8px 24px #0003; }
#buy-modal .pay-gate:hover::after { transform: translate(2px, -2px); color: #f0a2b6; }
#buy-modal .pay-gate .pay-brand { width: 44px; height: 44px; border-radius: 11px; grid-row: 1 / span 2; }
#buy-modal .pay-copy { gap: 5px; }
#buy-modal .pay-copy strong { color: #efe6ef; font-size: 16px; line-height: 1.2; font-weight: 650; }
#buy-modal .pay-copy span { color: #a295ad; font-size: 11px; line-height: 1.5; }
#buy-modal .pay-icos { gap: 5px; }
#buy-modal .pay-ico { width: 33px; height: 20px; border-radius: 4px; }
#buy-modal .pay-ways { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 24px; }
#buy-modal .pay-ways .btn { min-height: 52px; padding: 12px 16px; border-radius: 11px; font-size: 13px; }
#buy-modal .pay-ways .pay-way { border: 1px solid #ffffff18; background: #1d1724; color: #e9dce9; gap: 14px; transition: background .2s ease, border-color .2s ease; }
#buy-modal .pay-ways .pay-way:hover { border-color: #e6394660; background: #291c2c; }
#buy-modal > .sheet > .actions:not(#pay-actions) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 25px; padding-top: 20px; border-top: 1px solid #ffffff10; }
#buy-modal > .sheet > .actions:not(#pay-actions) .btn { justify-content: center; min-height: 42px; border: 1px solid #ffffff15; border-radius: 10px; background: #ffffff02; color: #b4a5bd; font-size: 12px; transition: border-color .2s ease, color .2s ease; }
#buy-modal > .sheet > .actions:not(#pay-actions) .btn::after { content: "↗"; margin-left: 10px; color: #a46f89; }
#buy-modal > .sheet > .actions:not(#pay-actions) .btn:hover { color: #f1dce9; border-color: #e6394645; }
#buy-modal #buy-x { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 42px; margin: 14px 0 -6px; padding: 10px; color: #95869f; border: 0; border-radius: 9px; background: transparent; font-size: 12px; letter-spacing: 0; font-weight: 550; transition: background .2s ease, color .2s ease; }
#buy-modal #buy-x:hover { color: #e0cbdc; background: #ffffff04; }
#buy-modal :is(a, button, input):focus-visible { outline: 2px solid #ff91a6; outline-offset: 3px; }
#buy-modal :is(button, input):disabled { opacity: .45; cursor: not-allowed; }
@keyframes checkout-backdrop-in { from { background-color: #05050b66; } to { background-color: #05050bc7; } }
@keyframes checkout-sheet-in { from { opacity: .5; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes checkout-choice-in { from { opacity: .65; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  #buy-modal.modal { padding: 16px 12px; }
  #buy-modal > .sheet { width: calc(100vw - 24px); padding: 25px 20px 22px; border-radius: 19px; max-height: calc(100dvh - 32px); }
  #buy-modal #buy-term { margin-bottom: 20px; font-size: 9px; }
  #buy-modal .pay-gate { padding: 15px 34px 15px 13px; grid-template-columns: 38px minmax(0, 1fr); gap: 6px 11px; }
  #buy-modal .pay-gate .pay-brand { width: 38px; height: 38px; }
  #buy-modal .pay-gate::after { right: 13px; }
  #buy-modal .pay-copy strong { font-size: 15px; }
  #buy-modal .pay-copy span { font-size: 10px; }
  #buy-modal .pay-icos { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  #buy-modal, #buy-modal *, #buy-modal *::after { animation: none !important; transition: none !important; }
}
