/* ==========================================================================
   Connect Nigeria — Growth Edit Design System & Stylesheet
   ========================================================================== */

:root {
  /* Brand Colors */
  --cn-green-hero: #2f8728;
  --cn-green-hero-dark: #267220;
  --cn-green-primary: #358628;
  --cn-green-tag: #25791b;
  --cn-green-deep: #1b4913;
  --cn-green-card-callout: #1f4f16;
  --cn-green-lime: #84cc16;
  --cn-green-light: #f0fdf4;
  --cn-green-tint: #eaf5e9;
  
  /* Accent Colors */
  --cn-amber: #e67e22;
  --cn-amber-gold: #f59e0b;
  --cn-orange-dot: #f97316;
  
  /* Dark & Neutral Colors */
  --cn-dark-stat: #111a11;
  --cn-dark-stat-border: #1e2e1e;
  --cn-dark-footer: #0c150c;
  --cn-text-main: #111827;
  --cn-text-muted: #4b5563;
  --cn-text-light: #6b7280;
  --cn-text-footer-muted: #8c9b8b;
  --cn-border-card: #e5e7eb;
  --cn-border-card-hover: #bbf7d0;
  --cn-bg-card: #ffffff;
  --cn-bg-page: #eef1f5;
  
  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Layout & Spacing */
  --email-width: 600px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 2px 6px -1px rgba(0, 0, 0, 0.06), 0 1px 3px -1px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 8px 20px -3px rgba(37, 121, 27, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-container: 0 12px 36px -4px rgba(0, 0, 0, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  --shadow-btn: 0 4px 14px rgba(53, 134, 40, 0.35);
  --shadow-btn-hover: 0 6px 20px rgba(53, 134, 40, 0.45);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--cn-bg-page);
  color: var(--cn-text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Interactive Preview Control Bar
   ========================================================================== */
.preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(17, 24, 39, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.toolbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #f3f4f6;
  white-space: nowrap;
}

.toolbar-brand-badge {
  background: linear-gradient(135deg, #358628, #1f4f16);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.view-mode-group {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.view-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
  font-family: inherit;
}

.view-btn:hover {
  color: #ffffff;
}

.view-btn.active {
  background: #358628;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.view-btn svg {
  width: 14px;
  height: 14px;
}

.toggle-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #d1d5db;
  cursor: pointer;
  user-select: none;
}

.toggle-switch-label input[type="checkbox"] {
  accent-color: #358628;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.action-btn {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.action-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.action-btn.btn-copy-green {
  background: #16a34a;
}
.action-btn.btn-copy-green:hover {
  background: #15803d;
}

/* ==========================================================================
   App Stage Container
   ========================================================================== */
.stage-container {
  flex: 1;
  padding: 24px 16px 48px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.device-viewport {
  width: 100%;
  max-width: var(--email-width);
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-container);
  transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease;
  position: relative;
}

/* Viewport Width Variants */
.stage-container[data-viewport="mobile"] .device-viewport {
  max-width: 375px;
}

.stage-container[data-viewport="tablet"] .device-viewport {
  max-width: 480px;
}

.stage-container[data-viewport="desktop"] .device-viewport {
  max-width: 600px;
}

.stage-container[data-viewport="full"] .device-viewport {
  max-width: 720px;
}

/* ==========================================================================
   Simulated Email Client Frame (Gmail Header)
   ========================================================================== */
.email-client-chrome {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  user-select: none;
}

.client-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #edf2f7;
  color: #4b5563;
}

.client-icon-btn {
  background: transparent;
  border: none;
  color: #5f6368;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.client-icon-btn:hover {
  background: #e5e7eb;
  color: #202124;
}

.client-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.client-actions-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.client-subject-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 8px;
}

.client-subject-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.client-subject-title {
  font-size: 18px;
  font-weight: 600;
  color: #202124;
  letter-spacing: -0.2px;
}

.client-inbox-badge {
  background: #e8eaed;
  color: #3c4043;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.client-inbox-badge span.close-x {
  font-size: 10px;
  cursor: pointer;
  opacity: 0.7;
}

.client-subject-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5f6368;
}

.client-sender-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px 14px;
}

.sender-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sender-avatar svg {
  width: 36px;
  height: 36px;
}

.sender-avatar img.sender-avatar-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.sender-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sender-main-line {
  font-size: 13px;
  color: #202124;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.sender-name {
  font-weight: 700;
}

.sender-email {
  color: #5f6368;
  font-size: 12px;
}

.sender-unsubscribe {
  color: #1a73e8;
  font-size: 12px;
  text-decoration: none;
  margin-left: 4px;
}

.sender-unsubscribe:hover {
  text-decoration: underline;
}

.sender-to-line {
  font-size: 12px;
  color: #5f6368;
  display: flex;
  align-items: center;
  gap: 3px;
}

.sender-to-line svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* ==========================================================================
   Email Newsletter Core Container
   ========================================================================== */
.email-container {
  width: 100%;
  background: #ffffff;
  color: var(--cn-text-main);
  font-family: var(--font-main);
  overflow: hidden;
}

/* --- Hero Section --- */
.hero-section {
  background: linear-gradient(180deg, #388e2c 0%, #2e8224 100%);
  padding: 32px 28px 36px;
  color: #ffffff;
  position: relative;
}

.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

/* Brand Logo Badge */
.hero-brand-logo {
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.hero-brand-logo svg {
  height: 22px;
  width: auto;
}

.hero-brand-logo img.hero-logo-img {
  height: 22px;
  width: auto;
  display: block;
  object-fit: contain;
}

.hero-growth-badge {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 14px;
  color: #ffffff;
}

.hero-subtitle {
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 400;
  max-width: 480px;
}

/* --- Email Main Body --- */
.body-section {
  padding: 32px 28px 24px;
  background: #ffffff;
}

.eyebrow-tag {
  color: var(--cn-green-tag);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.greeting-headline {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--cn-text-main);
  letter-spacing: -0.4px;
  margin-bottom: 14px;
}

.greeting-description {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--cn-text-muted);
  margin-bottom: 22px;
}

/* --- Metrics & Status Bar --- */
.stats-bar {
  background: var(--cn-dark-stat);
  border-radius: 12px;
  padding: 16px 12px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  align-items: center;
  margin-bottom: 34px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.stat-column {
  text-align: center;
  padding: 4px 6px;
  position: relative;
}

.stat-column:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.stat-value.color-white {
  color: #ffffff;
}

.stat-value.color-amber {
  color: var(--cn-amber-gold);
}

.stat-value.color-lime {
  color: var(--cn-green-lime);
  font-size: 21px;
}

.stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #8c9e8b;
  line-height: 1.25;
}

/* --- Section: Choose Your Next Move --- */
.section-header {
  margin-bottom: 20px;
}

.section-title {
  font-size: 21px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--cn-text-main);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--cn-text-muted);
}

/* --- 6 Opportunity Cards Grid --- */
.opportunity-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.opportunity-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--cn-border-card);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.opportunity-card:hover {
  border-color: var(--cn-green-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.card-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.card-icon-box.badge-box {
  background: #f4f9f3;
  border: 1px solid #e3ede1;
}

.opportunity-card:hover .card-icon-box {
  transform: scale(1.05);
}

.card-icon-box svg {
  width: 26px;
  height: 26px;
}

.card-icon-box img.card-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 10px;
}

.card-icon-box img.icon-emblem {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.card-content {
  flex: 1;
  min-width: 0;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3px;
}

.card-category {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--cn-green-tag);
}

.card-number {
  font-size: 12px;
  font-weight: 800;
  color: var(--cn-amber);
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--cn-text-main);
  letter-spacing: -0.2px;
  margin-bottom: 4px;
}

.card-description {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--cn-text-muted);
}

/* --- Primary CTA Button --- */
.explore-cta-container {
  display: flex;
  justify-content: center;
  margin: 28px 0 36px;
}

.btn-explore {
  background: var(--cn-green-primary);
  color: #ffffff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  padding: 13px 32px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-btn);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.btn-explore:hover {
  background: #2e7a22;
  box-shadow: var(--shadow-btn-hover);
  transform: translateY(-1.5px);
}

.btn-explore:active {
  transform: translateY(0);
}

/* --- Feature Callout Card (High-Impact Next Step) --- */
.callout-card {
  background: linear-gradient(145deg, #1b4913 0%, #205617 100%);
  border-radius: var(--radius-lg);
  padding: 24px 22px 22px;
  color: #ffffff;
  margin-bottom: 36px;
  box-shadow: 0 4px 16px rgba(27, 73, 19, 0.25);
  position: relative;
  overflow: hidden;
}

.callout-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(132, 204, 22, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.callout-tag {
  color: var(--cn-amber-gold);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.callout-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.25;
  margin-bottom: 8px;
  color: #ffffff;
}

.callout-text {
  font-size: 13px;
  line-height: 1.5;
  color: #cde4cc;
  margin-bottom: 18px;
}

.btn-callout-white {
  background: #ffffff;
  color: var(--cn-green-deep);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.btn-callout-white:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-callout-white svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.btn-callout-white:hover svg {
  transform: translateX(3px);
}

/* --- Section: On The Horizon --- */
.horizon-section {
  margin-bottom: 24px;
}

.horizon-tag {
  color: var(--cn-amber);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.horizon-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--cn-text-main);
  letter-spacing: -0.3px;
  margin-bottom: 16px;
}

.horizon-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.horizon-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #374151;
}

.horizon-check-icon {
  width: 16px;
  height: 16px;
  color: #16a34a;
  flex-shrink: 0;
  margin-top: 2px;
}

.horizon-check-icon svg {
  width: 16px;
  height: 16px;
}

.horizon-divider {
  height: 1px;
  background: #f3f4f6;
  margin: 20px 0;
}

.horizon-signoff {
  font-size: 13px;
  line-height: 1.5;
  color: var(--cn-text-muted);
}

/* --- Footer Section --- */
.footer-section {
  background: var(--cn-dark-footer);
  padding: 28px 24px 32px;
  color: #94a3b8;
  font-size: 11.5px;
  line-height: 1.6;
}

.footer-brand-tagline {
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-account-note {
  color: var(--cn-text-footer-muted);
  margin-bottom: 12px;
}

.footer-links-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.footer-link {
  color: #a3b8a2;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-separator {
  color: #4a5c4a;
}

.footer-copyright {
  color: #5c6c5b;
  font-size: 11px;
}

/* ==========================================================================
   Toast Notification Component
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #111827;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid #358628;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 640px) {
  .preview-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 14px;
  }
  
  .toolbar-brand {
    justify-content: space-between;
  }
  
  .toolbar-controls {
    justify-content: space-between;
  }
  
  .hero-section {
    padding: 24px 20px 28px;
  }
  
  .hero-title {
    font-size: 26px;
  }
  
  .body-section {
    padding: 24px 18px 20px;
  }
  
  .greeting-headline {
    font-size: 20px;
  }
  
  .stats-bar {
    padding: 12px 6px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  .stat-label {
    font-size: 8px;
  }
  
  .opportunity-card {
    padding: 14px 12px;
    gap: 10px;
  }
  
  .card-icon-box {
    width: 38px;
    height: 38px;
  }
  
  .callout-card {
    padding: 20px 16px;
  }
}
