/**
 * Chat-specific styles for PAM AI Frontend
 * Custom styles that complement Tailwind CSS
 */

/* Chat container height matching prototype */
.chat-container {
    height: calc(100vh - 160px);
}

@media (min-width: 768px) {
    .chat-container {
        height: calc(100vh - 96px);
    }
}




/* Enhanced focus styles for input container */
.chat-input-container .input-container:focus-within {
    border-color: #9ca3af;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}


/* Textarea styling to match prototype */
#message-input {
    line-height: 1.5;
    min-height: 56px;
    height: 56px;
    resize: none;
    transition: height 0.2s;
    overflow-y: hidden;
}


/* Thinking indicator animation delays */
.thinking-dot-1 {
    animation-delay: 0s;
}

.thinking-dot-2 {
    animation-delay: 0.2s;
}

.thinking-dot-3 {
    animation-delay: 0.4s;
}

/* File upload button hover effects */
.remove-file-btn {
    z-index: 5;
    transition: transform 0.1s ease-in-out;
}

.remove-file-btn:hover {
    transform: scale(1.05);
}


/* Message content styling */
.message-content {
    transition: height 0.1s ease-out;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.6;
}

/* Code block improvements */
.message-content pre {
    position: relative;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    margin: 16px 0;
    overflow-x: auto;
}

/* Code copy button enhancements */
.code-copy-btn {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.code-copy-btn:hover {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Ensure code blocks have proper spacing for the button */
.message-content pre code {
    padding-right: 48px;
    display: block;
    padding: 16px;
}

/* Drag and drop overlay animations */
#drag-drop-overlay {
    transition: opacity 0.2s ease-in-out, backdrop-filter 0.2s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

#drag-drop-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

#drag-drop-overlay .text-center {
    transform: scale(0.95);
    transition: transform 0.2s ease-out;
}

#drag-drop-overlay:not(.hidden) .text-center {
    transform: scale(1);
    animation: bounceIn 0.3s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* File upload acknowledgment animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Mobile-specific adjustments */
@media (max-width: 640px) {
    .chat-container {
        height: calc(100vh - 160px);
    }

    .response-container {
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    .chat-input-container {
        touch-action: pan-y;
    }

    #drag-drop-overlay .text-center {
        padding: 2rem;
        margin: 1rem;
    }
}