/* 新着ティッカー（RENGO ONLINE）
   デザイン: Figma「トップ バナー関連」案C（イエロー）。PC=高さ60px、スマホ(480px以下)=高さ44px。
   色: 帯 #ffc400／下線 #e6ae00／ラベル・タイトル #0b2a5b／NEW #e60012／日付 #3a3000 */

/* position は指定しない（グローバルナビのドロップダウンが、帯の上に重なって表示されるようにする） */
.boxTicker {
  box-sizing: border-box;
  min-width: 980px;
  height: 60px;
  background: #ffc400;
  border-bottom: 1px solid #e6ae00;
}

.boxTicker__inner {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 980px;
  height: 59px;
  margin: 0 auto;
}

/* ラベル */
.boxTicker__label {
  flex: none;
  box-sizing: border-box;
  padding: 6px 18px;
  background: #0b2a5b;
  border-radius: 4px;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
}

/* サイト共通の a:link／a:visited／a:hover（青・下線）に負けないよう、詳細度を上げる（見た目は変えない） */
.boxTicker .boxTicker__label:link,
.boxTicker .boxTicker__label:visited,
.boxTicker .boxTicker__label:hover,
.boxTicker .boxTicker__label:focus {
  color: #fff;
  text-decoration: none;
}

.boxTicker .boxTicker__label:focus-visible {
  outline: 2px solid #0b2a5b;
  outline-offset: 2px;
}

/* NEW */
.boxTicker__new {
  flex: none;
  box-sizing: border-box;
  padding: 3px 12px;
  background: #e60012;
  border-radius: 100px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
}

/* 日付 */
.boxTicker__date {
  flex: none;
  color: #3a3000;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  white-space: nowrap;
}

/* 記事タイトルの窓枠（白背景。ラベル・「記事一覧へ」と区別して目立たせる）。
   左右の余白は枠側に持たせる（ul に持たせると、JS が測る表示幅がずれるため） */
.boxTicker__frame {
  flex: 1 1 0;
  min-width: 1px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  background: #fff;
  border-radius: 4px;
}

/* 記事タイトル（1件ずつ表示する） */
.boxTicker__items {
  flex: 1 1 0;
  min-width: 1px;
  height: 24px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
}

.boxTicker__item {
  display: none;
  margin: 0;
  padding: 0;
}

.boxTicker__item.is-active {
  display: block;
}

.boxTicker__link {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  white-space: nowrap;
}

/* サイト共通の a:link／a:visited／a:hover（青・下線）に負けないよう、詳細度を上げる */
.boxTicker .boxTicker__link:link,
.boxTicker .boxTicker__link:visited,
.boxTicker .boxTicker__link:hover,
.boxTicker .boxTicker__link:focus {
  color: #0b2a5b;
  text-decoration: none;
}

.boxTicker__link:hover .boxTicker__text,
.boxTicker__link:focus .boxTicker__text {
  text-decoration: underline;
}

.boxTicker__link:focus-visible {
  outline: 2px solid #0b2a5b;
  outline-offset: 2px;
}

/* 既定（JSなし・「視差効果を減らす」設定）: 収まらないタイトルは末尾を「…」で省略 */
.boxTicker__text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 動きあり（JSが付与）: 収まらないタイトルを右から左へ流すため、幅いっぱいに伸ばして測る */
.boxTicker.is-motion .boxTicker__text {
  display: inline-block;
  overflow: visible;
  text-overflow: clip;
  will-change: transform;
}

/* 右側（ドット／記事一覧へ） */
.boxTicker__right {
  flex: none;
  display: flex;
  align-items: center;
  gap: 22px;
}

/* ページドット（10px、間隔8px。現在は濃く、ほかは30%） */
.boxTicker__dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.boxTicker__dot {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #0b2a5b;
  opacity: 0.3;
  cursor: pointer;
}

.boxTicker__dot.is-active {
  opacity: 1;
}

/* タップ・クリックしやすいよう、見た目より広く反応させる */
.boxTicker__dot::after {
  content: "";
  position: absolute;
  top: -9px;
  right: -4px;
  bottom: -9px;
  left: -4px;
}

.boxTicker__dot:focus-visible {
  outline: 2px solid #0b2a5b;
  outline-offset: 3px;
}

/* 記事一覧へ ＞ */
.boxTicker__more {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
}

.boxTicker .boxTicker__more:link,
.boxTicker .boxTicker__more:visited,
.boxTicker .boxTicker__more:hover,
.boxTicker .boxTicker__more:focus {
  color: #0b2a5b;
  text-decoration: none;
}

.boxTicker__more:hover span {
  text-decoration: underline;
}

.boxTicker__more:focus-visible {
  outline: 2px solid #0b2a5b;
  outline-offset: 2px;
}

.boxTicker__more img {
  display: block;
  width: 9px;
  height: 16px;
}

/* スマホ（480px以下）: 高さ44px、ラベル／タイトル。帯全体が、表示中の記事へのリンク（「＞」・ドット・記事一覧へは出さない） */
@media screen and (max-width: 480px) {
  .boxTicker {
    min-width: 0;
    height: 44px;
  }

  .boxTicker__inner {
    gap: 8px;
    width: auto;
    height: 43px;
    padding: 0 10px;
  }

  .boxTicker__label {
    position: relative;
    z-index: 1; /* 帯全体の記事リンクより手前に置き、ラベルだけ RENGO ONLINE トップへのリンクにする */
    padding: 5px 9px;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.2;
  }

  .boxTicker__frame {
    height: 30px;
    padding: 0 5px;
    border-radius: 3px;
  }

  /* ラベルのタップ領域を、帯の高さ（44px）まで広げる */
  .boxTicker__label::after {
    content: "";
    position: absolute;
    top: -12px;
    right: -4px;
    bottom: -12px;
    left: -10px;
  }

  .boxTicker__new,
  .boxTicker__date,
  .boxTicker__right {
    display: none; /* 「＞」は付けない（記事リンクと一覧リンクが重なるため）。タイトルの窓枠を、右端まで広げる */
  }

  .boxTicker__items {
    height: 20px;
  }

  .boxTicker__link {
    font-size: 14px;
    line-height: 20px;
  }

  /* 帯全体をタップ領域にする（高さ44px） */
  .boxTicker__link::after {
    content: "";
    position: absolute;
    top: -1px;
    right: 0;
    bottom: -1px;
    left: 0;
  }

  .boxTicker__link:hover .boxTicker__text,
  .boxTicker__link:focus .boxTicker__text {
    text-decoration: none;
  }
}
