/* ============================================
   ボートレーサーの仕事現場を知る 専用CSS
   ============================================ */

/* ============================================
   ページタイトル
   ============================================ */
.page-title--workplace {
  width: auto;
  max-width: 340px;
  min-width: 280px;
  height: 75px;
  padding: 0 16px;
}

/* ============================================
   一般的な流れセクション
   ============================================ */
.wp-flow {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wp-flow__items {
  display: flex;
  gap: 4px;
}

.wp-flow__item {
  flex: 1;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
  padding-right: 14px;
}

.wp-flow__item--blue {
  background-color: var(--boat-blue);
}

.wp-flow__item--yellow {
  background-color: var(--boat-yellow);
}

.wp-flow__item--red {
  background-color: var(--boat-red);
  clip-path: none;
  padding-right: 0;
}

.wp-flow__item-text {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  text-align: center;
  letter-spacing: 0.2em;
}

.wp-flow__item--blue .wp-flow__item-text {
  color: var(--white);
}

.wp-flow__item--yellow .wp-flow__item-text {
  color: var(--boat-darkblue);
}

.wp-flow__item--red .wp-flow__item-text {
  color: var(--white);
}

.wp-flow__item-text--sm {
  font-size: 14px;
  letter-spacing: 0.1em;
}

.wp-flow__note {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--boat-text);
  text-align: right;
}

/* ============================================
   タブナビゲーション
   ============================================ */
.wp-tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wp-tabs__nav {
  display: flex;
  gap: 1px;
  padding-top: 12px;
}

.wp-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  height: 44px;
  border: none;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--boat-text);
  background-color: var(--white);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 非アクティブ状態のボーダー */
.wp-tab--blue {
  border-bottom: 3px solid var(--boat-blue);
}

.wp-tab--yellow {
  border-bottom: 3px solid var(--boat-yellow);
  letter-spacing: -0.04em;
}

.wp-tab--red {
  border-bottom: 3px solid var(--boat-red);
  font-size: 16px;
}

/* アクティブ状態 */
.wp-tab--blue.wp-tab--active {
  background-color: var(--boat-blue);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  border-bottom: none;
}

.wp-tab--yellow.wp-tab--active {
  background-color: var(--boat-yellow);
  color: var(--boat-darkblue);
  font-weight: 700;
  font-size: 15px;
  border-bottom: none;
}

.wp-tab--red.wp-tab--active {
  background-color: var(--boat-red);
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  border-bottom: none;
}

/* 下部タブ：ボーダーを上に */
.wp-tabs__nav--bottom .wp-tab--blue {
  border-bottom: none;
  border-top: 3px solid var(--boat-blue);
}

.wp-tabs__nav--bottom .wp-tab--yellow {
  border-bottom: none;
  border-top: 3px solid var(--boat-yellow);
}

.wp-tabs__nav--bottom .wp-tab--red {
  border-bottom: none;
  border-top: 3px solid var(--boat-red);
}

.wp-tabs__nav--bottom .wp-tab--active {
  border-top: none;
}

/* ============================================
   タブパネル
   ============================================ */
.wp-tab-panel {
  display: none;
  flex-direction: column;
}

.wp-tab-panel--active {
  display: flex;
}

/* ============================================
   タイムライン
   ============================================ */
.wp-timeline {
  display: flex;
  flex-direction: column;
}

.wp-timeline-item {
  display: flex;
  width: 100%;
  padding-bottom: 8px;
}

.wp-timeline-item:last-child {
  padding-bottom: 0;
}

/* タイムライン左カラム（時間 + 縦線） */
.wp-timeline-item__left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 35px;
  flex-shrink: 0;
  align-self: stretch;
}

/* TIMEラベル（タイムライン上部） */
.wp-timeline__time-label {
  display: block;
  font-family: "din-2014", sans-serif;
  font-weight: 600;
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: -0.04em;
  color: var(--boat-text);
  text-align: center;
  width: 35px;
}

.wp-timeline-item__time {
  font-family: "din-2014", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.04em;
  text-align: center;
  width: 35px;
}

/* 時間テキストの色はタブ色に依存 */
.wp-tab-panel--blue .wp-timeline-item__time {
  color: var(--boat-blue);
}

.wp-tab-panel--yellow .wp-timeline-item__time {
  color: #E3C500;
}

.wp-tab-panel--red .wp-timeline-item__time {
  color: var(--boat-red);
}

/* 縦線 */
.wp-timeline-item__line {
  flex: 1;
  width: 1px;
  min-height: 8px;
}

.wp-tab-panel--blue .wp-timeline-item__line {
  background-color: var(--boat-blue);
}

.wp-tab-panel--yellow .wp-timeline-item__line {
  background-color: #F4CF14;
}

.wp-tab-panel--red .wp-timeline-item__line {
  background-color: var(--boat-red);
}

/* 最後のアイテムの縦線を非表示 */
.wp-timeline-item:last-child .wp-timeline-item__line {
  display: none;
}

/* タイムライン右カラム */
.wp-timeline-item__right {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-left: 24px;
}

/* ============================================
   詳細パネル
   ============================================ */
.wp-timeline-detail__inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 4px;
  position: relative;
}

/* 吹き出し三角（左向き）- 中心を時間数字の中心に合わせる */
.wp-timeline-detail__inner::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 5px;
  width: 0;
  height: 0;
  border-top: 8.5px solid transparent;
  border-bottom: 8.5px solid transparent;
}


/* パネルの背景色・吹き出し色はタブ色に依存 */
.wp-tab-panel--blue .wp-timeline-detail__inner {
  background-color: #F1F7FD;
}

.wp-tab-panel--blue .wp-timeline-detail__inner::before {
  border-right: 16px solid #F1F7FD;
}

.wp-tab-panel--yellow .wp-timeline-detail__inner {
  background-color: #FDF9E1;
}

.wp-tab-panel--yellow .wp-timeline-detail__inner::before {
  border-right: 16px solid #FDF9E1;
}

.wp-tab-panel--red .wp-timeline-detail__inner {
  background-color: #FDF2F2;
}

.wp-tab-panel--red .wp-timeline-detail__inner::before {
  border-right: 16px solid #FDF2F2;
}

.wp-timeline-detail__header {
  display: flex;
  gap: 4px;
  align-items: flex-start;
}

.wp-timeline-detail__title {
  flex: 1;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  color: var(--boat-text);
}

.wp-timeline-detail__image {
  width: 104px;
  height: 80px;
  flex-shrink: 0;
  object-fit: cover;
}

.wp-timeline-detail__text {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.7;
  color: var(--boat-text);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.wp-timeline-detail__inner--open .wp-timeline-detail__text {
  opacity: 1;
}

/* 続きを読む / 閉じる ボタン */
.wp-timeline-detail__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 0 11px;
  border: none;
  border-radius: 100px;
  background: none;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
  color: var(--boat-text);
  transition: opacity 0.3s ease;
}

.wp-timeline-detail__toggle:hover {
  opacity: 0.7;
}

.wp-tab-panel--blue .wp-timeline-detail__toggle {
  border: 1px solid var(--boat-blue);
}

.wp-tab-panel--yellow .wp-timeline-detail__toggle {
  border: 1px solid #F4CF14;
}

.wp-tab-panel--red .wp-timeline-detail__toggle {
  border: 1px solid var(--boat-red);
}

/* ============================================
   注意書き
   ============================================ */
.wp-note {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--boat-text);
}
