body.faka-buy-modal-open { overflow: hidden; }

.faka-buy-modal[hidden] { display: none !important; }
.faka-buy-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.faka-buy-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.faka-buy-modal__dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: min(92vh, 780px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  padding: 18px 18px 14px;
}
.faka-buy-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.faka-buy-modal__head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #202124;
}
.faka-buy-modal__close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: #f1f3f4;
  color: #5f6368;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.faka-buy-modal__product {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  margin-bottom: 14px;
}
.faka-buy-modal__product img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}
.faka-buy-modal__product h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #202124;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.faka-buy-modal__product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #5f6368;
}
.faka-buy-modal__product-meta strong {
  color: #d93025;
  font-size: 15px;
}
.faka-buy-modal__qty {
  margin-bottom: 14px;
}
.faka-buy-modal__qty-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #3c4043;
}
.faka-buy-modal__qty-label small {
  font-weight: 500;
  color: #9aa0a6;
}
.faka-buy-modal .faka-qty-control {
  border-radius: 12px;
}
.faka-buy-modal .faka-qty-control button {
  width: 48px;
  height: 48px;
  font-size: 22px;
}
.faka-buy-modal .faka-qty-control input {
  width: 80px;
  height: 48px;
  font-size: 18px;
}
.faka-buy-modal__pay-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #202124;
}
.faka-buy-modal__method {
  display: block;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  background: #fff;
}
.faka-buy-modal__method:has(input:checked),
.faka-buy-modal__method.is-open:has(input:checked),
.faka-buy-modal__method--group:has(.faka-buy-modal__crypto input:checked) {
  border-color: var(--faka-accent, #1a73e8);
  box-shadow: 0 0 0 1px rgba(26, 115, 232, 0.2);
}
.faka-buy-modal__method input[type="radio"] {
  margin-right: 10px;
  vertical-align: top;
  margin-top: 3px;
}
.faka-buy-modal__method-body,
.faka-buy-modal__method-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.faka-buy-modal__method-body strong,
.faka-buy-modal__method-head strong {
  display: block;
  font-size: 14px;
  color: #202124;
}
.faka-buy-modal__method-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #80868b;
}
.faka-buy-modal__fee {
  margin-left: 6px;
  color: #188038;
  font-style: normal;
}
.faka-buy-modal__balance-tip {
  display: inline-block;
  margin-top: 4px;
  color: #d93025;
  font-size: 12px;
  font-weight: 600;
}
.faka-buy-modal__crypto-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  margin-left: 26px;
}
.faka-buy-modal__crypto {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  background: #fafbfc;
  cursor: pointer;
  text-align: center;
  font-size: 11px;
  color: #3c4043;
  position: relative;
}
.faka-buy-modal__crypto input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.faka-buy-modal__crypto img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.faka-buy-modal__crypto.is-active,
.faka-buy-modal__crypto:has(input:checked) {
  border-color: var(--faka-accent, #1a73e8);
  background: #e8f0fe;
  color: var(--faka-accent, #1a73e8);
  font-weight: 600;
}
.faka-buy-modal__login-tip {
  font-size: 12px;
  color: #80868b;
  margin: 0 0 8px;
}
.faka-buy-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed #e8eaed;
}
.faka-buy-modal__total span {
  display: block;
  font-size: 12px;
  color: #80868b;
}
.faka-buy-modal__total strong {
  font-size: 22px;
  color: #d93025;
  font-weight: 800;
}
.faka-buy-modal__submit {
  flex: 1;
  max-width: 220px;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--faka-accent, #1a73e8);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-left: auto;
}
.faka-buy-modal__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
@media (max-width: 575px) {
  .faka-buy-modal__crypto-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faka-buy-modal__foot { flex-direction: column; align-items: stretch; }
  .faka-buy-modal__submit { max-width: none; width: 100%; }
}
