/*
 * 閉業のお知らせバー
 * HarborS 閉業に伴い、サイトの公開終了までの間に表示する暫定の告知（Issue #598）。
 * サイトを閉じる際は、このファイルと各HTMLの .closed-notice ブロック・linkタグをまとめて削除する。
 */

:root {
  --closed-notice-height: 44px;
}

/* 告知バーは position: fixed のため、その分だけページ全体を下げる */
body {
  padding-top: var(--closed-notice-height);
}

.closed-notice {
  position: fixed;
  top: 0;
  left: 0;
  /* extends配下のヘッダーが z-index: 1000 のため、それより前面に出す */
  z-index: 1010;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--closed-notice-height);
  padding: 4px 12px;
  background-color: #111;
  color: #fff;
  font-family: noto-sans-cjk-jp, sans-serif;
}

.closed-notice-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-align: center;
}

/* 折り返しが語中で起きないよう、文単位でまとめる */
.closed-notice-line {
  display: inline-block;
}

.closed-notice-label {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: 2px;
  background-color: #fff;
  color: #111;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* position: fixed のヘッダーを告知バーの下へずらす */
#header,
.closed-notice + header {
  top: var(--closed-notice-height);
}

/* 下スクロール時にヘッダーを隠す挙動に、告知バーの高さ分を上乗せする */
#header.hide {
  transform: translateY(calc(-100% - var(--closed-notice-height)));
}

@media screen and (max-width: 767px) {
  :root {
    --closed-notice-height: 56px;
  }

  .closed-notice-text {
    font-size: 11px;
  }

  .closed-notice-label {
    margin-right: 6px;
    font-size: 10px;
  }
}
