/* ================================================
   EMAIL MARKETING PAGE - Email Campaigns & Management
   ================================================ */

.email-content {
  min-height: 100vh;
}

.email-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.email-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #f9fafb;
}

.create-campaign-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.create-campaign-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.3);
}

.create-campaign-btn .icon {
  width: 20px;
  height: 20px;
}

.email-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
  gap: 24px;
}

.email-section {
  background: #1a1f2e;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.email-section:hover {
  border-color: #14b8a6;
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.1);
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #374151;
}

.section-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-icon .icon {
  width: 24px;
  height: 24px;
  color: white;
}

.section-title h3 {
  font-size: 20px;
  font-weight: 700;
  color: #f9fafb;
  margin-bottom: 4px;
}

.section-title p {
  font-size: 14px;
  color: #9ca3af;
}

.section-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #e5e7eb;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.email-goal-select,
.email-tone-select,
.email-length-select {
  padding: 12px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  color: #f9fafb;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}





.email-prompt {
  padding: 12px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  color: #f9fafb;
  font-size: 14px;
  font-family: inherit;
  min-height: 100px;
  resize: vertical;
  transition: all 0.3s ease;
}

.email-prompt:hover {
  border-color: #14b8a6;
}

.email-prompt:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.generate-email-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.generate-email-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.3);
}

.generate-email-btn .icon {
  width: 20px;
  height: 20px;
}

.subject-line-generator {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 20px;
}

.subject-line-generator h4 {
  font-size: 16px;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 12px;
}

.generate-subjects-btn {
  padding: 10px 16px;
  background: #1f2937;
  color: #14b8a6;
  border: 1px solid #14b8a6;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 16px;
}

.generate-subjects-btn:hover {
  background: #14b8a6;
  color: white;
}

.subject-variants {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subject-variant {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.subject-variant:hover {
  border-color: #14b8a6;
}

.subject-variant input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.subject-variant label {
  flex: 1;
  color: #e5e7eb;
  font-size: 14px;
  cursor: pointer;
}

.campaign-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.campaign-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.campaign-type-card:hover {
  border-color: #14b8a6;
  background: #1f2937;
  transform: translateY(-2px);
}

.campaign-type-card .icon {
  width: 32px;
  height: 32px;
  color: #14b8a6;
}

.campaign-type-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;
}

.campaign-type-card p {
  font-size: 12px;
  color: #9ca3af;
}

.active-campaigns h4 {
  font-size: 16px;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 16px;
}

.campaign-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.campaign-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.campaign-item:hover {
  border-color: #14b8a6;
}

.campaign-info {
  flex: 1;
}

.campaign-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.campaign-status.active {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.campaign-status.paused {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}

.campaign-info h5 {
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 4px;
}

.campaign-info p {
  font-size: 12px;
  color: #9ca3af;
}

.campaign-stats {
  display: flex;
  gap: 16px;
  align-items: center;
}

.campaign-stats .stat {
  font-size: 12px;
  color: #9ca3af;
}

.campaign-stats .stat strong {
  color: #14b8a6;
  font-size: 14px;
}

.audience-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  padding: 20px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #f9fafb;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 8px;
}

.stat-change {
  font-size: 12px;
  font-weight: 600;
}

.stat-change.positive {
  color: #10b981;
}

.stat-change.negative {
  color: #ef4444;
}

.segment-builder h4,
.list-management h4 {
  font-size: 16px;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 16px;
}

.segment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.segment-item {
  padding: 16px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.segment-item:hover {
  border-color: #14b8a6;
}

.segment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.segment-header input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.segment-header label {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.segment-header strong {
  color: #f9fafb;
  font-size: 14px;
}

.segment-count {
  color: #9ca3af;
  font-size: 12px;
}

.segment-item p {
  font-size: 12px;
  color: #9ca3af;
  margin-left: 30px;
}

.create-segment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: #1f2937;
  color: #14b8a6;
  border: 1px solid #14b8a6;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.create-segment-btn:hover {
  background: #14b8a6;
  color: white;
}

.create-segment-btn .icon {
  width: 20px;
  height: 20px;
}

.list-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.list-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  color: #e5e7eb;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.list-action-btn:hover {
  border-color: #14b8a6;
  color: #14b8a6;
  background: #1f2937;
}

.list-action-btn .icon {
  width: 24px;
  height: 24px;
}

.performance-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.metric-card {
  padding: 20px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.metric-label {
  font-size: 14px;
  color: #9ca3af;
}

.metric-trend {
  font-size: 12px;
  font-weight: 600;
}

.metric-trend.positive {
  color: #10b981;
}

.metric-trend.negative {
  color: #ef4444;
}

.metric-value {
  font-size: 32px;
  font-weight: 700;
  color: #f9fafb;
  margin-bottom: 12px;
}

.metric-bar {
  width: 100%;
  height: 6px;
  background: #1f2937;
  border-radius: 3px;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  background: linear-gradient(90deg, #14b8a6 0%, #10b981 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.metric-fill.warning {
  background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.ab-testing h4,
.ai-recommendations h4 {
  font-size: 16px;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 16px;
}

.test-results {
  margin-bottom: 16px;
}

.test-item {
  padding: 20px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
}

.test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.test-header h5 {
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;
}

.test-status {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.test-status.completed {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.test-variants {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.variant {
  padding: 16px;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 6px;
}

.variant.winner {
  border-color: #14b8a6;
  background: rgba(20, 184, 166, 0.05);
}

.variant-label {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 8px;
}

.variant.winner .variant-label {
  color: #14b8a6;
}

.variant-subject {
  font-size: 14px;
  color: #f9fafb;
  margin-bottom: 12px;
}

.variant-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #9ca3af;
}

.variant-stats strong {
  color: #14b8a6;
}

.create-test-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: #1f2937;
  color: #14b8a6;
  border: 1px solid #14b8a6;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.create-test-btn:hover {
  background: #14b8a6;
  color: white;
}

.create-test-btn .icon {
  width: 20px;
  height: 20px;
}

.recommendation-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recommendation-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.recommendation-item:hover {
  border-color: #14b8a6;
}

.recommendation-item .icon {
  width: 24px;
  height: 24px;
  color: #14b8a6;
  flex-shrink: 0;
}

.recommendation-content strong {
  display: block;
  font-size: 14px;
  color: #f9fafb;
  margin-bottom: 4px;
}

.recommendation-content p {
  font-size: 12px;
  color: #9ca3af;
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.integration-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
}

.integration-card:hover {
  border-color: #14b8a6;
}

.integration-card.connected {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.integration-icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.integration-icon.sendgrid {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.integration-icon.mailchimp {
  background: linear-gradient(135deg, #ffe01b 0%, #f9c80e 100%);
  color: #333;
}

.integration-icon.aws {
  background: linear-gradient(135deg, #ff9900 0%, #ff6600 100%);
}

.integration-icon.resend {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.integration-icon.hubspot {
  background: linear-gradient(135deg, #ff7a59 0%, #ff5c35 100%);
}

.integration-icon.salesforce {
  background: linear-gradient(135deg, #00a1e0 0%, #0070d2 100%);
}

.integration-info h5 {
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;
}

.integration-status {
  font-size: 12px;
  color: #9ca3af;
}

.integration-btn {
  padding: 8px 16px;
  background: #1f2937;
  color: #14b8a6;
  border: 1px solid #14b8a6;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.integration-btn:hover {
  background: #14b8a6;
  color: white;
}

.integration-card.connected .integration-btn {
  color: #10b981;
  border-color: #10b981;
}

.integration-card.connected .integration-btn:hover {
  background: #10b981;
  color: white;
}

.import-contacts h4,
.cross-channel h4 {
  font-size: 16px;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 12px;
}

.import-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.import-method-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  color: #e5e7eb;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.import-method-btn:hover {
  border-color: #14b8a6;
  color: #14b8a6;
  background: #1f2937;
}

.import-method-btn .icon {
  width: 24px;
  height: 24px;
}

.cross-channel p {
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 16px;
}

.channel-options {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.channel-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.channel-option:hover {
  border-color: #14b8a6;
}

.channel-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.channel-option span {
  font-size: 14px;
  color: #e5e7eb;
}

/* 1200px Breakpoint - Email Page */
@media (max-width: 1200px) {
  .email-grid {
    grid-template-columns: 1fr;
  }

  .campaign-types,
  .integration-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .audience-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 768px Breakpoint - Email Page */
@media (max-width: 768px) {
  .email-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .campaign-types,
  .integration-grid,
  .list-actions,
  .import-methods {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .performance-overview,
  .audience-stats,
  .test-variants {
    grid-template-columns: 1fr;
  }

  .campaign-item {
    flex-direction: column;
    gap: 12px;
  }

  .campaign-stats {
    align-self: flex-start;
  }
}
