/* =======================================================
   style.css — ff-mkt module styles
   mkt-pages-ffs-com / ff-mkt v1.3

   Scope: mkt-* prefixed classes only.
   All ff-* classes are inherited from global.css.
   Do NOT redefine ff-* variables or base classes here.
   ======================================================= */

/* =======================================================
   Progress Indicator
   ======================================================= */

.mkt-progress {
  margin-bottom: var(--spacing-xl);
}

.mkt-progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  padding-bottom: var(--spacing-xs);
}

.mkt-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 56px;
}

.mkt-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-gray);
  color: var(--text-medium);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
}

.mkt-step-label {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition-normal);
}

.mkt-step.active .mkt-step-num {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.mkt-step.active .mkt-step-label {
  color: var(--primary-color);
  font-weight: 700;
}

.mkt-step.completed .mkt-step-num {
  background: var(--success);
  color: white;
  border-color: transparent;
}

.mkt-step.completed .mkt-step-num::after {
  content: '✓';
}

.mkt-step.completed .mkt-step-label {
  color: var(--success);
}

.mkt-step-line {
  flex: 1;
  height: 2px;
  background: var(--bg-gray);
  min-width: 16px;
  max-width: 40px;
  margin-bottom: 18px;
  transition: background var(--transition-normal);
}

.mkt-step-line.completed {
  background: var(--success);
}

/* =======================================================
   Section visibility
   ======================================================= */

.mkt-section {
  display: none;
}

.mkt-section.active {
  display: block;
}

/* =======================================================
   Step badge (inside section headings)
   ======================================================= */

.mkt-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  font-size: 13px;
  font-weight: 700;
  margin-right: var(--spacing-xs);
  vertical-align: middle;
  flex-shrink: 0;
}

/* =======================================================
   Form fields
   ======================================================= */

.mkt-field {
  margin-bottom: var(--spacing-md);
}

.mkt-field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.mkt-required {
  color: var(--error);
  margin-left: 2px;
}

/* =======================================================
   Radio cards (User State + Objective)
   ======================================================= */

.mkt-radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.mkt-radio-card {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border: 2px solid var(--bg-gray);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  background: var(--bg-white);
}

.mkt-radio-card:hover {
  border-color: var(--primary-color);
  background: rgba(102, 126, 234, 0.04);
}

.mkt-radio-card input[type="radio"] {
  accent-color: var(--primary-color);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.mkt-radio-card:has(input:checked) {
  border-color: var(--primary-color);
  background: rgba(102, 126, 234, 0.06);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.mkt-radio-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mkt-radio-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.mkt-radio-desc {
  font-size: 13px;
  color: var(--text-medium);
  line-height: 1.4;
}

/* Objective stage tag (Reach / Engage / Brand / etc.) */
.mkt-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(102, 126, 234, 0.12);
  color: var(--primary-color);
  letter-spacing: 0.3px;
}

/* =======================================================
   Checkbox cards (Channels)
   ======================================================= */

.mkt-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xs);
}

.mkt-checkbox-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid var(--bg-gray);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  background: var(--bg-white);
  transition: all var(--transition-normal);
  user-select: none;
}

.mkt-checkbox-card:hover {
  border-color: var(--primary-color);
  background: rgba(102, 126, 234, 0.04);
}

.mkt-checkbox-card input[type="checkbox"] {
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

.mkt-checkbox-card:has(input:checked) {
  border-color: var(--primary-color);
  background: rgba(102, 126, 234, 0.06);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

/* =======================================================
   Navigation buttons (Back / Next row)
   ======================================================= */

.mkt-nav {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

.mkt-nav .ff-btn {
  width: auto;
  flex: 1;
}

.mkt-nav .ff-btn-secondary {
  flex: 0 0 auto;
  min-width: 100px;
}

/* =======================================================
   Output actions
   ======================================================= */

.mkt-output-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  flex-wrap: wrap;
}

.mkt-output-actions .ff-btn {
  width: auto;
  flex: 1;
  min-width: 120px;
}

/* =======================================================
   History section
   ======================================================= */

.mkt-history {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 2px solid var(--bg-gray);
}

.mkt-history h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-medium);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: var(--spacing-md);
}

.mkt-history-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.mkt-history-item {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--bg-gray);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-white);
}

.mkt-history-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.mkt-history-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin-bottom: 4px;
}

.mkt-history-objective {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--primary-gradient);
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mkt-history-copied {
  font-size: 11px;
  color: var(--success);
  font-weight: 600;
}

.mkt-history-time {
  font-size: 11px;
  color: var(--text-light);
  margin-left: auto;
}

.mkt-history-product {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.mkt-history-preview {
  font-size: 12px;
  color: var(--text-medium);
  line-height: 1.4;

  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mkt-history-empty {
  font-size: 13px;
  color: var(--text-light);
  text-align: center;
  padding: var(--spacing-md);
}

/* =======================================================
   Privacy notice
   ======================================================= */

.mkt-privacy-notice {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: var(--spacing-md);
  padding: 0 var(--spacing-md) var(--spacing-lg);
}

.mkt-privacy-notice a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
}

.mkt-privacy-notice a:hover {
  color: white;
}

/* =======================================================
   Responsive
   ======================================================= */

@media (max-width: 768px) {
  .mkt-progress-steps {
    gap: 0;
    justify-content: flex-start;
  }

  .mkt-step-label {
    display: none;
  }

  .mkt-step-line {
    min-width: 10px;
  }

  .mkt-checkbox-group {
    flex-direction: column;
  }

  .mkt-checkbox-card {
    width: 100%;
  }

  .mkt-nav {
    flex-direction: column-reverse;
  }

  .mkt-nav .ff-btn,
  .mkt-nav .ff-btn-secondary {
    width: 100%;
    flex: none;
  }

  .mkt-output-actions {
    flex-direction: column;
  }

  .mkt-output-actions .ff-btn {
    width: 100%;
  }
}
