/* ==========================================================================
   IBN AFFILIATE & INFLUENCER PROGRAMME — MOBILE-FIRST STYLESHEET
   Comprehensive responsive design for 320px, 360px, 390px, 430px, 768px, 1024px, 1440px+
   ========================================================================== */

/* 1. Global Page Layout & Containers */
#app-affiliate-apply-section {
  width: 100%;
  min-height: 100vh;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: inherit;
  color: var(--ibn-text-primary, #0f172a);
}

.aff-header-banner {
  background: linear-gradient(135deg, #071224 0%, #112240 100%);
  color: #ffffff;
  padding: 24px 16px;
  border-bottom: 3px solid var(--ibn-gold, #c59b27);
  box-shadow: 0 4px 14px rgba(7, 18, 36, 0.15);
}

.aff-header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.aff-main-container {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  padding: 20px 16px 60px 16px;
  flex: 1;
}

/* 2. Responsive Application Card */
.aff-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
  width: 100%;
}

@media (min-width: 640px) {
  .aff-card {
    padding: 32px 36px;
    border-radius: 16px;
  }
  .aff-header-banner {
    padding: 32px 24px;
  }
}

/* 3. Steps Progress Bar */
.aff-steps-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  position: relative;
}

.aff-steps-indicator::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #e2e8f0;
  z-index: 1;
  transform: translateY(-50%);
}

.aff-step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.aff-step-bubble {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.25s ease;
}

.aff-step-item.active .aff-step-bubble {
  background: var(--ibn-navy, #071224);
  border-color: var(--ibn-gold, #c59b27);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(229, 184, 66, 0.2);
}

.aff-step-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.aff-step-item.active .aff-step-label {
  color: var(--ibn-navy, #071224);
}

/* 4. Form Controls & Touch Targets */
.aff-form-group {
  margin-bottom: 18px;
  width: 100%;
}

.aff-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.aff-helper-text {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.4;
}

.aff-input,
.aff-select,
.aff-textarea {
  width: 100%;
  min-height: 46px; /* Touch target >= 44px */
  padding: 10px 14px;
  font-size: 15px; /* Prevents auto-zoom on iOS Safari */
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.aff-textarea {
  min-height: 80px;
  resize: vertical;
}

.aff-input:focus,
.aff-select:focus,
.aff-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.aff-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 600px) {
  .aff-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* 5. Dynamic Social Media Profiles */
.aff-social-profile-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
  transition: all 0.2s ease;
}

.aff-social-profile-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.aff-social-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.aff-social-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #1e3a5f;
  background: #eff6ff;
  padding: 4px 10px;
  border-radius: 6px;
}

.aff-btn-remove {
  background: transparent;
  border: 1px solid #fecaca;
  color: #ef4444;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  min-height: 44px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
}

.aff-btn-remove:hover {
  background: #fef2f2;
}

.aff-btn-add-profile {
  width: 100%;
  min-height: 48px;
  background: #f1f5f9;
  border: 1.5px dashed #94a3b8;
  color: var(--ibn-navy, #071224);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
  margin-bottom: 18px;
}

.aff-btn-add-profile:hover {
  background: #e2e8f0;
  border-color: var(--ibn-gold, #c59b27);
}

/* 6. Action Buttons */
.aff-btn-primary {
  width: 100%;
  min-height: 48px;
  background: var(--ibn-navy, #071224);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(7, 18, 36, 0.2);
  transition: all 0.2s ease;
}

.aff-btn-primary:hover {
  background: #112240;
  transform: translateY(-1px);
}

.aff-btn-secondary {
  width: 100%;
  min-height: 46px;
  background: #ffffff;
  color: #475569;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.aff-btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* 7. Success Confirmation & Status Card */
.aff-status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.aff-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending {
  background: #fef3c7;
  color: #b45309;
}

.status-under_review {
  background: #eff6ff;
  color: #1d4ed8;
}

.status-approved {
  background: #ecfdf5;
  color: #047857;
}

.status-rejected {
  background: #fef2f2;
  color: #b91c1c;
}

.status-more_info_required {
  background: #fff7ed;
  color: #c2410c;
}

.aff-ref-box {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  margin: 18px 0;
}

.aff-ref-id {
  font-family: monospace;
  font-size: 22px;
  font-weight: 800;
  color: #2563eb;
  letter-spacing: 1px;
}

/* 8. Responsive Dashboard & Mobile Cards */
.aff-dash-metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

@media (min-width: 390px) {
  .aff-dash-metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .aff-dash-metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.aff-dash-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

/* Mobile Transaction Card */
.aff-mobile-card-row {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}

.aff-mobile-card-row:hover {
  background: #f8fafc;
}

/* Admin Application Review Cards for Mobile */
.aff-admin-app-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

@media (max-width: 768px) {
  .aff-desktop-table {
    display: none !important;
  }
  .aff-mobile-cards-view {
    display: block !important;
  }
}

@media (min-width: 769px) {
  .aff-desktop-table {
    display: table !important;
  }
  .aff-mobile-cards-view {
    display: none !important;
  }
}



/* ==========================================================================
   9. LANDING PAGE & MARKETING COMPONENTS
   ========================================================================== */
.aff-landing-hero {
  background: linear-gradient(135deg, #071224 0%, #0d1e38 50%, #15294e 100%);
  color: #ffffff;
  padding: 48px 16px 56px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--ibn-gold, #c59b27);
}

.aff-landing-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(circle, rgba(229, 184, 66, 0.12) 0%, rgba(7, 18, 36, 0) 70%);
  pointer-events: none;
}

.aff-hero-content {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.aff-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ibn-gold, #e5b842);
  background: rgba(229, 184, 66, 0.12);
  border: 1px solid rgba(229, 184, 66, 0.3);
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 18px;
}

.aff-hero-headline {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin: 0 0 10px 0;
  letter-spacing: -0.5px;
}

.aff-hero-subheadline {
  font-size: clamp(17px, 3.5vw, 22px);
  font-weight: 700;
  color: var(--ibn-gold, #e5b842);
  margin: 0 0 18px 0;
  letter-spacing: 0.2px;
}

.aff-hero-desc {
  font-size: clamp(14px, 2.5vw, 16px);
  line-height: 1.65;
  color: #cbd5e1;
  max-width: 720px;
  margin: 0 auto 28px auto;
}

.aff-hero-cta-group {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.aff-btn-hero-primary {
  min-height: 50px;
  padding: 12px 28px;
  background: var(--ibn-gold, #c59b27);
  color: #071224;
  font-size: 15px;
  font-weight: 800;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(229, 184, 66, 0.35);
  transition: all 0.2s ease;
}

.aff-btn-hero-primary:hover {
  background: #d4a72c;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 184, 66, 0.45);
}

.aff-btn-hero-secondary {
  min-height: 50px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.aff-btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #ffffff;
}

.aff-hero-reassurance {
  font-size: 12.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.45;
}

/* 10. RECURRING REVENUE OPPORTUNITY SECTION */
.aff-landing-section {
  padding: 40px 16px;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .aff-landing-section {
    padding: 56px 20px;
  }
}

.aff-sec-header {
  text-align: center;
  margin-bottom: 32px;
}

.aff-sec-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ibn-gold, #c59b27);
  display: inline-block;
  margin-bottom: 8px;
}

.aff-sec-title {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  color: var(--ibn-navy, #071224);
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.aff-sec-desc {
  font-size: clamp(13.5px, 2.5vw, 15px);
  color: #475569;
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto;
}

/* Dynamic Calculation Cards Grid */
.aff-calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 24px;
  margin-bottom: 24px;
}

@media (min-width: 480px) {
  .aff-calc-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 820px) {
  .aff-calc-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.aff-calc-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.aff-calc-card:hover {
  border-color: var(--ibn-gold, #c59b27);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.aff-calc-subscribers {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.aff-calc-amount {
  font-size: 26px;
  font-weight: 800;
  color: var(--ibn-navy, #071224);
  margin-bottom: 4px;
}

.aff-calc-amount span {
  color: var(--ibn-gold, #c59b27);
}

.aff-calc-cadence {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 600;
}

.aff-disclaimer-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #94a3b8;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.55;
  margin-top: 18px;
}

/* 11. FOUR-STEP PROCESS */
.aff-steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}

@media (min-width: 600px) {
  .aff-steps-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .aff-steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.aff-step-card-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 18px;
  position: relative;
  transition: all 0.2s ease;
}

.aff-step-card-box:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.aff-step-num-bubble {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ibn-navy, #071224);
  color: var(--ibn-gold, #e5b842);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(7, 18, 36, 0.15);
}

.aff-step-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ibn-navy, #071224);
  margin: 0 0 8px 0;
}

.aff-step-card-text {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.aff-notice-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 24px;
  font-size: 12.5px;
  color: #1e40af;
  line-height: 1.5;
}

/* 12. BUILT FOR PEOPLE WHO BUILD COMMUNITIES */
.aff-audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 24px;
}

@media (min-width: 480px) {
  .aff-audience-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .aff-audience-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.aff-audience-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ibn-navy, #071224);
  transition: all 0.2s ease;
}

.aff-audience-pill:hover {
  border-color: var(--ibn-gold, #c59b27);
  background: #fffdf5;
  transform: translateY(-1px);
}

.aff-audience-pill i {
  color: var(--ibn-gold, #c59b27);
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* 13. BENEFITS GRID */
.aff-benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}

@media (min-width: 640px) {
  .aff-benefits-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .aff-benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.aff-benefit-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.aff-benefit-box:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.aff-benefit-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(229, 184, 66, 0.15);
  color: var(--ibn-gold, #c59b27);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
}

.aff-benefit-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ibn-navy, #071224);
  margin: 0 0 8px 0;
}

.aff-benefit-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* 14. PRIOR EXPERIENCE RADIO BUTTONS & TERMS MODAL */
.aff-radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.aff-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  padding: 10px 16px;
  min-height: 44px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.aff-radio-label:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.aff-radio-label input[type="radio"] {
  accent-color: var(--ibn-navy, #071224);
  width: 18px;
  height: 18px;
}

.aff-radio-label.checked {
  border-color: var(--ibn-navy, #071224);
  background: #f1f5f9;
}

/* Terms and Conditions Modal */
.aff-terms-modal-box {
  max-width: 840px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.aff-terms-modal-body {
  overflow-y: auto;
  padding: 24px 28px;
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
}

.aff-terms-clause {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
}

.aff-terms-clause:last-child {
  border-bottom: none;
}

.aff-terms-clause h4 {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ibn-navy, #071224);
  margin: 0 0 8px 0;
}

.aff-terms-clause p {
  margin: 0 0 6px 0;
  color: #475569;
}
