/* ==========================================================
   HORIZONTAL STEPPER TIPO CHEVRON / CINTILLO DE PROGRESO
   Preservación idéntica del componente de identidad visual
   ========================================================== */

.stepper-widget-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.06);
  margin-bottom: 20px;
}

.stepper-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.stepper-header-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper-complete-btn {
  background: #0176D3;
  color: #ffffff;
  border: 1px solid #0176D3;
  border-radius: 9999px;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.stepper-complete-btn:hover {
  background: #014486;
  border-color: #014486;
}
.stepper-complete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Contenedor del cintillo horizontal */
.stepper-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.stepper-track {
  display: grid;
  align-items: center;
  gap: 2px;
  width: 100%;
  min-width: max-content;
}

/* Elemento individual tipo flecha / Chevron */
.stepper-step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  transition: background 220ms ease, color 220ms ease;
  box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

/* Recortes Poligonales (Clip-Path) */
.stepper-step-first {
  clip-path: polygon(0% 0%, calc(100% - 10px) 0%, 100% 50%, calc(100% - 10px) 100%, 0% 100%, 0% 0%);
  border-top-left-radius: 9999px;
  border-bottom-left-radius: 9999px;
}

.stepper-step-middle {
  clip-path: polygon(0% 0%, calc(100% - 10px) 0%, 100% 50%, calc(100% - 10px) 100%, 0% 100%, 10px 50%);
}

.stepper-step-last {
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 10px 50%);
  border-top-right-radius: 9999px;
  border-bottom-right-radius: 9999px;
}

/* Estados de Cada Etapa */
/* 1. Pendiente */
.stepper-step-pending {
  background: #e5e7eb;
  color: #080707;
}
.stepper-step-pending:hover {
  background: #d9dbde;
}

/* 2. Activo Actual */
.stepper-step-active {
  background: #032D60 !important;
  color: #ffffff !important;
  font-weight: 600;
}

/* 3. Completado */
.stepper-step-completed {
  background: #d1fae5;
  color: #065f46;
}
.stepper-step-completed:hover {
  background: #a7f3d0;
}

/* Contenido interno del Step */
.stepper-step-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.stepper-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}
.stepper-check-icon svg {
  width: 15px;
  height: 15px;
}

/* Comportamiento Táctil Responsive (Móviles < 768px) */
@media (max-width: 768px) {
  .stepper-track {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: auto;
    min-width: 100%;
    scroll-snap-type: x mandatory;
    touch-action: pan-x;
  }

  .stepper-step {
    flex: 0 0 160px;
    min-width: 160px;
    min-height: 36px;
    font-size: 12px;
    padding: 6px 12px;
    scroll-snap-align: center;
  }
}
