/*
 * 閉業のお知らせバー
 * SKY TERRACE OMOTESANDO 閉業に伴い、サイトの公開終了までの間に表示する暫定の告知（Issue #71）。
 * サイトを閉じる際は、このファイルと各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;
  /* .nav-button が 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;
}

.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 の要素は body の padding では下がらないため、個別にずらす。
 * .header は top: 0 と margin-top の組み合わせで配置されている。
 */
.header {
  top: var(--closed-notice-height);
}

.nav-button {
  top: calc(65px + var(--closed-notice-height));
}

/* 全画面のナビゲーションは告知バーの下に収める */
.header-nav {
  top: var(--closed-notice-height);
  height: calc(100% - var(--closed-notice-height));
}

/* ファーストビューと下層ページが画面内に収まるよう、告知バーの高さを差し引く */
.first-view {
  height: calc(100vh - var(--closed-notice-height));
}

.lower-page {
  min-height: calc(100vh - var(--closed-notice-height));
}

@media screen and (max-width: 1100px) {
  /* サイト名が長く2行になるため高さを増やす */
  :root {
    --closed-notice-height: 60px;
  }

  .nav-button {
    top: calc(60px + var(--closed-notice-height));
  }

  .lower-page {
    min-height: calc(100vh - var(--closed-notice-height));
  }
}

@media screen and (max-width: 767px) {
  .closed-notice-text {
    font-size: 11px;
  }

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

@media screen and (max-width: 479px) {
  /* ラベルと本文が3行になるため、さらに高さを増やす */
  :root {
    --closed-notice-height: 68px;
  }
}
