:root {
  --chatbot-button-width: 90px;
  --chatbot-button-height: 90px;
  --chatbot-button-border-radius: 6px;
  --chatbot-button-closer-offset-top: -6px;
  --chatbot-button-closer-offset-right: -6px;
  --chatbot-button-closer-width: 32px;
  --chatbot-button-closer-height: 32px;
  --chatbot-button-closer-icon-font-width: 15px;
  --chatbot-button-closer-icon-font-height: 20px;
  /* `0` を扱うときは必ず単位を付与すること! */
  --chatbot-view--centered-padding-x: 10vw;
  --chatbot-view--centered-padding-y: 10dvh;
}

/*
 * チャットボットボタン
 */
#chatbot-button {
  z-index: 1000000;
  bottom: 10px;
  left: 10px;
  margin:0px!important;
  padding:0px!important;
  background:transparent!important;
  border: none;
  border-radius: 0px!important;
  width: var(--chatbot-button-width);
  height: var(--chatbot-button-height);
  box-shadow: none!important;
}
#chatbot-button > .chatbot-button-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

#chatbot-button > .chatbot-button-inner > img {
  border: none;
  border-radius: 0px;
  width: var(--chatbot-button-width);
  height: var(--chatbot-button-height);
}

#chatbot-button > .chatbot-button-inner > .close {
  position: absolute;
  top: var(--chatbot-button-closer-offset-top);
  right: var(--chatbot-button-closer-offset-right);
  border: none;
  border-radius: 16px;
  width: var(--chatbot-button-closer-width);
  height: var(--chatbot-button-closer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  user-select: none;
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
  font-size: 66%;
}
#chatbot-button > .chatbot-button-inner > .close:focus {
  outline: var(--focus-indicator-outline);
}
#chatbot-button > .chatbot-button-inner > .close.hidden {
  display: none;
}
#chatbot-button > .chatbot-button-inner > .close > i {
  display: block;
  width: var(--chatbot-button-closer-icon-font-width);
  height: var(--chatbot-button-closer-icon-font-height);
}

/*
 * チャットボット本体フレーム (ページ内オーバレイ表示用、配置タイプ共通)
 *   lib/entry.ts 内 `_createChatbotViewStyle()` にて基礎的な定義あり
 */
#chatbot-view {
  z-index: 1000001;
}

/*
 * チャットボット本体フレーム (ページ内オーバレイ表示用、「角」への配置用)
 */
#chatbot-view.chatbot-view--cornered {
  bottom: 10px;
  right: 10px;
  width: 50%;
  height: 66%;
}

/*
 * チャットボット本体フレーム (ページ内オーバレイ表示用、中央配置用)
 */
#chatbot-view.chatbot-view--centered {
  margin: auto;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: calc(100vw - (2 * var(--chatbot-view--centered-padding-x)));
  max-width: 1312px;
  height: calc(100vh - (2 * var(--chatbot-view--centered-padding-y)));
}
@media only screen and (max-width: 820px) {
  #chatbot-view.chatbot-view--centered {
    width: calc(100vw - (var(--chatbot-view--centered-padding-x)));
    height: calc(100vh - (var(--chatbot-view--centered-padding-y) * 0.8));
    height: calc(100dvh - (var(--chatbot-view--centered-padding-y) * 0.8));
  }
  /* ボトムナビゲーション対応 */
  #chatbot-button {
    bottom: 70px;
  }
}

body::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(70, 70, 70, 0.95);
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}
body.chatbot-open::before {
	opacity: 1;
	visibility: visible;
}
body.chatbot-open {
	overflow: hidden;
}
