/* === Recharge Modal === */
.recharge-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.recharge-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(0 0 0 / 72%);
  cursor: pointer;
  backdrop-filter: blur(5px);
}

@keyframes rechargeModalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.recharge-modal__panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 20px;
  width: min(1300px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border: 1px solid var(--border-subtle, rgb(255 255 255 / 10%));
  border-radius: 20px;
  background: var(--bg-surface, #171a1f);
  color: var(--fg-body, #edf2f7);
  padding: 28px;
  box-shadow: 0 28px 80px rgb(0 0 0 / 44%);
  animation: rechargeModalIn 180ms ease both;
  scrollbar-color: rgba(var(--accent-rgb), 0.36) transparent;
}

.recharge-modal__header {
  position: relative;
  display: block;
  padding: 0 168px 18px;
  border-bottom: 1px solid var(--border-weak, rgb(255 255 255 / 7%));
  text-align: center;
}

.recharge-modal__header > div {
  max-width: 720px;
  margin: 0 auto;
}

.recharge-modal__eyebrow {
  color: var(--accent, #34d399);
  font-size: 12px;
  font-weight: 850;
}

.recharge-modal__header h2 {
  margin: 4px 0 6px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.recharge-modal__header p {
  margin: 0;
  color: var(--fg-muted, #9ba7b7);
  font-size: 13px;
  line-height: 1.55;
}

.recharge-modal__balance {
  position: absolute;
  top: 8px;
  right: 48px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--fg-body, #edf2f7);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.recharge-modal__close {
  position: absolute;
  top: 4px;
  right: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--fg-muted, #9ba7b7);
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.recharge-modal__close:hover {
  border-color: var(--border-subtle, rgb(255 255 255 / 10%));
  background: var(--bg-hover, rgb(255 255 255 / 7%));
  color: var(--fg-body, #edf2f7);
}

.recharge-modal__promo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.06)),
    var(--bg-elevated, #20242b);
  color: var(--fg-muted, #9ba7b7);
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.recharge-modal__promo strong {
  color: var(--accent, #34d399);
  font-weight: 950;
  white-space: nowrap;
}

.recharge-modal__audience-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--border-subtle, rgb(255 255 255 / 10%));
  border-radius: 12px;
  background: var(--bg-inset, rgb(0 0 0 / 18%));
  padding: 6px;
}

.recharge-modal__audience-tabs button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--fg-muted, #9ba7b7);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.recharge-modal__audience-tabs button:hover {
  border-color: var(--border-subtle, rgb(255 255 255 / 10%));
  background: var(--bg-hover, rgb(255 255 255 / 7%));
  color: var(--fg-body, #edf2f7);
}

.recharge-modal__audience-tabs button.is-active {
  border-color: rgba(var(--accent-rgb), 0.48);
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--accent, #34d399);
}

.recharge-modal__grid {
  display: grid;
  gap: 14px;
}

.recharge-modal__grid[data-audience="personal"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recharge-modal__grid[data-audience="enterprise"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recharge-modal__card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 390px;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border-subtle, rgb(255 255 255 / 10%));
  border-radius: 14px;
  background: var(--bg-elevated, #20242b);
  padding: 18px;
}

.recharge-modal__card.is-selected {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.16);
}

.recharge-modal__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  background: var(--accent, #34d399);
  color: #07110d;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 900;
}

.recharge-modal__card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 84px;
}

.recharge-modal__card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  min-width: 42px;
  place-items: center;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent, #34d399);
  font-size: 18px;
}

.recharge-modal__card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
}

.recharge-modal__card-head span:not(.recharge-modal__card-icon) {
  color: var(--fg-muted, #9ba7b7);
  font-size: 12px;
  font-weight: 800;
}

.recharge-modal__price strong {
  color: var(--fg-body, #edf2f7);
  font-size: 25px;
  font-weight: 950;
}

.recharge-modal__period {
  width: fit-content;
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent, #34d399);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.recharge-modal__grant {
  margin: 0;
  border-radius: 10px;
  background: var(--bg-inset, rgb(0 0 0 / 18%));
  color: var(--fg-muted, #9ba7b7);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.recharge-modal__diff-label {
  width: fit-content;
  color: var(--fg-body, #edf2f7);
  font-size: 12px;
  font-weight: 900;
}

.recharge-modal__features {
  display: grid;
  gap: 8px;
  height: 92px;
  margin: 0;
  padding: 0;
  padding-right: 6px;
  overflow-y: auto;
  list-style: none;
  overscroll-behavior: contain;
  scrollbar-width: none;
  scrollbar-gutter: stable;
}

.recharge-modal__features::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.recharge-modal__features li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 8px;
  color: var(--fg-muted, #9ba7b7);
  font-size: 12px;
  line-height: 1.45;
}

.recharge-modal__features .anticon {
  margin-top: 2px;
  color: var(--accent, #34d399);
  font-size: 12px;
}

.recharge-modal__buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: var(--accent, #34d399);
  color: #07110d;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.recharge-modal__buy.is-selected {
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.2), 0 10px 24px rgba(var(--accent-rgb), 0.18);
}

.recharge-modal__buy:hover {
  filter: brightness(1.05);
}

.recharge-modal__rules {
  border: 1px solid var(--border-subtle, rgb(255 255 255 / 10%));
  border-radius: 14px;
  background: var(--bg-elevated, #20242b);
  padding: 16px 18px;
}

.recharge-modal__rules h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 900;
}

.recharge-modal__rules ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--fg-muted, #9ba7b7);
  font-size: 12px;
  line-height: 1.55;
}

.recharge-modal__checkout {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.12), rgba(var(--accent-rgb), 0.05));
  padding: 18px;
}

.recharge-modal__checkout-eyebrow {
  color: var(--accent, #34d399);
  font-size: 12px;
  font-weight: 900;
}

.recharge-modal__checkout h3,
.recharge-modal__checkout p {
  margin: 0;
}

.recharge-modal__checkout h3 {
  margin-top: 4px;
  color: var(--fg-body, #edf2f7);
  font-size: 18px;
}

.recharge-modal__checkout p {
  color: var(--fg-muted, #9ba7b7);
  font-size: 13px;
  line-height: 1.6;
}

.recharge-modal__payment-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.recharge-modal__payment-methods button {
  display: grid;
  gap: 5px;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--border-subtle, rgb(255 255 255 / 10%));
  border-radius: 12px;
  background: var(--bg-inset, rgb(0 0 0 / 18%));
  color: var(--fg-body, #edf2f7);
  cursor: pointer;
  text-align: left;
}

.recharge-modal__payment-methods button.is-active {
  border-color: rgba(var(--accent-rgb), 0.56);
  background: rgba(var(--accent-rgb), 0.14);
}

.recharge-modal__payment-methods span {
  color: var(--fg-muted, #9ba7b7);
  font-size: 12px;
}

.recharge-modal__pay {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--accent, #34d399);
  color: #07110d;
  cursor: pointer;
  font-weight: 950;
}

.recharge-modal__pay:disabled {
  cursor: wait;
  opacity: 0.7;
}

.recharge-modal__order {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border-subtle, rgb(255 255 255 / 10%));
  border-radius: 12px;
  background: var(--bg-inset, rgb(0 0 0 / 18%));
  color: var(--fg-muted, #9ba7b7);
  font-size: 13px;
}

.recharge-modal__order strong,
.recharge-modal__order a {
  color: var(--accent, #34d399);
}

.recharge-modal__order img {
  width: 160px;
  max-width: 100%;
  border-radius: 10px;
}

@media (max-width: 980px) {
  .recharge-modal__grid[data-audience="personal"],
  .recharge-modal__grid[data-audience="enterprise"] {
    grid-template-columns: 1fr;
  }

  .recharge-modal__payment-methods {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .recharge-modal {
    padding: 12px;
  }

  .recharge-modal__panel {
    padding: 18px;
  }

  .recharge-modal__header {
    padding: 0 40px 16px;
  }

  .recharge-modal__balance {
    position: static;
    display: inline-flex;
    margin-top: 12px;
  }

  .recharge-modal__promo {
    align-items: flex-start;
    flex-direction: column;
    text-align: left;
  }
}
