/**
 * WhatsApp Campaigns - Styles
 * Phase 1: Campaign list and builder UI
 */

/* ======================
   Campaign List View
   ====================== */

.whatsapp-campaigns-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

#campaign-toast-container {
  position: fixed;
  top: 24px;
  right: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2600;
  pointer-events: none;
}

.campaign-toast {
  min-width: 260px;
  max-width: 340px;
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  background: #111827;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-12px);
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
}

.campaign-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.campaign-toast.success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.campaign-toast.error {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.campaign-toast.info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.campaign-toast .campaign-toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.6);
  width: 100%;
  transform-origin: left;
  transform: scaleX(1);
}

@media (max-width: 768px) {
  #campaign-toast-container {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 480px;
    align-items: center;
  }

  .campaign-toast {
    width: 100%;
    max-width: none;
  }
}

/* Header */
.campaigns-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e5e7eb;
}

.campaigns-header .header-left h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Connection Status Indicator */
.connection-status {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
  animation: pulse 2s ease-in-out infinite;
}

.connection-status.connected {
  background-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.connection-status.disconnected {
  background-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
  animation: none;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Inline Connection Status (for form labels) */
.connection-status-inline {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}

.connection-status-inline.connected {
  background-color: #10b981;
}

.connection-status-inline.disconnected {
  background-color: #ef4444;
}

.campaigns-header .subtitle {
  color: #6b7280;
  font-size: 14px;
  margin: 0;
}

.campaigns-header .header-right {
  display: flex;
  gap: 12px;
}

/* Removed Provider Info Box - status now shown in title bar */

/* Alerts */
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.alert i {
  font-size: 18px;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.alert-link {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  margin-left: 8px;
}

/* Filters & Tabs */
.campaigns-filters {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0;
}

.tab-btn {
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover:not(:disabled) {
  color: #667eea;
  background: #f3f4f6;
}

.tab-btn.active {
  color: #667eea;
  border-bottom-color: #667eea;
}

.tab-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tab-btn .badge {
  background: #e5e7eb;
  color: #6b7280;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.tab-btn.active .badge {
  background: #667eea;
  color: white;
}

.filter-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-box {
  flex: 1;
  position: relative;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.search-box input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select {
  padding: 10px 32px 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  min-width: 150px;
}

/* Campaign Cards */
.campaigns-list {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.campaign-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  border: 1px solid #e5e7eb;
}

.campaign-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.campaign-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.campaign-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.campaign-title h3 {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  margin: 0;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-draft {
  background: #e5e7eb;
  color: #4b5563;
}

.status-scheduled {
  background: #dbeafe;
  color: #1e40af;
}

.status-active {
  background: #d1fae5;
  color: #065f46;
}

.status-warning {
  background: #fef3c7;
  color: #92400e;
}

.status-completed {
  background: #f3e8ff;
  color: #6b21a8;
}

.status-failed {
  background: #fee2e2;
  color: #991b1b;
}

.campaign-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon i {
  font-size: 16px;
  line-height: 1;
  display: inline-block !important;
}

.btn-icon:hover {
  background: #f3f4f6;
  border-color: #667eea;
  color: #667eea;
}

.btn-icon.btn-danger:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #ef4444;
}

/* Campaign Action Button Styles */
.btn-icon.btn-launch {
  background: white;
  border-color: #d1d5db;
}

.btn-icon.btn-launch:hover {
  background: #f3f4f6;
  border-color: #4f46e5;
}

.btn-icon.btn-success {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

.btn-icon.btn-success:hover {
  background: #059669;
  border-color: #059669;
}

.btn-icon.btn-warning {
  background: #f59e0b;
  color: white;
  border-color: #f59e0b;
}

.btn-icon.btn-warning:hover {
  background: #d97706;
  border-color: #d97706;
}

.btn-icon.btn-info {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.btn-icon.btn-info:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.btn-icon.btn-secondary {
  background: #6b7280;
  color: white;
  border-color: #6b7280;
}

.btn-icon.btn-secondary:hover {
  background: #4b5563;
  border-color: #4b5563;
}

.campaign-card-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
}

.campaign-info {
  display: grid;
  gap: 8px;
}

.info-row {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.info-label {
  color: #6b7280;
  min-width: 80px;
  font-weight: 500;
}

.info-value {
  color: #1f2937;
}

.campaign-stats {
  display: flex;
  gap: 20px;
  padding-left: 20px;
  border-left: 2px solid #e5e7eb;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.no-stats {
  color: #9ca3af;
  font-size: 14px;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: white;
  border-radius: 12px;
  margin: 40px 0;
}

.empty-state i {
  color: #d1d5db;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.empty-state p {
  color: #6b7280;
  margin: 0 0 24px 0;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.btn-page {
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-page:hover:not(:disabled) {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.btn-page.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.btn-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-ellipsis {
  padding: 8px 4px;
  color: #9ca3af;
}

/* ======================
   Campaign Builder
   ====================== */

.campaign-builder-shell {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  overflow: hidden;
  box-sizing: border-box;
}

#toast-container {
  z-index: 4000 !important;
}

.notification-toast {
  z-index: 4000 !important;
}

.campaign-builder-container {
  width: min(1100px, calc(100vw - 48px));
  margin: 0;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: min(92vh, 800px);
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

/* Builder Header (Legacy - Now using compact-wizard-header) */
.builder-header {
  display: none; /* Hide the original header */
}

.btn-back {
  width: 30px;
  height: 30px;
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151; /* Darker gray for better contrast */
}

.btn-back:hover {
  background: #f3f4f6;
  border-color: #667eea;
  color: #667eea;
}

/* Wizard Steps */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 4px 8px;
  background: #f9fafb;
  border-radius: 6px;
  flex-shrink: 0;
  overflow-x: auto;
}

.step {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: auto;
}

.step-number {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
  margin-right: 6px;
  transition: all 0.2s;
}

.step.active .step-number {
  background: #667eea;
  color: white;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.step.completed .step-number {
  background: #10b981;
  color: white;
}

.step.completed .step-number::before {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 10px;
}

.step-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  white-space: nowrap;
}

.step.active .step-label {
  color: #667eea;
  font-weight: 600;
}

.step.completed .step-label {
  color: #10b981;
}

.step.disabled .step-label {
  opacity: 0.4;
}

.step-line {
  flex: 0 1 20px;
  height: 1px;
  background: #e5e7eb;
  margin: 0 2px;
  transition: all 0.2s;
}

.step-line.completed {
  background: #10b981;
}

.step-line.disabled {
  opacity: 0.4;
}

/* Wizard Content */
.wizard-content {
  flex: 1;
  margin-bottom: 0;
  min-height: 0;
  overflow: hidden;
  background: #f9fafb;
  border-radius: 6px;
  padding: 10px;
  border: 1px solid #e5e7eb;
}

.step-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.step-container::-webkit-scrollbar {
  width: 6px;
}

.step-container::-webkit-scrollbar-track {
  background: #f1f3f4;
  border-radius: 10px;
}

.step-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.step-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.step-intro {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-intro h2 {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.step-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  height: 100%;
  overflow: hidden;
}

.step-content-layout.with-sidebar {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
}

.step-main-card,
.step-sidebar-card {
  background: #fdfefe;
  border: 1px solid #d7dce5;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.step-sidebar-card {
  position: sticky;
  top: 12px;
}

.step-main-card::-webkit-scrollbar,
.step-sidebar-card::-webkit-scrollbar {
  width: 6px;
}

.step-main-card::-webkit-scrollbar-track,
.step-sidebar-card::-webkit-scrollbar-track {
  background: #f1f3f4;
  border-radius: 10px;
}

.step-main-card::-webkit-scrollbar-thumb,
.step-sidebar-card::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.step-main-card::-webkit-scrollbar-thumb:hover,
.step-sidebar-card::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.step-description {
  color: #1e293b;
  margin: 0;
  font-size: 13px;
}

.step-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin: 0 0 4px 0;
}

.step-header p {
  color: #4b5563;
  margin: 0;
  font-size: 13px;
}

/* Form Elements */
.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
  font-size: 12px;
}

.required {
  color: #ef4444;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  color: #0f172a;
  background-color: #ffffff;
  transition: all 0.2s;
}

.form-control::placeholder {
  color: #9ca3af;
}

.form-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-hint {
  display: block;
  color: #6b7280;
  font-size: 11px;
  margin-top: 2px;
}

.muted {
  color: #475569;
}

@media (max-width: 1024px) {
  .campaign-builder-shell {
    padding: 16px 0;
  }

  .campaign-builder-container {
    width: min(100%, calc(100vw - 32px));
    height: auto;
    box-shadow: none;
  }

  .wizard-content {
    max-height: none;
    padding: 18px;
  }

  .step-content-layout.with-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .step-main-card,
  .step-sidebar-card {
    max-height: none;
    overflow: visible;
    position: static;
  }
}

/* Provider Info Readonly */
.provider-info-readonly {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  color: white;
}

.provider-info-readonly .provider-icon {
  font-size: 28px;
}

.provider-info-readonly .provider-details {
  flex: 1;
}

.provider-info-readonly .provider-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
}

.provider-info-readonly .provider-instance {
  font-size: 12px;
  opacity: 0.9;
}

.provider-info-readonly .status-badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 5px 12px;
}

/* Audience Type Buttons */
.audience-type-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
  justify-content: flex-start;
}

.audience-btn {
  position: relative;
  padding: 8px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  background: white;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audience-btn:not(.disabled):hover {
  border-color: #667eea;
  background: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(102, 126, 234, 0.15);
}

.audience-btn.selected {
  border-color: #667eea;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.audience-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f9fafb;
}

.card-icon, .btn-icon {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title, .btn-text {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.card-description {
  font-size: 13px;
  color: #6b7280;
}

.card-radio {
  position: absolute;
  top: 12px;
  right: 12px;
}

.audience-btn input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.card-radio input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.card-badge, .btn-badge {
  background: #fbbf24;
  color: #78350f;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* Audience Preview */
.audience-preview {
  margin-top: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  max-height: 400px;
  overflow-y: auto;
}

/* Expanded audience preview for more vertical space */
.audience-preview.expanded {
  height: calc(100% - 100px);
  max-height: none;
  display: flex;
  flex-direction: column;
}

.audience-preview::-webkit-scrollbar {
  width: 6px;
}

.audience-preview::-webkit-scrollbar-track {
  background: #f1f3f4;
  border-radius: 10px;
}

.audience-preview::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.audience-preview::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.preview-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.preview-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
  margin: auto;
}

.preview-placeholder i {
  font-size: 40px;
  margin-bottom: 10px;
  display: block;
}

.audience-preview.expanded .preview-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.preview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.preview-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #e5e7eb;
  font-size: 12px;
  color: #1f2937;
}

.preview-stat.highlight {
  background: #dcfce7;
  color: #047857;
  font-weight: 600;
}

.preview-stat.warn {
  background: #fee2e2;
  color: #b91c1c;
}

.preview-stat.muted {
  background: transparent;
  color: #6b7280;
  padding: 0;
}

.preview-stat i {
  font-size: 12px;
}

.preview-items {
  display: grid;
  gap: 8px;
  overflow-y: auto;
}

.audience-preview.expanded .preview-items {
  max-height: none;
  flex: 1;
}

.contact-preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: white;
  border-radius: 8px;
}

.contact-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #667eea;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.contact-info {
  flex: 1;
}

.contact-name {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}

.contact-phone {
  font-size: 12px;
  color: #6b7280;
}

.preview-more {
  text-align: center;
  padding: 12px;
  color: #6b7280;
  font-size: 13px;
  font-style: italic;
}

/* Info Box */
.info-box {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #dbeafe;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  margin-top: 24px;
}

.info-box i {
  color: #3b82f6;
  font-size: 20px;
  margin-top: 2px;
}

.info-box strong {
  display: block;
  color: #1e3a8a;
  margin-bottom: 4px;
}

.info-box p {
  color: #1e40af;
  font-size: 13px;
  margin: 0;
}

/* Wizard Actions */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 0;
  margin-top: 4px;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.actions-right {
  display: flex;
  gap: 10px;
}

/* Button Styles */
.btn {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #5568d3;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: #e5e7eb;
  color: #374151;
}

.btn-secondary:hover {
  background: #d1d5db;
}

.btn-outline {
  background: white;
  color: #667eea;
  border: 1px solid #667eea;
}

.btn-outline:hover {
  background: #eff6ff;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
  .campaigns-header {
    flex-direction: column;
    gap: 16px;
  }

  .campaign-card-body {
    grid-template-columns: 1fr;
  }

  .campaign-stats {
    border-left: none;
    border-top: 2px solid #e5e7eb;
    padding-left: 0;
    padding-top: 16px;
  }

  .wizard-steps {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .audience-type-cards {
    grid-template-columns: 1fr;
  }
}

/* ======================
   Step 2: Audience Selection
   ====================== */

.audience-segment-selection {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.segment-list-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 460px;
}

.segment-search-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.segment-search-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
}

.segment-search-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.segment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
}

.segment-list::-webkit-scrollbar {
  width: 6px;
}

.segment-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.segment-list-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.segment-list-item:hover {
  border-color: #2563eb;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.segment-list-item.selected {
  border-color: #2563eb;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.2);
}

.segment-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.segment-item-name {
  font-weight: 600;
  font-size: 15px;
  color: #1f2937;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.segment-item-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #1f2937;
}

.segment-item-badge.static {
  background: #fef3c7;
  color: #92400e;
}

.segment-item-badge.dynamic {
  background: #dbeafe;
  color: #1e40af;
}

.segment-item-summary {
  font-size: 12px;
  color: #4b5563;
  line-height: 1.4;
}

.segment-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #6b7280;
}

.segment-item-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.audience-detail-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.segment-detail-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.segment-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.segment-detail-header h3 {
  margin: 0;
  font-size: 18px;
  color: #0f172a;
}

.segment-detail-summary {
  margin: 4px 0 0;
  font-size: 13px;
  color: #4b5563;
}

.segment-detail-description {
  margin: 0;
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}

.segment-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #4b5563;
}

.segment-detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.segment-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.segment-detail-footnote {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
}

.audience-tag-selection {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
}

.tag-search-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag-search-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
}

.tag-search-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.selected-tags {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.selected-tags-label {
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.selected-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.tag-list::-webkit-scrollbar {
  width: 6px;
}

.tag-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.tag-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.tag-list-item:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.tag-list-item input {
  accent-color: #2563eb;
}

.tag-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.tag-name {
  font-size: 13px;
  color: #1f2937;
  font-weight: 500;
}

.tag-category {
  margin-left: auto;
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 600;
}

.tag-chip.selected {
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
}

.tag-chip.selected i {
  font-size: 10px;
}

.tag-chip.small {
  font-size: 11px;
  padding: 3px 8px;
  background: #f3f4f6;
  color: #1f2937;
}

.tag-chip.small.more {
  background: #1f2937;
  color: #ffffff;
}

.audience-manual-selection {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  min-height: 320px;
}

.manual-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.manual-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
  flex: 0 0 auto;
}

.manual-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
}

.manual-filter select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-size: 13px;
  color: #1f2937;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.manual-filter select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.12);
}

.manual-filter.search {
  flex: 1 1 240px;
  position: relative;
}

.manual-filter.search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 14px;
}

.manual-filter.search input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.manual-filter.search input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.12);
}

.manual-filter-row .btn-text {
  margin-left: auto;
  font-size: 12px;
  color: #667eea;
  border: none;
  background: none;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.manual-filter-row .btn-text[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.manual-filter-row .btn-text i {
  font-size: 12px;
}

.manual-selected-summary {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.manual-selected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}

.manual-selected-header .btn-text {
  font-size: 12px;
  color: #6366f1;
  padding: 0;
}

.manual-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.manual-selected-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #4f46e5;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.manual-selected-pill button {
  background: none;
  border: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 0;
}

.manual-selected-pill button i {
  font-size: 10px;
}

.manual-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.manual-results::-webkit-scrollbar {
  width: 6px;
}

.manual-results::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.manual-contact-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.manual-contact-row:hover {
  border-color: #6366f1;
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.12);
  transform: translateY(-1px);
}

.manual-contact-row input[type="checkbox"] {
  margin-top: 4px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #6366f1;
}

.manual-contact-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.manual-contact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.manual-contact-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.manual-contact-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #1f2937;
}

.manual-contact-badge.manual-type-lead {
  background: #fde68a;
  color: #92400e;
}

.manual-contact-badge.manual-type-customer {
  background: #bbf7d0;
  color: #065f46;
}

.manual-contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #4b5563;
}

.manual-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
  font-size: 11px;
}

.manual-contact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.manual-tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 600;
}

.manual-tag-chip.more {
  background: #e2e8f0;
  color: #475569;
}

.manual-load-more {
  text-align: center;
  margin-top: 6px;
}

.manual-load-more .btn {
  min-width: 150px;
}

@media (max-width: 768px) {
  .manual-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .manual-filter.search {
    flex: 1 1 auto;
    width: 100%;
  }

  .manual-results {
    max-height: none;
  }
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.preview-header-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preview-context {
  font-size: 12px;
  color: #4b5563;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.preview-context .tag-chip.small {
  margin: 0;
}

@media (max-width: 968px) {
  .audience-segment-selection {
    grid-template-columns: 1fr;
  }

  .segment-list-panel {
    max-height: none;
  }

  .audience-detail-card {
    min-height: auto;
  }
}

/* ======================
   Step 3: Template Selection
   ====================== */

.template-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.templates-grid {
  margin-top: 16px;
}

.template-step-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 24px;
  height: 100%;
  overflow: hidden;
}

.template-list-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.template-search-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 12px;
  background: #f9fafb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input-group:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.search-input-group i {
  color: #9ca3af;
  font-size: 14px;
}

.search-input-group input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  color: #1f2937;
}

.search-input-group input:focus {
  outline: none;
}

.template-search-bar .btn-text {
  border: none;
  background: transparent;
  color: #9ca3af;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.template-search-bar .btn-text:hover {
  color: #111827;
}

.template-search-meta {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.template-item-preview {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #4b5563;
}

.template-item-preview .whatsapp-message-preview {
  min-height: unset;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
}

.templates-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding-right: 4px;
}

.templates-list::-webkit-scrollbar {
  width: 6px;
}

.templates-list::-webkit-scrollbar-track {
  background: #f1f3f4;
  border-radius: 10px;
}

.templates-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.templates-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.template-list-item {
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.template-list-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.12);
  transform: translateY(-1px);
}

.template-list-item.selected {
  border-color: #25D366;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.18);
}

.template-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.template-item-name {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
  color: #1f2937;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.template-item-status {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
}

.template-item-status.status-published,
.template-item-status.status-approved {
  background: #d1fae5;
  color: #047857;
}

.template-item-status.status-draft {
  background: #fef3c7;
  color: #92400e;
}

.template-item-status.status-archived,
.template-item-status.status-disabled {
  background: #f3f4f6;
  color: #6b7280;
}

.template-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

.template-item-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.template-item-meta span + span::before {
  content: '•';
  color: #d1d5db;
  margin-right: 6px;
}

.template-preview-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}

.template-preview-panel::-webkit-scrollbar {
  width: 6px;
}

.template-preview-panel::-webkit-scrollbar-track {
  background: #f1f3f4;
  border-radius: 10px;
}

.template-preview-panel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.template-preview-panel::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.template-preview-panel .selected-template-preview {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  height: 100%;
}

.template-preview-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 16px;
}

.template-locale-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #4b5563;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 12px;
}

.template-locale-picker span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.template-locale-picker select {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
  text-transform: uppercase;
  cursor: pointer;
}

.template-locale-picker select:focus {
  outline: none;
}

.template-preview-placeholder {
  margin: auto;
  text-align: center;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.template-preview-placeholder i {
  font-size: 40px;
  color: #d1d5db;
}

.templates-placeholder,
.templates-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.templates-placeholder i,
.templates-loading i {
  font-size: 48px;
  color: #d1d5db;
  margin-bottom: 16px;
  display: block;
}

.templates-placeholder.error i {
  color: #ef4444;
}

.templates-loading i {
  color: #3b82f6;
}

.template-preview-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.template-preview-card:hover {
  border-color: #25D366;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
  transform: translateY(-2px);
}

.template-preview-card.selected {
  border-color: #25D366;
  border-width: 3px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
}

.template-selected-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #25D366;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* WhatsApp Message Preview Bubble */
.whatsapp-message-preview {
  background: #e5ddd5; /* WhatsApp chat background */
  padding: 16px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.wa-bubble {
  background: white;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  position: relative;
}

.wa-bubble::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid white;
  border-bottom: 8px solid transparent;
}

/* Header (image/video/document) */
.wa-header {
  margin: -8px -8px 8px -8px;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.wa-header-image img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.wa-header-video,
.wa-header-document {
  background: #f3f4f6;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
}

.wa-header-video i,
.wa-header-document i {
  font-size: 24px;
}

.wa-header-text {
  font-weight: 700;
  font-size: 15px;
  color: #1f2937;
  margin-bottom: 8px;
}

/* Body text */
.wa-body {
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Footer */
.wa-footer {
  font-size: 12px;
  color: #6b7280;
  margin-top: 8px;
  font-style: italic;
}

/* Buttons */
.wa-buttons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
}

.wa-button {
  background: white;
  border: 1px solid #25D366;
  color: #25D366;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: default;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.wa-list-block {
  margin-top: 12px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.wa-list-title {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.wa-list-section {
  border-top: 1px solid #f3f4f6;
}

.wa-list-section:first-of-type {
  border-top: none;
}

.wa-list-section-title {
  padding: 12px 16px 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: #ffffff;
}

.wa-list-row {
  padding: 10px 16px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.wa-list-row:first-of-type {
  border-top: none;
}

.wa-list-row-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.wa-list-row-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
}

.wa-list-button {
  padding: 12px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #0ea5e9;
  border-top: 1px solid #e5e7eb;
  background: #f0f9ff;
}

.wa-list-more {
  padding: 10px 16px;
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
}

.wa-cards {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.wa-card {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
}

.wa-card-media img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.wa-card-title {
  padding: 12px 14px 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.wa-card-body {
  padding: 6px 14px 12px;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

.wa-card-buttons {
  margin-top: auto;
  padding: 0 14px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wa-card-button {
  flex: 1;
  min-width: 120px;
  padding: 8px 10px;
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
  font-weight: 500;
}

.wa-cards-more {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}

.wa-button i {
  font-size: 12px;
}

.wa-timestamp {
  font-size: 11px;
  color: #9ca3af;
  text-align: right;
  margin-top: 4px;
}

/* Template card footer */
.template-card-footer {
  padding: 12px 16px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.template-name {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.template-language {
  color: #6b7280;
  text-transform: uppercase;
}

.template-status {
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 11px;
}

.template-status.status-approved {
  background: #d1fae5;
  color: #065f46;
}

.template-status.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.template-status.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.template-status.approved {
  background: #d1fae5;
  color: #065f46;
}

.template-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.template-status.rejected {
  background: #fee2e2;
  color: #991b1b;
}

/* Selected Template Full Preview */
.selected-template-preview {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  height: 100%;
}

.selected-template-preview h3 {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 20px;
}

.selected-template-display {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.selected-template-display .whatsapp-phone-mockup {
  flex: 0 0 320px;
}

.selected-template-display .template-details {
  flex: 1 1 320px;
}

@media (max-width: 1100px) {
  .selected-template-display {
    flex-direction: column;
    gap: 24px;
  }

  .selected-template-display .whatsapp-phone-mockup {
    flex: unset;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  .selected-template-display .template-details {
    width: 100%;
  }
}

/* WhatsApp Phone Mockup */
.whatsapp-phone-mockup {
  background: white;
  border-radius: 24px;
  border: 8px solid #1f2937;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  height: fit-content;
}

.phone-header {
  background: #075e54; /* WhatsApp green */
  color: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.phone-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #d1d5db;
}

.phone-contact {
  flex: 1;
}

.phone-name {
  font-weight: 600;
  font-size: 15px;
}

.phone-status {
  font-size: 12px;
  opacity: 0.8;
}

.phone-chat {
  background: #e5ddd5;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"><defs><pattern id="pattern" x="0" y="0" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="%23d4cfc5" opacity="0.3"/></pattern></defs><rect fill="url(%23pattern)" width="400" height="400"/></svg>');
  padding: 16px;
  min-height: 400px;
}

.phone-chat .wa-bubble {
  max-width: 85%;
  margin-left: auto;
  background: #dcf8c6; /* WhatsApp sent message green */
}

.phone-chat .wa-bubble::before {
  border-left-color: #dcf8c6;
}

.wa-message {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Template Details */
.template-details {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.template-details h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px 0;
}

.template-description {
  font-size: 13px;
  color: #475569;
  margin-bottom: 16px;
}

.template-details h4 {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 16px 0;
}

.template-details .template-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #4b5563;
  margin-bottom: 16px;
}

.template-details .template-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.template-details .template-meta i {
  color: #94a3b8;
}

.template-locales {
  font-size: 12px;
  color: #4b5563;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.template-locale-chip {
  padding: 4px 10px;
  border-radius: 20px;
  background: #f3f4f6;
  color: #1f2937;
  font-weight: 600;
  font-size: 11px;
}

.template-locale-chip.active {
  background: #2563eb;
  color: #ffffff;
}

.template-structure {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.template-structure h4 {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin: 12px 0 6px;
}

.template-structure p {
  font-size: 13px;
  color: #1f2937;
  line-height: 1.5;
  margin: 0 0 12px 0;
  white-space: pre-wrap;
}

.template-button-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: #1f2937;
}

.template-button-list li {
  margin-bottom: 6px;
}

.template-button-list strong {
  color: #2563eb;
}

.template-details dl {
  margin: 0;
}

.template-details dt {
  font-weight: 600;
  color: #6b7280;
  font-size: 13px;
  margin-top: 12px;
}

.template-details dd {
  color: #1f2937;
  font-size: 14px;
  margin: 4px 0 0 0;
}

.template-details .status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 12px;
}

.template-details .status-badge.status-approved {
  background: #d1fae5;
  color: #065f46;
}

#btn-change-template {
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 968px) {
  .template-step-layout {
    grid-template-columns: 1fr;
  }

  .template-list-panel,
  .template-preview-panel {
    min-height: auto;
  }
  
  .selected-template-display {
    grid-template-columns: 1fr;
  }
  
  .whatsapp-phone-mockup {
    max-width: 340px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .template-step-layout {
    gap: 16px;
  }

  .search-input-group {
    flex-wrap: wrap;
    padding: 8px 12px;
  }

  .search-input-group input {
    width: 100%;
  }

  .template-item-name {
    font-size: 14px;
  }
}

/* ======================
   Step 4: Schedule & Rate Limiting
   ====================== */


.schedule-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.input-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #dbe3f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  color: #0f172a;
}

.input-card.selected {
  border-color: #3b82f6;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.18);
}

.input-card:hover {
  border-color: #2563eb;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.16);
  transform: translateY(-1px);
}

.input-card input[type="radio"] {
  margin-top: 3px;
  accent-color: #2563eb;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.input-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.input-title {
  font-weight: 600;
  font-size: 14px;
  color: #0f172a;
}

.input-description {
  font-size: 12px;
  color: #475569;
}

.schedule-card {
  background: #f8fafc;
  border: 1px solid #d8dee9;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #0f172a;
}

.schedule-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.schedule-card-heading h3 {
  margin: 0;
}

.schedule-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.schedule-card .form-group label {
  color: #0f172a;
}

.schedule-card .form-hint,
.schedule-card .input-description,
.schedule-card .schedule-hint {
  color: #475569;
}

.schedule-date-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.schedule-date-row .btn {
  white-space: nowrap;
}

.rate-limit-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rate-slider {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rate-slider input[type="range"] {
  flex: 1;
  accent-color: #2563eb;
  height: 4px;
}

.rate-value {
  min-width: 140px;
  font-weight: 600;
  color: #1d4ed8;
  font-size: 13px;
}

.quiet-hours-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
}

.quiet-hours-grid input[type="time"] {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  background: #ffffff;
  color: #0f172a;
}

.quiet-hours-grid input[disabled] {
  background: #e2e8f0;
  color: #64748b;
}

.quiet-hours-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiet-hours-card .schedule-hint {
  margin-top: -4px;
}

.recurring-card .recurring-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.recurring-card .form-select {
  width: 100%;
}

.recurring-interval-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recurring-interval-row .form-control {
  width: 90px;
  min-width: 80px;
  text-align: center;
  padding: 8px 12px;
}

.interval-suffix {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.recurring-card .pill-group {
  margin-top: 6px;
}

.pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid #d1d9e8;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn.selected {
  background: #2563eb;
  color: white;
  border-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.pill-btn:hover {
  border-color: #2563eb;
  color: #1d4ed8;
}

.schedule-hint {
  font-size: 12px;
  color: #475569;
}

/* Date Time Picker */
.schedule-datetime-group {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.datetime-input {
  max-width: 400px;
  font-size: 15px;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s;
}

.datetime-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* Rate Limiting Section */
.rate-limiting-section {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-top: 12px;
  max-height: 450px;
  overflow-y: auto;
}

.rate-limiting-section::-webkit-scrollbar {
  width: 6px;
}

.rate-limiting-section::-webkit-scrollbar-track {
  background: #f1f3f4;
  border-radius: 10px;
}

.rate-limiting-section::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.rate-limiting-section::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.rate-limit-control {
  margin-bottom: 28px;
}

.rate-limit-control:last-child {
  margin-bottom: 0;
}

.control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.control-label {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
}

.control-value {
  font-size: 18px;
  font-weight: 700;
  color: #3b82f6;
}

/* Slider */
.slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
}

.slider::-webkit-slider-thumb:hover {
  background: #2563eb;
  transform: scale(1.1);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
}

.slider::-moz-range-thumb:hover {
  background: #2563eb;
  transform: scale(1.1);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

.recommended-label {
  color: #10b981;
  font-weight: 600;
}

.recommended-label i {
  margin-right: 4px;
}

/* Delay Inputs */
.delay-inputs {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.delay-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.delay-input-group label {
  font-size: 13px;
  color: #6b7280;
  min-width: 60px;
}

.delay-input {
  width: 80px;
  text-align: center;
  padding: 8px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.delay-input:focus {
  border-color: #3b82f6;
  outline: none;
}

.delay-separator {
  color: #9ca3af;
  font-weight: 500;
}

/* Toggle Switch */
.toggle-control {
  margin-top: 12px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  background: #d1d5db;
  border-radius: 13px;
  transition: background 0.3s;
  flex-shrink: 0;
}

.toggle-switch::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-checkbox:checked + .toggle-switch {
  background: #10b981;
}

.toggle-checkbox:checked + .toggle-switch::before {
  transform: translateX(22px);
}

.toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-text strong {
  font-size: 14px;
  color: #1f2937;
}

.toggle-text small {
  font-size: 12px;
  color: #6b7280;
}

/* Campaign Summary Preview */
.campaign-summary-preview {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-top: 32px;
  max-height: 450px;
  overflow-y: auto;
}

.snapshot-card,
.checklist-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #d7deeb;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.snapshot-list,
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.snapshot-label {
  font-size: 12px;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 600;
}

.snapshot-value {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.checklist-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.checklist-item.ready {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(236, 253, 245, 0.9);
}

.checklist-item.action {
  border-color: rgba(234, 179, 8, 0.35);
  background: rgba(254, 252, 232, 0.9);
}

.checklist-label {
  font-weight: 600;
  color: #0f172a;
  font-size: 13px;
}

.checklist-message {
  font-size: 12px;
  color: #475569;
}

.campaign-summary-preview::-webkit-scrollbar {
  width: 6px;
}

.campaign-summary-preview::-webkit-scrollbar-track {
  background: #f1f3f4;
  border-radius: 10px;
}

.campaign-summary-preview::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.campaign-summary-preview::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.campaign-summary-preview h3 {
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.campaign-summary-preview h3 i {
  color: #3b82f6;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.summary-item {
  background: #f9fafb;
  padding: 12px 16px;
  border-radius: 8px;
}

.summary-label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.summary-value {
  font-size: 14px;
  color: #1f2937;
  font-weight: 500;
}

.badge-immediate {
  display: inline-block;
  padding: 4px 12px;
  background: #dcfce7;
  color: #166534;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.badge-scheduled {
  display: inline-block;
  padding: 4px 12px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

/* ============================================
   STEP 5: VARIABLE MAPPING STYLES
   ============================================ */

.variable-mapping-container {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 30px;
  margin-top: 20px;
  height: 100%;
  overflow: hidden;
}

.variable-mapping-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.variable-mapping {
  border: 1px solid #d1d9e8;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.variable-mapping-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.variable-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.variable-placeholder-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 600;
}

.variable-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.variable-mapping .control-group label {
  color: #0f172a;
}

.variable-example {
  font-size: 12px;
  color: #475569;
  margin-top: 4px;
}

.variable-mappers {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  max-height: 100%;
}

.variable-mappers::-webkit-scrollbar {
  width: 6px;
}

.variable-mappers::-webkit-scrollbar-track {
  background: #f1f3f4;
  border-radius: 10px;
}

.variable-mappers::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.variable-mappers::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.variable-mappers h3 {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.variable-mappers h3 i {
  color: #667eea;
}

.section-description {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 20px 0;
}

.variable-mapper-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.variable-mapper-card:hover {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
  border-color: #667eea;
}

.variable-mapper-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f3f4f6;
}

.variable-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: 700;
  min-width: 60px;
}

.variable-label {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
}

.variable-mapper-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mapping-type-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.radio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-card i {
  font-size: 24px;
  color: #9ca3af;
  transition: color 0.3s ease;
}

.radio-card span {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  transition: color 0.3s ease;
}

.radio-card:hover {
  border-color: #667eea;
  background: #f9fafb;
}

.radio-card:hover i,
.radio-card:hover span {
  color: #667eea;
}

.radio-card.active {
  border-color: #667eea;
  background: #f0f4ff;
}

.radio-card.active i {
  color: #667eea;
}

.radio-card.active span {
  color: #667eea;
}

.mapping-field-selector,
.mapping-static-input {
  transition: all 0.3s ease;
}

.mapping-field-selector.hidden,
.mapping-static-input.hidden {
  display: none;
}

.mapping-field-selector .form-label,
.mapping-static-input .form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.mapping-field-selector .form-label i,
.mapping-static-input .form-label i {
  color: #667eea;
  font-size: 14px;
}

.mapping-field-selector .form-control,
.mapping-static-input .form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.mapping-field-selector .form-control:focus,
.mapping-static-input .form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mapping-preview {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
}

.mapping-preview .form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mapping-preview .form-label i {
  color: #10b981;
}

.preview-value {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.preview-value em {
  color: #9ca3af;
  font-style: italic;
}

.variable-preview-panel {
  position: sticky;
  top: 0;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  color: #0f172a;
}

.variable-preview-panel::-webkit-scrollbar {
  width: 6px;
}

.variable-preview-panel::-webkit-scrollbar-track {
  background: #f1f3f4;
  border-radius: 10px;
}

.variable-preview-panel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.variable-preview-panel::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.variable-preview-panel h3 {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.variable-preview-panel .preview-contact-name {
  color: #0f172a;
  font-weight: 600;
}

.variable-preview-panel .preview-contact-count,
.variable-preview-panel .preview-contact-meta i {
  color: #475569;
}

.variable-preview-panel .preview-header-text,
.variable-preview-panel .preview-body,
.variable-preview-panel .preview-footer {
  color: #0f172a;
}

.variable-preview-panel .preview-footer {
  font-style: italic;
  color: #1e3a8a;
}

.variable-preview-panel .variable-value {
  color: #0f172a;
  font-weight: 600;
}

.variable-preview-panel .variable-value.fallback {
  color: #1d4ed8;
}

.variable-preview-panel .variable-placeholder {
  color: #b91c1c;
  font-weight: 600;
}

.variable-preview-panel h3 i {
  color: #667eea;
}

.preview-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
}

.preview-info i {
  color: #3b82f6;
  font-size: 16px;
  margin-top: 2px;
}

.preview-info p {
  margin: 0;
  font-size: 13px;
  color: #1e40af;
  line-height: 1.5;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.empty-state p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .schedule-type-cards {
    grid-template-columns: 1fr;
  }
  
  .delay-inputs {
    flex-direction: column;
    align-items: stretch;
  }
  
  .delay-separator {
    text-align: center;
  }
  
  .summary-grid {
    grid-template-columns: 1fr;
  }
  
  .variable-mapping-container {
    grid-template-columns: 1fr;
  }
  
  .variable-preview-panel {
    position: relative;
    top: auto;
    order: -1;
  }
  
  .mapping-type-selector {
    grid-template-columns: 1fr;
  }
}

