
.chat-item-text {
    position: relative;
}

.chat-message-actions {
    position: absolute;
    top: 20px;
    right: -18px;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease-in-out;
}

.chat-item-text:hover .chat-message-actions,
.chat-item-text:focus-within .chat-message-actions,
.chat-message-actions.has-open-menu {
    opacity: 1;
    pointer-events: auto;
}


.chat-message-actions-toggle {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #222;
    cursor: pointer;
    line-height: 24px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.chat-message-actions-toggle i {
    font-size: 12px;
}

.chat-message-actions-menu {
    position: absolute;
    top: 28px;
    right: 0;
    min-width: 96px;
    padding: 6px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    z-index: 30;
}

.chat-message-action-item {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: left;
    font-size: 13px;
    color: #222;
    cursor: pointer;
}

.chat-message-action-item:hover {
    background: #f2f4f7;
}

.chat-edit-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    margin: 0 0 6px 0;
    border-left: 3px solid #009fa0;
    background: #f7f8fa;
    font-size: 13px;
}

.chat-edit-state.d-none {
    display: none !important;
}

.chat-edit-state > div {
    min-width: 0;
}

.chat-edit-state strong {
    display: block;
    font-weight: 500;
    color: #222;
    line-height: 1.2;
}

.chat-edit-hint {
    display: block;
    color: #8a8f98;
    font-size: 11px;
    margin-top: 2px;
    line-height: 1.2;
}

.chat-edit-cancel {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: #009fa0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0 4px 8px;
}

.message-edited-label {
    margin-left: 4px;
    font-size: 10px;
    color: #222;
    font-style: italic;
    font-weight: 600;
    white-space: nowrap;
}

.chat-item.is-being-edited .chat-item-text-content {
    box-shadow: 0 0 0 2px rgba(0, 159, 160, 0.22);
    border-radius: 8px;
}

.chat-item.is-being-edited .chat-item-text-content p {
    margin-bottom: 0;
}

.chat-edit-scope.is-editing-message .chat-message-actions {
    display: none;
}

.chat-edit-scope.is-editing-message #btn-chat-upload-file {
    display: none;
}

.chat-upload-file.disabled {
    pointer-events: none;
    opacity: 0.45;
}

.chat-bottom-note {
    position: absolute;
    bottom: 0;
}

.chat-item-text-content {
    display: inline-block !important;
    width: auto !important;
}

.chat-iframe-content .chat-item-text-content {
    max-width: 320px !important;
}

.admin-support-chat .chat-item-text-content {
    max-width: 4900px !important;
}

.chat-item.chat-green.float-right .chat-item-text-content {
    float: right !important;
}

.chat-item.chat-grey.float-left .chat-item-text-content {
    float: left !important;
}

.chat-item-text-content p {
    display: inline-block !important;
    width: auto !important;
    margin-bottom: 0 !important;
}

.message-timestamp,
.message-edited-label {
    white-space: nowrap !important;
}
