/* STG表示と環境シェルの最小CSS。Next.jsの静的チャンクに依存しない。 */
.staging-environment-banner {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10000;
  min-height: 44px;
  padding: 6px 20px;
  color: #fff;
  background: linear-gradient(110deg, #8f172a 0%, #b91c1c 52%, #991b1b 100%);
  box-shadow: 0 2px 10px rgb(69 10 10 / 28%);
  font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
}

.staging-environment-banner__inner {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(1120px, 100%);
  margin-inline: auto;
}

.staging-environment-banner__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 999px;
  background: rgb(255 255 255 / 16%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
}

.staging-environment-banner__label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.staging-environment-banner__message {
  padding-left: 10px;
  border-left: 1px solid rgb(255 255 255 / 45%);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

body.is-staging-environment {
  padding-top: 44px !important;
}

body.is-staging-environment:has(.l-page) {
  padding-top: 100px !important;
}

body.is-staging-environment .staging-public-shell,
body.is-staging-environment .staging-admin-shell {
  display: contents;
}

body.is-staging-environment .staging-public-shell .l-header {
  top: 44px;
}

body.is-staging-environment .staging-public-shell .l-header__drawer {
  top: 44px;
  max-height: calc(100dvh - 44px);
}

body.is-staging-environment .staging-admin-chrome {
  height: calc(100dvh - 44px);
}

@media (max-width: 640px) {
  .staging-environment-banner {
    min-height: 48px;
    padding: 6px 12px;
  }

  .staging-environment-banner__inner {
    min-height: 36px;
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  .staging-environment-banner__message {
    width: 100%;
    padding-left: 0;
    border-left: 0;
    font-size: 11px;
    text-align: center;
  }

  body.is-staging-environment {
    padding-top: 48px !important;
  }

  body.is-staging-environment:has(.l-page) {
    padding-top: 105px !important;
  }

  body.is-staging-environment .staging-public-shell .l-header {
    top: 48px;
  }

  body.is-staging-environment .staging-public-shell .l-header__drawer {
    top: 48px;
    max-height: calc(100dvh - 48px);
  }

  body.is-staging-environment .staging-admin-chrome {
    height: calc(100dvh - 48px);
  }
}
