/* =============================================================================
   ItinereHub Onboarding Web — style.css (A7 §13.5)
   Minimal CSS — target < 10KB. No framework dependency.
   ============================================================================= */

/* ── Reset + base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-brand:    #1E6BFF;
  --color-brand-dk: #1554CC;
  --color-text:     #111827;
  --color-muted:    #6B7280;
  --color-error:    #DC2626;
  --color-success:  #16A34A;
  --color-border:   #D1D5DB;
  --color-bg:       #F9FAFB;
  --color-card:     #FFFFFF;
  --radius:         8px;
  --shadow:         0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.onboarding-card {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 440px;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.onboarding-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.onboarding-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
}

.logo { flex-shrink: 0; }

/* ── Typography ───────────────────────────────────────────────────────────── */
.onboarding-tagline {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: .5rem;
}

.onboarding-body {
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}

/* ── Form ─────────────────────────────────────────────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin-bottom: 1rem;
}

.field-group label {
  font-size: .875rem;
  font-weight: 500;
}

.field-group input[type="email"] {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: .625rem .75rem;
  font-size: 1rem;
  width: 100%;
  transition: border-color .15s;
}

.field-group input[type="email"]:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(30,107,255,.15);
}

.consent-group {
  margin-bottom: 1.25rem;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .875rem;
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  margin-top: .2rem;
  flex-shrink: 0;
}

.field-error {
  font-size: .8125rem;
  color: var(--color-error);
}

.form-error {
  font-size: .875rem;
  color: var(--color-error);
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius);
  padding: .75rem;
  margin-bottom: 1rem;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-primary {
  display: block;
  width: 100%;
  background: var(--color-brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: .75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .15s;
}

.btn-primary:hover { background: var(--color-brand-dk); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.btn-secondary {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--color-brand);
  border: 1.5px solid var(--color-brand);
  border-radius: var(--radius);
  padding: .625rem 1rem;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  margin-top: .75rem;
  transition: background .15s;
}

.btn-secondary:hover { background: rgba(30,107,255,.05); }

.btn-link {
  background: none;
  border: none;
  color: var(--color-brand);
  font-size: .875rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* ── Already member ───────────────────────────────────────────────────────── */
.already-member {
  font-size: .8125rem;
  color: var(--color-muted);
  margin-top: 1.25rem;
  text-align: center;
}

/* ── Check email page ─────────────────────────────────────────────────────── */
.check-email-icon {
  color: var(--color-brand);
  margin-bottom: 1rem;
}

.email-display {
  word-break: break-all;
}

.resend-section {
  margin-top: 1.25rem;
  font-size: .875rem;
}

.resend-section summary { cursor: pointer; color: var(--color-muted); }

.resend-tips {
  margin-top: .5rem;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.resend-feedback {
  display: block;
  margin-top: .5rem;
  font-size: .8125rem;
  color: var(--color-success);
}

/* ── Welcome page ─────────────────────────────────────────────────────────── */
.success-icon {
  color: var(--color-success);
  margin-bottom: 1rem;
}

.address-box {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin-bottom: .75rem;
  position: relative;
}

.ingest-address {
  font-size: .9375rem;
  word-break: break-all;
  flex: 1;
}

.btn-copy {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--color-muted);
  cursor: pointer;
  padding: .25rem;
  border-radius: 4px;
  transition: color .15s;
}

.btn-copy:hover { color: var(--color-brand); }

.copy-toast {
  position: absolute;
  top: -2rem;
  right: 0;
  background: var(--color-text);
  color: #fff;
  font-size: .75rem;
  padding: .25rem .5rem;
  border-radius: 4px;
}

.how-it-works {
  margin-top: 1.5rem;
}

.how-it-works h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .75rem;
}

.how-it-works ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: .9375rem;
  color: var(--color-muted);
}

.no-app-needed {
  margin-top: .75rem;
  font-size: .875rem;
  color: var(--color-muted);
}

.manage-address {
  margin-top: 1.25rem;
  font-size: .875rem;
  color: var(--color-muted);
}

.manage-address-code {
  font-size: .875rem;
  color: var(--color-text);
}

/* ── RTL adjustments ──────────────────────────────────────────────────────── */
[dir="rtl"] .onboarding-header { flex-direction: row-reverse; }
[dir="rtl"] .consent-label { flex-direction: row-reverse; }
[dir="rtl"] .resend-tips { padding-left: 0; padding-right: 1.25rem; }
[dir="rtl"] .how-it-works ol { padding-left: 0; padding-right: 1.25rem; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .onboarding-card { padding: 1.5rem 1rem; }
}
