@charset "utf-8";
/* CSS Document */
:root {
    --color-msg-bg: #dadde4;
    /*メッセージ背景*/
    --color-msg-info: #aaa;
    --color-com-me-bg: #32cd32;
    --color-com-you-bg: #000;
    --color-com-form-bg: #263146;
    --color-com-form-btn: #546285;
}


/* 不要な項目を非表示 */
.view-comment-tab .node.node--type-entry > h2,
.view-comment-tab .node.node--type-entry footer.node__meta,
.view-comment-tab .node.node--type-entry .node__links {
    display: none;
}

/* メッセージ背景 */
.comment-wrapper {
    background: var(--color-msg-bg);
    padding: 10px;
    padding-bottom: 140px;
    max-width: 600px;
    position: relative;
}
.comment-wrapper .title.comment-form__title,
.comment-wrapper .profile,
.comment-wrapper .item .message .fa.fa-clock-o,
.comment-wrapper .item .message .links.inline {
    display: none;
}
.comment-wrapper .item {
    width: 100%;
}
.comment-wrapper .item .message {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.comment-wrapper .item .message *:not(.field--name-field-comment-body) {
    width: 100%;
}
.comment-wrapper .item .message p,
.comment-wrapper .item .message .message-info {
    margin: 0;
    color: var(--color-msg-info);
    font-size: 0.8em;
    margin-bottom: 0.2em;
}
.comment-wrapper .item .field--name-field-comment-body {
    max-width: 70%;
    border-radius: 15px;
    padding: 0.5em 1em;
}
/* 相手メッセージ*/
.comment-wrapper .item .message .field--name-field-comment-body {
    color: #fff;
    background: var(--color-com-you-bg);
}

/* 自分メッセージ */
.comment-wrapper .item .message.by-viewer {
    display: flex;
    justify-content: flex-end;
}
.comment-wrapper .item .message.by-viewer * {
    text-align: right;
}
.comment-wrapper .item .message.by-viewer .field--name-field-comment-body {
    background: var(--color-com-me-bg);
    text-align: left;
}
/* フォーム ***************/
.comment-wrapper .comment-form .field--name-field-comment-body .form-item label {
    display: none;
}
.comment-wrapper .comment-form {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--color-com-form-bg);
    display: flex;
    padding-top: 10px;
    padding-bottom: 10px;
    gap:5px;
}
.comment-wrapper .comment-form .field--name-field-comment-body {
    width: calc(100% - 120px);
    display: inline-block;
    margin: 0;
    padding-left: 10px;
}
.comment-wrapper .comment-form .field--name-field-comment-body .form-item {
    margin-top: 0;
    margin-bottom: 0;
}

.comment-wrapper .comment-form textarea {
    display: inline-block;
    width: 100%;
    max-height: 120px;/* 高さはjavascriptにて可変 */
    border: none;
    padding-top: 8px;
    resize: none;
    transition: unset;
}
.comment-wrapper .comment-form #edit-actions {
    margin: 0;
}
.comment-wrapper .comment-form #edit-submit {
    background: var(--color-com-form-btn);
    color: #fff;
    border: none;
    width: 100%;
    height: 32px;
    line-height: 1;
    text-align: center;
}
.comment-wrapper .comment-form #edit-submit:hover {
    opacity: 0.8;
}
.comment-wrapper .comment-form #edit-preview {
    display: none;
}