/* File: chat.css */
/* Minimal, mobil odaklı Sahasenin sohbet tasarımı */

:root {
    --chat-accent: var(--theme-color, #4caf50);
    --chat-accent-dark: #388e3c;
    --chat-accent-soft: #f3fff6;
    --chat-surface: #ffffff;
    --chat-surface-soft: rgba(255, 255, 255, 0.92);
    --chat-border: #edf0f3;
    --chat-text: #20242a;
    --chat-muted: #7b8494;
    --chat-shadow: 0 10px 30px rgba(20, 30, 45, 0.07);
    --chat-shadow-soft: 0 6px 18px rgba(20, 30, 45, 0.055);
    --chat-radius: 12px;
    --chat-radius-sm: 12px;
    --chat-time-reveal-progress: 0;
    --chat-time-reveal-width: 0px;
    --chat-time-reveal-shift: -10px;
    --chat-time-reveal-scale: 0.94;
    --chat-time-reveal-bubble-shift: 0px;
    --chat-time-reveal-bubble-scale: 1;
    --chat-scroll-shift: 0px;
    --chat-scroll-scale: 1;
    --chat-scroll-rotate: 0deg;
    --chat-keyboard-bottom: 0px;
    --chat-input-left: 0px;
    --chat-input-width: 100%;
    --chat-viewport-height: 100vh;
}


.chatCompability {
    padding: 0px !important;
    min-height: unset !important;
}

#DesktopContainer.chatCompability {
    padding: 0px !important;
    min-height: unset !important;
}


#MessagesArea,
.messages-area {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    touch-action: pan-y;
    --chat-time-reveal-progress: 0;
    --chat-time-reveal-width: 0px;
    --chat-time-reveal-shift: -10px;
    --chat-time-reveal-scale: 0.94;
    --chat-time-reveal-bubble-shift: 0px;
    --chat-time-reveal-bubble-scale: 1;
    padding: 8px 12px 14px;
    border-radius: var(--chat-radius);
    background: transparent !important;
    scrollbar-width: none;
    transition: height 210ms cubic-bezier(0.16, 1, 0.3, 1), max-height 210ms cubic-bezier(0.16, 1, 0.3, 1), padding-bottom 210ms cubic-bezier(0.16, 1, 0.3, 1);
}

    #MessagesArea::-webkit-scrollbar,
    .messages-area::-webkit-scrollbar {
        width: 0;
        height: 0;
    }

    #MessagesArea.chat-loading,
    .messages-area.chat-loading {
        pointer-events: none;
    }

.chat-message-item {
    position: relative;
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 0;
    margin: 3px 0;
    animation: chatMessageIn 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
    will-change: transform, opacity, filter;
    contain: layout style;
}

    .chat-message-item.is-mine {
        animation-name: chatMessageInMine;
    }

    .chat-message-item.is-other {
        animation-name: chatMessageInOther;
    }

    .chat-message-item.is-mine {
        justify-content: flex-end;
    }

    .chat-message-item.is-other {
        justify-content: flex-start;
    }

    .chat-message-item.is-action-card {
        justify-content: center;
        margin: 8px 0;
    }


    .chat-message-item.is-system-notification {
        justify-content: center;
        align-items: center;
        margin: 10px 0;
        animation-name: chatSystemNotificationIn;
        contain: layout style paint;
    }

.chat-system-notification {
    width: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0 !important;
    padding: 0 8px !important;
    color: var(--chat-muted) !important;
    text-align: center;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

    .chat-system-notification::before,
    .chat-system-notification::after {
        content: "";
        flex: 1 1 auto;
        max-width: 62px;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(142, 151, 165, 0.20));
    }

    .chat-system-notification::after {
        background: linear-gradient(90deg, rgba(142, 151, 165, 0.20), transparent);
    }

.chat-system-notification-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: min(82%, 460px);
    min-height: 25px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(237, 240, 243, 0.92);
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 14px rgba(20, 30, 45, 0.045);
    color: #687285 !important;
    font-weight: 850 !important;
    line-height: 1.35;
    letter-spacing: 0.005em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-system-notification-time {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 21px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(237, 240, 243, 0.72);
    color: rgba(104, 114, 133, 0.82) !important;
    font-weight: 850 !important;
    line-height: 1;
    white-space: nowrap;
}

.chat-message-item.is-group-first {
    margin-bottom: 1px;
}

.chat-message-item.is-group-middle {
    margin-top: 1px;
    margin-bottom: 1px;
}

.chat-message-item.is-group-last {
    margin-top: 1px;
    margin-bottom: 7px;
}

.chat-message-item.is-single {
    margin-top: 5px;
    margin-bottom: 8px;
}

.chat-bubble {
    position: relative;
    max-width: min(78%, 520px);
    padding: 8px 10px 7px;
    border-radius: var(--chat-radius);
    background: var(--chat-surface);
    color: var(--chat-text);
    border: 1px solid rgba(237, 240, 243, 0.96);
    box-shadow: var(--chat-shadow-soft);
    overflow: hidden;
    isolation: isolate;
    transform-origin: bottom left;
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease, border-radius 180ms ease, filter 180ms ease;
    will-change: transform, filter;
}

    .chat-bubble::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: inherit;
        opacity: 0;
        background: radial-gradient(circle at 25% 0%, rgba(255, 255, 255, 0.48), transparent 38%);
        transition: opacity 220ms ease;
        pointer-events: none;
    }

.chat-message-item.is-mine .chat-bubble::after {
    opacity: 0.24;
}

.chat-message-item.is-other.is-group-first .chat-bubble {
    border-bottom-left-radius: 8px;
}

.chat-message-item.is-other.is-group-middle .chat-bubble {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.chat-message-item.is-other.is-group-last .chat-bubble {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 18px;
}

.chat-message-item.is-mine .chat-bubble {
    transform-origin: bottom right;
    border-color: transparent;
    background: linear-gradient(135deg, var(--chat-accent) 0%, #66c86f 100%);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(76, 175, 80, 0.22);
}

.chat-message-item.is-mine.is-group-first .chat-bubble {
    border-bottom-right-radius: 8px;
}

.chat-message-item.is-mine.is-group-middle .chat-bubble {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.chat-message-item.is-mine.is-group-last .chat-bubble {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 18px;
}

#MessagesArea.chat-scrolling .chat-bubble,
.messages-area.chat-scrolling .chat-bubble {
    transform: translate3d(0, var(--chat-scroll-shift, 0px), 0) scale(var(--chat-scroll-scale, 1)) rotate(var(--chat-scroll-rotate, 0deg));
    filter: saturate(1.03);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@media (hover: none) and (pointer: coarse) {

    #MessagesArea.chat-scrolling .chat-bubble,
    .messages-area.chat-scrolling .chat-bubble,
    #MessagesArea.chat-time-reveal-visible .chat-bubble,
    .messages-area.chat-time-reveal-visible .chat-bubble,
    #MessagesArea.chat-time-reveal-visible .chat-reveal-time,
    .messages-area.chat-time-reveal-visible .chat-reveal-time {
        will-change: transform, opacity, width;
    }
}

.chat-reveal-time {
    width: var(--chat-time-reveal-width, 0px);
    min-width: var(--chat-time-reveal-width, 0px);
    max-width: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    opacity: var(--chat-time-reveal-progress, 0);
    transform: translate3d(var(--chat-time-reveal-shift, -10px), 0, 0) scale(var(--chat-time-reveal-scale, 0.94));
    color: rgba(92, 101, 116, 0.92) !important;
    font-weight: 850;
    letter-spacing: 0.01em;
    transition: width 170ms cubic-bezier(0.16, 1, 0.3, 1), min-width 170ms cubic-bezier(0.16, 1, 0.3, 1), opacity 140ms ease, transform 170ms cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-message-item.is-mine .chat-reveal-time {
    color: rgba(92, 101, 116, 0.86) !important;
}

#MessagesArea.chat-time-reveal-visible .chat-bubble,
.messages-area.chat-time-reveal-visible .chat-bubble {
    transform: translate3d(var(--chat-time-reveal-bubble-shift, 0px), 0, 0) scale(var(--chat-time-reveal-bubble-scale, 1));
}

#MessagesArea.chat-time-reveal-visible .chat-reveal-time,
.messages-area.chat-time-reveal-visible .chat-reveal-time {
    text-shadow: 0 1px 6px rgba(20, 30, 45, 0.08);
}

.chat-message-content {
    min-width: 0;
}

.chat-text-wrap {
    min-width: 0;
}

.chat-text {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: var(--chat-text) !important;
    font-weight: 650 !important;
    line-height: 1.45;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.chat-message-item.is-mine .chat-text,
.chat-message-item.is-mine .chat-time:not(.text-dark),
.chat-message-item.is-mine .chat-file-link,
.chat-message-item.is-mine .chat-file-link span,
.chat-message-item.is-mine .chat-file-link i,
.chat-message-item.is-mine .chat-member-name:not(.text-dark) {
    color: rgba(255, 255, 255, 0.96) !important;
}

.chat-message-meta {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    color: var(--chat-muted) !important;
    line-height: 1;
}

.chat-message-item.show-sender-info .chat-message-meta {
    display: flex;
}

.chat-message-meta.is-meta-mine {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.chat-meta-member {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.chat-avatar {
    width: 20px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.88);
    background: #fff;
    box-shadow: 0 2px 8px rgba(20, 30, 45, 0.10);
}

.chat-member-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
    line-height: 1.1;
    color: #596170;
}

.chat-time {
    display: inline-flex;
    color: var(--chat-muted) !important;
    font-weight: 750;
    line-height: 1;
    opacity: 0.82;
}

.chat-image-box {
    display: block;
    width: min(260px, 68vw);
    max-width: 100%;
    margin: 2px 0 6px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(237, 240, 243, 0.9);
    background: #eef2f7;
}

    .chat-message-image,
    .chat-image-box img {
        display: block;
        width: 100%;
        height: auto;
        max-height: 280px;
        object-fit: cover;
        transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), filter 220ms ease;
    }

    .chat-image-box:active img {
        transform: scale(0.985);
        filter: brightness(0.96);
    }

.chat-file-link {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(76, 175, 80, 0.09);
    color: var(--chat-accent-dark) !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    transition: transform 150ms ease, background-color 150ms ease;
}

.chat-message-item.is-mine .chat-file-link {
    background: rgba(255, 255, 255, 0.17);
}

.chat-file-link:active {
    transform: scale(0.97);
}

.chat-date-badge {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px 0 9px;
    pointer-events: none;
    animation: chatDateIn 200ms ease both;
}

    .chat-date-badge::before,
    .chat-date-badge::after {
        content: "";
        flex: 1;
        max-width: 70px;
        height: 1px;
        background: rgba(142, 151, 165, 0.18);
    }

    .chat-date-badge span,
    .chat-floating-date-badge span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 24px;
        padding: 4px 11px;
        border-radius: 999px;
        border: 1px solid rgba(237, 240, 243, 0.88);
        background: rgba(255, 255, 255, 0.72);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        color: #5d6675 !important;
        font-weight: 850;
        box-shadow: none;
    }

.chat-floating-date-badge {
    position: sticky;
    top: 6px;
    z-index: 8;
    display: flex;
    justify-content: center;
    width: 100%;
    height: 0;
    margin: 0;
    overflow: visible;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 140ms ease, transform 140ms ease;
}

    .chat-floating-date-badge.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

    .chat-floating-date-badge span {
        background: rgba(255, 255, 255, 0.86);
        box-shadow: 0 2px 10px rgba(20, 30, 45, 0.045);
    }

.chat-loader,
.chat-top-loader {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 30px;
    margin: 8px auto;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--chat-surface-soft);
    color: var(--chat-muted) !important;
    font-weight: 800;
    box-shadow: var(--chat-shadow-soft);
}

    .chat-loader::before,
    .chat-top-loader::before {
        content: "";
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: 2px solid currentColor;
        border-top-color: transparent;
        animation: chatSpin 720ms linear infinite;
    }

.chat-empty-state {
    min-height: 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 28px 18px;
    color: var(--chat-muted) !important;
    text-align: center;
}

.chat-empty-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--chat-accent-soft);
    color: var(--chat-accent) !important;
    box-shadow: 0 8px 22px rgba(76, 175, 80, 0.12);
}

.chat-empty-state strong {
    color: #475062 !important;
    font-weight: 850;
}

.chat-empty-state span {
    max-width: 240px;
    color: var(--chat-muted) !important;
    font-weight: 650;
    line-height: 1.35;
}

.chat-action-card,
.globalRequestCard.w-100 {
    width: 100% !important;
}

.chat-action-card {
    max-width: 560px;
    animation: chatMessageIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

    .chat-action-card .card,
    .globalRequestCard .card {
        border-radius: var(--chat-radius) !important;
        border-color: var(--chat-border) !important;
        box-shadow: var(--chat-shadow-soft) !important;
    }

    .chat-action-card .chat-image-box,
    .chat-action-card .slider-container.chat-image-box {
        width: 70px !important;
        height: 70px !important;
        margin: 0;
        border-radius: 12px !important;
    }


.chat-input-container {
    position: sticky;
    bottom: 0;
    z-index: 20;
    width: 100%;
    padding: 6px 7px calc(6px + env(safe-area-inset-bottom));
    background: transparent !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 1px solid rgba(237, 240, 243, 0.72);
    transition: bottom 210ms cubic-bezier(0.16, 1, 0.3, 1), transform 210ms cubic-bezier(0.16, 1, 0.3, 1), padding 210ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 210ms ease, background-color 210ms ease;
}

#chatForm,
.chat-form {
    position: relative;
    display: flex;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 4px;
    width: 100%;
    min-height: 44px;
    padding: 4px;
    border: 1px solid rgba(237, 240, 243, 0.95);
    border-radius: 22px;
    background: none;
    box-shadow: none;
}

#messageText {
    flex: 1 1 auto;
    min-width: 0;
    height: 36px;
    min-height: 36px;
    max-height: 118px;
    padding: 8px 6px !important;
    border: 0 !important;
    outline: none !important;
    resize: none !important;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box;
    color: var(--chat-text) !important;
    font-weight: 650 !important;
    line-height: 1.35;
    overflow-y: hidden;
    user-select: text !important;
    -webkit-user-select: text !important;
}

    #messageText::placeholder {
        color: #a3acba;
        font-weight: 650;
    }

.chat-attachment-btn,
.chat-edit-cancel-mode-btn,
.chat-send-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    outline: none;
    color: #687285;
    background: transparent;
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), background-color 170ms ease, color 170ms ease, box-shadow 180ms ease;
}

    .chat-attachment-btn:active,
    .chat-edit-cancel-mode-btn:active,
    .chat-send-btn:active {
        transform: scale(0.94);
    }

    .chat-attachment-btn:hover {
        background: rgba(20, 30, 45, 0.045);
        color: #475062;
    }

#chatForm > .chat-attachment-btn[data-chat-file-trigger],
.chat-form > .chat-attachment-btn[data-chat-file-trigger] {
    display: none !important;
}

.chat-attachment-plus-btn[aria-expanded="true"] {
    background: rgba(76, 175, 80, 0.12);
    color: var(--chat-accent-dark) !important;
    transform: rotate(45deg);
}

.chat-attachment-menu {
    position: absolute;
    left: 42px;
    bottom: calc(100% + 8px);
    z-index: 40;
    display: none;
    grid-template-columns: repeat(5, minmax(54px, 1fr));
    gap: 7px;
    width: min(360px, calc(100vw - 28px));
    padding: 8px;
    border: 1px solid rgba(237, 240, 243, 0.96);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 16px 38px rgba(20, 30, 45, 0.14);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

    .chat-attachment-menu.is-visible {
        display: grid;
        animation: chatActionPopoverIn 150ms cubic-bezier(0.16, 1, 0.3, 1) both;
    }

.chat-attachment-menu-btn {
    min-width: 0;
    min-height: 54px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 5px;
    border: 0;
    border-radius: 14px;
    background: rgba(20, 30, 45, 0.045);
    color: #4b5566 !important;
    font-weight: 850;
    line-height: 1;
    transition: transform 140ms ease, background-color 140ms ease, color 140ms ease;
}

    .chat-attachment-menu-btn i,
    .chat-attachment-menu-btn strong,
    .chat-attachment-menu-btn span {
        color: inherit !important;
    }

    .chat-attachment-menu-btn i,
    .chat-attachment-menu-btn strong {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        border-radius: 999px;
        background: rgba(76, 175, 80, 0.10);
        color: var(--chat-accent-dark) !important;
    }

    .chat-attachment-menu-btn:active {
        transform: scale(0.96);
        background: rgba(76, 175, 80, 0.10);
    }

.chat-edit-cancel-mode-btn {
    display: none;
    width: auto;
    padding: 0 12px;
    background: rgba(232, 77, 77, 0.10);
    color: #d04444 !important;
    font-weight: 900;
    white-space: nowrap;
}

    .chat-edit-cancel-mode-btn span {
        display: inline-flex;
    }

#chatForm.chat-form-editing .chat-attachment-btn {
    display: none !important;
}

#chatForm.chat-form-editing .chat-edit-cancel-mode-btn {
    display: inline-flex !important;
}

#chatForm.chat-form-editing {
    border-color: rgba(76, 175, 80, 0.28);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.07);
}

    #chatForm.chat-form-editing #messageText {
        font-weight: 750 !important;
    }

    #chatForm.chat-form-editing .chat-send-btn {
        background: var(--chat-accent);
    }


.chat-send-btn {
    color: #ffffff;
    background: var(--chat-accent);
    box-shadow: 0 8px 18px rgba(76, 175, 80, 0.24);
}

#chatForm.chat-form-sending .chat-send-btn,
#chatForm.chat-form-sending button[type="submit"] {
    cursor: wait;
    opacity: 0.94;
    pointer-events: none;
}

.chat-send-btn.is-loading {
    background: var(--chat-accent);
    box-shadow: 0 8px 18px rgba(76, 175, 80, 0.20);
}

.chat-send-loader {
    width: 16px;
    height: 16px;
    display: inline-flex;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    animation: chatSpin 720ms linear infinite;
}

.chat-selected-files {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 3px;
    padding: 0 4px;
    color: var(--chat-muted) !important;
    font-weight: 750;
}

    .chat-selected-files.has-files {
        display: flex;
    }

    .chat-selected-files span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .chat-selected-files button {
        border: 0;
        background: transparent;
        color: #9aa3b3;
        padding: 2px 4px;
    }

body.chat-keyboard-open #mobileFooterBar,
body.chat-keyboard-open .mobileFooterBar {
    transform: translateY(110%);
    transition: transform 180ms ease;
}

body.chat-keyboard-open .chat-input-container {
    padding-bottom: 8px;
}

@media (hover: hover) and (pointer: fine) {
    .chat-bubble:hover {
        transform: translateY(-2px) scale(1.006);
        box-shadow: 0 14px 32px rgba(20, 30, 45, 0.10);
    }

    .chat-message-item.is-mine .chat-bubble:hover {
        box-shadow: 0 12px 28px rgba(76, 175, 80, 0.25);
    }
}

@media (max-width: 768px) {

    #MessagesArea,
    .messages-area {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        padding: 8px 8px 12px;
        min-height: 180px;
    }

    .chat-bubble {
        max-width: 86%;
        padding: 8px 9px 7px;
        border-radius: 17px;
    }

    .chat-reveal-time {
        max-width: 68px;
    }


    .chat-message-item.is-system-notification {
        margin: 9px 0;
    }

    .chat-system-notification {
        gap: 5px;
        padding: 0 4px !important;
    }

        .chat-system-notification::before,
        .chat-system-notification::after {
            max-width: 34px;
        }

    .chat-system-notification-text {
        max-width: 86%;
        min-height: 24px;
        padding: 5px 10px;
        line-height: 1.32;
    }

    .chat-system-notification-time {
        min-height: 20px;
        padding: 3px 6px;
    }

    .chat-action-card {
        max-width: 100%;
    }

    .chat-member-name {
        max-width: 130px;
    }

    .chat-image-box {
        width: min(245px, 74vw);
    }

    .chat-input-container {
        padding-left: 7px;
        padding-right: 7px;
    }

    #chatForm,
    .chat-form {
        border-radius: 20px;
        padding: 5px;
    }

    #messageText {
        min-height: 36px;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    .chat-attachment-btn,
    .chat-send-btn,
    #chatForm button[type="submit"],
    #chatForm input[type="submit"] {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
    }

    .chat-attachment-menu {
        left: 4px;
        grid-template-columns: repeat(5, minmax(50px, 1fr));
        width: min(340px, calc(100vw - 18px));
    }

    .chat-attachment-menu-btn {
        min-height: 50px;
        padding: 6px 4px;
    }
}

@media (max-width: 390px) {
    .chat-bubble {
        max-width: 90%;
    }

    .chat-text {
    }

    .chat-avatar {
        width: 18px;
        min-width: 18px;
        height: 18px;
    }

    .chat-attachment-btn {
        width: 34px !important;
        min-width: 34px !important;
    }



    .chat-system-notification {
        gap: 4px;
    }

        .chat-system-notification::before,
        .chat-system-notification::after {
            max-width: 22px;
        }

    .chat-system-notification-text {
        max-width: 88%;
        padding: 5px 9px;
    }

    .chat-system-notification-time {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {

    #MessagesArea,
    .messages-area,
    .chat-message-item,
    .chat-system-notification,
    .chat-date-badge,
    .chat-floating-date-badge,
    .chat-loader::before,
    .chat-top-loader::before,
    #chatForm,
    #chatForm button,
    .chat-bubble,
    .chat-reveal-time,
    .chat-image-box img {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

@keyframes chatMessageIn {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.965);
        filter: blur(6px) saturate(0.92);
    }

    60% {
        opacity: 1;
        transform: translateY(-2px) scale(1.012);
        filter: blur(0) saturate(1.04);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0) saturate(1);
    }
}

@keyframes chatMessageInMine {
    0% {
        opacity: 0;
        transform: translate3d(18px, 14px, 0) scale(0.965);
        filter: blur(6px) saturate(0.92);
    }

    60% {
        opacity: 1;
        transform: translate3d(-2px, -2px, 0) scale(1.012);
        filter: blur(0) saturate(1.04);
    }

    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0) saturate(1);
    }
}

@keyframes chatMessageInOther {
    0% {
        opacity: 0;
        transform: translate3d(-18px, 14px, 0) scale(0.965);
        filter: blur(6px) saturate(0.92);
    }

    60% {
        opacity: 1;
        transform: translate3d(2px, -2px, 0) scale(1.012);
        filter: blur(0) saturate(1.04);
    }

    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0) saturate(1);
    }
}


@keyframes chatSystemNotificationIn {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(0.96);
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes chatDateIn {
    0% {
        opacity: 0;
        transform: translateY(-4px) scale(0.96);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes chatSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes chatSendPulse {

    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.94);
    }
}

/* Mesaj Bilgisi / Herkesten Sil Baloncuğu */
.chat-message-item.is-menu-open {
    z-index: 30;
    contain: layout style;
}

    .chat-message-item.is-pressing .chat-bubble,
    .chat-message-item.is-long-press-fired .chat-bubble,
    .chat-message-item.is-menu-open .chat-bubble {
        transform: translateY(-2px) scale(0.985);
        filter: brightness(0.98) saturate(1.04);
        box-shadow: 0 16px 36px rgba(20, 30, 45, 0.16);
    }

.chat-message-item.is-long-press-fired .chat-bubble {
    animation: chatLongPressFeedback 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.chat-message-item.is-edited-pulse .chat-bubble {
    animation: chatEditedPulse 720ms ease both;
}

.chat-message-item.is-editing-target .chat-bubble {
    outline: 2px solid rgba(76, 175, 80, 0.28);
    outline-offset: 2px;
    box-shadow: 0 14px 32px rgba(76, 175, 80, 0.16);
}

.chat-message-item.is-reported .chat-bubble {
    border-color: rgba(232, 77, 77, 0.32) !important;
    box-shadow: 0 10px 26px rgba(232, 77, 77, 0.12);
}

.chat-message-item.is-mine.is-reported .chat-bubble {
    background: linear-gradient(135deg, #6d7888 0%, #8792a2 100%);
    box-shadow: 0 10px 26px rgba(65, 73, 84, 0.18);
}

.chat-reported-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 6px;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(232, 77, 77, 0.12);
    color: #c83f3f !important;
    font-weight: 900;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
}

.chat-message-item.is-mine .chat-reported-badge {
    background: rgba(255, 255, 255, 0.20);
    color: #ffffff !important;
}

.chat-message-item.is-removing {
    pointer-events: none;
    animation: chatMessageRemove 140ms ease both !important;
}

.chat-message-action-popover {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 35;
    width: min(200px, calc(100vw - 28px));
    max-height: min(410px, 72vh);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid rgba(237, 240, 243, 0.96);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--chat-text) !important;
    box-shadow: 0 18px 42px rgba(20, 30, 45, 0.16);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform-origin: right bottom;
    animation: chatActionPopoverIn 160ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

    .chat-message-action-popover::after {
        content: "";
        position: absolute;
        right: 22px;
        bottom: -7px;
        width: 14px;
        height: 14px;
        border-right: 1px solid rgba(237, 240, 243, 0.96);
        border-bottom: 1px solid rgba(237, 240, 243, 0.96);
        background: rgba(255, 255, 255, 0.96);
        transform: rotate(45deg);
    }

.chat-message-action-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(20, 30, 45, 0.05);
    color: #7b8494;
}

.chat-message-action-title {
    padding: 2px 34px 8px 2px;
    color: #333b49 !important;
    font-weight: 900;
    line-height: 1.2;
}

.chat-message-action-loader,
.chat-message-action-error,
.chat-message-member-empty,
.chat-delete-reason,
.chat-edit-reason,
.chat-report-reason {
    color: var(--chat-muted) !important;
    font-weight: 750;
    line-height: 1.35;
}

.chat-message-action-loader {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}

    .chat-message-action-loader::before {
        content: "";
        width: 13px;
        height: 13px;
        border-radius: 50%;
        border: 2px solid currentColor;
        border-top-color: transparent;
        animation: chatSpin 720ms linear infinite;
    }

.chat-message-action-error {
    padding: 10px 2px 2px;
    color: #d04444 !important;
}

.chat-message-member-section {
    padding: 8px 0;
    border-top: 1px solid rgba(237, 240, 243, 0.82);
}

.chat-message-member-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    color: #4b5566 !important;
    font-weight: 900;
}

    .chat-message-member-section-title strong {
        min-width: 22px;
        min-height: 22px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        background: rgba(76, 175, 80, 0.10);
        color: var(--chat-accent-dark) !important;
        font-weight: 900;
    }

.chat-message-member-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 118px;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
}

.chat-message-member-row {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 3px 4px;
    border-radius: 11px;
    background: rgba(20, 30, 45, 0.025);
    cursor: pointer;
    transition: background-color 140ms ease, transform 140ms ease;
}

    .chat-message-member-row:hover {
        background: rgba(76, 175, 80, 0.08);
        transform: translateX(1px);
    }

.chat-message-member-avatar {
    width: 24px;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    object-fit: cover;
    background: #fff;
    border: 1px solid rgba(237, 240, 243, 0.95);
}

.chat-message-member-row span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    color: #3f4858 !important;
    font-weight: 850;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-message-member-row small {
    color: var(--chat-muted) !important;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-message-action-footer {
    padding-top: 8px;
    border-top: 1px solid rgba(237, 240, 243, 0.82);
}


.chat-message-reported-notice {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 20px;
    margin: 0 0 8px;
    padding: 7px 9px;
    border-radius: 12px;
    background: rgba(232, 77, 77, 0.10);
    color: #c83f3f !important;
    font-weight: 900;
}

.chat-message-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 7px;
}

    .chat-message-action-buttons.is-single {
        grid-template-columns: 1fr;
    }

.chat-message-secondary-action,
.chat-report-message,
.chat-message-edit-save,
.chat-message-edit-cancel {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 12px;
    font-weight: 900;
    line-height: 1;
    transition: transform 150ms ease, opacity 150ms ease, background-color 150ms ease;
}

.chat-message-secondary-action {
    background: rgba(20, 30, 45, 0.06);
    color: #4b5566 !important;
}

    .chat-message-secondary-action.is-copied {
        background: rgba(76, 175, 80, 0.13);
        color: var(--chat-accent-dark) !important;
    }

    .chat-message-secondary-action:disabled,
    .chat-report-message:disabled,
    .chat-message-edit-save:disabled,
    .chat-message-edit-cancel:disabled {
        cursor: not-allowed;
        opacity: 0.58;
    }

.chat-message-edit-panel {
    margin: 8px 0;
    padding: 8px;
    border: 1px solid rgba(237, 240, 243, 0.92);
    border-radius: 14px;
    background: rgba(20, 30, 45, 0.025);
}

.chat-message-edit-textarea {
    width: 100%;
    min-height: 74px;
    max-height: 130px;
    padding: 8px 9px;
    border: 1px solid rgba(218, 225, 234, 0.95);
    border-radius: 12px;
    outline: none;
    resize: vertical;
    background: #ffffff;
    color: var(--chat-text) !important;
    font-weight: 750;
    line-height: 1.4;
}

.chat-message-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 7px;
}

.chat-message-edit-cancel {
    padding: 0 12px;
    background: rgba(20, 30, 45, 0.07);
    color: #596170 !important;
}

.chat-message-edit-save {
    padding: 0 14px;
    background: var(--chat-accent);
    color: #ffffff !important;
}

.chat-report-message {
    width: 100%;
    background: #f08d32;
    color: #ffffff !important;
}

    .chat-report-message:disabled {
        background: rgba(20, 30, 45, 0.10);
        color: rgba(90, 100, 115, 0.70) !important;
    }

    .chat-report-message.is-reporting {
        filter: saturate(0.72);
        opacity: 0.82;
    }

.chat-edit-reason,
.chat-report-reason {
    min-height: 16px;
    margin: 5px 0 7px;
    text-align: center;
}

.chat-delete-for-everyone {
    width: 100%;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 13px;
    background: #e84d4d;
    color: #ffffff !important;
    font-weight: 900;
    transition: transform 150ms ease, opacity 150ms ease, filter 150ms ease;
}

    .chat-message-secondary-action:active,
    .chat-report-message:active,
    .chat-message-edit-save:active,
    .chat-message-edit-cancel:active,
    .chat-delete-for-everyone:active {
        transform: scale(0.98);
    }

    .chat-delete-for-everyone:disabled {
        cursor: not-allowed;
        background: rgba(20, 30, 45, 0.10);
        color: rgba(90, 100, 115, 0.68) !important;
        box-shadow: none;
    }

    .chat-delete-for-everyone.is-deleting {
        filter: saturate(0.75);
        opacity: 0.8;
    }

.chat-delete-reason {
    min-height: 16px;
    margin-top: 6px;
    text-align: center;
}

body.chat-keyboard-open {
    overscroll-behavior: none;
}

    body.chat-keyboard-open #MessagesArea,
    body.chat-keyboard-open .messages-area {
        overscroll-behavior-y: contain;
        scroll-behavior: smooth;
        transition: height 210ms cubic-bezier(0.16, 1, 0.3, 1), max-height 210ms cubic-bezier(0.16, 1, 0.3, 1), padding-bottom 210ms cubic-bezier(0.16, 1, 0.3, 1);
    }

body.chat-keyboard-transitioning #MessagesArea,
body.chat-keyboard-transitioning .messages-area {
    will-change: height, max-height, padding-bottom;
}

body.chat-keyboard-transitioning .chat-input-container {
    will-change: bottom, transform;
}

body.chat-keyboard-open .chat-input-container {
    position: fixed !important;
    left: var(--chat-input-left, 0px) !important;
    right: auto !important;
    bottom: var(--chat-keyboard-bottom, 0px) !important;
    width: var(--chat-input-width, 100%) !important;
    z-index: 2147483000;
    padding-bottom: 7px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border-top: 1px solid rgba(237, 240, 243, 0.86);
    box-shadow: 0 -8px 22px rgba(20, 30, 45, 0.08);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

@media (max-width: 768px) {
    .chat-message-action-popover {
        right: 0;
        width: min(200px, calc(100vw - 18px));
        max-height: min(390px, 68vh);
        border-radius: 16px;
    }

    .chat-message-member-list {
        max-height: 104px;
    }
}

@keyframes chatLongPressFeedback {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(0.965);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes chatEditedPulse {
    0% {
        box-shadow: 0 0 0 rgba(76, 175, 80, 0);
    }

    35% {
        box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.16);
    }

    100% {
        box-shadow: var(--chat-shadow-soft);
    }
}

@keyframes chatActionPopoverIn {
    0% {
        opacity: 0;
        transform: translate3d(0, 8px, 0) scale(0.96);
    }

    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes chatMessageRemove {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-5px) scale(0.96);
        filter: blur(4px);
    }
}

.chat-image-box.openImage {
    cursor: zoom-in;
}

.chat-message-item.is-other .chat-message-action-popover {
    left: 0;
    right: auto;
    transform-origin: left bottom;
}

    .chat-message-item.is-other .chat-message-action-popover::after {
        left: 22px;
        right: auto;
    }

@media (max-width: 768px) {
    body.chat-keyboard-open .chat-message-action-popover {
        max-height: 52vh;
    }

    .chat-message-action-buttons {
        grid-template-columns: 1fr;
    }
}

/* Yeni medya / emoji / yükleme / düzenlendi / obje kartı destekleri */
.chat-message-item.is-object-card {
    justify-content: center;
    margin: 8px 0;
}

.chat-structured-message-wrap {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chat-action-card,
.chat-object-card,
.globalObjectCard.w-100 {
    width: 100% !important;
}

.chat-object-card {
    max-width: 560px;
    animation: chatMessageIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

    .chat-object-card .card,
    .globalObjectCard .card {
        border-radius: var(--chat-radius) !important;
        border-color: var(--chat-border) !important;
        box-shadow: var(--chat-shadow-soft) !important;
    }

    .chat-object-card .chat-image-box,
    .chat-object-card .slider-container.chat-image-box {
        width: 70px !important;
        height: 70px !important;
        margin: 0;
        border-radius: 12px !important;
    }

.chat-card-sender-info {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 0 5px;
    color: var(--chat-muted) !important;
    opacity: 0.78;
    line-height: 1;
}

    .chat-card-sender-info.is-meta-mine {
        flex-direction: row-reverse;
        justify-content: flex-start;
    }

.chat-edited-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: rgba(123, 132, 148, 0.82) !important;
    font-weight: 800;
    line-height: 1;
    opacity: 0.86;
    white-space: nowrap;
}

.chat-edited-inline-wrap {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-top: 4px;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
}

.chat-edited-inline-label {
    padding-top: 1px;
}

.chat-message-item.is-mine .chat-edited-label {
    color: rgba(255, 255, 255, 0.76) !important;
}

.chat-video-box {
    display: block;
    width: min(280px, 70vw);
    max-width: 100%;
    margin: 2px 0 6px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(237, 240, 243, 0.9);
    background: #111827;
}

.chat-message-video {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    background: #111827;
}

.chat-emoji-panel {
    display: none;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 4px;
    margin: 6px 4px 0;
    padding: 8px;
    border: 1px solid rgba(237, 240, 243, 0.92);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--chat-shadow-soft);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

    .chat-emoji-panel.is-visible {
        display: grid;
        animation: chatActionPopoverIn 150ms cubic-bezier(0.16, 1, 0.3, 1) both;
    }

.chat-emoji-option {
    min-width: 0;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: rgba(20, 30, 45, 0.045);
    color: var(--chat-text) !important;
    line-height: 1;
    transition: transform 140ms ease, background-color 140ms ease;
}

    .chat-emoji-option:active {
        transform: scale(0.94);
        background: rgba(76, 175, 80, 0.12);
    }

.chat-upload-status,
.chat-upload-status.is-visible {
    display: none !important;
}

.chat-upload-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

    .chat-upload-status-row span,
    .chat-upload-status-row strong {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        color: inherit !important;
        font-weight: 850;
        line-height: 1;
    }

.chat-upload-progress {
    width: 100%;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(20, 30, 45, 0.08);
}

    .chat-upload-progress span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: var(--chat-accent);
        transition: width 160ms ease;
    }

.chat-withdraw-report {
    width: 100%;
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-bottom: 6px;
    border: 0;
    border-radius: 12px;
    background: rgba(76, 175, 80, 0.12);
    color: var(--chat-accent-dark) !important;
    font-weight: 900;
    line-height: 1;
    transition: transform 150ms ease, opacity 150ms ease, background-color 150ms ease;
}

    .chat-withdraw-report:disabled {
        cursor: not-allowed;
        background: rgba(20, 30, 45, 0.10);
        color: rgba(90, 100, 115, 0.68) !important;
    }

    .chat-withdraw-report.is-withdrawing {
        filter: saturate(0.75);
        opacity: 0.82;
    }

.chat-message-action-buttons button,
.chat-message-secondary-action,
.chat-report-message,
.chat-message-edit-save,
.chat-message-edit-cancel,
.chat-delete-for-everyone,
.chat-withdraw-report {
    min-height: 20px;
}

    .chat-message-action-buttons button i,
    .chat-message-action-buttons button span,
    .chat-message-secondary-action i,
    .chat-message-secondary-action span,
    .chat-report-message i,
    .chat-report-message span,
    .chat-message-edit-save i,
    .chat-message-edit-save span,
    .chat-message-edit-cancel i,
    .chat-message-edit-cancel span,
    .chat-delete-for-everyone i,
    .chat-delete-for-everyone span,
    .chat-withdraw-report i,
    .chat-withdraw-report span,
    .chat-file-link i,
    .chat-file-link span,
    .chat-selected-files i,
    .chat-selected-files span,
    .chat-selected-files button,
    .chat-attachment-menu-btn i,
    .chat-attachment-menu-btn span,
    .chat-attachment-menu-btn strong {
        color: inherit !important;
    }

.chat-attachment-btn span {
    color: inherit !important;
    line-height: 1;
}

@media (max-width: 768px) {
    .chat-structured-message-wrap,
    .chat-object-card {
        max-width: 100%;
    }

    .chat-video-box {
        width: min(255px, 76vw);
    }

    .chat-emoji-panel {
        grid-template-columns: repeat(8, minmax(0, 1fr));
        padding: 7px;
    }

    .chat-emoji-option {
        height: 29px;
    }
}

@media (max-width: 390px) {
    .chat-emoji-panel {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .chat-video-box {
        width: min(240px, 80vw);
    }
}

.chat-message-action-buttons button {
    min-height: 20px !important;
}
