@charset "UTF-8";

.chatbot-container {
  position: fixed;
  bottom: 0;
  right: 20px;
  width: 400px;
  overflow: auto;
  background: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
  flex-direction: column;
  font-size: 14px;
  text-align: left;
  z-index: 1000;
  transition: transform 0.5s;
  transform: translateY(calc(100% - 60px));
}

.chatbot-frame {
  position: relative;
}

.chatbot-container,
.chatbot-container::after,
.chatbot-container::before,
.chatbot-container *,
.chatbot-container *::after,
.chatbot-container *::before {
  box-sizing: border-box;
}

.chatbot-container.is-open {
  transform: translateY(0);
}

.chatbot-header {
  padding: 12px 10px 9px 60px;
  background: #222 url(https://staging.chatbot.ecbeing.io/data/images/chatbot/chatbot-icon-w.png) center left 15px / 32px auto no-repeat;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  align-items: flex-start;
  font-size: 15px;
  font-weight: bold;
  line-height: 1.3;
  color: #FFF;
  position: relative;
  cursor: pointer;
}

.chatbot-title {
}

.close-chatbot {
  position: absolute;
  right: 12px;
  top: calc(50% - 13px);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: url(https://staging.chatbot.ecbeing.io/data/images/chatbot/chatbot-arrow.png) center center / 15px auto no-repeat;
  border: none;
  cursor: pointer;
  transition: background 0.5s, transform 0.5s;
}

.is-open .close-chatbot {
  transform: rotate(180deg);
  background-color: rgba(255, 255, 255, 0.2);
}

/* キーボードフォーカスインジケーター（全インタラクティブ要素共通） */
.chatbot-container button:focus-visible,
.chatbot-container [tabindex]:focus-visible {
  outline: 2px solid #005FCC;
  outline-offset: 2px;
}

.chatbot-container input:focus-visible {
  outline: none;
}

/* 以下は上記共通ルールの個別調整 */
.chatbot-header:focus-visible {
  outline-offset: -2px;
}

.close-chatbot:focus-visible {
  border-radius: 50%;
}

.chatbot-disclaimer {
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
  max-height: 0;
  color: #FFF;
  padding: 0 0 0 1.5em;
  overflow: hidden;
  transition: padding 0.5s, max-height 0.5s;
}

.is-open .chatbot-disclaimer {
  padding-top: 5px;
  max-height: 20px;
}

.chatbot-content {
  max-height: calc(100vh - 200px);
  padding: 10px;
  overflow-wrap: anywhere;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.chatbot-content p {
  margin-bottom: 1rem;
}

.chatbot-content::-webkit-scrollbar {
  width: 12px;
}

.chatbot-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.chatbot-content::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 10px;
  transition: background 0.25s ease;
}

.chatbot-content.is-scrolling,
.chatbot-content:hover {
  scrollbar-color: rgba(9, 52, 58, 0.35) transparent;
}

.chatbot-content.is-scrolling::-webkit-scrollbar-thumb,
.chatbot-content:hover::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 214, 226, 0.55) 0%, rgba(0, 146, 152, 0.55) 100%);
  box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.25);
}

.chatbot-content > .clear-button-margin {
  margin-bottom: 40px;
}

.suggested-questions-container {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #FFFFFF;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  border-top: 1px solid #DEDEDE;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.suggested-questions-container::-webkit-scrollbar {
  display: none;
}

.suggested-question-button {
  padding: 8px 16px;
  background: #F5F5F5;
  border: 1px solid #DEDEDE;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #222;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.suggested-question-button:hover {
  background: #E8E8E8;
  border-color: #CCCCCC;
}

.suggested-question-button:active {
  background: #DDDDDD;
}

.chatbot-footer {
  box-sizing: border-box;
  padding: 10px;
  background: #F5F5F5;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.5s, max-height 0.5s;
  gap:6px;
  flex-wrap: nowrap;
  }

input.chat-input {
  flex-grow: 1;
  padding: 4px 22px;
  height: 34px;
  border: 1px solid #DEDEDE;
  border-radius: 4px;
  outline: 0;
  font-size: 14px;
  font-weight: 500;
  max-width: 346px;
  margin-right: 8px;
  min-width: 0;
}

.send-chat {
  background: url(https://staging.chatbot.ecbeing.io/data/images/chatbot/chatbot-send.png) center center / 20px auto no-repeat;
  border: none;
  cursor: pointer;
  width: 34px;
  height: 34px;
  position: relative;
  transition: opacity 0.2s ease;
  padding: 0;
  margin: 0;
}

.send-chat:hover {
  opacity: 0.8;
}

.send-chat:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.mic-chat:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.chatbot-message-user,
.chatbot-message-bot {
  max-width: 77%;
  padding: 12px;
  margin: 10px;
  border-radius: 8px;
  font-weight: bold;
  color: #222;
  line-height: 19px;
}

.chatbot-message-user {
  align-self: flex-end;
  margin: 15px 0 15px 170px;
  background: #F5F5F5;
}

.chatbot-message-bot {
  align-self: flex-start;
  margin: 15px 40px 15px 50px;
  position: relative;
  background: #B5EEF4;
}

.chatbot-message-bot ul,
.chatbot-message-bot ol {
  max-width: 100%;
  padding-left: 20px;
  margin: 8px 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.chatbot-message-bot li {
  margin: 4px 0;
}

.chatbot-message-bot.message-error {
  padding: 11px 11px 11px 46px;
  border: 1px solid #C11600;
  color: #C11600;
  background: url(https://staging.chatbot.ecbeing.io/data/images/chatbot/chatbot-error.png) top 11px left 11px / 24px auto no-repeat;
}

.chatbot-message-bot-icon {
  position: absolute;
  left: -44px;
  top: 0;
  width: 32px;
  height: 32px;
  margin-right: 12px;
  background: url(https://staging.chatbot.ecbeing.io/data/design/chatbot-icon.png) center center / 32px auto no-repeat;
}

/* Expression（表情）に応じたアイコンclass */
.chatbot-message-bot-icon-happy {
  background: url(https://staging.chatbot.ecbeing.io/data/design/chatbot-icon-happy.png) center center / 32px auto no-repeat;
}

.chatbot-message-bot-icon-sad {
  background: url(https://staging.chatbot.ecbeing.io/data/design/chatbot-icon-sad.png) center center / 32px auto no-repeat;
}

.chatbot-message-bot-icon-confused {
  background: url(https://staging.chatbot.ecbeing.io/data/design/chatbot-icon-confused.png) center center / 32px auto no-repeat;
}

.floating-buttons-container {
  position: relative;
  pointer-events: none;
  z-index: 1;
}

/* 小画面レイアウト時のユーティリティ用ドック（スクロールに追従しない配置） */
.chatbot-utility-dock {
  position: relative;
  pointer-events: none;
  z-index: 1;
}

.chatbot-to-top-button {
  display: none;
  position: absolute;
  bottom: 10px;
  right: 15px;
  background: #F5F5F5;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
}
.chatbot-to-top-button.show-powered-by {
  bottom: 10px;
}

.chatbot-loading {
  width: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/*!
* Load Awesome v1.1.0 (http://github.danielcardoso.net/load-awesome/)
* Copyright 2015 Daniel Cardoso <@DanielCardoso>
* Licensed under MIT
*/
.la-ball-pulse,
.la-ball-pulse > div {
    position: relative;
    -webkit-box-sizing: border-box;
       -moz-box-sizing: border-box;
            box-sizing: border-box;
}
.la-ball-pulse {
    display: block;
    font-size: 0;
}
.la-ball-pulse > div {
    display: inline-block;
    float: none;
    background-color: currentColor;
    border: 0 solid currentColor;
}
.la-ball-pulse {
    width: 54px;
    height: 18px;
    letter-spacing: 0;
}
.la-ball-pulse > div:nth-child(1) {
    -webkit-animation-delay: -200ms;
       -moz-animation-delay: -200ms;
         -o-animation-delay: -200ms;
            animation-delay: -200ms;
}
.la-ball-pulse > div:nth-child(2) {
    -webkit-animation-delay: -100ms;
       -moz-animation-delay: -100ms;
         -o-animation-delay: -100ms;
            animation-delay: -100ms;
}
.la-ball-pulse > div:nth-child(3) {
    -webkit-animation-delay: 0ms;
       -moz-animation-delay: 0ms;
         -o-animation-delay: 0ms;
            animation-delay: 0ms;
}
.la-ball-pulse > div {
    width: 10px;
    height: 10px;
    margin: 4px;
    border-radius: 100%;
    -webkit-animation: ball-pulse 1s ease infinite;
       -moz-animation: ball-pulse 1s ease infinite;
         -o-animation: ball-pulse 1s ease infinite;
            animation: ball-pulse 1s ease infinite;
}
/*
* Animation
*/
@-webkit-keyframes ball-pulse {
    0%,
    60%,
    100% {
        opacity: 1;
        -webkit-transform: scale(1);
                transform: scale(1);
    }
    30% {
        opacity: .1;
        -webkit-transform: scale(.01);
                transform: scale(.01);
    }
}
@-moz-keyframes ball-pulse {
    0%,
    60%,
    100% {
        opacity: 1;
        -moz-transform: scale(1);
             transform: scale(1);
    }
    30% {
        opacity: .1;
        -moz-transform: scale(.01);
             transform: scale(.01);
    }
}
@-o-keyframes ball-pulse {
    0%,
    60%,
    100% {
        opacity: 1;
        -o-transform: scale(1);
           transform: scale(1);
    }
    30% {
        opacity: .1;
        -o-transform: scale(.01);
           transform: scale(.01);
    }
}
@keyframes ball-pulse {
    0%,
    60%,
    100% {
        opacity: 1;
        -webkit-transform: scale(1);
           -moz-transform: scale(1);
             -o-transform: scale(1);
                transform: scale(1);
    }
    30% {
        opacity: .1;
        -webkit-transform: scale(.01);
           -moz-transform: scale(.01);
             -o-transform: scale(.01);
                transform: scale(.01);
    }
}

.feedback-container {
	margin-top: 10px;
}

.feedback-button {
  display: inline-block;
  cursor: pointer;
	margin-left: 15px;
  opacity: 0.3;
  width: 18px;
  height: 18px;
  background-size: cover;
	transition: opacity 0.3s ease;
}

.feedback-button.good {
  background-image: url('https://staging.chatbot.ecbeing.io/data/images/chatbot/feedback-good.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center; 
}

.feedback-button.bad {
  background-image: url('https://staging.chatbot.ecbeing.io/data/images/chatbot/feedback-bad.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center; 
}

.feedback-button.selected {
  opacity: 0.8;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.question-choice-container {
  width: 100%;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

/* よくある質問を見るボタンのコンテナ */
.chatbot-faq-button-container {
  display: flex;
  justify-content: flex-start;
  align-self: flex-start;
  width: 100%;
  max-width: 77%;
  margin: 10px 40px 10px 50px;
  padding: 0;
}

.chatbot-faq-button-container .question-choice {
  width: 100%;
  margin: 0;
  padding: 8px 16px;
  text-align: center;
}

.question-choice {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin: 10px auto 5px;
  padding: 8px;
  width: 100%;
  background-color: #FFF;
  border: 1px solid #DEDEDE;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  outline: 0;
  font-size: 14px;
  font-weight: bold;
}

.question-choice:first-child {
  margin-left: 0;
}

.question-choice:last-child {
  margin-right: 0;
}

.question-choice.selected,
.question-choice:hover {
  background-color: #dcdcdc;
  cursor: pointer;
  box-shadow: 0 0 0 0;
}

.question-choice.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.clear-conversation-button {
  position: absolute;
  bottom: 10px;
  left: 15px;
  width: auto;
  min-width: 30px;
  height: 30px;
  border-radius: 15px;
  background-color: #F5F5F5;
  background-size: 13px;
	background-repeat: no-repeat;
	background-position: center; 
  padding: 0;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
}
.clear-conversation-button.show-powered-by {
  bottom: 10px;
}

.clear-conversation-button.with-text {
	background-position: center;
}

.clear-conversation-button span {
  font-size: 12px;
  font-weight: bold;
  margin-left: 8px;
  margin-right: 8px;
}

.mic-chat {
  background: url('https://staging.chatbot.ecbeing.io/data/images/chatbot/chatbot-mic.png') center center / 20px auto no-repeat;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  margin-right: 5px;
  flex:0 0 20px;
}

@media screen and (max-width: 800px) {
  .chatbot-container {
    bottom: env(safe-area-inset-bottom);
    right: 10px;
    width: 150px;
    max-width: calc(100% - 20px);
    border-radius: 5px 5px 0 0;
    font-size: 13px;
    transition: transform 0.5s, width 0.5s, background 0.5s, max-height 0.2s;
    transform: translateY(calc(100% - 72px));
  }

  .chatbot-content p{
    margin-bottom: 1rem;
  }

  .chatbot-container.is-open {
    width: calc(100vw - 20px);
  }

  .chatbot-container .chatbot-frame {
    width: calc(100vw - 20px);
    transition: none;
  }

  .chatbot-header {
    align-items: center;
    padding: 47px 15px 8px;
    font-size: 13px;
    font-weight: bold;
    line-height: 17px;
    background-position: top 8px center;
  }

  .is-open .chatbot-header {
    padding: 8px 15px 8px 62px;
    align-items: flex-start;
    background-position: center left 15px;
  }

  .chatbot-disclaimer {
    font-size: 10px;
    line-height: 12px;
    white-space: nowrap;
    padding: 0;
  }

  .is-open .chatbot-disclaimer {
    padding-top: 3px;
    max-height: 15px;
  }

  .chatbot-content {
    max-height: 60vh;
  }
  
  .chatbot-content::-webkit-scrollbar {
    width: 10px;
  }

  .chatbot-content::-webkit-scrollbar-thumb {
    background: transparent;
  }

  .chatbot-content.is-scrolling::-webkit-scrollbar-thumb,
  .chatbot-content:hover::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 214, 226, 0.55) 0%, rgba(0, 146, 152, 0.55) 100%);
  }
  
  input.chat-input {
    padding: 4px 12px;
    height: 30px;
    font-size: 16px;
    transform: scale(0.95);
    max-width: none;
    min-width:0;
    margin-right: 2px;
  }
  
  .send-chat {
    width: 30px;
    height: 30px;
    flex:0 0 20px;
    margin-right: 7px;
  }

  .mic-chat{
    margin-right: 10px;
  }
  
  .chatbot-message-user,
  .chatbot-message-bot {
    max-width: 80%;
    padding: 8px;
    border-radius: 5px;
  }
  
  .chatbot-message-user {
    margin: 10px 0 10px 80px;
  }
  
  .chatbot-message-bot {
    margin: 10px 30px 10px 40px;
  }

  .chatbot-message-bot ul,
  .chatbot-message-bot ol {
    padding-left: 18px;
    margin: 6px 0;
  }

  .chatbot-message-bot li {
    margin: 3px 0;
  }

  .chatbot-message-bot.message-error {
    padding: 7px 7px 7px 38px;
    background-position: top 7px left 7px;
    background-size: 24px auto;
    background-repeat: no-repeat;
  }
  
  .chatbot-message-bot-icon {
    left: -40px;
    margin-right: 8px;
  }

  .chatbot-pc-only {
    display: none;
  }

	.feedback-container {
		margin-top: 15px;
		margin-bottom: 5px;
		text-align: center!important;
	}

  .feedback-button {
		margin: 0 15%;
    width: 20px;
    height: 20px;
  }

  /* よくある質問を見るボタンのコンテナ - スマホ用 */
  .chatbot-faq-button-container {
    max-width: 80%;
    margin: 10px 30px 10px 40px;
  }
}

@media screen and (min-width: 801px) {
  .chatbot-sp-only {
    display: none;
  }
}

@media print{.chatbot-container{display: none;}} /* 印刷時にチャットボット非表示 */

.chatbot-content.recording,
.chatbot-footer.recording {
  position: relative;
}

.chatbot-content.recording::before,
.chatbot-footer.recording::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.mic-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1001;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(3px);
  overflow: hidden;
}

body.mic-active {
  overflow: hidden;
}

.mic-content {
  border-radius: 10px;
  padding: 25px;
  width: 90%;
  max-width: 450px;
  text-align: center;
  color: #fff;
  position: relative;
  border: 0px;
  overflow-y: hidden;
}

.mic-close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: transparent;
  border: 0px;
  color: #ccc;
  font-size: 25px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s;
}

.mic-close-button:hover {
  background-color: #f5f5f5;
}

.mic-instruction {
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: bold;
}

.mic-text-display {
  background-color: transparent;
  padding: 15px;
  margin-bottom: 25px;
  min-height: 50px;
  word-break: break-all;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  border: 0px;
}

.mic-icon-animated {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 25px 0;
  height: 60px;
}

.mic-icon-animated .bar {
  width: 6px;
  height: 50px;
  background-color: #fff;
  border-radius: 3px;
  transform-origin: center;
  transition: transform 0.1s ease;
}

.mic-submit-button {
  background-color: transparent;
  color: #fff;
  border: 1px solid #fff;
  border-radius: 25px;
  padding: 12px 25px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  margin-top: 15px;
  transition: background-color 0.3s;
}

.mic-submit-button:hover {
  background-color: #fff;
  color: #333;
  border: none;
  transition: background-color 0.3s;
}

@media screen and (max-width: 800px) {
  .mic-content {
    width: 90%;
    padding: 20px;
  }
  
  .mic-text-display {
    font-size: 15px;
    min-height: 40px;
    margin-bottom: 5px;
    padding: 12px;
  }
  
  .mic-icon-animated {
    height: 50px;
    margin: 5px 0;
  }
  
  .mic-icon-animated .bar {
    height: 20px;
    width: 5px;
  }
  
  .mic-submit-button {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Chatbot Answer Reference (common) */
.chatbot-reference-title {
  color: #666;
  font-size: 0.9em;
  margin-top: 1em;
}

.chatbot-reference-container {
  margin-top: 10px;
  font-size: 0.9rem;
}

/* Chatbot Answer Reference (number_mode) */
.chatbot-reference-number-mode-container {
  display: flex;
  margin-top: 10px;
  align-items: center;
  margin-top: 1em;
}

.chatbot-reference-number-mode-url-title {
color: #666;
font-size: 14px;
margin-top: 0;
margin-right: 10px;
}

.chatbot-reference-number-mode-numbers {
display: flex;
gap: 7px;
}

.chatbot-reference-number-mode-number {
font-size: 12px;
padding: 0 4px;
border: 1px solid #d1d1d1;
border-radius: 4px;
color: #009298;
background-color: white;
text-decoration: none;
}

@media screen and (max-width: 800px) {
  .chatbot-reference-number-mode-numbers {
    gap: 15px;
  }

  .chatbot-reference-number-mode-number {
    padding: 5px 10px;
  }
}

@media screen and (max-width: 410px) {
  .chatbot-reference-number-mode-numbers {
    gap: 5px;
  }

  .chatbot-reference-number-mode-number {
    padding: 5px 8px;
  }
}

/* Chatbot Answer Reference (url_list) */
.chatbot-reference-url-list-mode-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-left: 15px;
  margin: 10px 0 0 0;
}

.chatbot-reference-url-list-mode-item {
  margin-left: 10px;
  word-break: break-all;
}

.chatbot-reference-url-list-mode-link {
  color: #0066cc;
  text-decoration: underline;
  line-height: 1.4;
}

/* Chatbot Answer Reference (ogp_full) */
.chatbot-reference-ogp-full-mode-item {
  display: flex;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  padding: 6px;
  margin-top: 6px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s;
  overflow: hidden;
  background-color: #f8f8f8;
}

.chatbot-reference-ogp-full-mode-item:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.chatbot-reference-ogp-full-mode-image {
  flex: 0 0 50px;
  height: 50px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 4px;
  background-color: #f5f5f5;
}

.chatbot-reference-ogp-full-mode-image.no-image {
  background-color: #f0f0f0;
  background-image: url('https://staging.chatbot.ecbeing.io/data/images/chatbot/noimage.png');
  position: relative;
}

.chatbot-reference-ogp-full-mode-content {
  flex: 1;
  margin-left: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  justify-content: center;
}

.chatbot-reference-ogp-full-mode-content-title {
  font-weight: bold;
  margin-bottom: 2px;
  line-height: 1.1;
  font-size: 0.80rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.chatbot-reference-ogp-full-mode-content-description {
  font-size: 0.7rem;
  line-height: 1.2;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

/* Chatbot Answer Reference (ogp_title) */
.chatbot-reference-ogp-title-mode-item {
  display: block;
  margin-top: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease;
}

.chatbot-reference-ogp-title-mode-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chatbot-reference-ogp-title-mode-content {
  padding: 5px 10px;
  background-color: #f8f8f8;
}

.chatbot-reference-ogp-title-mode-content-title {
  font-weight: 500;
  font-size: 0.95em;
  line-height: 1.4;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* CSS for the audio play button */
.audio-container {
  text-align: right;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
}
.audio-play-button {
  background-color: #FFF;
  border: 1px solid #DEDEDE;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.audio-play-button-icon {
  background-image: url('https://staging.chatbot.ecbeing.io/data/images/chatbot/audio-operator.svg');
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat; 
  background-position: center;
  flex-shrink: 0;
}

/* Powered by section */
.chatbot-powered-by {
  background: #ffffff;
  border-top: 1px solid #ddd;
  padding: 3px;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.chatbot-powered-by a {
  display: flex;
}

.chatbot-powered-by .powered-by-text {
  font-size: 9px;
  color: #afafaf;
  line-height: 19px;
  vertical-align: middle;
}

.chatbot-powered-by .powered-by-logo {
  height: 13px;
}

.chatbot-powered-by a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.chatbot-powered-by .powered-by-logo {
  width: 140px;
  height: 19px;
  background-image: url('https://staging.chatbot.ecbeing.io/data/images/chatbot/ai-digital-staff-gray.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.chatbot-goods-button,
.chatbot-goods-button-content,
.chatbot-products-panel {
  display: none;
}

/* MessageBlock スタイル */
.chatbot-message-content {
  display: inline-block;
  max-width: 100%;
}

.chatbot-message-block {
  margin: 0;
}

.chatbot-message-block-spacer {
  height: 0.75em;
}

.chatbot-message-block-text {
  white-space: pre-wrap;
}

/* MessageBlock Info スタイル */
.chatbot-message-block-info {
  margin: 0.75em 0;
}

.chatbot-message-block-info-goods {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
}

.chatbot-goods-info-item {
  scroll-snap-align: start;
  flex: 0 0 200px;
  background: #fff;
  border-radius: 4px;
  padding: 10px;
  border: 1px solid #ededed;
  margin: 1em 0;
}

.chatbot-visumo-post-item {
  margin: 1em 0;
}

.chatbot-goods-info-item img,
.chatbot-visumo-post-item img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.5em 0;
}

.chatbot-goods-info-item p,
.chatbot-visumo-post-item p {
  margin: 0.5em 0;
}

.chatbot-goods-info-item blockquote {
  margin: 0.5em 0;
  padding-left: 1em;
  border-left: 3px solid #ddd;
  color: #666;
}

.chatbot-goods-rating {
  color: #f39c12;
  margin: 0.25em 0;
}

.chatbot-visumo-details {
  color: #666;
  font-size: 0.9em;
  margin: 0.25em 0;
}

.chatbot-visumo-description {
  margin: 0.5em 0;
}

.chatbot-message-block-info hr {
  margin: 1em 0;
  border: none;
  border-top: 1px solid #ddd;
}

/* PatternAnswer用スタイル */
.chatbot-message-block-info-pattern-answer {
  /* PatternAnswerはHTML形式のため、基本的なテキストフォーマットを適用 */
  line-height: 1.6;
}

.chatbot-message-block-info-pattern-answer p {
  margin: 0.5em 0;
}

.chatbot-message-block-info-pattern-answer p:first-child {
  margin-top: 0;
}

.chatbot-message-block-info-pattern-answer p:last-child {
  margin-bottom: 0;
}

/* ローディングインジケーター */
.chatbot-loading-indicator {
  color: #999;
  font-style: italic;
  padding: 0.5em 0;
}

.chatbot-loading-error {
  color: #d9534f;
  font-style: italic;
  padding: 0.5em 0;
}

/* 商品リンク（C#サニタイズ処理に対応） */
a.chatbot-goods {
  display: block;
  color: #0066cc;
  text-decoration: none;
}

a.chatbot-goods:hover {
  text-decoration: underline;
}

/* ===== Visumo Media Post スタイル (chatbot-visumo- プレフィックス) ===== */

/* Visumo投稿ヘッダー */
.chatbot-visumo-post-header {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.chatbot-visumo-badge {
  display: inline-block;
  padding: 4px 12px;
  background-color: #222;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 3px;
}

/* Visumoカルーセル */
.chatbot-visumo-carousel-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 8px 0;
}

.chatbot-visumo-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #f5f5f5;
}

.chatbot-visumo-carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-visumo-carousel-item.active {
  opacity: 1;
}

.chatbot-visumo-carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* カルーセルボタン */
.chatbot-visumo-carousel-prev,
.chatbot-visumo-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 0px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    z-index: 2;
}
.chatbot-visumo-carousel-prev::after,
.chatbot-visumo-carousel-next::after {
    content: " ";
    border-top: 1px solid #000;
    border-right: 1px solid #000;
    display: block;
    width: 7px;
    height: 7px;
    transform: rotate(-135deg);
}
.chatbot-visumo-carousel-next::after {
    transform: rotate(45deg);
}

.chatbot-visumo-carousel-prev {
  left: 8px;
}

.chatbot-visumo-carousel-next {
  right: 8px;
}

/* カルーセルインジケーター */
.chatbot-visumo-carousel-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.chatbot-visumo-carousel-indicators span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.2s ease, width 0.2s ease;
}

.chatbot-visumo-carousel-indicators span.active {
  background-color: rgba(255, 255, 255, 0.9);
  width: 24px;
  border-radius: 4px;
}

/* Visumo情報行 */
.chatbot-visumo-info-line {
  margin: 8px 0;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

/* Visumo説明文 */
.chatbot-visumo-description {
  margin: 8px 0;
}

.chatbot-visumo-description-text {
  margin: 0;
  line-height: 1.6;
  color: #222;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  text-overflow: ellipsis;
}

.chatbot-visumo-description-text.expanded {
  -webkit-line-clamp: unset;
  display: block;
}

.chatbot-visumo-description-toggle {
  margin-top: 6px;
  padding: 4px 12px;
  background-color: #f5f5f5;
  border: 1px solid #dedede;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #222;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.chatbot-visumo-description-toggle:hover {
  background-color: #e8e8e8;
}

/* Visumo関連商品ボタン */
.chatbot-visumo-related-products-button {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 16px;
  background-color: #fff;
  border: 1px solid #dedede;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.chatbot-visumo-related-products-button:hover {
  background-color: #f5f5f5;
  border-color: #cccccc;
}

/* レスポンシブ: スマホ用 */
@media screen and (max-width: 800px) {
  .chatbot-visumo-description-text {
    -webkit-line-clamp: 2;
  }

  .chatbot-visumo-carousel-prev,
  .chatbot-visumo-carousel-next {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .chatbot-visumo-carousel-indicators span {
    width: 6px;
    height: 6px;
  }

  .chatbot-visumo-carousel-indicators span.active {
    width: 18px;
  }
}

/* Visumoオーバーレイパネル (通常モード用) - chatbot-frame内に収まるサイズ */
.chatbot-visumo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
}

.chatbot-visumo-overlay.open {
  display: flex;
}

.chatbot-visumo-overlay-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.chatbot-visumo-overlay-panel {
  position: relative;
  background-color: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 85%;
  max-width: 500px;
  max-height: 70%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.chatbot-visumo-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.chatbot-visumo-overlay-title {
  font-size: 18px;
  font-weight: bold;
  color: #222;
}

.chatbot-visumo-overlay-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.chatbot-visumo-overlay-close:hover {
  color: #222;
}

.chatbot-visumo-related-overlay {
  z-index: 2001;
}

.chatbot-visumo-overlay-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* 関連商品カルーセル */
.chatbot-visumo-related-carousel-container {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.chatbot-visumo-related-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.chatbot-visumo-related-carousel-item {
  display: none;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
}

.chatbot-visumo-related-carousel-item.active {
  display: flex;
}

.chatbot-visumo-related-carousel-item .chatbot-visumo-product-card {
  max-width: 320px;
  width: 100%;
}

.chatbot-visumo-related-carousel-prev,
.chatbot-visumo-related-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: #333;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 10;
}

.chatbot-visumo-related-carousel-prev {
  left: 10px;
}

.chatbot-visumo-related-carousel-next {
  right: 10px;
}

.chatbot-visumo-related-carousel-prev:hover,
.chatbot-visumo-related-carousel-next:hover {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.chatbot-visumo-related-carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.chatbot-visumo-related-carousel-indicators span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.chatbot-visumo-related-carousel-indicators span.active {
  background-color: #fff;
  border-color: #333;
}

.chatbot-visumo-product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #dedede;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
  background-color: #fff;
}

.chatbot-visumo-product-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chatbot-visumo-product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background-color: #f5f5f5;
}

.chatbot-visumo-product-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chatbot-visumo-product-name {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chatbot-visumo-product-price-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chatbot-visumo-product-price {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.chatbot-visumo-product-price-original {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
}

.chatbot-visumo-product-price-sale {
  color: #d9534f;
}