/* Redeem instructions */
.total-codes-card {
  position: relative;
  padding-right: 58px !important;
}

.redeem-help-button {
  position: absolute;
  top: 13px;
  right: 13px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(254, 240, 138, 0.9);
  border-radius: 999px;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #111827;
  font-size: 1.05rem;
  font-weight: 1000;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.redeem-help-button:hover {
  transform: translateY(-1px) scale(1.04);
  filter: brightness(1.05);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.38);
}

.redeem-help-button:focus-visible {
  outline: 3px solid rgba(250, 204, 21, 0.35);
  outline-offset: 3px;
}

.redeem-guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 1320;
  display: grid;
  place-items: center;
  padding: 24px;
}

.redeem-guide-overlay[hidden] {
  display: none;
}

.redeem-guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 5, 15, 0.78);
  backdrop-filter: blur(14px);
}

.redeem-guide-panel {
  position: relative;
  width: min(640px, calc(100vw - 48px));
  max-height: min(78vh, 720px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(250, 204, 21, 0.42);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.12), transparent 22rem),
    linear-gradient(180deg, rgba(13, 19, 35, 0.99), rgba(4, 8, 18, 0.99));
  box-shadow: var(--shadow), 0 0 56px rgba(245, 158, 11, 0.16);
}

.redeem-guide-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: var(--text);
}

.redeem-guide-close svg {
  width: 20px;
  height: 20px;
}

.redeem-guide-header {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  padding-right: 48px;
}

.redeem-guide-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #111827;
  font-size: 1.55rem;
  font-weight: 1000;
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.25);
}

.redeem-guide-kicker {
  display: block;
  margin-bottom: 5px;
  color: #facc15;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.redeem-guide-header h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.redeem-guide-content {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.42);
}

.redeem-guide-instructions,
.redeem-guide-empty {
  margin: 0;
  color: var(--muted-strong);
  font-size: 1rem;
  line-height: 1.75;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.redeem-guide-empty {
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 520px) {
  .total-codes-card {
    padding-right: 54px !important;
  }

  .redeem-help-button {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
  }

  .redeem-guide-overlay {
    padding: 12px;
  }

  .redeem-guide-panel {
    width: min(100%, calc(100vw - 24px));
    max-height: 86vh;
    padding: 22px 18px;
    border-radius: 24px;
  }

  .redeem-guide-close {
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
  }

  .redeem-guide-header {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    padding-right: 38px;
  }

  .redeem-guide-icon {
    width: 46px;
    height: 46px;
    font-size: 1.3rem;
  }

  .redeem-guide-header h2 {
    font-size: 1.45rem;
  }

  .redeem-guide-content {
    margin-top: 18px;
    padding: 16px;
    border-radius: 17px;
  }

  .redeem-guide-instructions,
  .redeem-guide-empty {
    font-size: 0.95rem;
    line-height: 1.65;
  }
}
