/* Toast通知スタイル */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  max-width: 400px;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(100%);
  transition: none;
}

.toast-show {
  animation: toast-slide-in 0.3s ease forwards;
}

.toast-hide {
  animation: toast-slide-out 0.3s ease forwards;
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-slide-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.toast-close:hover {
  opacity: 1;
}

/* タイプ別スタイル */
.toast-error {
  border-left: 4px solid #dc3545;
}

.toast-error .toast-icon {
  color: #dc3545;
}

.toast-warning {
  border-left: 4px solid #ffc107;
}

.toast-warning .toast-icon {
  color: #d39e00;
}

.toast-success {
  border-left: 4px solid #28a745;
}

.toast-success .toast-icon {
  color: #28a745;
}

.toast-info {
  border-left: 4px solid #17a2b8;
}

.toast-info .toast-icon {
  color: #17a2b8;
}

/* モバイル対応 */
@media (max-width: 480px) {
  .toast-container {
    top: auto;
    bottom: 20px;
    left: 20px;
    right: 20px;
  }

  .toast {
    min-width: auto;
    max-width: none;
    width: 100%;
  }

  .toast-show {
    animation: toast-slide-up 0.3s ease forwards;
  }

  .toast-hide {
    animation: toast-slide-down 0.3s ease forwards;
  }

  @keyframes toast-slide-up {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes toast-slide-down {
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(100%);
    }
  }
}
