/* Purchase page - base layout: page shell, topbar, checkout grid, account switch, notices, package cards, order summary, pay method, submit, and base responsive breakpoints. */

.purchase-page {
  min-height: 100vh;
  height: auto;
  overflow: auto;
  background: #0a0d12;
}

.purchase-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(10, 13, 18, 0.86);
  backdrop-filter: blur(14px);
}

.purchase-brand,
.purchase-login-btn,
.purchase-back {
  color: #fff;
  text-decoration: none;
}

.purchase-brand {
  font-weight: 800;
  font-size: 18px;
}

.purchase-login-btn,
.purchase-back {
  height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.05);
}

.purchase-login-btn {
  margin-left: auto;
  margin-right: 10px;
  cursor: pointer;
}

.purchase-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.purchase-main,
.purchase-summary {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(18, 22, 30, 0.86);
  box-shadow: 0 24px 70px rgba(0,0,0,0.22);
}

.purchase-main {
  padding: 24px;
}

.purchase-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.purchase-heading span {
  color: #4ade80;
  font-size: 13px;
  font-weight: 700;
}

.purchase-heading h1 {
  margin-top: 6px;
  color: #fff;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.purchase-required {
  flex: 0 0 auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.2);
  color: #facc15;
  font-size: 13px;
}

.purchase-account-switch {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  min-inline-size: 0;
  margin-inline: 0;
  margin-bottom: 18px;
}

.purchase-account-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,0.7);
  padding: 0 16px;
  cursor: pointer;
}

.purchase-account-option > input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.purchase-account-option > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 5px;
}

.purchase-account-option > input:focus-visible + span {
  outline: 3px solid rgba(155, 108, 255, .72);
  outline-offset: 4px;
}

.purchase-account-option.active {
  background: #16a34a;
  color: #fff;
  font-weight: 700;
}

.purchase-team-notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(250, 204, 21, 0.2);
  background: rgba(250, 204, 21, 0.1);
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  line-height: 1.6;
}

.purchase-team-notice.blocked {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
}

.purchase-team-notice.ready {
  border-color: rgba(74, 222, 128, 0.24);
  background: rgba(74, 222, 128, 0.1);
  color: #bbf7d0;
}

.purchase-order-status {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(148, 163, 184, 0.08);
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  line-height: 1.6;
}

.purchase-order-status--info {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(96, 165, 250, 0.1);
  color: #bfdbfe;
}

.purchase-order-status--success {
  border-color: rgba(74, 222, 128, 0.24);
  background: rgba(74, 222, 128, 0.1);
  color: #bbf7d0;
}

.purchase-order-status--warn {
  border-color: rgba(250, 204, 21, 0.2);
  background: rgba(250, 204, 21, 0.1);
  color: rgba(255,255,255,0.82);
}

.purchase-order-status--error {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
}

.purchase-team-box {
  display: grid;
  grid-template-columns: 90px minmax(0, 360px);
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.purchase-team-box label {
  color: rgba(255,255,255,0.72);
  font-size: 13px;
}

.purchase-team-box input {
  height: 42px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  outline: none;
  padding: 0 12px;
}

.purchase-packages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.purchase-loading,
.purchase-error {
  grid-column: 1 / -1;
  color: rgba(255,255,255,0.62);
  padding: 18px 0;
}

.package-card {
  position: relative;
  min-height: 152px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
  color: #fff;
  padding: 16px;
  text-align: left;
  cursor: pointer;
}

.package-card:hover {
  border-color: rgba(74, 222, 128, 0.35);
}

.package-card.active {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.package-card .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.14);
  color: #facc15;
  font-size: 12px;
}

.package-amount {
  font-size: 26px;
  font-weight: 800;
}

.package-amount span {
  font-size: 14px;
  color: rgba(255,255,255,0.56);
  margin-left: 4px;
}

.package-points {
  margin-top: 18px;
  color: #4ade80;
  font-size: 18px;
  font-weight: 800;
}

.package-desc {
  margin-top: 6px;
  color: rgba(255,255,255,0.52);
  font-size: 13px;
}

.package-daily-note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.45);
  font-size: 12px;
  line-height: 1.5;
}

.summary-daily-note {
  margin: 10px 0 2px;
  color: rgba(255, 213, 79, 0.82);
  font-size: 12px;
  line-height: 1.6;
}

.purchase-summary {
  position: sticky;
  top: 86px;
  padding: 20px;
  height: max-content;
}

.summary-title {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.summary-row span,
.summary-pay span {
  color: rgba(255,255,255,0.56);
  font-size: 13px;
}

.summary-row strong {
  color: #fff;
}

.summary-pay {
  padding: 16px 0;
}

.summary-pay-method {
  margin-top: 8px;
  height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(22, 163, 74, 0.38);
  background: rgba(22, 163, 74, 0.1);
  color: #fff;
  font-weight: 700;
}

.summary-pay-methods {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.pay-method-option {
  position: relative;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
  padding: 0 10px;
  cursor: pointer;
  font-weight: 700;
}

.pay-method-option > input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pay-method-option > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
}

.pay-method-option > input:focus-visible + span {
  outline: 3px solid rgba(155, 108, 255, 0.72);
  outline-offset: 4px;
}

.pay-method-option.active {
  border-color: rgba(22, 163, 74, 0.6);
  background: rgba(22, 163, 74, 0.16);
  color: #fff;
}

.summary-wallet-balance {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(22, 163, 74, 0.24);
  background: rgba(22, 163, 74, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.purchase-submit {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: #16a34a;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.purchase-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.package-card:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.purchase-note {
  margin-top: 14px;
  color: rgba(255,255,255,0.48);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 920px) {
  .purchase-shell {
    grid-template-columns: 1fr;
  }

  .purchase-summary {
    position: static;
  }

  .purchase-packages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .purchase-topbar {
    padding: 12px 16px;
  }

  .purchase-shell {
    width: calc(100% - 20px);
    margin-top: 14px;
  }

  .purchase-main,
  .purchase-summary {
    padding: 16px;
  }

  .purchase-heading {
    flex-direction: column;
  }

  .purchase-heading h1 {
    font-size: 23px;
  }

  .purchase-packages,
  .purchase-team-box {
    grid-template-columns: 1fr;
  }
}

