/* Full Height Chat Layout */
    .chat-disclaimer .alert {
        padding: 0.75rem 1rem;
        margin: 0.5rem auto 0;
        font-size: 0.875rem;
        border-radius: 0.375rem;
        border: 1px solid rgba(255, 140, 0, 0.3);
        background: rgba(255, 140, 0, 0.05);
    }

    .chat-disclaimer .alert-heading {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        font-weight: 600;
    }

    .chat-disclaimer ul {
        margin-bottom: 0.5rem;
        padding-left: 1.125rem;
        font-size: 0.8rem;
    }

    .chat-disclaimer li {
        margin-bottom: 0.125rem;
    }

.dropdown-menu {
    z-index: 1050;
}

.chat-input-area .dropdown-menu {
    inset: unset !important;
    top: calc(100% + 0.25rem) !important;
    left: 0 !important;
    position: fixed !important;
    z-index: 1060;
}

/* Modern message styling */
.message {
    margin-bottom: 1.5rem;
    animation: messageSlideIn 0.3s ease-out;
}

.message-bubble {
    max-width: 75%;
    border-radius: 1.125rem;
    padding: 0.875rem 1.125rem;
    position: relative;
    word-wrap: break-word;
    line-height: 1.5;
    transition: transform 0.4s ease;
    overflow: hidden;
}

    .message-bubble::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at center, rgba(255, 193, 7, 0) 0%, rgba(255, 193, 7, 0) 100%);
        opacity: 0;
        transition: opacity 0.4s ease;
        border-radius: inherit;
        pointer-events: none;
    }

    .message-bubble p:first-child {
        margin-bottom: 0;
    }

#workflow-task-chat-message-content p:last-child {
    margin-bottom: 0 !important;
}

/* User messages - modern gradient bubble */
.user-message {
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
    align-items: flex-end;
}

    .user-message .message-bubble {
        background:var(--bs-light);
        color: var(--bs-black);
        border-bottom-right-radius: 0.375rem;
    }

/* AI messages - clean, professional styling */
.ai-message .message-bubble {
    background: var(--bs-secondary);
    color: var(--bs-body-color);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 0.375rem;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
}

/* Professional input styling */
.chat-input-group {
    background: var(--bs-dark);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

    .chat-input-group .form-control {
        border: none;
        background: transparent;
        color: var(--bs-body-color);
        padding: 0.75rem 1rem;
        resize: none;
        min-height: 2.75rem;
    }

        .chat-input-group .form-control:focus {
            box-shadow: none;
            background: transparent;
        }

    .chat-input-group .btn {
        border: none;
        border-left: 1px solid var(--bs-border-color);
        border-radius: 0;
        padding: 0.75rem 1rem;
    }

        .chat-input-group .btn:last-child {
            border-top-right-radius: 0.5rem;
            border-bottom-right-radius: 0.5rem;
        }

/* Attach button styling */
.attach-btn {
    background: var(--bs-secondary);
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

    .attach-btn:hover {
        background: var(--bs-primary);
        color: var(--bs-dark);
        border-color: var(--bs-primary);
    }

/* Send button styling */
.send-btn {
    background: var(--bs-primary);
    color: var(--bs-dark);
    border-color: var(--bs-primary);
    font-weight: 600;
}

    .send-btn:hover {
        background: var(--bs-warning);
        color: var(--bs-dark);
        border-color: var(--bs-warning);
    }

/* File attachment badges */
.file-attachments {
    margin-bottom: 0.75rem;
}

.file-badge {
    background: var(--bs-primary);
    color: var(--bs-dark);
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

    .file-badge .btn-close {
        font-size: 0.7rem;
        opacity: 0.8;
    }

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bs-primary);
    animation: typingPulse 1.4s infinite ease-in-out;
}

    .typing-dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .typing-dot:nth-child(3) {
        animation-delay: 0.4s;
    }

/* Animations */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingPulse {
    0%, 60%, 100% {
        transform: scale(0.8);
        opacity: 0.4;
    }

    30% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .message-bubble {
        max-width: 85%;
        padding: 0.75rem 1rem;
    }

    .chat-disclaimer .alert {
        margin: 0.25rem;
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

.message-highlighted {
    background-color: rgba(255, 140, 0, 0.15) !important;
    border: 1px solid var(--bs-primary) !important;
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.3) !important;
    transform: scale(1.01);
    transition: all 0.3s ease;
}

    .message-highlighted::before {
        background: radial-gradient(circle at center, rgba(255, 140, 0, 0.25) 0%, rgba(255, 140, 0, 0.1) 50%, transparent 100%) !important;
        opacity: 1 !important;
        animation: highlightPulse 1.3s ease-out;
    }

@keyframes highlightPulse {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.01);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}