/* ウィンドウ全体 */
.chat-window {
    position: absolute;
    top: calc(9vh + 3rem);
    right: 3rem;
    z-index: 2;
    background: #322E7B;
    color: #FFFFFF;
    border-radius: 1.5rem;
    border: 0.125rem solid #FFFFFF;

    /* --- リサイズ機能の追加 --- */
    width: 25vw;
    height: 75vh;
    min-width: 15rem;
    min-height: 30rem;
    resize: both;
    overflow: hidden;

    display: flex;
    flex-direction: column;
}

/* ヘッダー (高さは固定) */
.chat-header {
    flex: none;
    padding: 1.0rem;
    cursor: move;
    user-select: none;
    border-bottom: 0.125rem solid #FFFFFF;
    display: flex;
    align-items: center;
}

/* コメントエリア (ここが伸縮する) */
.message-list {
    flex: 1;
    padding: 0 1.0rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
    border-bottom: 0.125rem solid #FFFFFF;
}

.message-list::-webkit-scrollbar {
    display: none;
}

/* --- メッセージの装飾 --- */
.message-item {
    margin-top: 1.0rem;
}

.message-header {
    display: flex;
    align-items: baseline;
}

.message-header b {
    font-size: 1.0rem;
    white-space: nowrap;
    margin-right: 0.5rem;
}

.message-header span {
    color: #949BA4;
    font-size: 0.75rem;
}

.message-item>p {
    white-space: pre-wrap;
    overflow-wrap: break-word;
    font-size: 1.0rem;
    margin: 0;
}

/* --- フィルターのロジック --- */
/* info（情報）タブの時、system 以外を隠す */
.message-list[data-current-filter="info"] .message-item:not([data-tag="system"]) { display: none; }
/* chat（雑談）タブの時、comment 以外を隠す */
.message-list[data-current-filter="chat"] .message-item:not([data-tag="comment"]) { display: none; }


/* 入力エリア (高さは固定) */
.chat-input-wrapper {
    flex: none;
    background: none;
    display: flex;
    align-items: center;
    border-radius: 1.0rem;
    margin: 0.75rem 1.0rem;
    padding: 0.125rem 0.5rem;
    border: 0.125rem solid #FFFFFF;
}

.color-picker {
    background: none;
    appearance: none;
    outline: none;
    border: none;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    margin-right: 0.5rem;
    cursor: pointer;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.chat-input {
    background: none;
    color: #FFFFFF;
    outline: none;
    border: none;
    width: 100%;
    font-size: 1.0rem;
    padding: 0.25rem 0;
}

.chat-input::placeholder {
    color: #949BA4;
}