/* Inline Chat Styles */

.inline-chat-section {
    max-width: 700px;
    margin: 3rem auto 3rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.inline-chat-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.inline-chat-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.inline-chat-icon svg {
    width: 22px;
    height: 22px;
}

.inline-chat-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: left;
}

.inline-chat-header p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    opacity: 0.9;
    text-align: left;
}

.inline-chat-messages {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f9fafb;
}

.inline-chat-message {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.75rem;
    animation: messageSlide 0.3s ease-out;
}

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

.inline-chat-message.user {
    justify-content: flex-end;
}

.inline-chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.inline-chat-avatar svg {
    width: 20px;
    height: 20px;
    color: white;
}

.inline-chat-message.user .inline-chat-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.inline-chat-content {
    max-width: 70%;
    padding: 0.875rem 1.125rem;
    border-radius: 14px;
    line-height: 1.5;
    font-size: 0.9375rem;
}

.inline-chat-message.assistant .inline-chat-content {
    background: white;
    color: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.inline-chat-message.user .inline-chat-content {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

/* Typing Indicator */
.inline-typing {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.125rem;
    background: white;
    border-radius: 14px;
    width: fit-content;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.inline-typing.active {
    display: flex;
}

.inline-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Input */
.inline-chat-input {
    padding: 1rem 1.25rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
}

.inline-chat-input input {
    flex: 1;
    padding: 0.75rem 1.125rem;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.2s;
}

.inline-chat-input input:focus {
    border-color: #2563eb;
}

.inline-chat-input button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.inline-chat-input button:hover:not(:disabled) {
    transform: scale(1.05);
}

.inline-chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.inline-chat-input button svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* Compact Upload */
.upload-compact {
    text-align: center;
    margin: 2rem 0 1.5rem;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-upload svg {
    flex-shrink: 0;
}

.upload-hint {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Scrollbar */
.inline-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.inline-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.inline-chat-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.inline-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Mobile */
@media (max-width: 768px) {
    .inline-chat-section {
        margin: 2rem 1rem;
    }

    .inline-chat-content {
        max-width: 80%;
    }

    .btn-upload {
        width: 100%;
        justify-content: center;
    }
}
