/* 主要互動 */
.step {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  position: absolute; /* 疊在一起 */
  width: 100%;
}

.step.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  z-index: 15;
}

/* 表單驗證 */
input.error,select.error {
  border: 2px solid #ff4d4f;
  /* error-shake */
  animation: nice-shake 0.4s ease-in-out;
  /* 加上擴散的光暈感，讓視覺不會太突兀 */
  box-shadow: 0 0 8px rgba(255, 120, 117, 0.4);
  /* 稍微讓背景也帶一點點紅，更有氛圍感 */
  background-color: #fff2f0;
  transition: all 0.3s ease;
}

.input-error::placeholder {
  color: #ff4d4f;
}

/* TOAST */
@keyframes nice-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 容器固定在中上位置 */
.toast-container {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translate(-50%, -20px);
  padding: 16px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* --- 修正對齊的關鍵 --- */
  display: flex;
  align-items: center; /* 垂直居中 */
  justify-content: center; /* 水平居中 */
  line-height: 1; /* 消除行高造成的位移 */
  gap: 12px;
  /* ---------------------- */
}

/* 確保裡面的文字也垂直居中 */
.toast-container span {
  display: inline-block;
  line-height: 1.2; /* 稍微給一點行高讓文字更美，但不會歪 */
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block; /* 防止 svg 底部的空隙 */
}
.toast-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 顏色維持質感的淺色調，但邊框稍微明顯一點 */
.toast-success {
  background-color: #f6ffed;
  border: 1.5px solid #b7eb8f;
  color: #389e0d;
}
.toast-error {
  background-color: #fff2f0;
  border: 1.5px solid #ffccc7;
  color: #cf1322;
}

button:disabled {
  background-color: #cccccc !important;
  cursor: not-allowed; /* 游標變成禁止符號 */
  opacity: 0.7;
}
