#chatHistoryLoader {
    display: block;
}

.chat-window {
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(.96);
    transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1), visibility .25s;
}

    .chat-window.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }
.quick-replies.show {
    display: block;
}

.quick-replies[hidden] {
    display: none !important;
}


.message-attachment-image {
    display: block;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
}

.message-attachment-image-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 90px;
    max-height: 320px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--bs-border-color, #e5e7eb);
    border-radius: 12px;
    background: var(--bs-tertiary-bg, #f3f4f6);
    cursor: pointer;
}

.message-attachment-preview {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    opacity: 0;
    transition: opacity .2s ease;
}

    .message-attachment-preview.is-loaded {
        opacity: 1;
    }

    .message-attachment-preview.is-load-failed {
        opacity: 0;
    }

.message-attachment-image-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: var(--bs-secondary-color, #6b7280);
    font-size: 12px;
    pointer-events: none;
}

.message-attachment-image-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 2px 0;
}

    .message-attachment-image-meta .message-attachment-size {
        padding-left: 4px;
    }

/* Image overlay */

.message-image-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    border-radius: 10px;
}

    .message-image-container .message-attachment-image-button {
        display: block;
        max-width: 100%;
    }

.message-image-bottom {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}

.message-image-container:hover .message-image-bottom,
.message-image-container:focus-within .message-image-bottom {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.message-image-info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}

.message-image-name {
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-image-info .message-attachment-size {
    color: rgba(255, 255, 255, .75);
    font-size: 11px;
}

.message-image-bottom .message-attachment-download {
    flex: 0 0 auto;
}

/* =========================================================
   IMAGE LIGHTBOX
   ========================================================= */

.chat-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, .85);
}

    .chat-image-lightbox.is-open {
        display: flex;
    }

.chat-image-lightbox-img {
    display: block;
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
}

.chat-image-lightbox-close {
    position: absolute;
    top: 16px;
    right: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

    .chat-image-lightbox-close:hover {
        background: rgba(255, 255, 255, .28);
    }


.online-dot {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 9px;
    height: 9px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #22c55e;
    transition: background-color .25s ease;
}

    .online-dot.offline {
        background: #94a3b8;
    }


.admin-status.online {
    color: #fff;
}

.admin-status.offline {
    color: #d1d5db;
}

    .admin-status.offline > span:first-child {
        background: #94a3b8;
    }

/* =========================================================
   CATERIN CHAT - CUSTOM ANIMATIONS
   ========================================================= */

@keyframes message-status-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes chat-history-boundary {
    0%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(4px);
    }

    70% {
        transform: translateY(-2px);
    }
}