/* lp-affiliate/style.css — shared base for Smacient affiliate program pages */

:root {
  --smc-gradient: linear-gradient(to right, #2579f7 0%, #41b059 100%);
  --smc-text: #1a1a1a;
  --smc-text-muted: #6b6b6b;
  --smc-border: #e5e5e5;
  --smc-surface: #ffffff;
  --smc-surface-alt: #f7f8fa;
  --smc-accent: #2579f7;
}

body.affiliate-page {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  color: var(--smc-text);
  background: var(--smc-surface);
  -webkit-font-smoothing: antialiased;
}

.affiliate-page * { box-sizing: border-box; }

.aff-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.aff-container-narrow {
  max-width: 700px;
}

/* Nav */
.aff-nav {
  border-bottom: 1px solid var(--smc-border);
  position: sticky;
  top: 0;
  background: var(--smc-surface);
  z-index: 100;
}

.aff-nav::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(to right, #2579f7 0%, #41b059 100%);
}

.aff-nav-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  height: 88px;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap;
  overflow: hidden;
}

.aff-nav-logo {
  display: flex;
  align-items: center;
  height: 48px;
  max-height: 48px;
  overflow: hidden;
  flex-shrink: 0;
}

.aff-nav-logo img {
  display: block;
  height: 48px;
  width: auto;
  max-width: none;
  max-height: none;
}

.aff-nav-cta {
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 6px;
  background: linear-gradient(to right, #2579f7 0%, #41b059 100%);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Hero */
.aff-hero {
  text-align: center;
  padding: 48px 24px 24px;
}

.aff-hero-container { max-width: 680px; margin: 0 auto; }

.aff-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--smc-accent);
  background: #eaf1fe;
  padding: 5px 14px;
  border-radius: 6px;
  margin-bottom: 18px;
}

.aff-h1 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 14px;
  color: var(--smc-text);
}

.aff-sub {
  font-size: 16px;
  color: var(--smc-text-muted);
  line-height: 1.6;
  margin: 0 0 28px;
}

.aff-hero-cta {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: 8px;
  background: linear-gradient(to right, #2579f7 0%, #41b059 100%);
  color: #fff;
  text-decoration: none;
}

/* Stats strip */
.aff-stats {
  border-top: 1px solid var(--smc-border);
  border-bottom: 1px solid var(--smc-border);
  background: var(--smc-surface-alt);
}

.aff-stats-container {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.aff-stat {
  text-align: center;
  padding: 22px 12px;
  border-right: 1px solid var(--smc-border);
}

.aff-stat:last-child { border-right: none; }

.aff-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--smc-text);
}

.aff-stat-label {
  font-size: 13px;
  color: var(--smc-text-muted);
  margin-top: 4px;
}

/* Generic section */
.aff-section { padding: 44px 0; }

.aff-why {
  background: var(--smc-surface-alt);
}

.aff-section-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--smc-text-muted);
  margin: 0 0 20px;
}

/* Product card */
.aff-product-card {
  border: 1px solid var(--smc-border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.aff-product-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #eaf1fe;
  color: var(--smc-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.aff-product-body { flex: 1; min-width: 200px; }

.aff-product-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px;
}

.aff-product-desc {
  font-size: 14px;
  color: var(--smc-text-muted);
  margin: 0;
}

.aff-product-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--smc-accent);
  text-decoration: none;
  white-space: nowrap;
}

/* Why grid */
.aff-why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.aff-why-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  padding: 4px 0;
}

.aff-why-item i {
  color: var(--smc-accent);
  font-size: 16px;
  margin-top: 2px;
}

/* Steps */
.aff-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.aff-step {
  text-align: center;
  padding: 20px 12px;
  border: 1px solid var(--smc-border);
  border-radius: 10px;
}

.aff-step i {
  font-size: 20px;
  color: var(--smc-accent);
  display: block;
  margin-bottom: 10px;
}

.aff-step span {
  font-size: 14px;
  font-weight: 600;
}

/* FAQ */
.aff-faq { border-top: 1px solid var(--smc-border); }

.aff-faq-item { border-bottom: 1px solid var(--smc-border); }

.aff-faq-q,
.aff-faq-q:hover,
.aff-faq-q:focus,
.aff-faq-q:active {
  width: calc(100% + 24px);
  margin: 0 -12px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--smc-text) !important;
  cursor: pointer;
  padding: 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.aff-faq-q:hover {
  background: var(--smc-surface-alt) !important;
}

.aff-faq-q:focus-visible {
  outline: 2px solid var(--smc-accent) !important;
  outline-offset: 2px;
}

.aff-faq-q i {
  font-size: 13px;
  color: var(--smc-text-muted);
  transition: transform 0.15s ease;
}

.aff-faq-item.is-open .aff-faq-q i { transform: rotate(180deg); }

.aff-faq-a {
  display: none;
  padding: 0 0 18px;
}

.aff-faq-a p {
  font-size: 14px;
  color: var(--smc-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Final CTA banner */
.aff-cta-banner {
  background: linear-gradient(to right, #2579f7 0%, #41b059 100%);
  border-radius: 14px;
  padding: 36px 24px;
  text-align: center;
}

.aff-cta-banner h3 {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
}

.aff-cta-btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 8px;
  background: #fff;
  color: var(--smc-accent);
  text-decoration: none;
}

/* Footer */
.aff-footer {
  border-top: 1px solid var(--smc-border);
  padding: 20px 0;
}

.aff-footer .aff-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--smc-text-muted);
}

.aff-footer a {
  color: var(--smc-text-muted);
  text-decoration: none;
}

.aff-footer a:hover { color: var(--smc-accent); }

.aff-nav-links {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 16px;
  height: 48px;
  flex-shrink: 0;
}

.aff-nav-link {
  font-size: 14px;
  color: var(--smc-text-muted);
  text-decoration: none;
  padding-right: 28px;
  border-right: 1px solid var(--smc-border);
  height: 18px;
  display: flex;
  align-items: center;
}

.aff-nav-link:hover { color: var(--smc-accent); }

/* Forms */
.aff-form { display: flex; flex-direction: column; gap: 18px; }

.aff-field { display: flex; flex-direction: column; gap: 6px; }

.aff-field label { font-size: 13px; font-weight: 600; color: var(--smc-text); }

.aff-field input,
.aff-field select {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--smc-border);
  border-radius: 8px;
  color: var(--smc-text);
  background: #fff;
  box-sizing: border-box;
}

.aff-field textarea {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--smc-border);
  border-radius: 8px;
  color: var(--smc-text);
  background: #fff;
  box-sizing: border-box;
}

.aff-field textarea { min-height: 90px; resize: vertical; }

.aff-field input:focus,
.aff-field select:focus,
.aff-field textarea:focus {
  outline: none;
  border-color: var(--smc-accent);
}

.aff-submit,
.aff-submit:hover,
.aff-submit:focus,
.aff-submit:active {
  align-self: flex-start;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(to right, #2579f7 0%, #41b059 100%);
  color: #fff !important;
  cursor: pointer;
}

.aff-note { font-size: 13px; color: var(--smc-text-muted); }

.aff-success { text-align: center; padding: 8px 24px 40px !important; }

.aff-success i { font-size: 40px; color: var(--smc-accent); margin-bottom: 18px; display: block; }

/* Dashboard */
.aff-dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }

.aff-dash-stat { border: 1px solid var(--smc-border); border-radius: 10px; padding: 18px; text-align: center; }

.aff-dash-stat-num { font-size: 20px; font-weight: 800; }

.aff-dash-stat-label { font-size: 12px; color: var(--smc-text-muted); margin-top: 4px; }

.aff-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px dashed var(--smc-accent);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 32px;
  background: #eaf1fe;
  flex-wrap: wrap;
  gap: 12px;
}

.aff-code-box code { font-size: 18px; font-weight: 800; color: var(--smc-accent); }

.aff-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 32px; }

.aff-table th {
  text-align: left;
  color: var(--smc-text-muted);
  font-weight: 600;
  padding: 8px 6px;
  border-bottom: 1px solid var(--smc-border);
}

.aff-table td { padding: 10px 6px; border-bottom: 1px solid var(--smc-border); }

.aff-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }

.aff-badge-paid { background: #e1f5ee; color: #0f6e56; }

.aff-badge-pending { background: #faeeda; color: #854f0b; }

.aff-empty-state { text-align: center; padding: 60px 24px; }

.aff-empty-state i { font-size: 36px; color: var(--smc-text-muted); margin-bottom: 16px; display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.aff-login-box {
  max-width: 380px;
  margin: 40px auto;
  text-align: center;
  padding: 32px;
  border: 1px solid var(--smc-border);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.aff-login-box i {
  font-size: 28px;
  color: var(--smc-accent);
  margin-bottom: 14px;
  display: block;
}

.aff-login-form { text-align: left; }

.aff-login-form .aff-submit { align-self: stretch; text-align: center; }

/* Polish pass — depth and hover feedback */
.aff-hero-cta,
.aff-nav-cta,
.aff-submit {
  box-shadow: 0 4px 16px rgba(37, 121, 247, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.aff-hero-cta:hover,
.aff-nav-cta:hover,
.aff-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 121, 247, 0.3);
}

.aff-product-card,
.aff-step,
.aff-dash-stat,
.aff-empty-state,
.aff-login-box {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.15s ease;
}

.aff-product-card:hover,
.aff-step:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07);
}

.aff-eyebrow {
  box-shadow: 0 2px 8px rgba(37, 121, 247, 0.08);
}

/* Banners */
.aff-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 28px;
}

.aff-banner-success {
  background: #e1f5ee;
  color: #0f6e56;
}

.aff-banner-warning {
  background: #fdf0e0;
  color: #8a5a10;
}

/* Dashboard greeting */
.aff-dash-header { margin-bottom: 24px; }

.aff-dash-greeting {
  font-size: 22px;
  font-weight: 800;
  color: var(--smc-text);
  margin: 0 0 4px;
}

.aff-dash-sub {
  font-size: 14px;
  color: var(--smc-text-muted);
  margin: 0;
}

/* Empty states — refined */
.aff-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--smc-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 22px;
  color: var(--smc-accent);
}

.aff-empty-title { font-size: 16px; font-weight: 700; color: var(--smc-text); margin: 0 0 8px; }

.aff-empty-sub { font-size: 14px; color: var(--smc-text-muted); margin: 0; }

.aff-empty-state-inline {
  padding: 32px 24px;
  border: 1px dashed var(--smc-border);
  border-radius: 10px;
  margin-bottom: 32px;
}

/* Code box — richer, with copy button */
.aff-code-box-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--smc-accent);
  margin-bottom: 4px;
}

.aff-copy-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--smc-accent);
  background: #fff;
  color: var(--smc-accent);
  cursor: pointer;
  transition: background 0.15s ease;
}

.aff-copy-btn:hover { background: #eaf1fe; }

/* Stat cards with colored icon chips */
.aff-dash-stat-icon {
  width: 40px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin: 0 auto 12px;
}

.aff-icon-blue { background: #eaf1fe; color: #2579f7; }
.aff-icon-amber { background: #fdf0e0; color: #b5730f; }
.aff-icon-green { background: #e1f5ee; color: #0f6e56; }
.aff-icon-purple { background: #f1eafe; color: #7c3aed; }

.aff-dash-stats-4 { grid-template-columns: repeat(4, 1fr); }

/* Table wrap — bounded container instead of a bare table */
.aff-table-wrap {
  border: 1px solid var(--smc-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 32px;
}

.aff-table-wrap .aff-table { margin-bottom: 0; }

.aff-table-wrap .aff-table th {
  background: var(--smc-surface-alt);
  padding: 12px 16px;
}

.aff-table-wrap .aff-table td { padding: 12px 16px; }

.aff-table-wrap .aff-table tr:last-child td { border-bottom: none; }

.aff-table-wrap .aff-table tbody tr:nth-child(even) { background: #fbfbfc; }

/* Mobile */
@media (max-width: 640px) {
  .aff-dash-stats { grid-template-columns: 1fr; }
  .aff-dash-stats-4 { grid-template-columns: repeat(2, 1fr); }
  .aff-h1 { font-size: 26px; }
  .aff-stats-container { grid-template-columns: 1fr; }
  .aff-stat { border-right: none; border-bottom: 1px solid var(--smc-border); }
  .aff-stat:last-child { border-bottom: none; }
  .aff-why-grid { grid-template-columns: 1fr; }
  .aff-steps { grid-template-columns: 1fr; }
  .aff-footer .aff-container { flex-direction: column; gap: 8px; text-align: center; }
}

.aff-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.aff-footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Tighter top padding for a section immediately following the hero,
   where the hero's own bottom padding already provides spacing —
   without this, the two stack into an oversized gap. */
.aff-section--tight-top {
  padding-top: 8px !important;
}

.aff-required {
  color: #dc2626;
}

/* Payout method display + edit toggle */
.aff-payout-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--smc-border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 32px;
  gap: 12px;
  flex-wrap: wrap;
}

.aff-payout-current {
  font-size: 14px;
  color: var(--smc-text);
}

.aff-payout-edit-form {
  display: none;
  border: 1px solid var(--smc-border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 32px;
}

.aff-payout-edit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aff-cancel-btn {
  padding: 12px 20px;
  background: none;
  border: 1px solid var(--smc-border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--smc-text-muted);
  cursor: pointer;
  transition: background 0.15s ease;
}

.aff-cancel-btn:hover {
  background: var(--smc-surface-alt);
}

/* Real login form + forgot password link */
.aff-forgot-link {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--smc-accent);
  text-decoration: none;
}

.aff-forgot-link:hover { text-decoration: underline; }

.aff-nav-logout {
  font-size: 14px;
  color: var(--smc-text-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  padding: 0;
}

.aff-nav-logout:hover { color: var(--smc-accent); }

/* Password show/hide toggle — the wrapper itself draws the visible
   border and is a flex row, so the toggle is guaranteed to sit
   vertically centered at the end. No absolute positioning, no
   dependency on matching heights between elements. */
.aff-password-wrap {
  display: flex !important;
  align-items: center !important;
  height: 44px !important;
  border: 1px solid var(--smc-border) !important;
  border-radius: 8px !important;
  background: #fff !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.aff-password-wrap input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  height: 100% !important;
  border: none !important;
  outline: none !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  font-family: 'Open Sans', sans-serif !important;
  background: none !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

.aff-password-toggle,
.aff-password-toggle:hover,
.aff-password-toggle:focus,
.aff-password-toggle:active {
  flex: 0 0 auto !important;
  position: static !important;
  width: 44px !important;
  height: 100% !important;
  box-sizing: border-box !important;
  background: none !important;
  border: none !important;
  border-left: 1px solid var(--smc-border) !important;
  box-shadow: none !important;
  cursor: pointer !important;
  color: var(--smc-text-muted) !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  transform: none !important;
  transition: color 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.aff-password-toggle i {
  font-size: 14px !important;
  line-height: 1 !important;
  transform: none !important;
}

.aff-password-toggle:hover { color: var(--smc-accent) !important; }

.aff-account-edit-form {
  display: none;
  border: 1px solid var(--smc-border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 32px;
}