@scope (.chatbot-fixed-container) {
  :scope {
    /* アイコンとチャットボットを画面端に固定する共通の基準位置 */
    position: fixed;
    bottom: 8px; /* アイコンとチャットボットの下からの表示位置を指定 */
    right: 8px; /* アイコンとチャットボットの右からの表示位置を指定 */
    z-index: 3000;
    text-align: right;
    box-sizing: border-box;
  }

  #triggerImage {
    background-image: url(/content/000464331.png);
    background-size: contain;
    background-repeat: no-repeat;
  }

  .trigger-image {
    cursor: pointer;
    width: 240px; /* アイコンの幅を変更*/
    height: 240px; /* アイコンの高さを変更*/
    margin-left: auto;
  }

  .trigger-wrapper {
    position: relative;
    bottom: 8px; /* アイコンの下からの表示位置を指定 */
    right: -64px; /* アイコンの右からの表示位置を指定 */
    display: inline-block;
  }

  .widget-close-button {
    position: absolute;
    top: -32px; /* 閉じるボタンの位置を変更 */
    right: 72px;
    width: 36px; /* 閉じるボタンの幅を変更 */
    height: 36px; /* 閉じるボタンの高さを変更 */
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    z-index: 1001;
  }

  .widget-close-button::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: #0000001f;
    opacity: 0;
    transition: opacity 0.15s ease;
  }

  .widget-close-button:hover::after {
    opacity: 1;
  }

  .widget-close-button img {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
  }

  .chatbot-container {
    display: none;
    width: 400px; /* チャットボットの幅を変更*/
    max-height: 600px; /* チャットボットの最大の高さを変更*/
    height: 60vh; /*見切れ防止：画面の高さを割合を指定　（例：50vh = ブラウザーの高さの50%)*/ 
    position: relative;
    transition: all 0.2s ease;
  }

  .chatbot-header {
    border-radius: 10px 10px 0 0%;
    position: absolute;
    top: -40px;
    left: 0;
    display: flex;
    justify-content: center;
    width: 100%;
    height: 40px;
    background-color: #0277BD; 
  }

  .close-button {
    margin-top: 10px;
    margin-right: 20px;
    width: 148px;
    height: 24px;
    font-size: 12px;
    color: white;
    background-color: transparent;
    cursor: pointer;
    border: none;
    position: absolute;
    right: 10px
  }

  .chatbot-content {
    border-radius: 0 0% 10px 10px;
    width: 100%;
    height: 100%;
    border: none;
  }

  .expand-button {
    position: absolute;
    left: 10px;
    top: 7.5px;
    width: 24px;
    height: 24px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transform: scaleX(-1);
  }

  .chatbot-container.expanded {
    width: 60vw; /* 画面の幅を指定（vwはビューポート幅の割合） */
    height: calc(100vh - 80px); /* 画面の高さからヘッダー分（例:80px）を引いた高さを指定 */
    max-height: 100%
  }
}