.comment-post--form {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    position: relative;
}

.comment-post--form .comment-post--field {
    width: 100%;
    position: relative;
    /* overflow: ; */
}

.comment-post--form .comment-post--field textarea {
    width: 100%;
    min-height: 120px;
    max-height: 160px;
    padding: 12px 16px;
    background: rgba(252, 252, 253, 1);
    border: 1px solid rgba(234, 234, 235, 1);
    border-radius: 12px;
    resize: none;
    overflow-y: auto;
    outline: 0;
}

.comment-post::placeholder {
    color: #667085;
}

.comment-post--form .comment-post--field .comment-toolbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 8px;
    position: absolute;
    left: 0;
    bottom: 0;
    background: rgba(252, 252, 253, 1);
    border: 1px solid rgba(234, 234, 235, 1);
    border-top: none;
    border-radius: 12px;
}

.comment-post--form .comment-post--field .comment-toolbar :is(.attach-btn, .emoji-btn, .submit-comment) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    cursor: pointer;
}

.comment-post--form .comment-post--field .comment-toolbar .editor-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.chat-icon-button,
.chat-send-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 100%;
    cursor: pointer;
}

.chat-icon-button {
    width: 32px;
    height: 32px;
    color: #7b8490;
    background: transparent;
    transition: color .2s ease, background .2s ease;
}

.chat-icon-button:hover,
.chat-icon-button[aria-expanded="true"] {
    background: rgba(234, 234, 235, 1);
}

.chat-send-button {
    width: 40px;
    height: 40px;
    fill: rgba(21, 145, 229, 1);
    background: transparent;
    transition: fill .2s ease, background .2s ease, transform .2s ease;
}

.chat-send-button:hover {
    fill: rgba(255, 255, 255, 1);
    background: rgba(21, 145, 229, 1);
}

.chat-send-button svg {
    fill: inherit;
}

.dropdown {
    position: relative;
}

.dropdown-menu[hidden] {
    display: none;
}

@keyframes chatPopoverIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Bootstrap dropdown replacements */
.dropdown-menu.chat-attachment-menu,
.dropdown-menu.chat-emoji-picker {
    padding: 0;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    box-shadow:
        0 18px 40px rgba(16, 24, 40, .14),
        0 4px 12px rgba(16, 24, 40, .08);
}

.dropdown-menu.chat-emoji-picker {
    width: min(340px, calc(100vw - 36px));
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

/* Attachment menu */

.chat-attachment-menu {
    width: 275px;
    padding: 8px;
}

.chat-attachment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px;
    color: #344054;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: background .18s ease;
}

.chat-attachment-item:hover {
    background: #f7f9fb;
}

.chat-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    color: #1597e5;
    background: #edf8ff;
    border-radius: 10px;
}

.chat-item-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chat-attachment-item strong,
.chat-attachment-item small {
    display: block;
}

.chat-attachment-item strong {
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 600;
}

.chat-attachment-item small {
    color: #8a94a3;
    font-size: 11px;
}

/* Emoji picker */

.chat-emoji-picker {
    width: min(340px, calc(100vw - 36px));
}

.chat-emoji-header {
    padding: 12px;
    border-bottom: 1px solid #edf0f2;
}

.chat-emoji-header input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    color: #344054;
    background: #f6f8fa;
    border: 1px solid transparent;
    border-radius: 9px;
    outline: none;
    font: inherit;
    font-size: 13px;
}

.chat-emoji-header input:focus {
    background: #fff;
    border-color: #1597e5;
    box-shadow: 0 0 0 3px rgba(21, 151, 229, .09);
}

.chat-emoji-categories {
    display: flex;
    gap: 3px;
    padding: 8px 10px;
    overflow-x: auto;
    border-bottom: 1px solid #edf0f2;
    scrollbar-width: none;
}

.chat-emoji-categories::-webkit-scrollbar {
    display: none;
}

.chat-category-button {
    min-width: 38px;
    height: 34px;
    padding: 0 9px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
}

.chat-category-button:hover,
.chat-category-button.is-active {
    background: #edf8ff;
}

.chat-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 3px;
    max-height: 240px;
    padding: 10px;
    overflow-y: auto;
}

.chat-emoji-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 22px;
    transition: background .15s ease, transform .15s ease;
}

.chat-emoji-option:hover {
    background: #f1f7fb;
    transform: scale(1.12);
}

.chat-empty-emojis {
    grid-column: 1 / -1;
    padding: 30px 10px;
    color: #98a2b3;
    text-align: center;
    font-size: 13px;
}

/* Selected file chips */

.chat-selected-files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chat-selected-files:empty {
    display: none;
}

.chat-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 220px;
    padding: 6px 8px 6px 10px;
    color: #475467;
    background: #f2f4f7;
    border-radius: 8px;
    font-size: 12px;
}

.chat-file-name {
    /* overflow: ; */
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-remove-file {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    color: #667085;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.chat-remove-file:hover {
    color: #d92d20;
    background: #fee4e2;
}

@media (max-width: 600px) {
    .comment-post--form .post-author {
        position: absolute;
        left: 10px;
        top: 10px;
        z-index: 9;
    }

    .comment-post--form .post-author .post-author__avatar {
        --width-height: 30px !important;
    }

    .comment-post--form .comment-post--field textarea {
        min-height: 110px;
        max-height: 180px;
        padding-left: 50px;
    }

    .chat-attachment-menu {
        width: min(275px, calc(100vw - 80px));
    }

    .chat-emoji-picker {
        position: fixed;
        right: 12px;
        bottom: 85px;
        left: 12px;
        width: auto;
    }

    .chat-emoji-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}

@media (max-width:600px) {
    .dropdown-menu.chat-emoji-picker {
        position: fixed !important;
        right: 12px;
        bottom: 85px;
        left: 12px;
        width: auto;
    }
}