.bb-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.bb-modal.is-open {
  display: block;
}

.bb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.bb-modal__card {
  position: relative;
  width: min(540px, calc(100% - 24px));
  max-height: calc(100vh - 110px);
  margin: 82px auto 14px;
  overflow: auto;
  background: #05070c;
  border: 1px solid #131a28;
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  color: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #7a4cff #0d1118;
}

.bb-modal__card::-webkit-scrollbar {
  width: 8px;
}

.bb-modal__card::-webkit-scrollbar-track {
  background: #0d1118;
  border-radius: 999px;
}

.bb-modal__card::-webkit-scrollbar-thumb {
  background: #7a4cff;
  border-radius: 999px;
}

.bb-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid #20293b;
  border-radius: 14px;
  background: #0a1120;
  color: #c7ceda;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.bb-step {
  display: none;
  padding: 16px 18px 20px;
}

.bb-step--active {
  display: block;
}

.bb-brandbar {
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.bb-brandbar__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f4f7fb;
}

.bb-back-btn {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 1px solid #20293b;
  border-radius: 14px;
  background: #0a1120;
  color: #c7ceda;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bb-back-btn__icon {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transform: translateX(-1px);
}

.bb-product-card,
.bb-summary-card,
.bb-check-line,
.bb-method-card {
  background: #090d15;
  border: 1px solid #182132;
}

.bb-product-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  margin-bottom: 14px;
  align-items: center;
  border-radius: 22px;
}

.bb-product-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.bb-product-card__body--full {
  width: 100%;
}

.bb-product-card__title {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
}

.bb-product-card__plan {
  font-size: 0.95rem;
  color: #97a2b3;
  margin-top: 4px;
}

.bb-product-card__price {
  font-size: 1.1rem;
  font-weight: 800;
  margin-top: 8px;
  color: #ffffff;
}

.bb-coupon-card {
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 22px;
  background: #090d15;
  border: 1px solid #182132;
}

.bb-coupon-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.bb-coupon-card__title {
  font-size: 0.94rem;
  font-weight: 800;
  color: #ffffff;
}

.bb-coupon-card__note {
  font-size: 0.82rem;
  font-weight: 700;
  color: #778196;
}

.bb-coupon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 10px;
}

.bb-input--coupon {
  text-transform: uppercase;
}

.bb-btn--ghost {
  height: 54px;
  background: #0f1520;
  color: #f4f7fb;
  border: 1px solid #20293b;
  opacity: 1 !important;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.bb-btn--ghost:hover,
.bb-btn--ghost:focus-visible {
  border-color: rgba(189, 123, 253, 0.72);
  background: #141b28;
  color: #ffffff;
  opacity: 1 !important;
}

.bb-btn--ghost:disabled {
  cursor: wait;
  color: #ced5df;
}

.bb-coupon-feedback {
  min-height: 18px;
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #7f8a9b;
}

.bb-coupon-feedback.is-success {
  color: #33cf80;
}

.bb-coupon-feedback.is-error {
  color: #ff7189;
}

.bb-summary-card {
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 22px;
}

.bb-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #9aa5b5;
  font-size: 1rem;
}

.bb-summary-row--discount {
  margin-top: 10px;
  color: #8de0b0;
}

.bb-summary-row--discount strong {
  color: #8de0b0;
}

.bb-summary-row strong {
  color: #ffffff;
}

.bb-summary-divider {
  height: 1px;
  background: #1b2435;
  margin: 10px 0;
}

.bb-summary-row--total {
  font-size: 1.03rem;
  font-weight: 800;
}

.bb-form-group {
  margin-bottom: 14px;
}

.bb-label {
  display: block;
  font-size: 0.93rem;
  color: #ffffff;
  margin-bottom: 7px;
  font-weight: 700;
}

.bb-required {
  color: #ff5c77;
}

.bb-input {
  width: 100%;
  height: 54px;
  border: 1px solid #1a2436;
  background: #080d15;
  border-radius: 20px;
  padding: 0 16px;
  font-size: 0.97rem;
  color: #ffffff;
  box-sizing: border-box;
  outline: none;
}

.bb-input::placeholder {
  color: #667082;
}

.bb-input:focus {
  border-color: #1fd38a;
  background: #0a101a;
  box-shadow: 0 0 0 2px rgba(31, 211, 138, 0.22), 0 0 0 1px rgba(17, 107, 73, 0.7) inset;
}

.bb-check-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: #eef2f7;
  position: relative;
  cursor: pointer;
}

.bb-check-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bb-check-box {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  border-radius: 6px;
  border: 2px solid #5a6072;
  background: #0c1018;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(15, 18, 27, 0.7), 0 3px 10px rgba(0, 0, 0, 0.28);
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.bb-check-input:checked + .bb-check-box {
  background: linear-gradient(180deg, #2ad37f 0%, #18a957 100%);
  border-color: #29c76f;
  box-shadow: 0 0 0 1px rgba(27, 146, 79, 0.45), 0 4px 12px rgba(24, 169, 87, 0.28);
  transform: translateY(-1px);
}

.bb-check-input:checked + .bb-check-box::after {
  content: "";
  width: 12px;
  height: 12px;
  background-color: #fff;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='black'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='black'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.bb-check-line > span:last-child {
  display: block;
  line-height: 1.3;
  color: #737b8e;
}

.bb-check-line:hover .bb-check-box {
  border-color: #7a8297;
}

.bb-check-input:focus-visible + .bb-check-box {
  outline: 2px solid rgba(42, 211, 127, 0.38);
  outline-offset: 2px;
}

.bb-check-line:hover .bb-check-input:checked + .bb-check-box {
  border-color: #29c76f;
}

.bb-check-input:checked + .bb-check-box + span {
  color: #f3f6fb;
}

.bb-terms {
  text-align: center;
  color: #7f8a9b;
  font-size: 0.88rem;
  margin: 20px 0 16px;
}

.bb-terms a {
  color: #f4f7fb;
  font-weight: 700;
  text-decoration: none;
}

.bb-terms a:hover,
.bb-terms a:focus-visible {
  color: #bd7bfd;
  text-decoration: underline;
}

.bb-pay-section {
  margin-bottom: 18px;
}

.bb-pay-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 2px 0 18px;
}

.bb-pay-tab {
  height: 50px;
  border: 1px solid #1a2436;
  background: #080d15;
  color: #8f99ac;
  border-radius: 18px;
  font-size: 0.96rem;
  font-weight: 800;
  opacity: 1 !important;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.bb-pay-tab:hover,
.bb-pay-tab:focus-visible {
  border-color: rgba(189, 123, 253, 0.56);
  color: #f4f7fb;
  opacity: 1 !important;
}

.bb-pay-tab.is-active {
  border-color: #bd7bfd;
  background: rgba(189, 123, 253, 0.12);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(189, 123, 253, 0.24), 0 10px 24px rgba(189, 123, 253, 0.12);
}

.bb-pay-pane {
  display: none;
}

.bb-pay-pane.is-active {
  display: block;
}

.bb-pay-section__title {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7f8a9b;
  font-size: 0.87rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.bb-method-grid {
  display: grid;
  gap: 12px;
}

.bb-method-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bb-method-grid--1 {
  grid-template-columns: 1fr;
}

.bb-method-card {
  min-height: 58px;
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  color: #ffffff;
  font-size: 0.97rem;
  font-weight: 700;
}

.bb-method-card.active {
  border-color: #bd7bfd;
  background: rgba(189, 123, 253, 0.12);
  box-shadow: 0 0 0 1px rgba(189, 123, 253, 0.28), 0 8px 20px rgba(189, 123, 253, 0.14);
}

.bb-method-card:hover,
.bb-method-card:focus-visible {
  border-color: rgba(189, 123, 253, 0.72);
}

.bb-method-card.active:hover,
.bb-method-card.active:focus-visible {
  border-color: #bd7bfd;
  background: rgba(189, 123, 253, 0.16);
  box-shadow: 0 0 0 1px rgba(189, 123, 253, 0.34), 0 10px 22px rgba(189, 123, 253, 0.18);
}

.bb-method-card.is-disabled,
.bb-method-card:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.bb-method-card:disabled .bb-method-card__fee,
.bb-method-card.is-disabled .bb-method-card__fee {
  background: #232936;
  color: #b4bcc8;
}

.bb-method-card__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bb-method-card__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bb-method-card__title {
  line-height: 1.1;
}

.bb-method-card__subtitle {
  line-height: 1.1;
  font-size: 0.78rem;
  font-weight: 700;
  color: #8f99ac;
}

.bb-method-card.active .bb-method-card__subtitle {
  color: #d9ccf7;
}

.bb-method-card__fee {
  color: #ffffff;
  background: #1b2230;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.bb-show-more {
  width: 100%;
  height: 50px;
  border: 1px dashed #2a3244;
  background: transparent;
  color: #a2adbd;
  border-radius: 18px;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
}

.bb-coin-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bb-coin-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.bb-coin-icon--uni {
  position: relative;
  overflow: visible;
}

.bb-coin-icon--uni .bb-coin-icon__badge {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: #2563eb;
  border: 1.5px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

.bb-coin-icon--uni .bb-coin-icon__badge svg {
  width: 8px !important;
  height: 8px !important;
}

.bb-coin-icon--wide {
  width: 54px;
  min-width: 54px;
}

.bb-coin-icon--wide svg {
  width: 54px;
  height: auto;
}

.bb-btn {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  font-size: 1rem;
  border-radius: 18px;
}

.bb-btn--full {
  width: 100%;
}

.bb-btn--primary {
  height: 54px;
  background: #11151d;
  color: #ffffff !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #ffffff;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.bb-btn--primary:hover,
.bb-btn--primary:focus-visible {
  background: #bd7bfd;
  color: #ffffff !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #ffffff;
  box-shadow: 0 10px 24px rgba(189, 123, 253, 0.24);
}

.bb-btn--primary:active {
  background: #bd7bfd;
  color: #ffffff !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #ffffff;
  box-shadow: 0 8px 18px rgba(189, 123, 253, 0.2);
  transform: translateY(1px);
}

.bb-btn--primary:disabled {
  background: #4b515c;
  color: #cfd4db;
  opacity: 1 !important;
  cursor: not-allowed;
}

.bb-field-error {
  border-color: #ff5c77 !important;
}

@media (max-width: 560px) {
  .bb-modal__card {
    width: calc(100% - 10px);
    max-height: calc(100vh - 92px);
    margin: 70px auto 6px;
    border-radius: 20px;
  }

  .bb-step {
    padding: 12px 14px 16px;
  }

  .bb-product-card,
  .bb-coupon-card,
  .bb-summary-card,
  .bb-check-line,
  .bb-method-card {
    border-radius: 18px;
  }

  .bb-product-card__title {
    font-size: 0.96rem;
  }

  .bb-product-card__price {
    font-size: 1.05rem;
  }

  .bb-input {
    height: 52px;
    border-radius: 18px;
  }

  .bb-coupon-row {
    grid-template-columns: 1fr;
  }

  .bb-btn--ghost {
    height: 52px;
    border-radius: 18px;
  }

  .bb-method-grid--2 {
    grid-template-columns: 1fr 1fr;
  }

  .bb-pay-tabs {
    gap: 10px;
    margin-bottom: 16px;
  }

  .bb-pay-tab {
    height: 48px;
    border-radius: 16px;
    font-size: 0.9rem;
  }

  .bb-method-card {
    min-height: 56px;
    padding: 11px 12px;
    font-size: 0.9rem;
  }

  .bb-coin-icon,
  .bb-coin-icon svg {
    width: 26px;
    height: 26px;
    min-width: 26px;
  }

  .bb-coin-icon--wide {
    width: 50px;
    min-width: 50px;
  }

  .bb-coin-icon--wide svg {
    width: 50px;
    height: auto;
  }

  .bb-btn--primary {
    height: 52px;
  }
}
