
/* 見出し */
h1, h2, h3 {
    text-align: center;
    font-weight: 300;
    margin-bottom: 10px;
}

/* チャットログ本体 */
#chat-log {
    width: 60%;
    max-width: 100%;
    margin: 20px auto;
    padding: 12px;
    background: #d6e0df;
    overflow-y: auto;
    word-break: break-word;
}

/* 各チャットメッセージ */
.chat-message {
    display: flex;
    flex-direction: column;
    padding: 10px;
    position: relative;
}

/* ヘッダー部分（修正済） */
#chat-log .message-header {
    width: 100%;
    background-color: #acdbd8;
    padding: 12px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* ヘッダー右側：タイムスタンプとログID */
#chat-log .message-header .right-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
}

/* ユーザー名 */
.message-header .username {
    font-weight: bold;
    color: #0d0d0d;
    white-space: nowrap;
}

/* タイムスタンプ */
.message-header .timestamp {
    font-size: 0.75em;
    color: #444;
    white-space: nowrap;
    margin-left: 0;
}

/* ログID */
.message-header .log-id {
    position: static;
    font-size: 0.75em;
    color: #666;
    opacity: 0.8;
    white-space: nowrap;
}

/* メッセージ本文 */
.message, .chat-message .message, p {
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
    margin: 5px 0;
    word-break: break-word;
}

/* ユーザー名強調 */
strong {
    color: #ffffff;
}



/* 表情アイコン */
.expression-icon {
    margin-top: 10px;
    width: 50px;
    height: 50px;
    object-fit: cover;
    align-self: flex-start;
}

/* フォーム（送信エリア） */
form {
    text-align: center;
    margin: 20px auto;
}

textarea {
    width: 60%;
    height: 80px;
    background:#d6e0df;
    color: #1f1930;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 5px;
}

button {
    background-color: #506abc;
    color: #b6dff8;
    border: none;
    padding: 10px 20px;
    margin-top: 10px;
    cursor: pointer;
    border-radius: 4px;
}

button:hover {
    background-color: #666;
}

/* 返信ボタン */
.chat-message button {
    font-size: 0.8em;
    padding: 2px 6px;
    margin-top: 4px;
    margin-left: 8px;
    background-color: #eee;
    color: #000;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.chat-message button:hover {
    background-color: #ddd;
}

/* ページネーション */
#pagination {
    text-align: center;
    margin-top: 20px;
}

#pagination a {
    color: #b6dff8;
    text-decoration: none;
    margin: 0 10px;
}

/* アイコン選択エリア */
.icon-list-container,
.icon-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

#icon-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: calc((50px + 10px) * 5); /* 5個 + ギャップで折り返す */
    margin: 0 auto;
}

.icon-item {
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: border-color 0.3s;
}

.icon-item:hover {
    border-color: #0088cc;
}

.icon-img, #selected-icon {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.panel {
    display: none;
    padding: 0 18px;
    background-color: #f1f1f1;
}


#selected-icon-container {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
}

/* パートナー一覧 */
#partners-list {
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

#partners-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

#partners-list li {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    flex: 0 1 50px;
}

#partners-list li img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

/* スマホ対応 */
@media (max-width: 768px) {
    #chat-log,
    textarea {
        width: 90%;
        font-size: 14px;
    }
}

/* ヘッダー部分（修正済） */
.message-header {
    width: 100%;
    background-color: #acdbd8;
    padding: 6px 12px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* ヘッダー右側：タイムスタンプとログID */
.message-header .right-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
}

/* モーダル全体 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

/* モーダル内容 */
.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    max-height: 80vh; /* ビューポートの高さの80%を最大高さに設定 */
    overflow-y: auto; /* 縦方向のコンテンツがはみ出したらスクロールバーを表示 */
}

/* 閉じるボタン */
.close-button {
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

/* リスト */
.location-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.location-list li {
    padding: 12px;
    border-bottom: 1px dashed#506abc;
    text-align: center;
}

/* ボタン風 → リンク風へ変更 */
.location-list button {
    background: none;
    border: none;
    padding: 0;
    font-size: 16px;
    color: #0077cc;
    text-decoration: underline;
    cursor: pointer;
}

.location-list button:hover {
    color: #005999;
}


#open-location-modal {
    display: block;
    margin: 20px auto; /* 上下20px、左右autoで中央寄せ */
    padding: 10px 20px;
    background-color: #444;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

#open-location-modal:hover {
    background-color: #666;
}


.mokuji{
    text-align: center;
}


/* ユーザー選択リスト */
select {
    width: 100%;
    padding: 10px;
    background-color: #444; /* 背景色 */
    color: #b6dff8;
    border: 1px solid #555;
    border-radius: 5px;
    font-size: 1em;
    margin-bottom: 20px;
}
/* アイコンがないメッセージの背景色 */
.chat-message.bg-no-icon {
    background-color: #c8d2d0; /* 暗めの灰色 */
    /* 必要に応じて、文字色なども調整できます */
    color: #5d606a; /* 明るい文字色 */
}

.chat-message.bg-no-icon .message-header {
    background-color: #566864; /* 彩度を下げた灰色 */
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* 要素間の隙間を設定 */
}

.username-link {
    text-decoration: none;
}
/* モーダルウィンドウの基本スタイル */
.modal {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    z-index: 100; /* 他の要素より手前に表示 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4); /* 半透明の背景 */
    justify-content: center;
    align-items: center;
    padding-top: 50px;
}

/* モーダルの中身 */
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    text-align: center;
}

/* ボタンのスタイル */
#modal-delete-yes, #modal-delete-no {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#modal-delete-yes {
    background-color: #e74c3c;
    color: white;
}

#modal-delete-no {
    background-color: #bdc3c7;
}

/* 返信元のメッセージを展開するコンテナ */
.chat-message .reply-content {
    background-color: #3f3f3f;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #555;
    color: #ccc;
    max-width: 90%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 展開されたメッセージのヘッダー部分 */
.chat-message .reply-content .message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
    margin-bottom: 5px;
}

/* 展開されたメッセージの本文 */
.chat-message .reply-content .message {
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0;
    word-wrap: break-word;
}