/* アナウンスバー */
.up-d-announcement-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #6c6c6c;
  color: #fff;
  min-height: 40px;
  padding: 0 15px;
  width: 100%;
  box-sizing: border-box;
}

.up-d-announcement-bar__inner {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 800px;
  padding: 0 40px;
  box-sizing: border-box;
  overflow: hidden;
}

.up-d-announcement-bar__list {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-align: center;
}

.up-d-announcement-bar__item {
  display: block;
}

.up-d-announcement-bar__item[hidden] {
  display: none;
}

.up-d-announcement-bar__message {
  font-size: 1.4rem;
  line-height: 1.5;
  padding: 8px 0;
}

.up-d-announcement-bar__message p {
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.up-d-announcement-bar__message a {
  color: #fff;
  text-decoration: underline !important;
  text-decoration-color: rgba(255, 255, 255, 0.4) !important;
  transition: text-decoration-color 0.2s !important;
}

.up-d-announcement-bar__message a:hover {
  text-decoration-color: rgba(255, 255, 255, 1) !important;
}

.up-d-announcement-bar__btn {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.up-d-announcement-bar__btn:hover {
  opacity: 1;
}

.up-d-announcement-bar__btn--prev {
  left: 0;
}

.up-d-announcement-bar__btn--next {
  right: 0;
}

/* 768px以上：両端配置 */
@media (min-width: 768px) {
  .up-d-announcement-bar {
    padding: 0 150px;
  }

  .up-d-announcement-bar__inner {
    flex: 1;
    justify-content: space-between;
  }
}

/* アニメーション */
@keyframes up-d-bar-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes up-d-bar-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.up-d-announcement-bar__item--leaving {
  animation: up-d-bar-out 0.3s ease forwards;
}

.up-d-announcement-bar__item--entering {
  animation: up-d-bar-in 0.3s ease forwards;
}
