/* Campaign Workflow Styles */

.workflow-tabs {
  display: flex;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 20px;
}

.workflow-tabs .tab-btn {
  padding: 12px 24px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.workflow-tabs .tab-btn:hover {
  color: #007bff;
  background-color: #f8f9fa;
}

.workflow-tabs .tab-btn.active {
  color: #007bff;
  border-bottom-color: #007bff;
}

.workflow-content .tab-content {
  display: none;
}

.workflow-content .tab-content.active {
  display: block;
}

/* Campaign Cards */
.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.campaign-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.campaign-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.campaign-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.campaign-header h4 {
  margin: 0;
  color: #333;
  font-size: 18px;
}

.campaign-type {
  background: #007bff;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.campaign-details p {
  margin: 8px 0;
  color: #666;
  font-size: 14px;
}

.campaign-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

/* Workflow Cards */
.workflows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.workflow-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.workflow-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.workflow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.workflow-header h4 {
  margin: 0;
  color: #333;
  font-size: 18px;
}

.workflow-status {
  background: #28a745;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.workflow-status.inactive {
  background: #6c757d;
}

.workflow-details p {
  margin: 8px 0;
  color: #666;
  font-size: 14px;
}

.workflow-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

/* Sequence Cards */
.sequences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.sequence-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sequence-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.sequence-header h4 {
  margin: 0;
  color: #333;
  font-size: 18px;
}

.sequence-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.sequence-status.active {
  background: #28a745;
  color: white;
}

.sequence-status.completed {
  background: #17a2b8;
  color: white;
}

.sequence-status.stopped {
  background: #dc3545;
  color: white;
}

.sequence-status.error {
  background: #ffc107;
  color: #212529;
}

.sequence-details p {
  margin: 8px 0;
  color: #666;
  font-size: 14px;
}

.sequence-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

/* Stats Summary */
.stats-summary {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.stats-summary span {
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
}

/* Template Categories */
.templates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
}

.template-category h4 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
}

.template-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.template-card h5 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
}

.template-card p {
  margin: 8px 0;
  color: #666;
  font-size: 14px;
  line-height: 1.4;
}

/* Workflow Builder */
.workflow-builder {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.workflow-steps h3 {
  margin-bottom: 20px;
  color: #333;
  font-size: 20px;
}

.steps-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.workflow-step {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  transition: border-color 0.2s ease;
}

.workflow-step:hover {
  border-color: #007bff;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.step-number {
  background: #007bff;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

.step-type {
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #666;
}

.step-details {
  margin-left: 45px;
}

.step-details p {
  margin: 5px 0;
  color: #666;
  font-size: 14px;
}

.workflow-actions h3 {
  margin-bottom: 20px;
  color: #333;
  font-size: 20px;
}

.step-types {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-types .btn-small {
  text-align: left;
  padding: 12px 15px;
  font-size: 14px;
}

/* Workflow Selection */
.workflow-selection h4 {
  margin-bottom: 20px;
  color: #333;
  font-size: 18px;
}

.workflow-option {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.workflow-option h5 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
}

.workflow-option p {
  margin: 8px 0;
  color: #666;
  font-size: 14px;
}

/* Form Modals */
.form-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 1001;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.form-modal h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 500;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 12px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 30px;
}

/* Buttons */
.elegant-btn {
  background: #fff !important;
  color: #222 !important;
  border: 1.5px solid #848484 !important;
  box-shadow: none !important;
  border-radius: 6px !important;
  font-weight: 500;
  font-size: 0.97rem;
  padding: 0.45rem 1.1rem;
  transition: background 0.2s, border 0.2s;
  cursor: pointer;
}

.elegant-btn:hover {
  background: #2e2e2e !important;
  color: #ffffff !important;
  border-color: #959595 !important;
  box-shadow: none !important;
}

/* Section Actions */
.section-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.contacts-info {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #007bff;
}

.contacts-info p {
  margin: 5px 0;
  color: #333;
}

.btn-secondary {
  background: #fff !important;
  color: #222 !important;
  border: 1.5px solid #848484 !important;
  box-shadow: none !important;
  border-radius: 6px !important;
  font-weight: 500;
  font-size: 0.97rem;
  padding: 0.45rem 1.1rem;
  transition: background 0.2s, border 0.2s;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #2e2e2e !important;
  color: #ffffff !important;
  border-color: #959595 !important;
  box-shadow: none !important;
}

.btn-small {
  background: #fff !important;
  color: #222 !important;
  border: 1.5px solid #848484 !important;
  box-shadow: none !important;
  border-radius: 6px !important;
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.35rem 0.8rem;
  transition: background 0.2s, border 0.2s;
  cursor: pointer;
}

.btn-small:hover {
  background: #2e2e2e !important;
  color: #ffffff !important;
  border-color: #959595 !important;
  box-shadow: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .workflow-builder {
    grid-template-columns: 1fr;
  }
  
  .templates-grid {
    grid-template-columns: 1fr;
  }
  
  .campaigns-grid,
  .workflows-grid,
  .sequences-grid {
    grid-template-columns: 1fr;
  }
  
  .workflow-tabs {
    flex-wrap: wrap;
  }
  
  .workflow-tabs .tab-btn {
    flex: 1;
    min-width: 120px;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.workflow-card,
.campaign-card,
.sequence-card {
  animation: fadeIn 0.3s ease;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
} 