@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-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://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://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-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;
}

.chatbot-content::-webkit-scrollbar {
  width: 8px;
}

.chatbot-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.chatbot-content::-webkit-scrollbar-thumb {
  background: #888;
}

.chatbot-content::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.chatbot-content {
  scrollbar-width: thin;
  scrollbar-color: #888 #f1f1f1;
}

.chatbot-content > .clear-button-margin {
  margin-bottom: 40px;
}

.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://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;
}

.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.message-error {
  padding: 11px 11px 11px 46px;
  border: 1px solid #C11600;
  color: #C11600;
  background: url(https://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://chatbot.ecbeing.io/data/images/chatbot/chatbot-icon.png) center center / 32px auto no-repeat;
}

.chatbot-to-top-button {
  display: none;
  position: absolute;
  bottom: 60px;
  right: 15px;
  background: #F5F5F5;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
}
.chatbot-to-top-button.show-powered-by {
  bottom: 90px;
}

.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://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://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;
}

.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: 60px;
  left: 15px;
  width: auto;
  min-width: 30px;
  height: 30px;
  border-radius: 15px;
  background-color: #F5F5F5;
  background-image: url('https://chatbot.ecbeing.io/data/images/chatbot/chatbot-clear-conversation.svg');
  background-size: 13px;
	background-repeat: no-repeat;
	background-position: center; 
  padding: 0;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  bottom: 60px;
}
.clear-conversation-button.show-powered-by {
  bottom: 90px;
}

.clear-conversation-button.with-text {
	background-position: left 7.5px center;
}

.clear-conversation-button span {
  font-size: 12px;
  font-weight: bold;
  margin-left: 25px;
  margin-right: 8px;
}

.mic-chat {
  background: url('https://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-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: 4px;
  }
  
  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.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;
  }
}

@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://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://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://chatbot.ecbeing.io/data/images/chatbot/ai-digital-staff-gray.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}