/*
 * app-store-redirect.css
 *
 * Styles for the fallback modal (used by the CTA wrapper) and the /get
 * auto-redirect page. Colors are exposed as CSS custom properties on
 * `:root` -- swap the values below for Reps' real brand palette (or
 * override them from a page-level <style> after this file loads).
 */

:root {
  --asr-bg: #0b0d10;
  --asr-surface: #16191d;
  --asr-text: #f5f6f7;
  --asr-text-muted: #9aa1a9;
  --asr-accent: #caff33;
  --asr-accent-text: #0b0d10;
  --asr-border: #2a2e34;
  --asr-radius: 16px;
  --asr-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------------------------------------------------------------------
   Buttons (shared by the modal and the /get page's manual link)
--------------------------------------------------------------------- */

.asr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.9em 1.4em;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--asr-font);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.asr-btn:active {
  transform: scale(0.97);
}

.asr-btn--primary {
  background: var(--asr-accent);
  color: var(--asr-accent-text);
}

.asr-btn--secondary {
  background: transparent;
  color: var(--asr-text);
  border-color: var(--asr-border);
}

/* ---------------------------------------------------------------------
   Fallback modal
--------------------------------------------------------------------- */

.asr-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  font-family: var(--asr-font);
  animation: asr-fade-in 0.2s ease;
}

.asr-modal-overlay[hidden] {
  display: none;
}

@keyframes asr-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.asr-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto env(safe-area-inset-bottom, 0);
  background: var(--asr-surface);
  color: var(--asr-text);
  border-radius: var(--asr-radius) var(--asr-radius) 0 0;
  padding: 28px 24px calc(24px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}

@media (min-width: 480px) {
  .asr-modal-overlay {
    align-items: center;
  }
  .asr-modal {
    border-radius: var(--asr-radius);
    margin-bottom: 0;
  }
}

.asr-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--asr-text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.asr-modal__title {
  margin: 0 24px 8px 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.asr-modal__steps {
  margin: 0 0 20px;
  color: var(--asr-text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.asr-modal__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.asr-modal__actions .asr-btn {
  flex: 1 1 auto;
}

.asr-modal__copied {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--asr-accent);
}

/* ---------------------------------------------------------------------
   /get auto-redirect page
--------------------------------------------------------------------- */

.asr-get {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  text-align: center;
  background: var(--asr-bg);
  color: var(--asr-text);
  font-family: var(--asr-font);
}

.asr-get__logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.asr-get__spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--asr-border);
  border-top-color: var(--asr-accent);
  animation: asr-spin 0.8s linear infinite;
}

@keyframes asr-spin {
  to {
    transform: rotate(360deg);
  }
}

.asr-get__status {
  margin: 0;
  font-size: 1rem;
  color: var(--asr-text-muted);
  min-height: 1.5em;
}

.asr-get #asr-manual-link[hidden] {
  display: none;
}

body {
  margin: 0;
  background: var(--asr-bg);
}
