body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f0f0f0;
}

#chat-container {
    width:90vw;
    max-width: 380px;
    height: 70vh;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    background-color: #fff;
    overflow: hidden;
    margin: 20px auto;
    border-radius: 8px;
}

#chat-header {
    background-color: #121f2b;
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
}

#chat-controls .control-btn {
    cursor: pointer;
    margin-left: 10px;
    font-size: 20px;
}

#chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f7f7f7;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    text-align:left !important;
}

/* 全てのメッセージバブルのコンテナ */
.message-bubble {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

/* ロボットの返答を左寄せ */
.message-bubble.received {
    justify-content: flex-start;
}

/* ユーザーの返答を右寄せ */
.message-bubble.sent {
    justify-content: flex-end;
}

/* メッセージバブルのコンテンツ部分 */
.message-content {
    max-width: 85% !important;
    padding: 10px 15px;
    border-radius: 18px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
    flex-shrink: 1;
}

/* ロボットの返答バブルのスタイル */
.message-bubble.received .message-content {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    color: #333;
    display: flex;
    align-items: flex-start;
}

/* ユーザーの返答バブルのスタイル */
.message-bubble.sent .message-content {
    background-color: #d6e8b2;
    color: #333;
}

#chat-input-container {
    display: flex;
    padding: 10px;
    border-top: 1px solid #e0e0e0;
}

#chat-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-right: 10px;
    font-size: 14px;
}

#send-button {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* ロボットの顔画像 */
.robot-face {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

/* メッセージ内の画像 */
.message-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin-top: 5px;
}
.message-content a{
	color:#007bff !important;
	text-decoration: underline !important;
}

/* タイピング中のアニメーション用スタイル */
.typing-indicator .message-content {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    color: #333;
    display: flex;
    align-items: center; /* 垂直方向の中央揃え */
    padding: 10px 15px;
    border-radius: 18px;
}

.typing-gif {
    width: 20px;
    height: auto;
    margin-left: 5px; /* 必要であれば調整 */
}

/* -------------------------------------- */
/* モバイルデバイス向けの追加調整 (オプション) */
/* -------------------------------------- */
@media (max-width: 480px) {
    #chat-open-btn {
        bottom: 10px;
        right: 10px;
    }
    #chat-modal-container {
        bottom: 10px;
        right: 10px;
    }
}
