/* ===== STEP BAR ===== */
.step-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 40px;
  gap: 0;
  position: relative;
}

/* ===== STEP ITEM ===== */
.step-item {
  text-align: center;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

/* ICON */
.step-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 3px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  margin: 0 auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.step-icon i {
  font-size: 28px;
  color: #9ca3af;
  transition: all 0.3s ease;
}

/* TEXT */
.step-text {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.3s ease;
  white-space: nowrap;
}

/* LINE */
.step-line {
  flex: 1;
  height: 3px;
  background: #e5e7eb;
  margin: 0 8px;
  margin-top: -32px;
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}

/* ===== STATES ===== */

/* ACTIVE */
.step-item.active .step-icon {
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  border-color: #7c3aed;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4), 0 0 0 4px rgba(124, 58, 237, 0.1);
  transform: scale(1.05);
}

.step-item.active .step-icon i {
  color: #fff;
}

.step-item.active .step-text {
  color: #7c3aed;
  font-weight: 600;
}

/* COMPLETED */
.step-item.completed .step-icon {
  background: #ede9fe;
  border-color: #7c3aed;
}

.step-item.completed .step-icon i {
  color: #7c3aed;
}

.step-item.completed .step-text {
  color: #7c3aed;
  font-weight: 600;
}

/* LINE COMPLETED */
.step-line.completed {
  background: linear-gradient(90deg, #7c3aed 0%, #6366f1 100%);
}

/* ===== CURSOR & INTERACTION ===== */

/* กดได้ */
.step-item.allowed {
  cursor: pointer;
  opacity: 1;
}

/* กดไม่ได้ */
.step-item:not(.allowed) {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

/* hover เฉพาะที่กดได้ */
.step-item.allowed:hover:not(.active) .step-icon {
  transform: translateY(-3px);
  border-color: #c4b5fd;
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.2);
}

.step-item.allowed:hover:not(.active) .step-text {
  color: #7c3aed;
}

/* active state is clickable */
.step-item.active {
  cursor: pointer;
}

/* ===== STEP CONTENT ===== */
.step-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.step-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== BUTTONS ===== */
.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.btn-wid-step {
  min-width: 120px;
  /* padding: 12px 24px; */
  border: none;
  /* border-radius: 10px; */
  /* font-size: 15px; */
  /* font-weight: 600; */
  cursor: pointer;
  transition: all 0.3s ease;
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 992px) {
  .container {
    padding: 30px 20px;
  }

  .step-icon {
    width: 56px;
    height: 56px;
  }

  .step-icon i {
    font-size: 24px;
  }

  .step-text {
    font-size: 13px;
  }
}

/* Mobile - Vertical Layout */
@media (max-width: 768px) {
  .container {
    padding: 24px 16px;
  }

  .step-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 32px;
  }

  .step-item {
    width: 100%;
    display: flex;
    align-items: center;
    text-align: left;
    padding: 12px 0;
  }

  .step-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin: 0;
    flex-shrink: 0;
  }

  .step-icon i {
    font-size: 22px;
  }

  .step-text {
    margin-top: 0;
    margin-left: 16px;
    font-size: 14px;
    white-space: normal;
    text-align: left;
  }

  /* LINE - Vertical */
  .step-line {
    width: 3px;
    height: 40px;
    flex: none;
    margin: 0 0 0 23px;
    margin-top: 0;
  }

  /* ปรับ shadow ให้พอดี mobile */
  .step-item.active .step-icon {
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
  }

  .step-item.allowed:hover:not(.active) .step-icon {
    transform: translateX(4px);
  }

  .btn-group {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .btn-wid-step {
    width: 100%;
    min-width: unset;
  }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
  .container {
    padding: 20px 12px;
  }

  .step-icon {
    width: 44px;
    height: 44px;
  }

  .step-icon i {
    font-size: 20px;
  }

  .step-text {
    font-size: 13px;
  }

  .step-line {
    margin-left: 21px;
    height: 32px;
  }
}
