/* ==========================================================================
   KNET AI Chat Widget
   色を変更したい場合は .kc-chat-widget の CSS変数を編集してください
   ========================================================================== */
.kc-chat-widget,
.kc-chat-widget * {
  font-family: var(--kc-font-family);
}

.kc-chat-widget {
  text-align: left;
  --kc-primary: #556c9fe6;
  --kc-primary-dark: #476495;
  --kc-bg: #1F304E;
  --kc-header-color: white;
  --kc-bot-bubble-bg: #f1f3f5;
  --kc-bot-bubble-color: #222222;
  --kc-user-bubble-bg: #1F304E;
  --kc-user-bubble-color: white;
  --kc-error-bg: #fdecea;
  --kc-error-color: #b3261e;
  --kc-radius: 16px;
  --kc-z-index: 989;
  --kc-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}

/* ----- フローティングバブル ----- */
.kc-chat-widget .kc-chat__bubble {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 7em;
  height: 7em;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: var(--kc-primary);
  background-image: var(--kc-chat-icon, none);
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
  z-index: var(--kc-z-index);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(40px);
  transition: opacity .7s ease, transform .7s cubic-bezier(0.22, 1, 0.36, 1), visibility .7s;
}
.kc-chat-widget .kc-chat__bubble.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.kc-chat-widget .kc-chat__bubble.is-visible.is-open{
  width: 4em;
  height: 4em;
  background-color: #1F304E;
}

.kc-chat-widget .kc-chat__bubble:hover {
  transform: scale(1.06);
}
.kc-chat-widget .kc-chat__bubble-close {
  display: none;
  font-size: 28px;
  line-height: 1;
}
.kc-chat-widget .kc-chat__bubble.is-open {
  background-image: none;
}
.kc-chat-widget .kc-chat__bubble.is-open .kc-chat__bubble-close {
  display: block;
}
.kc-chat__footer-note{
  display:block;
  font-size: 0.8rem;
  color: #ccc;
  padding-inline:1rem;
  padding-block-end:0.4rem;
  height: 3em;
  align-content: center;
}

/* ----- 吹き出し（ツールチップ） ----- */
.kc-chat-widget .kc-chat__tooltip {
  position: fixed;
  right: 1.4em;
  bottom: 11em;
  max-width: 9em;
  text-align: justify;
  padding: .75em .7em;
  background: #fff;
  color: #333;
  font-size: 13px;
  line-height: 1.6;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
  z-index: var(--kc-z-index);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  cursor: pointer;
  transform: translateY(24px);
  transition: opacity .7s ease .15s, transform .7s cubic-bezier(0.22, 1, 0.36, 1) .15s, visibility .7s .15s;
}
.kc-chat-widget .kc-chat__tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  z-index: calc(var(--kc-z-index)  - 1);
  line-height:1.4;
}
.kc-chat-widget .kc-chat__tooltip::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 1.4rem;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 8px 0 8px;
  border-color: #fff transparent transparent transparent;
}

/* ----- チャットウィンドウ ----- */
.kc-chat-widget .kc-chat {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 24rem;
  height: clamp(27rem, 7.308rem + 30.77vw, 35rem);
  max-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--kc-bg);
  border-radius: var(--kc-radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
  z-index: var(--kc-z-index);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.kc-chat-widget .kc-chat.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ヘッダー */
.kc-chat-widget .kc-chat__header {
  display: flex;
  align-items: center;
  gap: .6em;
  padding: .8em 1em;
  background: var(--kc-primary);
  color: var(--kc-header-color);
  flex-shrink: 0;
}
.kc-chat-widget .kc-chat__header-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-image: var(--kc-chat-icon, none);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}
.kc-chat-widget .kc-chat__header-title {
  flex: 1;
  font-weight: bold;
  font-size: .95em;
}
.kc-chat-widget .kc-chat__reset,
.kc-chat-widget .kc-chat__close {
  padding: 0 .2em;
  border: none;
  background: none;
  color: var(--kc-header-color);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.kc-chat-widget .kc-chat__reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kc-chat-widget .kc-chat__reset-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

/* メッセージ一覧 */
.kc-chat-widget .kc-chat__messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .8em;
  padding: 1em;
  overflow-y: auto;
  background: #fafafa;
}

/* メッセージ行 */
.kc-chat-widget .kc-msg {
  margin-block-start:0.25em;
  display: flex;
  align-items: flex-start;
  gap: .5em;
  max-width: 100%;
}
.kc-chat-widget .kc-msg--user {
  flex-direction: row-reverse;
}
.kc-chat-widget .kc-msg__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
}
.kc-chat-widget .kc-msg__bubble {
  max-width: calc(100% - 38px);
  width: 100%;
}
.kc-chat-widget .kc-msg__content {
  padding: .6em .9em;
  border-radius: var(--kc-radius);
  font-size: .9em;
  line-height: 1.7;
  word-break: break-word;
}
.kc-chat-widget .kc-msg--bot .kc-msg__content {
  background: var(--kc-bot-bubble-bg);
  color: var(--kc-bot-bubble-color);
  border-bottom-left-radius: 4px;
}
.kc-chat-widget .kc-msg--user .kc-msg__content {
  background: var(--kc-user-bubble-bg);
  color: var(--kc-user-bubble-color);
  border-bottom-right-radius: 4px;
}
.kc-chat-widget .kc-msg--error .kc-msg__content {
  background: var(--kc-error-bg);
  color: var(--kc-error-color);
}

/* メッセージ内要素（今後 img / a / button などが増えてもここに追記すれば対応可） */
.kc-chat-widget .kc-msg__content p {
  margin: 0 0 .6em;
  display: block;
}
.kc-chat-widget .kc-msg__content b{
  display: block; 
  font-weight: bold;
}
.kc-chat-widget .kc-msg__content a[href]{
  font-weight: bold;
}
.kc-chat-widget .kc-msg__content .kc-chat-contact_message{
   display: block; 
   margin-block: 0.75em;
   background: #ffffffe4;
   padding:0.75em;

   a{
    padding-inline:0.5em;
   }
}
.kc-chat-widget .kc-msg__content p:last-child {
  margin-bottom: 0;
}
.kc-chat-widget .kc-msg__content a {
  color: var(--kc-primary-dark);
  text-decoration: underline;
}
.kc-chat-widget .kc-msg__content img {
  max-width: 100%;
  border-radius: 8px;
  margin: .4em 0;
}
.kc-chat-widget .kc-msg__content hr {
  margin: 1em;
  border: none;
  border-top: 1px dotted rgb(97 95 95 / 50%);
}
.kc-chat-widget .kc-msg__content ul,
.kc-chat-widget .kc-msg__content ol {
  margin: .4em 0 .4em 1.2em;
  padding: 0;
}
.kc-chat-widget .kc-msg__content code {
  padding: .1em .3em;
  border-radius: 4px;
  background: rgba(0, 0, 0, .06);
  font-size: .85em;
}
.kc-chat-widget .kc-msg__content pre {
  padding: .6em;
  border-radius: 8px;
  background: rgba(0, 0, 0, .06);
  overflow-x: auto;
}

/* 回答内のFAQ用ボタン（data-message） */
.kc-chat-widget .kc-msg__content button {
  display: inline-block;
  margin:0.25em;
  padding: .4em .9em;
  border: 1px solid var(--kc-primary);
  border-radius: 0;
  background: #fff;
  color: var(--kc-primary-dark);
  font-size: inherit;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
  text-align: start;
}
/* .kc-chat-widget .kc-msg__content button {
  display:block;
} */
.kc-chat-widget .kc-msg__content button:hover {
  background: var(--kc-primary);
  color: #fff;
}


/* タイピングインジケーター */
.kc-chat-widget .kc-typing {
  display: inline-flex;
  align-items: center;
  gap: .25em;
}
.kc-chat-widget .kc-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #999;
  animation: kc-typing-blink 1.2s infinite ease-in-out;
}
.kc-chat-widget .kc-typing span:nth-child(2) {
  animation-delay: .2s;
}
.kc-chat-widget .kc-typing span:nth-child(3) {
  animation-delay: .4s;
}
@keyframes kc-typing-blink {
  0%, 80%, 100% { opacity: .3; transform: scale(.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* 入力フォーム（FAQ専用のため非表示。DOM自体は残す。JS(chat.js)がinputEl/formEl/sendBtnをnullチェックなしで参照しているため削除は不可） */
.kc-chat-widget .kc-chat__form {
  display: none;
  gap: .5em;
  padding-inline: .6em;
  padding-block: .6em 0.2em;
  border-top: 1px solid #eee;
  background: var(--kc-bg);
  flex-shrink: 0;
}
.kc-chat-widget .kc-chat__input {
  flex: 1;
  padding: .6em 1em;
  border: 1px solid #ddd;
  border-radius: 999px;
  font-size: .9em;
  outline: none;
}
.kc-chat-widget .kc-chat__input:focus {
  border-color: var(--kc-primary);
}
.kc-chat-widget .kc-chat__input:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}
.kc-chat-widget .kc-chat__send {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: var(--kc-primary);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.kc-chat-widget .kc-chat__send:disabled {
  opacity: .5;
  cursor: default;
}

/* ----- モバイル：全画面オーバーレイ ----- */
@media (max-width: 600px) {
  .kc-chat-widget .kc-chat {
    left: 0;
    right: 0;
    top: 66px;
    bottom:80px;
    width: 100%;
    height: auto;
    max-height: none;
    border-radius: 0;
    transform: translateY(100%);
  }
  .kc-chat-widget .kc-chat.is-open {
    transform: translateY(0);
  }
  .kc-chat-widget .kc-chat__bubble {
    right: 16px;
    bottom: 5.5rem;
  }
  .kc-chat-widget .kc-chat__tooltip {
    right: 8px;
    bottom: calc(5.5rem + 9em);
  }
  .kc-chat-widget .kc-chat__tooltip::after {
    right: 2.2em;
  }
}

/* ボックス内表示に関するCSS */
.chat-contact-box{
  span{display:block;font-size:0.8em}
  .botlink{display:block;font-weight:bold;font-size:1.05em;}
}
.kc-msg__bubble .kc-msg__content p.chat-contact-box {
    margin-inline: 1rem;
    padding-block: 1em;
    margin-block-start: 2rem;
    padding-inline: 1.5em;
    border: 1px dotted rgb(97 95 95 / 50%);
}

.kc-msg__content p:nth-child(1) {display:block;margin-block-end:0.5em}

.kc-chat-widget .kc-msg__content .kc-chat-point{
	padding-block:0.75rem;
	font-weight:bold;
	p:nth-child(1) {display: block;margin-block-end: unset;}
	a[href]{transition:0.3s ease-in-out;padding-inline:0.25rem;display:inline-block;}
	a[href]::after{content:"(詳しく見る)"; padding-inline-start:0.25rem;font-size:0.75rem;display:inline-block}
	a[href]:hover{background-color: var(--kc-primary-dark);color: #fff;}
}
/* お墓じまい費用テーブル用 */
.kc-hakazimai-money {
  width: 100%;
  max-width: 100%;
  margin: 6px 0;
  padding: 10px 6px; 
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Meiryo", sans-serif;
  box-sizing: border-box;
}

/*見出し */
.kc-hakazimai-money .title {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  text-align: center; 
}


.kc-hakazimai-money .lead-text {
  margin: 0 0 10px 0;
  font-size: 12px;
  font-weight: 600;      
  color: #1e293b;        
  line-height: 1.5;
  letter-spacing: -0.02em;
  text-align: center; 
}


.kc-hakazimai-money .table-grid {
  display: grid;
  grid-template-columns: 0.95fr 0.95fr 1.25fr;
  width: 100%;
  border-top: 1px solid #cbd5e1;
  border-left: 1px solid #cbd5e1;
  border-radius: 4px;
  overflow: hidden;
  box-sizing: border-box;
}

.kc-hakazimai-money .cell {
  padding: 8px 2px;         
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;       
  font-size: 11.5px;        
  font-weight: 600;
  color: #1e293b;
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  box-sizing: border-box;
}


.kc-hakazimai-money .cell.header {
  background-color: #f1f5f9;
  font-size: 11px;         
  font-weight: 700;
  color: #0f172a;
}


.kc-hakazimai-money .cell.price {
  color: #b91c1c;
  font-weight: 700;
  font-size: 11.5px;
}


.kc-hakazimai-money .cell.quote {
  font-weight: 600;
  color: #475569;
}