/* FlipKey Redeem SDK — drop-in styles for the redemption widget.
 * License: MIT. Source: https://flipkey.gg/sdk/redeem/
 *
 * The widget reads CSS custom properties --fk-brand and --fk-accent
 * which are set automatically by the JS module based on data-platform.
 * Override them on the .fk-redeem element to customize per publisher.
 */

.fk-redeem {
  --fk-brand: #1a1a1a;
  --fk-accent: #6366f1;
  --fk-bg: #0f1117;
  --fk-bg-card: #18181c;
  --fk-bg-elev: #0e0e10;
  --fk-border: #2a2a30;
  --fk-text: #e2e4ed;
  --fk-text-muted: #9a9aa3;
  --fk-text-dim: #6b6b73;
  --fk-radius: 12px;
  --fk-radius-sm: 6px;
  --fk-radius-md: 8px;
  --fk-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fk-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-family: var(--fk-font);
  color: var(--fk-text);
  display: block;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  box-sizing: border-box;
}

.fk-redeem *, .fk-redeem *::before, .fk-redeem *::after {
  box-sizing: border-box;
}

.fk-card {
  background: var(--fk-bg-card);
  border: 1px solid var(--fk-border);
  border-radius: var(--fk-radius);
  padding: 2.25rem 2.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.fk-title {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.fk-lede {
  margin: 0;
  color: var(--fk-text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.fk-key-box {
  margin: 1.5rem 0 0.5rem;
  padding: 1rem 1.2rem;
  background: var(--fk-bg-elev);
  border: 1px solid var(--fk-border);
  border-radius: var(--fk-radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.fk-key-value {
  font-family: var(--fk-mono);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: #fff;
  font-weight: 600;
  user-select: all;
  word-break: break-all;
}

.fk-copy-btn {
  flex-shrink: 0;
  background: var(--fk-border);
  color: var(--fk-text);
  border: 1px solid var(--fk-border);
  border-radius: var(--fk-radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.fk-copy-btn:hover {
  background: var(--fk-text-dim);
}

.fk-copy-btn.fk-copied {
  background: var(--fk-accent);
  border-color: var(--fk-accent);
  color: #fff;
}

.fk-claim-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--fk-accent);
  color: #fff;
  font-weight: 700;
  padding: 0.85rem 1.5rem;
  border-radius: var(--fk-radius-sm);
  text-decoration: none;
  margin-top: 1.25rem;
  border: 1px solid var(--fk-accent);
  letter-spacing: 0.02em;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: filter 0.15s;
}

.fk-claim-btn:hover {
  filter: brightness(1.12);
}

.fk-warn {
  margin: 1.5rem 0 0;
  font-size: 0.85rem;
  color: #f5b95a;
  background: rgba(245, 185, 90, 0.08);
  border: 1px solid rgba(245, 185, 90, 0.25);
  padding: 0.7rem 0.9rem;
  border-radius: var(--fk-radius-sm);
  line-height: 1.55;
}

.fk-error {
  padding: 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  border-radius: var(--fk-radius-sm);
  font-family: var(--fk-mono);
  font-size: 0.85rem;
}

.fk-status {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--fk-text-muted, #888);
  min-height: 1.1em;
}
.fk-status-error {
  color: #ef4444;
}

.fk-wallet-toggle {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--fk-text-muted, #8b8fa3);
  text-decoration: none;
}
.fk-wallet-toggle:hover {
  color: var(--fk-accent, #66c0f4);
  text-decoration: underline;
}

/* Light-mode override — opt in by adding class fk-light to the .fk-redeem element */
.fk-redeem.fk-light {
  --fk-bg-card: #ffffff;
  --fk-bg-elev: #f5f5f5;
  --fk-border: #e0e0e0;
  --fk-text: #1a1a1a;
  --fk-text-muted: #555;
  --fk-text-dim: #888;
}
.fk-redeem.fk-light .fk-title,
.fk-redeem.fk-light .fk-key-value {
  color: #1a1a1a;
}

@media (max-width: 540px) {
  .fk-card {
    padding: 1.5rem 1.25rem;
  }
  .fk-key-box {
    flex-direction: column;
    align-items: stretch;
  }
  .fk-copy-btn {
    width: 100%;
  }
}
