/* ============================================================
   Marketing Content Dashboard — EPW-PRO-303
   Dargan Forum Campaign Content Pipeline
   ============================================================ */

/* ---- Stats ---- */
#mkt-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mkt-stat {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  min-width: 80px;
  text-align: center;
}

.mkt-stat-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.mkt-stat-lbl {
  font-size: 0.65rem;
  color: #64748b;
  text-transform: capitalize;
  margin-top: 2px;
}

/* ---- Buttons ---- */
.mkt-btn {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  background: #f8fafc;
  color: #334155;
  transition: all 0.15s;
}

.mkt-btn:hover { background: #f1f5f9; }

.mkt-btn--primary {
  background: #EC4899;
  color: #fff;
  border-color: #EC4899;
}

.mkt-btn--primary:hover { background: #db2777; }

.mkt-btn--sm {
  padding: 4px 10px;
  font-size: 11px;
}

.mkt-btn--danger {
  border-color: #fca5a5;
  color: #bf1d1d;
  background: #fff5f5;
}

.mkt-btn--danger:hover { background: #fee2e2; }

/* ---- Phase tabs ---- */
.mkt-phase-tab {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  cursor: pointer;
  background: #fff;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mkt-phase-tab:hover { opacity: 0.85; }

.mkt-phase-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  background: rgba(255,255,255,0.3);
  font-weight: 700;
}

.mkt-phase-tab--active .mkt-phase-count {
  background: rgba(255,255,255,0.25);
  color: inherit;
}

/* ---- Item cards ---- */
.mkt-item-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.mkt-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

.mkt-item-header:hover { background: #f8fafc; }

.mkt-item-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mkt-item-meta {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.mkt-expand-arrow {
  font-size: 10px;
  color: #94a3b8;
  transition: transform 0.15s;
}

.mkt-item-expanded .mkt-expand-arrow { transform: rotate(180deg); }

.mkt-item-body {
  display: none;
  padding: 10px 14px 14px;
  border-top: 1px solid #f1f5f9;
}

.mkt-item-expanded .mkt-item-body { display: block; }

.mkt-body-text {
  font-size: 13px;
  color: #334155;
  white-space: pre-wrap;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  line-height: 1.6;
  margin-bottom: 8px;
}

.mkt-item-notes {
  font-size: 11px;
  color: #b45309;
  background: #fef3e2;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.mkt-item-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* ---- Badges ---- */
.mkt-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.mkt-badge--platform { background: #6366f1; }
.mkt-badge--sched { background: #3B82F6; }
.mkt-badge--tmpl { background: #9CA3AF; }

/* ---- Live Post Panel ---- */
.mkt-live-post-panel {
  background: #1a1a2e;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 20px;
  margin-top: 24px;
}

.mkt-live-post-panel h3 {
  margin: 0 0 16px;
  font-size: 15px;
  color: #f9fafb;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mkt-live-post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.mkt-live-post-grid label,
.mkt-live-post-panel label {
  display: block;
  font-size: 11px;
  color: #9CA3AF;
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mkt-live-post-panel select,
.mkt-live-post-panel input[type="text"],
.mkt-live-post-panel textarea {
  width: 100%;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 5px;
  padding: 8px 10px;
  color: #f9fafb;
  font-size: 13px;
  box-sizing: border-box;
}

.mkt-live-post-panel textarea {
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
}

.mkt-live-post-panel select:focus,
.mkt-live-post-panel input[type="text"]:focus,
.mkt-live-post-panel textarea:focus {
  outline: none;
  border-color: #EF4444;
}

.mkt-lp-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.mkt-lp-status {
  font-size: 12px;
  color: #9CA3AF;
}

.mkt-recent-posts {
  margin-top: 20px;
  border-top: 1px solid #374151;
  padding-top: 16px;
}

.mkt-recent-posts h4 {
  font-size: 12px;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 10px;
}

.mkt-recent-post-item {
  background: #111827;
  border-radius: 5px;
  padding: 8px 12px;
  margin-bottom: 6px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.mkt-recent-post-text {
  color: #D1D5DB;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mkt-recent-post-meta {
  color: #6B7280;
  white-space: nowrap;
  font-size: 11px;
}

.mkt-btn--live {
  background: #DC2626;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.mkt-btn--live:hover { background: #B91C1C; }
.mkt-btn--live:disabled { background: #6B7280; cursor: not-allowed; }
