/* FreeAI.fyi — User earnings portal login page styles */

/* ── Reset body for full-height split layout ── */
.portal-body {
  background: none;
  min-height: 100vh;
}

/* ── Split layout ── */
.portal-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: 100dvh; /* stable height under iOS Safari's collapsing URL bar */
}

/* ── Left column — hero ── */
.portal-left {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #e8f5e9 0%, #e3f2fd 60%, #f3e5f5 100%);
  padding: 0 48px 32px;
  position: relative;
  overflow: hidden;
}

.portal-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(209,236,209,.55) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 70%, rgba(187,222,251,.45) 0%, transparent 70%);
  pointer-events: none;
}

.portal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 0;
  position: relative;
  z-index: 1;
}

.portal-nav-links {
  display: flex;
  gap: 28px;
}

.portal-nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color .15s;
}

.portal-nav-links a:hover {
  color: var(--ink);
}

.portal-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0 48px;
  position: relative;
  z-index: 1;
}

/* ── Badge ── */
.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #2e7d32;
  background: #fff;
  border: 1.5px solid #a5d6a7;
  border-radius: 999px;
  padding: 5px 13px 5px 10px;
  width: fit-content;
  margin-bottom: 28px;
}

.portal-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #43a047;
  box-shadow: 0 0 0 3px #c8e6c9;
}

.portal-h1 {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.06;
  color: var(--ink);
  margin: 0 0 22px;
}

.portal-lead {
  font-size: 17px;
  color: var(--gray);
  line-height: 1.6;
  max-width: 420px;
  margin: 0;
}

.portal-footer {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--gray-2);
  position: relative;
  z-index: 1;
}

.portal-footer a {
  color: var(--gray-2);
  transition: color .15s;
}

.portal-footer a:hover {
  color: var(--gray);
}

/* ── Right column ── */
.portal-right {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 32px 24px;
}

/* ── Auth card ── */
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #f8f9fa;
  border-radius: 20px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.06),
    0 4px 24px -6px rgba(0,0,0,.12);
}

/* ── Provider buttons (Google / Apple / Email option) ── */
.auth-btn-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  border-radius: 10px;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
  letter-spacing: -.01em;
  -webkit-appearance: none;
  appearance: none;
}

.auth-btn-provider:hover {
  border-color: #bbb;
  background: #fafafa;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  color: var(--ink);
}

/* Apple button — dark style */
.auth-btn-apple {
  background: #000;
  border-color: #000;
  color: #fff;
}

.auth-btn-apple:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

/* Email option button — neutral */
.auth-btn-email-opt {
  color: var(--gray);
}

.auth-btn-email-opt:hover {
  color: var(--ink);
}

/* Provider icon sizing */
.provider-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── OR divider ── */
.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-2);
  letter-spacing: .06em;
  margin: 2px 0;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e4e4e4;
}

/* ── Email step divider label ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--gray-2);
  margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

/* ── Email input ── */
.auth-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}

.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217,119,87,.12);
}

.auth-input::placeholder {
  color: var(--gray-2);
}

/* ── Primary action button ── */
.auth-btn-primary {
  width: 100%;
  padding: 13px 20px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(180deg, var(--accent-grad-a), var(--accent-grad-b));
  color: #fff;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  letter-spacing: -.01em;
  -webkit-appearance: none;
}

.auth-btn-primary:hover {
  opacity: .9;
}

.auth-btn-primary:active {
  transform: scale(.98);
}

.auth-btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ── Secondary button ── */
.auth-btn-secondary {
  width: 100%;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  -webkit-appearance: none;
}

.auth-btn-secondary:hover {
  border-color: #c0c0c0;
  background: #fafafa;
}

.auth-btn-secondary:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ── Link-style button ── */
.auth-link-btn {
  background: none;
  border: none;
  padding: 4px 0;
  color: var(--accent-d);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: color .15s;
}

.auth-link-btn:hover {
  color: var(--accent);
}

/* ── Sent confirmation ── */
#auth-step-sent {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* display:flex above would otherwise override the hidden attribute */
#auth-step-sent[hidden] {
  display: none;
}

.auth-sent-icon {
  font-size: 38px;
  text-align: center;
  padding: 8px 0 2px;
}

.auth-sent-msg {
  font-size: 14px;
  color: var(--gray);
  text-align: center;
  line-height: 1.55;
  margin: 0;
}

/* ── Error banner ── */
.auth-error {
  font-size: 13px;
  color: #c0392b;
  background: #fdf3f2;
  border: 1px solid #f5c6c0;
  border-radius: 8px;
  padding: 10px 13px;
  margin: 0;
  line-height: 1.4;
}

/* ── Applied referral code note ── */
.auth-referral-note {
  font-size: 13px;
  color: var(--accent-d);
  background: #fbf0ea;
  border: 1px solid #f0cdc0;
  border-radius: 8px;
  padding: 10px 13px;
  margin: 0;
  line-height: 1.4;
}

/* Stack the email step's input(s) + buttons with consistent spacing. */
#auth-step-email { display: flex; flex-direction: column; gap: 10px; }
#auth-step-email[hidden] { display: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .portal-split {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .portal-left {
    padding: 0 24px 28px;
    min-height: auto;
  }

  .portal-hero {
    padding: 24px 0 28px;
  }

  .portal-h1 {
    font-size: 30px;
  }

  .portal-lead {
    font-size: 15px;
  }

  .portal-footer {
    display: none;
  }

  .portal-right {
    padding: 28px 16px 40px;
    align-items: flex-start;
  }

  .portal-nav {
    padding-top: 20px;
  }

  /* 16px input so iOS Safari doesn't zoom on focus */
  .auth-input {
    font-size: 16px;
  }

  .auth-btn-primary,
  .auth-btn-secondary {
    min-height: 48px;
  }
}
