/* EduGameGalaxy — ABC Smash promo code page
   Builds on style.css: reuses --purple/--green/--orange, --radius and the
   .btn/.card families, mobile-first with the shared 768px breakpoint. */

.promo-badge {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* ---- how it works ---- */

.promo-how {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 8px;
}

.promo-how-step {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.promo-how-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.promo-how-step h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.promo-how-step p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---- stock availability (shown above the quiz) ---- */

.promo-stock {
  background: #fff;
  border: 2px solid #ede9fe;
  border-radius: var(--radius);
  padding: 20px 18px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.promo-stock-title {
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 14px;
}

.promo-stock-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.promo-stock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  text-align: center;
  line-height: 1.35;
}

.promo-stock-item.is-in {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.promo-stock-item.is-out {
  background: #f8f8f8;
  border-color: #e5e7eb;
  color: #999;
}

.promo-stock-icon {
  font-size: 1.4rem;
}

.promo-stock-name {
  font-weight: 700;
  font-size: 0.92rem;
}

.promo-stock-count {
  font-size: 0.86rem;
  font-weight: 700;
}

.promo-stock-item.is-in .promo-stock-count {
  color: #047857;
}

.promo-stock-item.is-out .promo-stock-count {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.promo-stock-note {
  background: #fffbeb;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 14px;
  color: #7c5a12;
  font-size: 0.9rem;
  line-height: 1.55;
}

.promo-soldout {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

.promo-soldout-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.promo-soldout p {
  color: #555;
  line-height: 1.7;
  max-width: 46ch;
  margin: 0 auto 22px;
}

/* ---- quiz form ---- */

.promo-app {
  max-width: 720px;
  margin: 0 auto;
}

.promo-h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.promo-lead {
  color: #555;
  margin-bottom: 28px;
}

.promo-form {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

.promo-question {
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  margin-bottom: 22px;
  transition: border-color 0.2s, background 0.2s;
}

.promo-question legend {
  font-weight: 700;
  font-size: 1.02rem;
  padding: 0 4px;
  margin-bottom: 10px;
}

.promo-question.invalid {
  border-color: #ef4444;
  background: #fef2f2;
}

.promo-options {
  display: grid;
  gap: 8px;
}

.promo-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1.45;
  transition: border-color 0.15s, background 0.15s;
}

.promo-option:hover {
  border-color: var(--purple-light);
  background: #faf7ff;
}

.promo-option input {
  margin-top: 3px;
  accent-color: var(--purple);
  flex-shrink: 0;
}

.promo-option:has(input:checked) {
  border-color: var(--purple);
  background: #f5f0ff;
  font-weight: 600;
}

.promo-hint {
  color: #666;
  font-size: 0.9rem;
  margin: 0 4px 12px;
  line-height: 1.5;
}

/* ---- platform picker ---- */

.promo-platform-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.promo-platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 10px;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.promo-platform-btn:hover {
  border-color: var(--purple-light);
  transform: translateY(-2px);
}

.promo-platform-btn.selected {
  border-color: var(--purple);
  background: #f5f0ff;
}

/* Out of stock — still readable, but clearly not an option. */
.promo-platform-btn.is-out,
.promo-platform-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f8f8f8;
}

.promo-platform-btn.is-out:hover,
.promo-platform-btn:disabled:hover {
  border-color: #e5e7eb;
  transform: none;
}

.promo-platform-icon {
  font-size: 2rem;
  line-height: 1;
}

.promo-platform-name {
  font-weight: 700;
}

/* Honeypot — off-screen rather than display:none, which some bots skip. */
.promo-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.promo-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.promo-submit {
  width: 100%;
}

.promo-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* ---- the code ---- */

.promo-code-card {
  background: linear-gradient(135deg, var(--purple) 0%, var(--blue) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px 22px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.28);
}

.promo-code-card .promo-h2 {
  color: #fff;
}

.promo-repeat {
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.promo-code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: clamp(1.35rem, 6vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  word-break: break-all;
  background: rgba(0, 0, 0, 0.22);
  border-radius: var(--radius-sm);
  padding: 18px 14px;
  margin: 18px 0;
  user-select: all;
}

.promo-code-card .promo-copy {
  background: #fff;
  border-color: #fff;
  color: var(--purple);
}

.promo-code-card .promo-copy:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.85);
  color: var(--purple-dark);
}

.promo-once {
  margin-top: 16px;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---- redemption manual ---- */

.promo-manual {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 22px;
  margin-top: 24px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

.promo-manual-platform {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.promo-steps {
  list-style: none;
  counter-reset: promo-step;
  padding: 0;
  margin: 0 0 20px;
}

.promo-steps li {
  counter-increment: promo-step;
  position: relative;
  padding: 0 0 18px 46px;
  line-height: 1.6;
}

.promo-steps li::before {
  content: counter(promo-step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

/* Connecting line between the step bullets. */
.promo-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 30px;
  bottom: 4px;
  width: 2px;
  background: #ede9fe;
}

.promo-note {
  background: #fffbeb;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: #7c5a12;
  font-size: 0.93rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.promo-manual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.promo-switch {
  background: none;
  border: none;
  color: var(--purple);
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 0;
}

/* ---- thank you + rating ---- */

.promo-thanks {
  background: #fff;
  border: 2px solid var(--purple-light);
  border-radius: var(--radius);
  padding: 32px 22px;
  margin-top: 24px;
  text-align: center;
}

.promo-thanks p {
  color: #555;
  line-height: 1.7;
  max-width: 52ch;
  margin: 0 auto 22px;
}

.promo-stars {
  font-size: 2rem;
  color: var(--orange);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.promo-thanks .promo-manual-actions {
  justify-content: center;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .promo-how {
    grid-template-columns: repeat(3, 1fr);
  }

  .promo-form,
  .promo-manual,
  .promo-thanks {
    padding: 32px 30px;
  }

  .promo-code-card {
    padding: 40px 32px;
  }

  .promo-submit {
    width: auto;
    min-width: 260px;
  }
}
