/* Custom Scrollbar for Chat Area */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceSubtle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-bounce-subtle {
    animation: bounceSubtle 2s ease-in-out infinite;
}

/* Font Setting */
body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Message Bubble Styles (Channel Talk Influenced) */
.message-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    animation: fadeIn 0.4s ease-out forwards;
}

.message-bubble {
    max-width: 85%;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

/* Admin/Bot Message (Left) */
.message-bot .message-bubble {
    background: #f1f5f9;
    color: #1e293b;
    border-radius: 4px 8px 8px 8px;
    align-self: flex-start;
}

/* User Message (Right) */
.message-user .message-bubble {
    background: white;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 8px 8px 4px 8px;
    align-self: flex-end;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01);
}

.message-time {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

.message-user .message-time {
    align-self: flex-end;
    margin-right: 4px;
}

.message-bot .message-time {
    align-self: flex-start;
    margin-left: 4px;
}

/* Image Bubble Styles */
.img-thumbnail {
    max-width: min(280px, 100%);
    max-height: 300px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.img-thumbnail:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* Image Viewer Modal Styles */
#image-viewer {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.98);
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 80px 0 24px 0;
}

#viewer-close {
    position: absolute;
    top: 24px;
    right: 24px;
    color: white;
    cursor: pointer;
    padding: 10px;
    z-index: 1010;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.2s ease;
}

#viewer-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
}

.viewer-container {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    user-select: none;
}

#viewer-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

#viewer-gallery {
    position: relative;
    width: 100%;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

#viewer-gallery::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-item.active {
    opacity: 1;
    border-color: #3b82f6;
    transform: scale(1.1);
}