/* 공통 토스트 — js/toast.js 와 한 쌍으로 쓴다.
 * 페이지 하단 중앙에 잠깐 떴다가 사라진다. */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 10000;
  transform: translate(-50%, 12px);
  max-width: min(90vw, 420px);
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.92);
  color: #ffffff;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.1px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* 아래 요소 클릭을 막지 않는다 */
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.toast.toast-success {
  background: rgba(4, 120, 87, 0.95);
}

.toast.toast-error {
  background: rgba(185, 28, 28, 0.95);
}

@media (max-width: 768px) {
  .toast {
    /* 홈 인디케이터가 있는 기기에서 하단에 겹치지 않게 */
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 32px);
    padding: 13px 18px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: opacity 0.01s linear, visibility 0.01s linear;
    transform: translate(-50%, 0);
  }
}
