.kg-app-v2 #chat-window {
    flex-direction: column;
}

.kg-app-v2 #chat-window .messages-area.kg-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 16px 120px;
}

.kg-app-v2 #chat-window .chat-footer-parent {
    width: min(760px, calc(100% - 32px));
    margin: 0;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    position: fixed;
    left: 60%;
    bottom: 12px;
    transform: translateX(-50%);
}

.kg-app-v2 #chat-window .chat-footer {
    width: 100%;
    box-sizing: border-box;
}

.kg-app-v2 #chat-window .chat-footer-low {
    width: 100%;
    gap: 8px;
    align-items: flex-end;
}

.kg-app-v2 #chat-window .chat-footer .msg-input {
    width: 100%;
    min-height: 44px;
    max-height: 200px;
    overflow-y: hidden;
    resize: none;
    transition: height 0.16s ease;
    box-sizing: border-box;
}

.kg-app-v2 #chat-window .chat-footer .sticker-btn,
.kg-app-v2 #chat-window .chat-footer .send {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    box-sizing: border-box;
}

.kg-app-v2 #chat-window .chat-footer .attach {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 4px;
    box-sizing: border-box;
}

.kg-app-v2 #chat-window .chat-footer .attach img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.kg-app-v2 #chat-window .chat-footer .sticker-btn {
    transform: translateY(-2px);
}

.kg-app-v2 .chat-attachment-preview {
    width: 100%;
    margin-bottom: 6px;
    box-sizing: border-box;
}

.kg-app-v2 .chat-attachment-preview.hidden {
    display: none !important;
}

.kg-app-v2 .chat-attachment-preview__list {
    display: grid;
    gap: 6px;
}

.kg-app-v2 .chat-attachment-preview__inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-left: 3px solid rgba(178, 145, 255, 0.95);
    border-radius: 12px;
    background: rgba(52, 60, 99, 0.54);
    color: white;
    box-sizing: border-box;
}

.kg-app-v2 .chat-attachment-preview__inner img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 auto;
}

.kg-app-v2 .chat-attachment-preview__file {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    font-size: 0.72rem;
    font-weight: 900;
}

.kg-app-v2 .chat-attachment-preview__meta {
    min-width: 0;
    display: grid;
    gap: 2px;
    flex: 1 1 auto;
}

.kg-app-v2 .chat-attachment-preview__meta strong,
.kg-app-v2 .chat-attachment-preview__meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kg-app-v2 .chat-attachment-preview__meta span {
    color: rgba(220, 232, 255, 0.68);
    font-size: 0.78rem;
}

.kg-app-v2 .chat-attachment-preview__inner button {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.kg-app-v2 .chat-avatar-wrap {
    position: relative;
}

.kg-app-v2 .chat-presence-dot {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(17, 16, 30, 0.95);
    border-radius: 50%;
    background: #7f8a9b;
}

.kg-app-v2 .chat-presence-dot.is-online {
    background: #39d98a;
}

.kg-app-v2 .chat-presence-status {
    margin-top: 2px;
    color: rgba(220, 232, 255, 0.72);
    font-size: 0.78rem;
    line-height: 1.1;
}

.kg-app-v2 .chat-presence-status.online {
    color: #39d98a;
}

.kg-app-v2 .chat-item-checks {
    color: rgba(220, 232, 255, 0.65);
    font-size: 0.78rem;
    font-weight: 900;
}

.kg-app-v2 .chat-item-checks.is-read {
    color: #a0a0ff;
}
