/* 全体的なスタイル */
body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f4f4f4;
    overflow: hidden;
}

#map {
    height: 100vh;
    width: 100%;
    border: none;
    z-index: 1;
}

#chat-container {
    display: none; /* 最初は非表示 */
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 300px;
    max-width: 90%;
    z-index: 100;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#chat-messages {
    height: 200px;
    overflow-y: scroll;
    padding: 10px;
}

.message {
    margin-bottom: 5px;
    padding: 10px;
    border-radius: 5px;
    max-width: 90%;
    word-wrap: break-word;
}

.user-message {
    background-color: #e0f7fa; /* 例: 水色 */
    text-align: right;
    margin-left: auto;
}

.ai-message {
    background-color: #f0f4c3; /* 例: 薄黄色 */
    text-align: left;
    margin-right: auto;
}

#chat-form {
    padding: 10px;
}

#user-input {
    width: calc(100% - 70px);
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#chat-form button {
    padding: 5px 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#avatar {
    width: 50px;
    height: 50px;
    background-color: lightblue;
    border-radius: 50%;
    cursor: pointer;
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 99;
}

.jump-button {
    display: inline-block;
    padding: 5px 10px;
    background-color: #007bff; /* 例: 青色 */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 5px;
}

.timestamp {
    font-size: smaller;
    color: gray;
    text-align: right; /* タイムスタンプを右寄せ */
    margin-top: 5px; /* メッセージとの間隔 */
}

/* スマホ対応のメディアクエリ */
@media (max-width: 768px) {
    #chat-container {
        width: 80%;
        max-width: 300px;
    }
    
    #avatar {
        width: 40px;
        height: 40px;
    }
    
    .message {
        max-width: 85%;
    }
}

/* PC表示の際も画面いっぱいにするスタイル */
@media (min-width: 769px) {
    #chat-container {
        width: 300px; /* 固定幅 */
        max-width: 100%; /* 最大幅を100%に設定 */
    }
    
    #map {
        height: calc(100vh - 20px); /* チャットコンテナの高さを考慮 */
    }
}