/* ============================================================
   SWEETALERT2 CAMPAIGN BUTTONS
   (plain CSS — no Tailwind, works inside Swal popup)
   ============================================================ */

.swal-btn-confirm {
  background: #059669;
  color: #fff;
  font-weight: 700;
  padding: 0.5rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.15s;
}
.swal-btn-confirm:hover { background: #047857; }

.swal-btn-phone {
  background: #7c3aed;
  color: #fff;
  font-weight: 700;
  padding: 0.5rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.15s;
}
.swal-btn-phone:hover { background: #6d28d9; }

.swal-btn-cancel {
  background: #f3f4f6;
  color: #374151;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  margin-right: 0.5rem;
  transition: background 0.15s;
}
.swal-btn-cancel:hover { background: #e5e7eb; }

/* ============================================================
   CAMPAIGN WIZARD - STYLES
   ============================================================ */

/* Wizard Container */
.wizard-content-wrapper {
  display: flex;
  flex-direction: column;
  margin: -2rem; /* Compensa el p-8 (2rem) del main en layout.html.twig */
  height: calc(100vh - 73px); /* Altura total menos el header del dashboard (aprox 73px) */
  overflow: hidden; /* Prevenir scroll del wrapper, solo main-container scrollea */
}

/* Estilos para el Wizard Progress removidos - usando modo header */

@media (min-width: 1024px) {
  .wizard-progress {
    width: auto; 
  }
}

/* Compact Progress for Global Header */
.wizard-progress-header-mode .step-indicator-badge.active {
    background-color: #2563eb;
    color: white;
}

.wizard-progress-header-mode .step-indicator-badge.completed {
    background-color: #10b981;
    color: white;
    border: none;
}

.wizard-progress-header-mode .step-indicator.completed .step-indicator-icon {
    display: inline-block;
}

.wizard-progress-header-mode .step-indicator.completed .step-indicator-number {
    display: none;
}

.wizard-progress-inner {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.progress-bar-container {
  margin-bottom: 1rem;
}

.progress-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.progress-bar-title {
  font-size: 1.125rem;
  font-weight: bold;
  color: #1f2937;
}

.progress-bar-counter {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
}

.progress-bar-track {
  width: 100%;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: #e5e7eb;
  overflow: hidden;
}

#progress_bar {
  height: 100%;
  background: linear-gradient(to right, #3b82f6, #2563eb);
  border-radius: 9999px;
  transition: width 0.5s ease-in-out;
}

/* Step Indicators */
.step-indicators-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.step-indicator-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  font-weight: bold;
  font-size: 0.875rem;
}

.step-indicator-badge.active {
  background-color: #2563eb;
  color: white;
}

.step-indicator-badge.completed {
  background-color: #10b981;
  color: white;
}

.step-indicator-badge.pending {
  background-color: #d1d5db;
  color: #4b5563;
}

.step-indicator-number {
  display: inline;
}

.step-indicator-number.hidden {
  display: none;
}

.step-indicator-icon {
  display: none;
}

.step-indicator-icon.hidden {
  display: none;
}

.step-indicator.completed .step-indicator-icon {
  display: inline;
}

.step-indicator.completed .step-indicator-number {
  display: none;
}

.step-indicator-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  margin-top: 0.25rem;
}

.step-indicator-label.active {
  color: #1f2937;
}

.step-indicator-label.completed {
  color: #059669;
}

.step-indicator-label.pending {
  color: #6b7280;
}

.step-indicator-line {
  display: none;
  height: 0.125rem;
  background-color: #e5e7eb;
  flex: 1;
}

@media (min-width: 640px) {
  .step-indicator-line {
    display: flex;
  }
}

/* Wizard Steps */
.wizard-step {
  animation: fadeIn 0.3s ease-in-out;
}

.wizard-step.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Checklist / Stepper (Sidebar) - Premium Vertical Look */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  background-color: transparent;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.checklist-item::before {
  content: '';
  position: absolute;
  left: 1.6rem;
  top: 2.5rem;
  bottom: -1rem;
  width: 1px;
  background-color: #e5e7eb;
  z-index: 0;
}

.checklist-item:last-child::before {
  display: none;
}

.checklist-item.completed {
  background-color: #f0fdf4;
}

.checklist-item.completed .checklist-icon {
  color: #10b981;
  background: #fff;
  z-index: 1;
}

.checklist-item.completed .checklist-text {
  color: #166534;
  font-weight: 700;
}

.checklist-item.active {
  background-color: #f8faff;
  border-color: #dbeafe;
  transform: translateX(4px);
}

.checklist-item.active .checklist-icon {
  color: #3b82f6;
  background: #fff;
  z-index: 1;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.checklist-item.active .checklist-text {
  color: #1e40af;
  font-weight: 800;
}

.checklist-icon {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.checklist-text {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.checklist-item.completed .checklist-icon {
  color: #10b981;
}

/* Channel Selection Cards - Modernized */
.channel-card {
  position: relative;
  cursor: pointer;
  padding: 1.5rem;
  border-radius: 1.25rem;
  border: 2px solid #e5e7eb;
  background-color: white;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}

.channel-card:hover {
  border-color: #93c5fd;
  background-color: #f8faff;
  transform: translateY(-2px);
}

.channel-card:active {
  transform: scale(0.98);
}

/* Selector para cuando el radio button anterior está seleccionado */
input[type="radio"]:checked + .channel-card {
  border-color: #3b82f6;
  background-color: #eff6ff;
  box-shadow: 
    0 0 0 2px rgba(59, 130, 246, 0.2), 
    0 10px 25px -5px rgba(59, 130, 246, 0.1), 
    0 8px 10px -6px rgba(59, 130, 246, 0.05);
}

/* Indicador de check para el card seleccionado */
input[type="radio"]:checked + .channel-card::after {
  content: '\f058';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  color: #3b82f6;
  font-size: 1.25rem;
  animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Message Preview */
.message-preview {
  border-radius: 1rem;
  border: 2px solid #dcfce7;
  padding: 1rem;
  background-color: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.message-bubble {
  border-radius: 1rem;
  border-top-left-radius: 0;
  padding: 0.75rem;
  background-color: #dcfce7;
  max-width: 20rem;
}

.message-bubble-text {
  font-size: 0.875rem;
  color: #1f2937;
  word-break: break-words;
  line-height: 1.5;
}

.message-bubble-time {
  font-size: 0.625rem;
  color: #4b5563;
  margin-top: 0.25rem;
  text-align: right;
}

/* Phone Call Preview */
.phone-preview {
  border-radius: 1rem;
  padding: 1rem;
  background: linear-gradient(to bottom-right, #f3e8ff, #fce7f3);
  border: 1px solid #d8b4fe;
}

.phone-preview-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: bold;
  color: #6b21a8;
}

.phone-preview-header i {
  font-size: 1.25rem;
}

.phone-preview-content {
  border-radius: 0.75rem;
  padding: 0.75rem;
  background-color: white;
  border: 1px solid #d8b4fe;
}

.phone-preview-text {
  font-size: 0.875rem;
  color: #1f2937;
  word-break: break-words;
  line-height: 1.5;
}

/* Wizard Floating Navigation - Clean Minimalist Bar */
.wizard-floating-nav {
  position: absolute; /* Relative to wizard-left-column which is relative */
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: white; /* Removed rgba for better contrast */
  padding: 0.75rem 1rem;
  border-radius: 9999px; /* Pill shape */
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  z-index: 50;
  transition: all 0.3s ease;
}

.wizard-floating-nav:hover {
  box-shadow: 0 15px 60px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%) translateY(-2px);
}

.wizard-btn-minimal {
  background: transparent;
  color: #6b7280;
  border: 1px solid transparent;
  padding: 0.75rem 1rem;
  font-weight: 600;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wizard-btn-minimal:hover {
  background: #f9fafb;
  color: #1f2937;
}

#divider_prev {
  display: block !important;
}

/* Full-Width Immersive Stepper */
.wizard-stepper-full {
  width: 100%;
  max-width: none;
}

.stepper-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  position: relative;
  flex: 0 1 auto;
}

.stepper-line {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  height: 3px;
  background: #e5e7eb;
  border-radius: 1.5px;
  z-index: 1;
}

.stepper-line-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 1.5px;
  width: 0%;
  transition: width 0.3s ease;
}

.stepper-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 2rem;
}

.stepper-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.stepper-dot .dot-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.stepper-dot .dot-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  transition: color 0.3s ease;
}

/* Stepper States - Extra Large */
.stepper-dot.active .dot-number {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.1);
}

.stepper-dot.completed .dot-number {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.1);
}

.stepper-dot.pending .dot-number {
  background: #f3f4f6;
  color: #9ca3af;
  border: 3px solid #e5e7eb;
}

.stepper-dot.active .dot-label {
  color: #3b82f6;
  font-weight: 600;
}

.stepper-dot.completed .dot-label {
  color: #10b981;
  font-weight: 600;
}

.stepper-dot.pending .dot-label {
  color: #9ca3af;
}

/* Stepper Actions - Integrated Buttons */
.stepper-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Remove old progress info styles */
.wizard-progress-info {
  display: none;
}

.wizard-stepper-progress {
  display: none;
}

.wizard-buttons {
  display: none;
}

.wizard-btn {
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  min-width: 120px;
  justify-content: center;
}

.wizard-btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.wizard-btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.wizard-btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.wizard-btn-secondary:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.wizard-btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.wizard-btn-success:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* Main Container - Scrolleable content area */
.wizard-main-container {
  flex: 1;
  display: flex;
  overflow: hidden;
  width: 100%;
  background-color: #f9fafb;
}

.wizard-left-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Remove old top navigation styles */
.wizard-navigation-top {
  display: none;
}

/* Desktop: No additional adjustments needed for bottom navigation */
@media (min-width: 1024px) {
  /* Styles inherit from base */
}

/* Removed old stepper styles */

/* Steps Container - Internal Scroll */
/* Steps Container - Internal Scroll */
.wizard-steps-container {
  flex: 1;
  overflow-y: auto;
  padding: 3rem 4rem 10rem 4rem; /* Bottom padding for floating nav */
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Form inside wizard steps container */
.wizard-steps-container form {
  width: 100%;
  max-width: 56rem; /* Critical for readable forms */
  margin: 0 auto; 
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Sidebar - Own Scroll */
.wizard-sidebar {
  width: 24rem; /* w-96 */
  overflow-y: auto;
  flex-shrink: 0;
  border-left: 1px solid #e5e7eb;
  padding: 2rem 1.5rem;
}

/* Mobile: Sidebar goes below */
@media (max-width: 1024px) {
  .wizard-main-container {
    flex-direction: column;
  }

  .wizard-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid #e5e7eb;
  }
}

/* Form spacing */
.wizard-form-group {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.wizard-form-group:last-child {
  border-bottom: none;
}

/* Buttons */
.wizard-button-group {
  display: flex;
  gap: 0.75rem;
}

.wizard-button {
  flex: 1;
  padding: 0.75rem 1rem;
  font-weight: bold;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.wizard-button-next {
  background-color: #3b82f6;
  color: white;
}

.wizard-button-next:hover {
  background-color: #2563eb;
}

.wizard-button-prev {
  background-color: #f3f4f6;
  color: #374151;
}

.wizard-button-prev:hover {
  background-color: #e5e7eb;
}

.wizard-button-submit {
  background-color: #10b981;
  color: white;
}

.wizard-button-submit:hover {
  background-color: #059669;
}

.wizard-button.hidden {
  display: none;
}

/* Utility: Hidden */
.hidden {
  display: none;
}

/* Animation utilities */
@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

/* ============================================================
   PATIENT LIST PANEL (Step 2)
   ============================================================ */

.patient-list-panel {
  border: 1px solid #bfdbfe;
  border-radius: 0.75rem;
  background-color: #f8faff;
  overflow: hidden;
  animation: fadeIn 0.2s ease-out;
}

.patient-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.patient-list-table th {
  background-color: #dbeafe;
  color: #1e40af;
  font-weight: 700;
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.patient-list-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e0e7ff;
  color: #374151;
  vertical-align: middle;
}

.patient-list-table tbody tr:hover td {
  background-color: #eff6ff;
}

.patient-list-table tbody tr:last-child td {
  border-bottom: none;
}

.patient-list-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background-color: #f0f7ff;
  border-top: 1px solid #bfdbfe;
}

.patient-list-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  border: 1px solid #bfdbfe;
  background-color: white;
  color: #3b82f6;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.patient-list-page-btn:hover:not([disabled]) {
  background-color: #dbeafe;
  border-color: #93c5fd;
}

/* ============================================================
   PHONE CAMPAIGN SUBMIT BUTTON
   ============================================================ */

.wizard-btn-phone {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.wizard-btn-phone:hover {
  background: linear-gradient(135deg, #6d28d9, #5b21b6);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
}

/* Wizard Step 2: Compact Spacing */
.wizard-step[data-step="2"] > div > div:not(.grid) {
  margin-bottom: 1.5rem;
}

.wizard-step[data-step="2"] label {
  font-size: 0.875rem; /* text-sm */
}

.wizard-step[data-step="2"] input[type="text"],
.wizard-step[data-step="2"] select {
  font-size: 0.875rem; /* text-sm */
}

/* ============================================================
   CUSTOM MODAL TRANSITIONS (Non-Bootstrap)
   ============================================================ */
.modal-custom-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.modal-custom-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-custom-wrapper {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
    pointer-events: none;
}

.modal-custom-wrapper.active {
    display: flex;
    pointer-events: auto;
}

.modal-custom-content {
    width: 100%;
    max-width: 95vw;
    background: white;
    border-radius: 2rem;
    box-shadow: 0 25px 70px -12px rgba(0, 0, 0, 0.3);
    transform: translateY(20px) scale(0.98);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.active .modal-custom-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-ultra-wide {
    max-width: 98vw !important;
}

/* Pagination Smoothness */
[data-modular-filter-target="previewResultsBody"] {
    transition: opacity 0.3s ease;
}

.table-loading {
    opacity: 0.4;
    filter: blur(1px);
    pointer-events: none;
}

