@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/*2025/5/19 タブのスキンカラー変更 start */
#index-tab-1:checked~.index-tab-buttons .index-tab-button[for=index-tab-1], 
#index-tab-2:checked~.index-tab-buttons .index-tab-button[for=index-tab-2], 
#index-tab-3:checked~.index-tab-buttons .index-tab-button[for=index-tab-3], 
#index-tab-4:checked~.index-tab-buttons .index-tab-button[for=index-tab-4] {
  background-image: repeating-linear-gradient(90deg,
    #b9d3e5 0%,#b9d3e5 50%,#bce4d2 50%,#bce4d2 100%);
  border:1px solid #b9d3e5;
  color:#1b4868;
}
.index-tab-buttons .index-tab-button {
  border-color: #b9d3e5;
  color:#1b4868;
}
/*2025/5/19 タブのスキンカラー変更 end */

/*2025/5/27 見出しの色変更 start */
.article h2 {
  background-image: repeating-linear-gradient(
    90deg, 
    #3A5B52 0%, 
    #3A5B52 50%, 
    #3A5B52 50%, 
    #3A5B52 100%);
 color: white;
}
.article h2::before {
  background: #3A5B52;
  color: white;
}
.article h2::after {
  background: #3A5B52;
  color: white;
}
/*2025/5/27 見出しの色変更 end */

/* 2025/5/19 グローバルメニューの色変更 start */
.navi-in>ul>li:nth-of-type(3n + 1) {
  border-bottom: ridge 3px #f7ca00;
}
.navi-in>ul>li:nth-of-type(3n + 2) {
  border-bottom: ridge 3px #ff0010;
}
.navi-in>ul>li:nth-of-type(3n + 3) {
  border-bottom: ridge 3px #009e1c;
}
/* 2025/5/19 グローバルメニューの色変更 end */

/* 2025/5/22 目次の背景色と文字色を変更 start */
.toc-title {
  background-color: #91BA58;
  color: #7c7c7c;
}
.article .toc .toc-content {
  border: 2px solid #91BA58;
}
/* 2025/5/22 目次の背景色と文字色を変更 end */


/* 2025/6/9 ▼ ChatGPTチャットエリアの見た目 */
/* 中央レイアウト */
#rag-chat-wrapper {
  display: flex;
  justify-content: center;
  padding: 20px;
}
#rag-chat {
  display: flex;
  flex-direction: column;
  height: 90vh; /* 全体の高さ */
  max-width: 1024px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
  background: #fafffb;
  border-radius: 10px;
  overflow: hidden;
}

/* 吹き出し */
.chat-row {
  display: flex;
  align-items: flex-start;
  margin: 10px 0;
  max-width: 100%;
}
.chat-row.user { flex-direction: row-reverse; }
.chat-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 80%;
  font-size: 0.95em;
  line-height: 1.5;
}
.chat-row.user .chat-bubble {
  background: #e0f7f4;
  border-top-right-radius: 0;
}
.chat-row.bot .chat-bubble {
  background: #fff;
  border: 1px solid #ddd;
  border-top-left-radius: 0;
}

/* 吹き出し内テキストカラー（共通） */
.chat-bubble {
  color: #008c74; /* 深めのSaunaAIグリーン */
}

/* 読み込み中テキスト */
.loading-text {
  color: #00a68a; /* やや明るめ */
}


/* アイコン */
.chat-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin: 0 8px;
}

/* ローディングスピナー */
.spinner-logo img {
  width: 28px;
  height: 28px;
  animation: spin 1.2s linear infinite;
}
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
#chat-loading {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.loading-text {
  font-size: 0.9em;
  color: #555;
}

/* 下固定入力エリア */
#chat-input-area {
  flex-shrink: 0;
  margin-bottom: 12px;
}

/* テキストエリア */
#chat-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  resize: none;
  overflow-y: auto;
  min-height: 44px;
  box-sizing: border-box;
  font-size: 1em;
}

#chat-input:focus {
  border-color: #00c3a5;
  box-shadow: 0 0 0 3px rgba(0, 195, 165, 0.2);
  outline: none;
}

/* ボタン */
#chat-input-area button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(to right, #00c3a5, #00b2cc);
  color: #fff;
  font-weight: bold;
  font-size: 1em;
  white-space: nowrap;
  cursor: pointer;
  min-height: 44px;
}

/* 送信ボタン */
#rag-chat button {
  padding: 0 14px;
  font-weight: bold;
  background: linear-gradient(to right, #00c3a5, #00b2cc);
  color: white;
  border: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#rag-chat button:hover {
  background: linear-gradient(to right, #00a68a, #0097b2);
  transform: scale(1.02);
}

#rag-chat button:active {
  transform: scale(0.96);
}

/* ロゴ */
.btn-logo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

#chat-history {
  flex-grow: 1;
  overflow-y: auto;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

@media screen and (max-width: 600px) {
  #rag-chat {
    width: 95%;
    max-width: 100%;
    height: 85vh;
    padding: 12px;
  }

  #chat-input-area {
    flex-direction: column;
  }

  #chat-input-area button {
    width: 100%;
  }
}

.chat-row.user .chat-bubble {
  text-align: right;
}

.chat-row.bot .chat-bubble {
  text-align: left;
}

.chat-bubble {
  max-width: 75%;
  line-height: 1.6;
}

.chat-icon {
  object-fit: cover;
}




/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}
